Skip to content

Commit

Permalink
Added color test in prettify-test.html
Browse files Browse the repository at this point in the history
  • Loading branch information
Francis Veilleux-Gaboury committed Jan 21, 2015
1 parent d565707 commit 07024f1
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 39 deletions.
Binary file added prettify-test/IDE-samples/SQL-SSMS-white.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1,70 +1,75 @@
/* GitHub Theme */
.prettyprint {
background: white;
font-family: Menlo, 'Bitstream Vera Sans Mono', 'DejaVu Sans Mono', Monaco, Consolas, monospace;
font-family: Monaco, Consolas, Courier New, monospace;
font-size: 12px;
line-height: 1.5;
border: 1px solid #ccc;
padding: 10px;
}

code {
font-family: Monaco, Consolas, Courier New, monospace;
font-size:12px;
}
/* Plain text */
.pln {
color: #333333;
}

@media screen {
/* String content */
.str {
color: #dd1144;
}

/* Keyword */
.kwd {
color: #333333;
}

/* Comment */
.com {
color: #999988;
}

/* Type name */
.typ {
color: #445588;
}

/* Literal value */
.lit {
color: #445588;
}

/* Punctuation */
.pun {
color: #333333;
}

/* Lisp open bracket */
.opn {
color: #333333;
}

/* Lisp close bracket */
.clo {
color: #333333;
}

/* Mark-up tag name */
.tag {
color: navy;
}

/* Mark-up attribute name */
.atn {
color: teal;
}

/* Markup attribute value */
.atv {
color: #dd1144;
}

/* Declaration */
.dec {
color: #333333;
}

/* Variable name */
.var {
color: teal;
}

/* Function name */
.fun {
color: #990000;
}
Expand Down
61 changes: 37 additions & 24 deletions prettify-test/prettify-test.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,33 @@
<script src="color-themes-for-google-code-prettify-gh-pages/js/modernizr-2.5.3.min.js"></script>

</head>
<body>


<body style="margin-left: 15px;">
<h2>Google Prettify Testing: Github default</h2>

<h3>Color Reference</h3>
<code class="pln ">Plain text</code><br />
<code class="str">"String content"</code><br />
<code class="kwd">Keyword</code><br />
<code class="com">// Comment</code><br />
<code class="typ">Type name</code><br />
<code class="lit">Literal value 42</code><br />
<code class="pun">Punctuation...</code><br />
<code class="dec">Declaration</code><br />
<code class="var">Variable name</code><br />
<code class="fun">Function name</code><br />
<br />
<code class="opn">Lisp {open bracket</code><br />
<code class="clo">Lisp close} bracket</code><br />
<br />
<code class="tag">&lt;Markup tag name&gt;</code><br />
<code class="atn">&lt;Markup attribute-name=""&gt;</code><br />
<code class="atv">&lt;Markup attribute="value"&gt;</code><br />
<br />

<h3>C#/LINQ</h3>

<pre class="prettyprint linenums lang-csharp lang-linq" style="font-size: 8pt;">
<pre class="prettyprint linenums lang-csharp lang-linq">
// this is a comment
/*
** Block quote
*/
public static class Evaluate
{
public static string FizzBuzz(int start, int end)
Expand All @@ -56,7 +72,7 @@ <h3>C#/LINQ</h3>

<h3>Java</h3>

<pre class="prettyprint linenums lang-java" style="font-size: 8pt;"> public class FizzBuzz {
<pre class="prettyprint linenums lang-java"> public class FizzBuzz { // this is a comment
private static Stream&lt;String&gt; fizzBuzz(final int min, final int max) {
if (min &lt; 0) {
throw new IllegalArgumentException("min is negative: min = " + min);
Expand Down Expand Up @@ -90,7 +106,7 @@ <h3>Java</h3>

<h3>Python</h3>

<pre class="prettyprint linenums lang-python" style="font-size: 8pt;">
<pre class="prettyprint linenums lang-python">
# This is a comment
def fizzbuzz(number):
if not number % 3:
Expand All @@ -109,14 +125,11 @@ <h3>Python</h3>

<h3>HTML, CSS, JavaScript</h3>

<pre class="prettyprint linenums lang-html lang-js lang-css" style="font-size: 8pt;">
<pre class="prettyprint linenums lang-html lang-js lang-css">
&lt;html&gt;&lt;body style="font-size: 12pt;"&gt;

&lt;!-- this is a comment --&gt;
&lt;script type="text/javascript"&gt;
// This is a comment
/*
* Block comment
*/
// another comment
var myString = "Hello, World!";
var myInt = 42;
function helloWorld(world) {
Expand All @@ -126,6 +139,7 @@ <h3>HTML, CSS, JavaScript</h3>
}
&lt;/script&gt;
&lt;style&gt;
/* another comment */
p { color: pink }
b { color: blue }
u { color: "umber" }
Expand All @@ -135,27 +149,26 @@ <h3>HTML, CSS, JavaScript</h3>

<h3>SQL</h3>

<pre class="prettyprint linenums lang-sql" style="font-size: 8pt;">
<pre class="prettyprint linenums lang-sql">
CREATE TABLE foo (
Id INT NOT NULL,
Word VARCHAR(100)
);
DECLARE @var;
DECLARE @var; /* this is a comment */
SET @var = 'bar';
INSERT INTO foo (Id, Word)
VALUEs (1, @var);
INSERT INTO foo (Id, Word) --also a comment
VALUES (1, @var);
SELECT Id
, Word
FROM foo
WHERE Word IS NOT NULL;
</pre>




<h3>PHP</h3>

<pre class="prettyprint linenums lang-php" style="font-size: 8pt;">
<pre class="prettyprint linenums lang-php">
&lt;?php
// this is a comment
$counter = 1;
$stopper = 100;
$fizzWord = 'Fizz';
Expand Down Expand Up @@ -184,7 +197,7 @@ <h3>PHP</h3>
<h3>VBA</h3>
<p><i>Comments removed on purpose as Prettify doesn't render them correctly. SE's system has a fix for it.</i></p>

<pre class="prettyprint linenums lang-vb" style="font-size: 8pt;">
<pre class="prettyprint linenums lang-vb">
Option Explicit
' This is a comment '
Public Function Chop(target As Long, Arr() As Long, Optional midpoint As Long = -1) As Long
Expand Down

0 comments on commit 07024f1

Please sign in to comment.