Difference between revisions of "S2 Cookbook: Blank Layout and Theme Layers"
From Dreamwidth Notes
Foxfirefey (Talk | contribs) (Created page with "== Layout == <syntaxhighlight lang="s2">layerinfo "type" = "layout"; # put the layout's name here layerinfo "name" = ""; # put your username here layerinfo "author_name" = "";...") |
m (added cats) |
||
(2 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
== Layout == | == Layout == | ||
+ | |||
+ | This layout will print out the base HTML of core2, with a blank stylesheet function. | ||
<syntaxhighlight lang="s2">layerinfo "type" = "layout"; | <syntaxhighlight lang="s2">layerinfo "type" = "layout"; | ||
Line 60: | Line 62: | ||
}</syntaxhighlight> | }</syntaxhighlight> | ||
+ | |||
+ | If you are just creating a plan theme for your layout, use this: | ||
+ | |||
+ | <syntaxhighlight lang="s2">layerinfo "type" = "theme"; | ||
+ | |||
+ | # put the theme's name here | ||
+ | layerinfo "name" = ""; | ||
+ | |||
+ | # put your username here | ||
+ | layerinfo "author_name" = ""; | ||
+ | |||
+ | # makes it so others can preview your theme and see its source | ||
+ | layerinfo "is_public" = 1; | ||
+ | layerinfo "source_viewable" = 1; | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | [[Category: Styles]] | ||
+ | [[Category: S2]] |
Latest revision as of 19:49, 12 August 2015
Layout
This layout will print out the base HTML of core2, with a blank stylesheet function.
layerinfo "type" = "layout"; # put the layout's name here layerinfo "name" = ""; # put your username here layerinfo "author_name" = ""; # makes it so others can preview your layout and see its source layerinfo "is_public" = 1; layerinfo "source_viewable" = 1; # add propgroups: presentation, colors, fonts, images, modules, customcss, text # Tabula Rasa source is a good example: http://www.dreamwidth.org/customize/advanced/layersource?id=551 # this is the function that prints out the stylesheet of the layout function Page::print_default_stylesheet() { }
Themes
If you want to override an existing layout's CSS using a theme layer:
layerinfo "type" = "theme"; # put the theme's name here layerinfo "name" = ""; # put your username here layerinfo "author_name" = ""; # makes it so others can preview your theme and see its source layerinfo "is_public" = 1; layerinfo "source_viewable" = 1; # this is the function that prints out theme specific CSS function Page::function print_theme_stylesheet() { }
If you want to redo a theme's CSS entirely from scratch:
layerinfo "type" = "theme"; # put the theme's name here layerinfo "name" = ""; # put your username here layerinfo "author_name" = ""; # makes it so others can preview your theme and see its source layerinfo "is_public" = 1; layerinfo "source_viewable" = 1; # this overrides the layout's stylesheet CSS function Page::print_default_stylesheet() { }
If you are just creating a plan theme for your layout, use this:
layerinfo "type" = "theme"; # put the theme's name here layerinfo "name" = ""; # put your username here layerinfo "author_name" = ""; # makes it so others can preview your theme and see its source layerinfo "is_public" = 1; layerinfo "source_viewable" = 1;