From 3a56e70e888ce9420c72add656726dc623a45894 Mon Sep 17 00:00:00 2001 From: Kevin Chabowski Date: Sun, 29 Jan 2012 13:28:28 +0100 Subject: You can now use %root% in CSS styles too. --- css.php | 2 +- ratatoeskr/cms_style/layout.css | 7 +++++++ ratatoeskr/frontend.php | 2 +- ratatoeskr/templates/src/systemtemplates/content_write.html | 1 + ratatoeskr/templates/src/systemtemplates/styles.html | 2 ++ ratatoeskr/translations/de.php | 5 +++-- ratatoeskr/translations/en.php | 5 +++-- 7 files changed, 18 insertions(+), 6 deletions(-) diff --git a/css.php b/css.php index bbc4bef..2187eb3 100644 --- a/css.php +++ b/css.php @@ -17,7 +17,7 @@ try { $style = Style::by_name($_GET["name"]); header("Content-Type: text/css; charset=UTF-8"); - echo $style->code; + echo str_replace("%root%", ".", $style->code); } catch(DoesNotExistError $e) { diff --git a/ratatoeskr/cms_style/layout.css b/ratatoeskr/cms_style/layout.css index a0d7e61..1163887 100644 --- a/ratatoeskr/cms_style/layout.css +++ b/ratatoeskr/cms_style/layout.css @@ -21,6 +21,13 @@ body, html { padding:0px; } +hr { + border: 0; + height: 1px; + color: #000; + background-color: #000; +} + #bar_top { margin: 0px; position: fixed; diff --git a/ratatoeskr/frontend.php b/ratatoeskr/frontend.php index 4b01fa0..0425099 100644 --- a/ratatoeskr/frontend.php +++ b/ratatoeskr/frontend.php @@ -601,7 +601,7 @@ $ste->register_tag("styles_load", function($ste, $params, $sub) try { $style = Style::by_name($stylename); - $output .= "/* Style: $stylename */\n" . $style->code . "\n"; + $output .= "/* Style: $stylename */\n" . str_replace("%root%", $rel_path_to_root, $style->code) . "\n"; } catch(DoesNotExistError $e) { diff --git a/ratatoeskr/templates/src/systemtemplates/content_write.html b/ratatoeskr/templates/src/systemtemplates/content_write.html index 782d4ea..063fad1 100644 --- a/ratatoeskr/templates/src/systemtemplates/content_write.html +++ b/ratatoeskr/templates/src/systemtemplates/content_write.html @@ -21,6 +21,7 @@
+
diff --git a/ratatoeskr/templates/src/systemtemplates/styles.html b/ratatoeskr/templates/src/systemtemplates/styles.html index 5865040..4574eef 100644 --- a/ratatoeskr/templates/src/systemtemplates/styles.html +++ b/ratatoeskr/templates/src/systemtemplates/styles.html @@ -34,6 +34,8 @@
+
+
diff --git a/ratatoeskr/translations/de.php b/ratatoeskr/translations/de.php index c595377..5eba112 100644 --- a/ratatoeskr/translations/de.php +++ b/ratatoeskr/translations/de.php @@ -259,10 +259,11 @@ $translation = array( "setup_link_backend" => "Das Backend deiner Webpage", "admin_data_must_be_filled_out" => "Administrator Daten müssen ausgefüllt sein", /* Very long texts here */ - "content_write_cheatsheet" => << <<Verlinken auf die Seitenwurzel

Der Text %root% wird mit einem Pfad ersetzt, der auf die Wurzel deiner Ratatöskr Seite verweist.

- +LINKINGBACK + ,"content_write_cheatsheet" => <<Markdown Spickzettel

Betonung / Kräftig

diff --git a/ratatoeskr/translations/en.php b/ratatoeskr/translations/en.php index 94a817a..ca015d3 100644 --- a/ratatoeskr/translations/en.php +++ b/ratatoeskr/translations/en.php @@ -259,10 +259,11 @@ $translation = array( "setup_link_backend" => "The backend of your Webpage", "admin_data_must_be_filled_out" => "Administrator data must be filled out", /* Very long texts here */ - "content_write_cheatsheet" => << <<Linking back

The text %root% will be replaced with a path, that points to the root of your Ratatöskr page.

- +LINKINGBACK + ,"content_write_cheatsheet" => <<Markdown Cheat Sheet

Emphasis / Strong

-- cgit v1.2.3-54-g00ecf