Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add transients and prism support #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions README.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
=== WP-Git-Embed ===
Contributors: gbaptistas
Contributors: gbaptistas, willybahuaud
Tags: github, gist, bitbucket, git, embed, code, highlight, source, sourcecode, syntax, syntax highlighting
Requires at least: 3.0.1
Tested up to: 3.4
Stable tag: 0.4
Tested up to: 3.6.0
Stable tag: 0.5
License: MIT
License URI: http://opensource.org/licenses/MIT

Expand All @@ -21,6 +21,9 @@ See: https://github.com/gbaptista/wp-git-embed

== Changelog ==

= 0.5 =
* Add Prism support.

= 0.4 =
* Fix file names.

Expand Down
108 changes: 108 additions & 0 deletions css/prism-dark.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
/**
* prism.js Dark theme for JavaScript, CSS and HTML
* Based on the slides of the talk “/Reg(exp){2}lained/”
* @author Lea Verou
*/

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

pre[class*="language-"],
:not(pre) > code[class*="language-"] {
background: hsl(30,20%,25%);
}

/* Code blocks */
pre[class*="language-"] {
padding: 1em;
margin: .5em 0;
overflow: auto;
border: .3em solid hsl(30,20%,40%);
border-radius: .5em;
box-shadow: 1px 1px .5em black inset;
}

/* Inline code */
:not(pre) > code[class*="language-"] {
padding: .15em .2em .05em;
border-radius: .3em;
border: .13em solid hsl(30,20%,40%);
box-shadow: 1px 1px .3em -.1em black inset;
}

.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
color: hsl(30,20%,50%);
}

.token.punctuation {
opacity: .7;
}

.namespace {
opacity: .7;
}

.token.property,
.token.tag,
.token.boolean,
.token.number {
color: hsl(350, 40%, 70%);
}

.token.selector,
.token.attr-name,
.token.string {
color: hsl(75, 70%, 60%);
}

.token.operator,
.token.entity,
.token.url,
.language-css .token.string,
.style .token.string {
color: hsl(40, 90%, 60%);
}

.token.atrule,
.token.attr-value,
.token.keyword,
.token.function,
.token.constant {
color: hsl(350, 40%, 70%);
}


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

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

.token.entity {
cursor: help;
}
104 changes: 104 additions & 0 deletions css/prism-funky.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
/**
* prism.js Funky theme
* Based on “Polyfilling the gaps” talk slides http://lea.verou.me/polyfilling-the-gaps/
* @author Lea Verou
*/

code[class*="language-"],
pre[class*="language-"] {
font-family: Consolas, Monaco, 'Andale Mono', monospace;
direction: ltr;
text-align: left;
white-space: pre;
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;
}

/* Code blocks */
pre[class*="language-"] {
padding: .4em .8em;
margin: .5em 0;
overflow: auto;
background: url('data:image/svg+xml;charset=utf-8,<svg%20version%3D"1.1"%20xmlns%3D"http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg"%20width%3D"100"%20height%3D"100"%20fill%3D"rgba(0%2C0%2C0%2C.2)">%0D%0A<polygon%20points%3D"0%2C50%2050%2C0%200%2C0"%20%2F>%0D%0A<polygon%20points%3D"0%2C100%2050%2C100%20100%2C50%20100%2C0"%20%2F>%0D%0A<%2Fsvg>');
background-size: 1em 1em;
}

code[class*="language-"] {
background: black;
color: white;
box-shadow: -.3em 0 0 .3em black, .3em 0 0 .3em black;
}

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

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

.token.punctuation {
color: #999;
}

.namespace {
opacity: .7;
}

.token.property,
.token.tag,
.token.boolean,
.token.number {
color: #0cf;
}

.token.selector,
.token.attr-name,
.token.string {
color: yellow;
}

.token.operator,
.token.entity,
.token.url,
.language-css .token.string {
color: yellowgreen;
}

.token.atrule,
.token.attr-value,
.token.keyword,
.token.function,
.token.constant {
color: deeppink;
}


.token.regex,
.token.important,
.token.variable {
color: orange;
}

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

.token.entity {
cursor: help;
}
110 changes: 110 additions & 0 deletions css/prism-willy2.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
/**
* 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: white;
text-shadow: 0 1px black;
font-family: Consolas, Monaco, 'Andale Mono', monospace;
direction: ltr;
text-align: left;
white-space: pre;
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;
}

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

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

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

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

.token.punctuation {
color: #63CFC5;
}

.namespace {
opacity: .7;
}

.token.property,
.token.tag,
.token.boolean,
.token.number {
color: #FB44B7;
}

.token.selector,
.token.attr-name,
.token.string {
color: #EFFA72;
}

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

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

.token.deliminator {
font-weight:bold;
}

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

.token.important {
font-weight: bold;
}

.token.entity {
cursor: help;
}

.token.deliminator {
font-weight:bold;
}
Loading