Skip to content

Commit

Permalink
feat(styles): add basic lineno support
Browse files Browse the repository at this point in the history
  • Loading branch information
sparanoid committed Nov 3, 2015
1 parent 3c13efe commit 9b09e93
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
8 changes: 8 additions & 0 deletions _app/_posts/note/2014-06-06-syntax-highlighting.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,14 @@ print_hi('Tom')
#=> prints 'Hi, Tom' to STDOUT.
{% endhighlight %}

{% highlight ruby linenos %}
def print_hi(name)
puts "Hi, #{name}"
end
print_hi('Tom')
#=> prints 'Hi, Tom' to STDOUT.
{% endhighlight %}

```js
// Load the http module to create an http server.
var http = require('http');
Expand Down
23 changes: 23 additions & 0 deletions _app/assets/themes/curtana/_less/module-syntax.less
Original file line number Diff line number Diff line change
Expand Up @@ -164,4 +164,27 @@
}
.loop-comments(1);

// Reset code blocks appearance with line numbers
table {

&,
th,
td,
td pre {
padding: 0;
margin: 0;
border: none;
background: transparent;
font-size: 100%;
}

.lineno {
color: desaturate(@link-color, 95%);
opacity: .5;
}

.code {
padding-left: 1em;
}
}
}

0 comments on commit 9b09e93

Please sign in to comment.