File tree Expand file tree Collapse file tree
.themes/classic/sass/partials Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -126,9 +126,10 @@ p code {
126126 .n { color : $blue !important ; }
127127 .na { color : $blue !important ; } /* Name.Attribute */
128128 .nb { color : $green !important ; } /* Name.Builtin */
129- // .nc { color: #445588; font-weight: bold } /* Name.Class */
129+ .nc { color : $magenta !important ;} /* Name.Class */
130130 .no { color : $yellow !important ; } /* Name.Constant */
131131 // .ni { color: #800080 } /* Name.Entity */
132+ .nl { color : $green !important ; }
132133 .ne { color : $blue !important ; font-weight : bold !important ; } /* Name.Exception */
133134 .nf { color : $blue !important ; font-weight : bold !important ; } /* Name.Function */
134135 .nn { color : $yellow !important ; } /* Name.Namespace */
@@ -215,3 +216,4 @@ figure[role=code] {
215216 padding-left : 3em ;
216217}
217218
219+
Original file line number Diff line number Diff line change @@ -73,6 +73,8 @@ def render(context)
7373 source = "<div><figure role=code>"
7474 source += @caption if @caption
7575 if @filetype
76+ @filetype = 'objc' if @filetype == 'm'
77+ @filetype = 'perl' if @filetype == 'pl'
7678 source += "{% highlight #{ @filetype } %}\n " + code + "\n {% endhighlight %}</figure></div>"
7779 else
7880 source += "<pre><code>" + code . lstrip . rstrip . gsub ( /</ , '<' ) + "</code></pre></figure></div>"
Original file line number Diff line number Diff line change @@ -50,11 +50,13 @@ def render(context)
5050
5151 Dir . chdir ( code_path ) do
5252 code = file . read
53- file_type = file . extname
53+ @filetype = file . extname
54+ @filetype = 'objc' if @filetype == 'm'
55+ @filetype = 'perl' if @filetype == 'pl'
5456 title = @title ? "#{ @title } (#{ file . basename } )" : file . basename
5557 url = "#{ context . registers [ :site ] . config [ 'url' ] } /#{ code_dir } /#{ @file } "
5658 source = "<div><figure role=code><figcaption><span>#{ title } </span> <a href='#{ url } '>download</a></figcaption>\n "
57- source += "{% highlight #{ file_type } %}\n " + code + "\n {% endhighlight %}</figure></div>"
59+ source += "{% highlight #{ @filetype } %}\n " + code + "\n {% endhighlight %}</figure></div>"
5860 partial = Liquid ::Template . parse ( source )
5961 context . stack do
6062 partial . render ( context )
You can’t perform that action at this time.
0 commit comments