Skip to content

Commit

Permalink
v1.0.3 - new languages for prismjs
Browse files Browse the repository at this point in the history
  • Loading branch information
Oscar Morrison authored and Oscar Morrison committed Jan 5, 2017
1 parent 4bb8978 commit 2bebc25
Show file tree
Hide file tree
Showing 4 changed files with 102 additions and 95 deletions.
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ fork of the [Lanyon-Ghost](https://github.com/PxlBuzzard/lanyon-ghost) Theme.
This theme is ideal for single author, tag heavy, looking for a simple design, with code highlighting.

### Updates
- v1.0.3 (4 Jan 16)
- Support additional language for syntax highlighting (Go, Python, MD)
- v1.0.2 (3 Dec 16)
- Add next and previous post links to Post.hbs
- Open all external links in new tab
Expand All @@ -25,7 +27,7 @@ This theme is ideal for single author, tag heavy, looking for a simple design, w

## Features
- Custom Navigation Menu ([#7](https://github.com/oscarmorrison/oscar-ghost/issues/7))
- [Prism.js](http://prismjs.com) Code Highlighting (Bash, Swift, JS, C, ...)
- [Prism.js](http://prismjs.com) Code Highlighting (Markup, Bash, Swift, JS, C, Go, Python...)
- Font: [Lato](https://www.google.com/fonts/specimen/Lato) weights 100,300,300italic
- Automatic internal and external linking
- Featured Image on Posts
Expand Down Expand Up @@ -55,6 +57,12 @@ To get the full benefits of the Gallery Viewer (Photoswipe) in a blog post, simp
* Gallery Post will have special behavior for the user. The images will all have a cursor pointer and be clickable. Once any image is clicked, the photoswipe viewer will open in full view.
* To add images to a gallery post, add them as you normally would with any post.

### Code Syntax Highlighting
Use [prismjs](http://prismjs.com/download.html) for syntax highlighting.
in your blog symply surround code block with:

```language-bash
## Installation
Expand Down
170 changes: 84 additions & 86 deletions assets/css/prism.css
Original file line number Diff line number Diff line change
@@ -1,125 +1,123 @@
/*
Name: Base16 Ocean Dark
Author: Chris Kempson (http://chriskempson.com)
Prism template by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/prism/)
Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16)
*/
/* http://prismjs.com/download.html?themes=prism-okaidia&languages=markup+css+clike+javascript+bash+go+python+swift */
/**
* okaidia theme for JavaScript, CSS and HTML
* Loosely based on Monokai textmate theme by http://www.monokai.nl/
* @author ocodia
*/

code[class*="language-"],
pre[class*="language-"] {
color: #eff1f5;
font-family: Consolas, Menlo, Monaco, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", "Courier New", Courier, monospace;
font-size: 14px;
line-height: 1.375;
direction: ltr;
text-align: left;
word-spacing: normal;

-moz-tab-size: 4;
-o-tab-size: 4;
tab-size: 4;

-webkit-hyphens: none;
-moz-hyphens: none;
-ms-hyphens: none;
hyphens: none;
white-space: pre;
white-space: pre-wrap;
word-break: break-all;
word-wrap: break-word;
background: #2b303b;
color: #c0c5ce;
color: #f8f8f2;
background: none;
text-shadow: 0 1px rgba(0, 0, 0, 0.3);
font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
text-align: left;
white-space: pre;
word-spacing: normal;
word-break: normal;
word-wrap: normal;
line-height: 1.5;

-moz-tab-size: 4;
-o-tab-size: 4;
tab-size: 4;

-webkit-hyphens: none;
-moz-hyphens: none;
-ms-hyphens: none;
hyphens: none;
}

/* Code blocks */
pre[class*="language-"] {
padding: 1em;
margin: .5em 0;
overflow: auto;
padding: 1em;
margin: .5em 0;
overflow: auto;
border-radius: 0.3em;
}

:not(pre) > code[class*="language-"],
pre[class*="language-"] {
background: #272822;
}

/* Inline code */
:not(pre) > code[class*="language-"] {
padding: .1em;
border-radius: .3em;
padding: .1em;
border-radius: .3em;
white-space: normal;
}

.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
color: #65737e;
color: slategray;
}

.token.punctuation {
color: #c0c5ce;
color: #f8f8f2;
}

.namespace {
opacity: .7;
opacity: .7;
}

.token.property,
.token.tag,
.token.constant,
.token.symbol,
.token.deleted {
color: #f92672;
}

.token.null,
.token.operator,
.token.boolean,
.token.number {
color: #d08770;
}
.token.property {
color: #ebcb8b;
}
.token.tag {
color: #8fa1b3;
}
.token.string {
color: #96b5b4;
}
.token.selector {
color: #b48ead;
}
.token.attr-name {
color: #d08770;
}
color: #ae81ff;
}

.token.selector,
.token.attr-name,
.token.string,
.token.char,
.token.builtin,
.token.inserted {
color: #a6e22e;
}

.token.operator,
.token.entity,
.token.url,
.token.url,
.language-css .token.string,
.style .token.string {
color: #96b5b4;
.style .token.string,
.token.variable {
color: #f8f8f2;
}

.token.atrule,
.token.attr-value,
.token.keyword,
.token.control,
.token.directive,
.token.unit {
color: #a3be8c;
}

.token.statement,
.token.regex,
.token.atrule {
color: #96b5b4;
.token.function {
color: #e6db74;
}

.token.placeholder,
.token.variable {
color: #8fa1b3;
}
.token.keyword {
color: #66d9ef;
}

.token.regex,
.token.important {
color: #bf616a;
font-weight: bold;
}
color: #fd971f;
}

.token.entity {
cursor: help;
}
.token.important,
.token.bold {
font-weight: bold;
}
.token.italic {
font-style: italic;
}

pre > code.highlight {
outline: .4em solid red;
outline-offset: .4em;
}
.token.entity {
cursor: help;
}

Loading

0 comments on commit 2bebc25

Please sign in to comment.