Age | Commit message (Collapse) | Author |
|
|
|
Add support for header elements with inline math expressions
|
|
|
|
Many websites employ the [MathJax](https://www.mathjax.org/) library for dynamically rendering LaTeX math expressions on the client side. I expect to require support for doing just that in the future. But as with syntax highlighting I am of the opinion that this kind of stuff should be performed once during site compilation instead of wasting ressources by forcing each client to do this job for every single page request.
Luckily there is a [MathJax-node](https://github.com/mathjax/MathJax-node) module that allows using the _MathJax_ library on the server side.
This commit adds support for rendering math expressions written in Markdown respectively LaTeX as follows: `$$1 + 1 \neq 0$$` on the server side.
This required the introduction of a new `math_highlighter` helper template in `formatter.xsl` based on the `tex2html` utility provided by _MathJax-node_. This formatter is matched against the (Markdown parser generated) `script` node in `formatter.xsl`'s _embellish_ mode. The HTML rendering of the expression is then embedded in a `p class="math"` node. This explicit labeling allows `master.xsl` to include the `math.css` rules only for pages that actually contain math expressions.
Note that the XHTML rendering utility stylesheet `xhtml.xsl` currently adds a XML comment to each `span` node. This is a workaround to prevent _Xalan_ from collapsing "empty" `span` tag pairs into single nodes which otherwise leads to rendering errors as it is not valid HTML and is interpreted as a wrong tree structure by the browser.
Note that the CSS rules declared in `math.css` are explicitly not part of the MIT licensed part of this repository but where generated by _MathJax_.
As there is currently no _productive_ content making use of math expressions a demo page is available under `page/math_test/`.
|
|
I am of the opinion that a website has no business messing around with the client's default fonts beyond defining the style and size relative to the default font size.
|
|
|
|
* removed background image and as such it's fixed pixel width
** i.e. the layout is now completely dependent on the basic font size and scales accordingly
* revamped master template and CSS to allow for nodes with varying lengths instead of truncating everything depending on the background width
* increased font size of tag and archive pages
* increased overall line height to improve readability
* improved CSS to e.g. make use of `last-child` instead of adding `last` classes during static site generation
* removed _microblog_ entries from archive as I have more or less stopped using _Twitter_
|
|
* extracted navigation and tag list style into `buttonlist` class
* navigation is now aligned left and non-overlapping on small screens
|
|
|
|
|
|
* the former also works when CSS is not supported while the latter leads to unseparated tag links
|
|
* both the CSS and master template markup contained cruft from the previous blog version and its slightly different layout
* removed unnecessary distinction between footer and its _taglist_ as the old footer element is now only a _taglist_
** promoted previous `last_line` to `footer` as it is the actual footer
* unified the different list styles as much as possible
** e.g. introduced new `topline` attribute instead of declaring the title-separator line for each style separately
** removed `taglist` class by declaring its rules directly in the `tags` id
** removed now unnecessary `archivtag` class
** introduced `sparselist` class which enables list such as the one contained the latest microblog entries to have extra padding
* merged `list_tags` helper template into primary master template
** this separation was not only unnecessary but decreased the readability as it provided no real encapsulation
|
|
* eliminated `last_item` list item class by fixing its padding
|
|
|
|
* gap between columns was needed because the alignment of all paragraphs was changed to justify
* increased overall browser compatibility of the column layout
** firefox now keeps elements with the column class together if possible
|
|
* XHTML elements "h2" and "h3" are replaced with "h3" and "h4" respectively
** modified all existing contents accordingly
** this was done to avoid the gap between the primary heading and subheadings in the markdown depiction of the contents
* fleshed out the InputXSLT project page with further information
|
|
* comment paragraphs were neither separated nor justified
* columns on archive page were incororrectly split inside their content in Chromium
** i.e. added "column-break-inside: avoid" property
|
|
|
|
* Isso improvements
** textarea placeholder font-color
** comment footer font-size
* lines of "pre" elements did not break correctly
* minified all CSS expressions using YUI
|
|
* [isso](http://posativ.org/isso/) is a Disqus like commenting system written in Python
** self-hosted i.e. no privacy implications
** lightweight and provides all the features I require for this blog
* I thought about implementing a commenting system in InputXSLT but sadly I just don't have the time to think of and implement a reasonable XSLT based solution
** maybe a simple REST service for pushing XML from the client into article-dependend comment directories can be implemented in the future
* added basic CSS styling for isso comments simmilar to how they currently look in the old Symphony CMS based blog
|
|
|
|
* fixed prettylist CSS to work in both WebKit and Gecko
|
|
* e.g. removing the target directory before each regeneration and symlinking CSS files
** this will be extended to include ressource directories and so on
* renamed "formatter.xsl" stylesheet to "helper.xsl" as it now includes various helper templates
* finally checked the main CSS into the VCS
|