Skip to content

Commit

Permalink
add prism library to make the markup code readable
Browse files Browse the repository at this point in the history
  • Loading branch information
Panagiotis Papadatis committed Jul 3, 2015
1 parent 1ef3428 commit 6b39dab
Show file tree
Hide file tree
Showing 3 changed files with 149 additions and 0 deletions.
137 changes: 137 additions & 0 deletions css/prism.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
/* http://prismjs.com/download.html?themes=prism&languages=markup+clike+javascript */
/**
* prism.js default theme for JavaScript, CSS and HTML
* Based on dabblet (http://dabblet.com)
* @author Lea Verou
*/

code[class*="language-"],
pre[class*="language-"] {
color: black;
text-shadow: 0 1px white;
font-family: Consolas, Monaco, 'Andale Mono', monospace;
direction: ltr;
text-align: left;
white-space: pre;
word-spacing: normal;
word-break: 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;
}

pre[class*="language-"]::-moz-selection, pre[class*="language-"] ::-moz-selection,
code[class*="language-"]::-moz-selection, code[class*="language-"] ::-moz-selection {
text-shadow: none;
background: #b3d4fc;
}

pre[class*="language-"]::selection, pre[class*="language-"] ::selection,
code[class*="language-"]::selection, code[class*="language-"] ::selection {
text-shadow: none;
background: #b3d4fc;
}

@media print {
code[class*="language-"],
pre[class*="language-"] {
text-shadow: none;
}
}

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

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

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

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

.token.punctuation {
color: #999;
}

.namespace {
opacity: .7;
}

.token.property,
.token.tag,
.token.boolean,
.token.number,
.token.constant,
.token.symbol,
.token.deleted {
color: #905;
}

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

.token.operator,
.token.entity,
.token.url,
.language-css .token.string,
.style .token.string {
color: #a67f59;
background: hsla(0, 0%, 100%, .5);
}

.token.atrule,
.token.attr-value,
.token.keyword {
color: #07a;
}

.token.function {
color: #DD4A68;
}

.token.regex,
.token.important,
.token.variable {
color: #e90;
}

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

.token.entity {
cursor: help;
}

7 changes: 7 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
<link rel="stylesheet" href="node_modules/font-awesome/css/font-awesome.min.css">
<!-- jQuery mCustomScrollbar -->
<link rel="stylesheet" href="node_modules/malihu-custom-scrollbar-plugin/jquery.mCustomScrollbar.css">
<!-- prism -->
<link rel="stylesheet" href="css/prism.css">
<!-- floativ css -->
<link rel="stylesheet" href="css/floativ.css">
<!-- website css -->
Expand Down Expand Up @@ -107,6 +109,8 @@ <h2>Usage</h2>
</ul>
<p>The floating box requires the following html markup in order to work</p>
<pre>
<code class="language-markup">

&lt;div id="#floativ"&gt;
&lt;div class="floativ-container"&gt;
&lt;div class="floativ-head"&gt;
Expand All @@ -122,6 +126,7 @@ <h2>Usage</h2>
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</code>
</pre>
</article>
<article>
Expand Down Expand Up @@ -245,6 +250,8 @@ <h1>License</h1>
<script src="node_modules/jquery/dist/jquery.min.js"></script>
<!-- jQuery mCustomScrollbar -->
<script src="node_modules/malihu-custom-scrollbar-plugin/jquery.mCustomScrollbar.js"></script>
<!-- prism.js -->
<script src="js/vendor/prism.js"></script>
<!-- floativ.js -->
<script src="js/floativ.js"></script>
<script>
Expand Down
5 changes: 5 additions & 0 deletions js/vendor/prism.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 6b39dab

Please sign in to comment.