S2 Cookbook: Blank Layout and Theme Layers

From Dreamwidth Notes
Revision as of 06:23, 6 June 2011 by Foxfirefey (Talk | contribs)

Jump to: navigation, search

Layout

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;