Age | Commit message (Collapse) | Author | Files | Lines |
|
Had been planning to use a more powerful preprocessor for CSS for a
while, so that I can also reorganize and clean up the CSS a bit. The
cleanup will come later, this is the first step to reorganize the build
system a bit and remove skingen.pl.
I moved all generated static assets to static/g/ (for _g_enerated),
including icons.png and js files. This simplifies management of
static/f/ and static/s/, which are fully in git.
Skins are now defined as sass files in css/skins/ with their images in
static/s/ using plain directory structure.
|
|
VNDB::Skins now behaves the same way as VNDB::Config - it provides a
single function that returns all the info you'll need.
This removes the tuwf->{skins} global variable, making skin-querying
code independent of the TUWF object, and, again, moving some
library-related functionality out of vndb.pl.
|
|
This rather significantly speeds up development builds. Also simplifies
skingen.pl and its config a bit.
The new compressed files are written to /s/*/style.min.css{,.gz}, it is
up to the web server to serve those instead of /s/*/style.css.
|
|
Should improve page loading time, reduce server load and speed up CSS
generation by a totally insignificant amount.
I did run into some trouble with the removal of boxbg.png, because
apparently there was something magical about that image that made
browsers render it in a different color than the one specified upon
creation. I've adjusted the boxbg color of the 'angel' skin accordingly,
but other skins may also have a slight color difference with this
change. Some details are at http://s.blicky.net/19/colortest.html
|
|
|
|
Compresses a little better. I reduced the number of iterations required
to find the optimal image size in spritegen.pl, but generating the
icons.png is *incredibly slow* when combining zopflipng with the 'slow'
option. It's possible to parallelize the calculation and use multiple
cores to speed it up, but that seems overkill.
Some icons.png compression stats:
METHOD SIZE RUNTIME
default 18103 <1sec
slow 17941 few secs
pngcrush 15385 <1sec
pngcrush+slow 15148 few mins
zopflipng 14986 few secs
zopflipng+slow 14898 ~1 hour
|
|
It became a bit of a hassle to keep updating that file manually in Gimp.
This script performs surprisingly well for our set of icons.
|
|
This makes sure that these also get forced reloaded on a version change.
|
|
And updated skingen.pl and vndb.pl to make use of this abstraction.
|
|
|
|
The minified and gzipped CSS file is now 0.7kB smaller than the
non-minified but gzipped CSS file. That's significant enough on ~5kB.
|
|
|
|
Simply set the 'maintitle' to '0'
|
|
|
|
...by removing all newlines, whitespace and comments from the
generated CSS file.
None of the CSS sent to the browser is maintained by hand now, so
adding some compression is easy. :-)
This compression is disabled if the debug config flag is enabled,
considering debugging an unreadable CSS file isn't fun.
|
|
|
|
So, instead of using separate smaller CSS files to overwrite
directives in the main (/static/f/style.css) file, I decided
to generate one CSS file for each skin, which includes everything
needed to render the page. The template for this skin is now
/data/skingen/style.css.
I just don't feel like maintaining two separate files when
changing something to the CSS.
Also converted the old layout into a skin directory (angel),
since the default skin isn't in the CSS template anymore.
|
|
generator
|
|
...but not yet in the skin generator, as I haven't really decided
yet whether to generate those colors based on the other colors, or
to make them configurable from the skin config (= more work for the
people who create the skins)
|
|
How it works:
Create new directory in static/s/
Create a 'conf' file (see the test skin for a template)
Run skingen.pl, which will generate a style.css and boxbg.png
This process will probably be automated using a simple web interface
or something...
There's no skin selector yet, so Util/LayoutHTML.pm has to be modified
to view the generated skin.
|