EckoThemes
EckoThemes

Cedar is a multi-author & personal blog theme for the Ghost platform. Featuring a minimal, responsive, content-focused design and single-column layout. Available on ThemeForest.

Harvey Specter has built a career and reputation by breaking the rules. Harvey's shoot-from-the-hip style has made him an effective lawyer and a slick character.

Share


Subscribe to EckoThemes


Subscribe to our email newsletter to receive article notifications and regular updates. We don't spam and your email won't be shared with third-parties.

Tags


avrt
EckoThemes

Syntax Highlighting

Harvey SpecterHarvey Specter

Cedar comes included with a Syntax Highlighter for code blocks, using RainbowJS. As well as generic pattern matching, it has support for the following languages:

Syntax highlighting is a feature which displays text, especially source code, in different colors and fonts according to the category of terms.

  • HTML/CSS
  • Python
  • Ruby
  • Shell
  • Java
  • PHP
  • CoffeeScript
  • C
  • Go
  • Scheme
  • Lua
  • C#
  • Haskell

Below is a preview of some of the above languages being highlighted.

JavaScript

var http = require('http');
http.createServer(function (req, res) {
  res.writeHead(200, {'Content-Type': 'text/plain'});
  res.end('Hello World\n');
}).listen(1337, "127.0.0.1");
console.log('Server running at http://127.0.0.1:1337/');

HTML / CSS

<!DOCTYPE html>
<html>
	<body>
		<h1>My First Heading</h1>
		<p>My first paragraph.</p>
	</body>
</html>
.wrapper{
	max-width:1400px;
	width:100%;
	@media (max-width: 1470px) {
		padding:0 2.5%;
	}
}

Python

def openFile(path):
    file = open(path, "r")
    content = file.read()
    file.close()
    return content

Ruby

def self.consume_front(str, size)
	str[0..size] = ''
	str.lstrip!
end

Shell

ls -la /home

PHP

function ivy_get_time(){
    if(get_theme_mod('layout_use_custom_date_format', false)){ 
    	the_date(); 
    }else{ 
    	the_time('jS F Y '); 
    }
}