39 lines
890 B
Awk
39 lines
890 B
Awk
{ helpers = "yes" }
|
|
|
|
function load_helpers() {
|
|
data["page_title"] = page_title()
|
|
data["section_blog"] = section_blog()
|
|
data["section_code"] = section_code()
|
|
data["section_photos"] = section_photos()
|
|
data["page_css"] = page_css()
|
|
}
|
|
|
|
function page_title( title) {
|
|
if (data["title"]) {
|
|
title = data["title"] " - " data["site_title"]
|
|
} else {
|
|
title = data["site_title"]
|
|
}
|
|
return title
|
|
}
|
|
function section_blog(section) {
|
|
if (data["section"] == "blog") {
|
|
return " class=\"section\""
|
|
}
|
|
}
|
|
function section_code(section) {
|
|
if (data["section"] == "code") {
|
|
return " class=\"section\""
|
|
}
|
|
}
|
|
function section_photos(section) {
|
|
if (data["section"] == "photos") {
|
|
return " class=\"section\""
|
|
}
|
|
}
|
|
function page_css(css) {
|
|
if (data["page_css"]) {
|
|
return "<link rel=\"stylesheet\" href=\"" data["page_css"] "\" type=\"text/css\">\n "
|
|
}
|
|
}
|