Browse code

updated syntax styling to have nice headers for code windows

B Mathis authored on 10/03/2010 at 20:22:19
Showing 7 changed files
1 1
deleted file mode 100644
... ...
@@ -1,17 +0,0 @@
1
-blog_title: My Octopress Blog
2
-
3
-twitter_user: 
4
-tweet_count: 3
5
-show_replies: false
6
-
7
-delicious_user: 
8
-delicious_count: 3
9
-
10
-full_url: 
11
-disqus_short_name: 
12
-
13
-google_custom_search_id:
14
-google_analytics_tracking_id:
15
-
16 1
\ No newline at end of file
... ...
@@ -2,7 +2,7 @@
2 2
 blog_title: My Octopress Blog
3 3
 author: 
4 4
 
5
-twitter_user: 
5
+twitter_user: imathis
6 6
 tweet_count: 3
7 7
 show_replies: false
8 8
 
9 9
new file mode 100644
10 10
Binary files /dev/null and b/source/images/code_bg.png differ
... ...
@@ -2,6 +2,8 @@
2 2
 layout: default
3 3
 title: Syntax Highlighting Debug
4 4
 ---
5
+<div class="code_window">
6
+<em>Ruby</em>
5 7
 {% highlight ruby %}
6 8
 def rebuild_site(relative)
7 9
   puts ">>> Change Detected to: #{relative} <<<"
... ...
@@ -11,9 +13,12 @@ def rebuild_site(relative)
11 11
   puts '>>> Update Complete <<<'
12 12
 end
13 13
 {% endhighlight %}
14
+</div>
14 15
 
15 16
 So that's a small example. What about a big one?
16 17
 
18
+<div class="code_window">
19
+<em>Ruby</em>
17 20
 {% highlight ruby %}
18 21
 require 'active_support/core_ext/array'
19 22
 require 'active_support/core_ext/hash/except'
... ...
@@ -219,4 +224,5 @@ module ActiveRecord
219 219
     end
220 220
   end
221 221
 end
222
-{% endhighlight %}
223 222
\ No newline at end of file
223
+{% endhighlight %}
224
+</div>
224 225
\ No newline at end of file
... ...
@@ -1,7 +1,7 @@
1 1
 !page_pad = 30px
2 2
 !page_width = 980px
3 3
 !sidebar_margin = 25px
4
-!sidebar_width = 250px
4
+!sidebar_width = 280px
5 5
 !default_border_radius = 4px
6 6
 
7 7
 html body
... ...
@@ -23,7 +23,6 @@ html body
23 23
 
24 24
 #page, #header, #footer, #nav
25 25
   min-width: #{!page_width}
26
-  
27 26
 #page, #content, .content
28 27
   +pie-clearfix
29 28
 #content
... ...
@@ -38,9 +37,9 @@ html body
38 38
 
39 39
 #sidebar
40 40
   float: left
41
-  width: #{!sidebar_width - !page_pad}
41
+  width: #{!sidebar_width - !page_pad/2}
42 42
   margin: 0 -100% 0 0
43
-  padding: #{!page_pad} 0 #{!page_pad} #{!page_pad}
43
+  padding: #{!page_pad} 0 #{!page_pad} #{!page_pad/2}
44 44
 
45 45
 #page.expanded
46 46
   #content
... ...
@@ -1,3 +1,26 @@
1
+.code_window
2
+  +border-top-radius(5px)
3
+  +border-bottom-radius(2px)
4
+  background: #aaa #{image_url("code_bg.png")} top repeat-x
5
+  position: relative
6
+  margin: .3em 0 1.3em
7
+  padding: 0 3px 3px
8
+  font-size: 14px
9
+  border: 1px solid #898989
10
+  border-top-color: #cbcbcb
11
+  border-left-color: #a5a5a5
12
+  border-right-color: #a5a5a5
13
+  em
14
+    text-align: center
15
+    +text-shadow(#ccc, 1px, 1px, 1px)
16
+    display: block
17
+    padding: 1px 0
18
+    color: #333
19
+    font-style: normal
20
+    +sans-font
21
+  .highlight
22
+    margin: 0
23
+    
1 24
 pre
2 25
   color: #ccc
3 26
   font-size: 13px
... ...
@@ -2,9 +2,9 @@
2 2
   p
3 3
     padding-bottom: 10px
4 4
     a.topic
5
-      color= !twitter_topic
5
+      color: #{!twitter_topic}
6 6
   .meta
7
-    color= !light_text
7
+    color: #{!light_text}
8 8
     font-size: 80%
9 9
     display: block
10 10
     padding: 8px 0 0