I have tried the four or so answers here to display MathJax on weebly (free account). Is there any way that would actually produce inline equations?
Any hint would be super appreciated!
Thanks!
Yes, it is possible.
MathJax
I took the example from here: http://docs.mathjax.org/en/latest/basic/mathematics.html#basic-mathematics
Steps
Go to your Weebly theme section and click on Edit HTML/CSS.
Edit the header.html and place this snippet inside it:
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
<script type="text/javascript" id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax#3/es5/tex-chtml.js"></script>
Add your equation inline using 'Embed Code'.
Voila! (It still might render as LaTex code in the editor but will show up as proper equation when you publish the page.)
Related
I am using asciidoctor-fopub to generate a pdf from an asciidoc.
The page number is added in the middle of the page footer. I would like to move it to the far right. I am convinced that this is doable. But I can't find any example of how to customize the page footer properly.
Since you already have asciidoc files it might be easier to use asciidoctor-pdf directly. With asciidoctor-pdf it is possible to design your own footer with themes. How to apply themes is described here.
Can I put a HTML code in my chrome extension's icon? According to the Google API (setBadgeText) this isn't possible.
Is there any way to put it there?
While .setBadgeText is, as implied by name, text-only, you can draw anything and set that as your icon.
You'll need to draw on a <canvas>, extract image data and use .setIcon({imageData: /*...*/}) to update the icon.
See this question for a brief example, and maybe this article.
It's not quite "using HTML", but with some work you can output anything to your icon.
Badge is plain text only as can be seen in source code. There's no way around.
I want to customize the navigation bar in my theme. I searched for the CSS file that styles the navigation bar in the css directory but I couldn't find it.
In the nagivation.vm file, the navigation is declared as follows:
<nav class="$nav_css_class" id="navigation">
and using firebug I found out that the class is
sort-pages modify-pages.
I appreciate your help.
Thanks
The css file is called css/navigation.css. However, best practice is to do all modifications in _diffs/css/custom.css - this file is loaded last and all settings in there will override those in navigation.css and any other files. As a side effect, you'll have all of your settings neatly separated from Liferay's and are in a better position during updates.
custom.css is supposed to be empty in all themes that are meant for extension. If you start with the classic theme, you'll see that custom.css in there is not empty - this means, that the classic theme is not meant to be extended. Technically you can still do so of course, but Liferay might change this theme without notice in future versions and you'll end up upgrading then.
Just starting off with YUI and I'm struggling a bit.
I am very interested in the example: Button Control: Using A Menu Button To Replace A Element here http://developer.yahoo.com/yui/examples/button/button-menu-select_log.html .
The example seems very well documented and explained, but I am struggling to get it to work in jsfiddle or codepen.
I guess that I am not sure on how to start the javascript.
What I've been doing is copying and pasting the HTML, CSS, and Javascript into jsfiddle, but I think there is something missing along the lines of YUI().use('node', function (Y) {
I was wondering if someone could maybe take that example and pop it in a jsfiddle or codepen for me, I really have tried very hard to help myself but now feel a bit hopeless.
FWIW I even struggle to get a simple YUI 'Hello World' example going in jsfiddle.
Thank you very much for any help!
Well that example is YUI2, not YUI3, so it's not going to work unless you wrap it in a yui use and bring them in that way YUI 2 in YUI 3
as I found out a few days ago when you click an extension button and popup shows up, its height is much higher than it needs to be if you need the height to be less than 350px. When something happens in the popup (animation e.g.) the height is adjusted properly according to the content. Setting height to html, body and general wrapper element didn't help. It might be some bug in the latest update of Chrome, I cannot test it in earlier builds, because of autoupdate.
I'll be thankful for any thoughts and advices.
Libor
UPDATE: I started to examine what can possibly cause this behaviour and found out this happens because of Twitter and Google Plus share buttons. They both modify DOM structure adding script tag which adds iframe. When commented, popup bubble appeared in correct size. The weird thing is facebook like button script does more or less the same, but it doesn't mess up the layout at all.
Like it was said here, the good solution to solve this problem is changing <html> to <!doctype html>
Same thing here with my extension and Chrome 19 on Windows 7. I must note that there were no problems with the previous version of Chrome. As you stated the issue shows up only on the first appearance of the popup - it shrinks correctly afterwards).
I'm using jQuery in my extension and I think I've partially solved it by adding
$("body").fadeOut(10).fadeIn(50);
though it doesn't always work (it probably will if you increment the fadeIn delay but!). Hope someone can provide a better solution to this.
EDIT. This should be guaranteed to always work (using your hint) although the user might see the resizing happening for a fraction of second:
$(window).load(function() {
$("body").fadeOut(10, function() { $(this).show(); });
});