Skip to content

Commit

Permalink
Updated code block styles.
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanbohacek committed Apr 14, 2021
1 parent f4a3c43 commit 3816d66
Show file tree
Hide file tree
Showing 50 changed files with 3,395 additions and 58 deletions.
16 changes: 16 additions & 0 deletions css/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -8231,6 +8231,22 @@ div.bottom-page-links {
-webkit-box-shadow: 4px 6px 0 rgba(0, 0, 0, 0.5);
box-shadow: 4px 6px 0 rgba(0, 0, 0, 0.5); } }

.wp-block-code {
padding: 0 !important;
border: none !important;
border-radius: 10px !important; }
.wp-block-code code {
border-radius: 10px !important; }

code.hljs {
position: relative; }
code.hljs label {
position: absolute;
color: lightgray;
right: 10px;
top: 4px;
font-size: 11px; }

/* Home page styles */
body.home article,
div#menu-wrapper {
Expand Down
2 changes: 1 addition & 1 deletion css/styles.min.css

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -223,8 +223,8 @@ function load_js_libraries(){
global $post;

if ( strpos( get_post_field( 'post_content', $post->ID ), '<code' ) !== false ){
wp_register_style( 'highlight-monokai-sublime', get_template_directory_uri() . '/libs/highlight.js/styles/monokai-sublime.css' );
wp_enqueue_style( 'highlight-monokai-sublime' );
wp_register_style( 'highlight-dark', get_template_directory_uri() . '/libs/highlight.js/styles/dark.css' );
wp_enqueue_style( 'highlight-dark' );
wp_register_script( 'highlight', get_template_directory_uri() . '/libs/highlight.js/highlight.pack.js', array( 'jquery' ) );
wp_enqueue_script( 'highlight' );
}
Expand Down
2 changes: 1 addition & 1 deletion js/scripts.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/scripts.min.js.map

Large diffs are not rendered by default.

99 changes: 99 additions & 0 deletions libs/highlight.js/styles/a11y-dark.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
/* a11y-dark theme */
/* Based on the Tomorrow Night Eighties theme: https://github.com/isagalaev/highlight.js/blob/master/src/styles/tomorrow-night-eighties.css */
/* @author: ericwbailey */

/* Comment */
.hljs-comment,
.hljs-quote {
color: #d4d0ab;
}

/* Red */
.hljs-variable,
.hljs-template-variable,
.hljs-tag,
.hljs-name,
.hljs-selector-id,
.hljs-selector-class,
.hljs-regexp,
.hljs-deletion {
color: #ffa07a;
}

/* Orange */
.hljs-number,
.hljs-built_in,
.hljs-builtin-name,
.hljs-literal,
.hljs-type,
.hljs-params,
.hljs-meta,
.hljs-link {
color: #f5ab35;
}

/* Yellow */
.hljs-attribute {
color: #ffd700;
}

/* Green */
.hljs-string,
.hljs-symbol,
.hljs-bullet,
.hljs-addition {
color: #abe338;
}

/* Blue */
.hljs-title,
.hljs-section {
color: #00e0e0;
}

/* Purple */
.hljs-keyword,
.hljs-selector-tag {
color: #dcc6e0;
}

.hljs {
display: block;
overflow-x: auto;
background: #2b2b2b;
color: #f8f8f2;
padding: 0.5em;
}

.hljs-emphasis {
font-style: italic;
}

.hljs-strong {
font-weight: bold;
}

@media screen and (-ms-high-contrast: active) {
.hljs-addition,
.hljs-attribute,
.hljs-built_in,
.hljs-builtin-name,
.hljs-bullet,
.hljs-comment,
.hljs-link,
.hljs-literal,
.hljs-meta,
.hljs-number,
.hljs-params,
.hljs-string,
.hljs-symbol,
.hljs-type,
.hljs-quote {
color: highlight;
}

.hljs-keyword,
.hljs-selector-tag {
font-weight: bold;
}
}
99 changes: 99 additions & 0 deletions libs/highlight.js/styles/a11y-light.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
/* a11y-light theme */
/* Based on the Tomorrow Night Eighties theme: https://github.com/isagalaev/highlight.js/blob/master/src/styles/tomorrow-night-eighties.css */
/* @author: ericwbailey */

/* Comment */
.hljs-comment,
.hljs-quote {
color: #696969;
}

/* Red */
.hljs-variable,
.hljs-template-variable,
.hljs-tag,
.hljs-name,
.hljs-selector-id,
.hljs-selector-class,
.hljs-regexp,
.hljs-deletion {
color: #d91e18;
}

/* Orange */
.hljs-number,
.hljs-built_in,
.hljs-builtin-name,
.hljs-literal,
.hljs-type,
.hljs-params,
.hljs-meta,
.hljs-link {
color: #aa5d00;
}

/* Yellow */
.hljs-attribute {
color: #aa5d00;
}

/* Green */
.hljs-string,
.hljs-symbol,
.hljs-bullet,
.hljs-addition {
color: #008000;
}

/* Blue */
.hljs-title,
.hljs-section {
color: #007faa;
}

/* Purple */
.hljs-keyword,
.hljs-selector-tag {
color: #7928a1;
}

.hljs {
display: block;
overflow-x: auto;
background: #fefefe;
color: #545454;
padding: 0.5em;
}

.hljs-emphasis {
font-style: italic;
}

.hljs-strong {
font-weight: bold;
}

@media screen and (-ms-high-contrast: active) {
.hljs-addition,
.hljs-attribute,
.hljs-built_in,
.hljs-builtin-name,
.hljs-bullet,
.hljs-comment,
.hljs-link,
.hljs-literal,
.hljs-meta,
.hljs-number,
.hljs-params,
.hljs-string,
.hljs-symbol,
.hljs-type,
.hljs-quote {
color: highlight;
}

.hljs-keyword,
.hljs-selector-tag {
font-weight: bold;
}
}
4 changes: 2 additions & 2 deletions libs/highlight.js/styles/agate.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*!
* Agate by Taufik Nurrohman <https://github.com/tovic>
* ----------------------------------------------------
* Agate by Taufik Nurrohman <https://github.com/taufik-nurrohman>
* ---------------------------------------------------------------
*
* #ade5fc
* #a2fca2
Expand Down
89 changes: 89 additions & 0 deletions libs/highlight.js/styles/an-old-hope.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
/*
An Old Hope – Star Wars Syntax (c) Gustavo Costa <[email protected]>
Original theme - Ocean Dark Theme – by https://github.com/gavsiu
Based on Jesse Leite's Atom syntax theme 'An Old Hope' – https://github.com/JesseLeite/an-old-hope-syntax-atom
*/

/* Death Star Comment */
.hljs-comment,
.hljs-quote
{
color: #B6B18B;
}

/* Darth Vader */
.hljs-variable,
.hljs-template-variable,
.hljs-tag,
.hljs-name,
.hljs-selector-id,
.hljs-selector-class,
.hljs-regexp,
.hljs-deletion
{
color: #EB3C54;
}

/* Threepio */
.hljs-number,
.hljs-built_in,
.hljs-builtin-name,
.hljs-literal,
.hljs-type,
.hljs-params,
.hljs-meta,
.hljs-link
{
color: #E7CE56;
}

/* Luke Skywalker */
.hljs-attribute
{
color: #EE7C2B;
}

/* Obi Wan Kenobi */
.hljs-string,
.hljs-symbol,
.hljs-bullet,
.hljs-addition
{
color: #4FB4D7;
}

/* Yoda */
.hljs-title,
.hljs-section
{
color: #78BB65;
}

/* Mace Windu */
.hljs-keyword,
.hljs-selector-tag
{
color: #B45EA4;
}

/* Millenium Falcon */
.hljs
{
display: block;
overflow-x: auto;
background: #1C1D21;
color: #c0c5ce;
padding: 0.5em;
}

.hljs-emphasis
{
font-style: italic;
}

.hljs-strong
{
font-weight: bold;
}
1 change: 0 additions & 1 deletion libs/highlight.js/styles/arduino-light.css
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ Arduino® Light Theme - Stefania Mellai <[email protected]>
}

.hljs-meta {
color: #728E00;
color: #434f54;
}

Expand Down
Loading

0 comments on commit 3816d66

Please sign in to comment.