summaryrefslogtreecommitdiff
path: root/lib/tpl
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2009-07-26 19:51:58 +0200
committerAndreas Gohr <andi@splitbrain.org>2009-07-26 19:51:58 +0200
commit3d491f758802dd2376dddd5d001765b940b08743 (patch)
treea9b27250e2e19c33ad52c63e1e642924be03b5bc /lib/tpl
parenta6783fdb13cb5cc9b0225cb1ea1ac8c028a775da (diff)
downloadrpg-3d491f758802dd2376dddd5d001765b940b08743.tar.gz
rpg-3d491f758802dd2376dddd5d001765b940b08743.tar.bz2
enhanced <code> and <file> syntax
Ignore-this: 80398f84222bec1fce56eee8f107d37a This patch enhances the code and file syntax with several new features. 1. code and file are now essentially the same and just differ in the class name. This means you now can use the file syntax with syntax highlighting as well. This also solves problems where the code to highlight already contains a <code> tag (FS#1493) 2. a filename can be given as label for the code or file block. It is specified as second parameter after the language: <code html myfile.html>...</code> If no highlighting is wanted, but a filename shall be given, you can use a dash as language: <code - somefile.foo>...</code> 3. when a filename was given (as shown above), the label links to a download of the code given in the code/file block. This is made possible by a new renderer in inc/parser/code.php. The basename of given filename is suggested as filename when downloading. darcs-hash:20090726175158-7ad00-969641a06ae1393a6d99207c3cd938fb67f23a71.gz
Diffstat (limited to 'lib/tpl')
-rw-r--r--lib/tpl/default/design.css41
1 files changed, 36 insertions, 5 deletions
diff --git a/lib/tpl/default/design.css b/lib/tpl/default/design.css
index 63c86d36b..c3591fc67 100644
--- a/lib/tpl/default/design.css
+++ b/lib/tpl/default/design.css
@@ -481,16 +481,47 @@ div.dokuwiki pre.code {
background-color: __background_other__;
}
-/* inline code words */
-div.dokuwiki code {
- font-size: 120%;
-}
-
/* code blocks by file tag */
div.dokuwiki pre.file {
background-color: __background_alt__;
}
+/* filenames for file and code blocks */
+div.dokuwiki dl.file,
+div.dokuwiki dl.code {
+ margin-top: 2em;
+ margin-bottom: 2.5em;
+}
+
+div.dokuwiki dl.file dt,
+div.dokuwiki dl.code dt {
+ border: 1px dashed __border__;
+ display: inline;
+ padding: 0.1em 1em;
+ margin-left: 2em;
+}
+
+div.dokuwiki dl.code dt a,
+div.dokuwiki dl.file dt a {
+ color: __text__;
+}
+
+div.dokuwiki dl.code dt {
+ background-color: __background_other__;
+ border-bottom: 1px solid __background_other__;
+}
+
+div.dokuwiki dl.file dt {
+ background-color: __background_alt__;
+ border-bottom: 1px solid __background_alt__;
+}
+
+
+/* inline code words */
+div.dokuwiki code {
+ font-size: 120%;
+}
+
/* inline tables */
div.dokuwiki table.inline {
background-color: __background__;