From 573af987bcec7bcb516292e4eb6cebc636ad48dc Mon Sep 17 00:00:00 2001 From: Jacques Distler Date: Mon, 6 Jul 2009 11:07:57 -0500 Subject: [PATCH] Syntax Colouring Add some default CSS support for syntax colouring of code blocks. Try: require 'chunks/chunk' {:lang=ruby html_use_syntax=true} or
bar
{:lang=html html_use_syntax=true} (Suggested by Casper Gripenberg) --- public/s5/ui/core/math.css | 28 ++++++++++++++++++++++++++++ public/stylesheets/instiki.css | 27 +++++++++++++++++++++++++++ 2 files changed, 55 insertions(+) diff --git a/public/s5/ui/core/math.css b/public/s5/ui/core/math.css index a024ccd3..6e4e4d8b 100644 --- a/public/s5/ui/core/math.css +++ b/public/s5/ui/core/math.css @@ -40,3 +40,31 @@ span.theorem_label {font-style:normal; font-weight:bold;} content: " " counter(remark); counter-increment: remark;} .num_note .theorem_label:after { content: " " counter(note); counter-increment: note;} + +code.ruby .normal {} +code.ruby span.attribute { color: #090; } +code.ruby span.char { color: #F00; } +code.ruby span.class { color: #A020F0; font-weight: bold; } +code.ruby span.comment { color: #00F; } +code.ruby span.constant { color: #008B8B; } +code.ruby span.escape { color: #6A5ACD; } +code.ruby span.expr { color: #22C; } +code.ruby span.global { color: #1A4; } +code.ruby span.ident { color: #004; } +code.ruby span.keyword { color: #A52A2A; font-weight: bold; } +code.ruby span.method { color: #008B8B; } +code.ruby span.module { color: #A020F0; font-weight: bold; } +code.ruby span.number { color: #D0D; } +code.ruby span.punct { color: #6A5ACD; } +code.ruby span.regex { color: #D0D; } +code.ruby span.string { color: #D0D; } +code.ruby span.symbol { color: #008B8B; } + +code.xml .normal {} +code.xml .namespace { color: #D66; font-weight: bold; } +code.xml .tag { color: #F55; } +code.xml .comment { color: #070; font-style: italic; } +code.xml .punct { color: #449; font-weight: bold; } +code.xml .string { color: #949; } +code.xml .number { color: #F99; } +code.xml .attribute { color: #771; } diff --git a/public/stylesheets/instiki.css b/public/stylesheets/instiki.css index 2adea647..33c8a71a 100644 --- a/public/stylesheets/instiki.css +++ b/public/stylesheets/instiki.css @@ -448,3 +448,30 @@ span.theorem_label {font-style:normal; font-weight:bold;} .num_note .theorem_label:after { content: " " counter(note); counter-increment: note;} +code.ruby .normal {} +code.ruby span.attribute { color: #090; } +code.ruby span.char { color: #F00; } +code.ruby span.class { color: #A020F0; font-weight: bold; } +code.ruby span.comment { color: #00F; } +code.ruby span.constant { color: #008B8B; } +code.ruby span.escape { color: #6A5ACD; } +code.ruby span.expr { color: #22C; } +code.ruby span.global { color: #1A4; } +code.ruby span.ident { color: #004; } +code.ruby span.keyword { color: #A52A2A; font-weight: bold; } +code.ruby span.method { color: #008B8B; } +code.ruby span.module { color: #A020F0; font-weight: bold; } +code.ruby span.number { color: #D0D; } +code.ruby span.punct { color: #6A5ACD; } +code.ruby span.regex { color: #D0D; } +code.ruby span.string { color: #D0D; } +code.ruby span.symbol { color: #008B8B; } + +code.xml .normal {} +code.xml .namespace { color: #D66; font-weight: bold; } +code.xml .tag { color: #F55; } +code.xml .comment { color: #070; font-style: italic; } +code.xml .punct { color: #449; font-weight: bold; } +code.xml .string { color: #949; } +code.xml .number { color: #F99; } +code.xml .attribute { color: #771; }