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

Update PrismJS version and add new languages #5

Open
wants to merge 7 commits into
base: develop
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
14 changes: 13 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,16 @@
# v1.0.2
# v1.1.0
## 10/04/2019

1. [](#improved)
* Updated PrismJS 1.16.0 to 1.17.1

2. [](#new)
* Added Batch, C and TypeScript languages

3. [](#bugfix)
* Fixed issue [#4](https://github.com/trilbymedia/grav-plugin-prism-highlight/issues/4)
> Added PowerShell language support

## 06/22/2019

1. [](#bugfix)
Expand Down
72 changes: 38 additions & 34 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,38 +27,43 @@ You should now have all the plugin files under

Prism.js supports currently [176 languages](http://prismjs.com/#languages-list), at the time of this edit, but the ones included in this specific version are:

* markup
* html
* xml
* svg
* mathml
* css
* css-extras
* clike
* javascript, js
* apacheconf
* bash, shell
* coffeescript, coffee
* diff
* docker, dockerfile
* git
* go
* java
* json
* json5
* less
* lua
* markdown, md
* php
* php-extras
* python, py
* regex
* ruby, rb
* sass
* scss
* sql
* twig
* yaml, yml
* Markup
* HTML
* XML
* SVG
* MathML
* CSS
* C-Like, clike
* JavaScript, js
* Apache Configuration, apacheconf
* Bash + Shell
* Batch
* C, c-language
* CoffeeScript, coffee
* CSS Extras, css-extras
* Diff
* Docker, dockerfile
* Git
* Go
* Java
* JSON
* JSON5
* Less
* Lua
* Markdown, md
* Markup templating
* PHP
* PHP Extras, php-extras
* PowerShell
* Python, py
* Regex
* Ruby, rb
* Sass
* Scss
* SQL
* Twig
* TypeScript
* YAML, yml

# Plugins Included

Expand All @@ -77,8 +82,7 @@ In your markdown, you can create a block of code, and assign the language to it.
Example using regular markdown fenced code syntax:

```php
```php
<?php
<?php

namespace Grav\Plugin;

Expand Down
2 changes: 1 addition & 1 deletion blueprints.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Prism Highlighter
version: 1.0.2
version: 1.1.0
description: "This plugin provides code highlighting functionality via the [Prism.js](http://prismjs.com/) syntax highlighter with lots of themes and plugins."
icon: code
author:
Expand Down
22 changes: 14 additions & 8 deletions css/prism.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* PrismJS 1.16.0
https://prismjs.com/download.html#themes=prism&languages=markup+css+clike+javascript+apacheconf+bash+coffeescript+ruby+css-extras+diff+markup-templating+docker+git+go+less+java+php+json+json5+markdown+lua+php-extras+sql+scss+python+sass+twig+yaml+regex&plugins=line-highlight+line-numbers+toolbar+command-line+copy-to-clipboard */
/* PrismJS 1.17.1
https://prismjs.com/download.html#themes=prism&languages=markup+css+clike+javascript+apacheconf+bash+batch+coffeescript+ruby+css-extras+diff+markup-templating+docker+git+go+less+java+php+markdown+json+json5+lua+php-extras+sql+scss+python+sass+twig+yaml+regex&plugins=line-highlight+line-numbers+toolbar+command-line+copy-to-clipboard */

.prism-wrapper {
overflow: hidden;
Expand Down Expand Up @@ -104,8 +104,8 @@ div.code-toolbar {

div.code-toolbar > .toolbar {
position: absolute;
top: 2px;
right: 5px;
top: .3em;
right: .2em;
transition: opacity 0.3s ease-in-out;
opacity: 0;
}
Expand All @@ -114,6 +114,12 @@ div.code-toolbar:hover > .toolbar {
opacity: 1;
}

/* Separate line b/c rules are thrown out if selector is invalid.
IE11 and old Edge versions don't support :focus-within. */
div.code-toolbar:focus-within > .toolbar {
opacity: 1;
}

div.code-toolbar > .toolbar .toolbar-item {
display: inline-block;
}
Expand All @@ -140,11 +146,11 @@ div.code-toolbar > .toolbar button,
div.code-toolbar > .toolbar span {
color: #bbb;
font-size: .8em;
padding: 2px 5px;
padding: 0 .5em;
background: #f5f2f0;
background: rgba(224, 224, 224, 0.2);
/*box-shadow: 0 2px 0 0 rgba(0,0,0,0.2);*/
border-radius: 3px;
box-shadow: 0 2px 0 0 rgba(0,0,0,0.2);
border-radius: .5em;
}

div.code-toolbar > .toolbar a:hover,
Expand All @@ -153,7 +159,7 @@ div.code-toolbar > .toolbar button:hover,
div.code-toolbar > .toolbar button:focus,
div.code-toolbar > .toolbar span:hover,
div.code-toolbar > .toolbar span:focus {
/*color: inherit;*/
color: inherit;
text-decoration: none;
}

Expand Down
Loading