aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Chabowski <kevin@kch42.de>2012-01-29 13:28:28 +0100
committerKevin Chabowski <kevin@kch42.de>2012-01-29 13:28:28 +0100
commit3a56e70e888ce9420c72add656726dc623a45894 (patch)
treeba1cd2108d58f0e7196917227f3e914ae0ae1df7
parentc91f5d5d77b55b1579b6020ad2dea3a8801eb106 (diff)
downloadratatoeskr-cms-3a56e70e888ce9420c72add656726dc623a45894.tar.gz
ratatoeskr-cms-3a56e70e888ce9420c72add656726dc623a45894.tar.bz2
ratatoeskr-cms-3a56e70e888ce9420c72add656726dc623a45894.zip
You can now use %root% in CSS styles too.
-rw-r--r--css.php2
-rw-r--r--ratatoeskr/cms_style/layout.css7
-rw-r--r--ratatoeskr/frontend.php2
-rw-r--r--ratatoeskr/templates/src/systemtemplates/content_write.html1
-rw-r--r--ratatoeskr/templates/src/systemtemplates/styles.html2
-rw-r--r--ratatoeskr/translations/de.php5
-rw-r--r--ratatoeskr/translations/en.php5
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 @@
<ste:default_success />
<div class="triplecolumns">
<div class="column_left">
+ <ste:get_translation for="linking_back_hint" raw="y" />
<ste:get_translation for="content_write_cheatsheet" raw="y" />
</div>
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 @@
</select>
</div>
</form>
+ <hr />
+ <ste:get_translation for="linking_back_hint" raw="y" />
</div>
<div class="column_main">
<form action="$rel_path_to_root/backend/design/styles" method="POST" accept-charset="UTF-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" => <<<CHEATSHEET
+ "linking_back_hint" => <<<LINKINGBACK
<h2>Verlinken auf die Seitenwurzel</h2>
<p>Der Text <code>%root%</code> wird mit einem Pfad ersetzt, der auf die Wurzel deiner Ratatöskr Seite verweist.</p>
-
+LINKINGBACK
+ ,"content_write_cheatsheet" => <<<CHEATSHEET
<h2>Markdown Spickzettel</h2>
<h3>Betonung / Kräftig</h3>
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" => <<<CHEATSHEET
+ "linking_back_hint" => <<<LINKINGBACK
<h2>Linking back</h2>
<p>The text <code>%root%</code> will be replaced with a path, that points to the root of your Ratatöskr page.</p>
-
+LINKINGBACK
+ ,"content_write_cheatsheet" => <<<CHEATSHEET
<h2>Markdown Cheat Sheet</h2>
<h3>Emphasis / Strong</h3>