Actualiza estilos para las notas y los snippets

El "Archivo de notas" y los "Marcadores" se han integrado en un único
bloque llamado "Notas rápidas". Y para los snippets se han descargado
las versiones más recientes de Prismjs del plugin Highlighting Code
Block. Se ajustan los estilos para tener en cuenta estos cambios.
This commit is contained in:
Manuel Cillero 2022-02-06 18:47:25 +01:00
parent d375f803ac
commit 1932537e7e
4 changed files with 90 additions and 366 deletions

View file

@ -69,8 +69,19 @@ function fix_single_post_title( $args, $id ) {
else { else {
// Post categories by name: // Post categories by name:
$categories = array_values( array_column( get_the_category(), 'name' ) ); $categories = array_values( array_column( get_the_category(), 'name' ) );
if ( in_array( $categories[0], array( 'Blog', 'Archivo de notas', 'Marcadores', 'Álbum de fotos' ) ) ) { switch ($categories[0]) {
$args['title'] = $categories[0]; case 'Blog':
$args['title'] = 'En el blog';
break;
case 'Notas rápidas':
$args['title'] = 'En mis notas';
break;
case 'Snippets':
$args['title'] = 'Picando código';
break;
case 'Álbum de fotos':
$args['title'] = 'Foto del álbum';
break;
} }
} }
} }

View file

@ -1,322 +1,5 @@
/* PrismJS 1.20.0 /* PrismJS 1.26.0
https://prismjs.com/download.html#themes=prism-coy&languages=markup+css+clike+javascript+bash+batch+dart+diff+docker+git+json+markdown+markup-templating+perl+php+rust+sql+toml+typescript&plugins=line-highlight+line-numbers */ https://prismjs.com/download.html#themes=prism-coy&languages=markup+css+clike+javascript+bash+batch+dart+diff+docker+git+json+markdown+markup-templating+perl+php+rust+sql+toml+typescript&plugins=line-highlight+line-numbers */
/** code[class*=language-],pre[class*=language-]{color:#000;background:0 0;font-family:Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace;font-size:1em;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap: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-]{position:relative;margin:.5em 0;overflow:visible;padding:1px}pre[class*=language-]>code{position:relative;z-index:1;border-left:10px solid #358ccb;box-shadow:-1px 0 0 0 #358ccb,0 0 0 1px #dfdfdf;background-color:#fdfdfd;background-image:linear-gradient(transparent 50%,rgba(69,142,209,.04) 50%);background-size:3em 3em;background-origin:content-box;background-attachment:local}code[class*=language-]{max-height:inherit;height:inherit;padding:0 1em;display:block;overflow:auto}:not(pre)>code[class*=language-],pre[class*=language-]{background-color:#fdfdfd;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin-bottom:1em}:not(pre)>code[class*=language-]{position:relative;padding:.2em;border-radius:.3em;color:#c92c2c;border:1px solid rgba(0,0,0,.1);display:inline;white-space:normal}pre[class*=language-]:after,pre[class*=language-]:before{content:'';display:block;position:absolute;bottom:.75em;left:.18em;width:40%;height:20%;max-height:13em;box-shadow:0 13px 8px #979797;-webkit-transform:rotate(-2deg);-moz-transform:rotate(-2deg);-ms-transform:rotate(-2deg);-o-transform:rotate(-2deg);transform:rotate(-2deg)}pre[class*=language-]:after{right:.75em;left:auto;-webkit-transform:rotate(2deg);-moz-transform:rotate(2deg);-ms-transform:rotate(2deg);-o-transform:rotate(2deg);transform:rotate(2deg)}.token.block-comment,.token.cdata,.token.comment,.token.doctype,.token.prolog{color:#7d8b99}.token.punctuation{color:#5f6364}.token.boolean,.token.constant,.token.deleted,.token.function-name,.token.number,.token.property,.token.symbol,.token.tag{color:#c92c2c}.token.attr-name,.token.builtin,.token.char,.token.function,.token.inserted,.token.selector,.token.string{color:#2f9c0a}.token.entity,.token.operator,.token.url,.token.variable{color:#a67f59;background:rgba(255,255,255,.5)}.token.atrule,.token.attr-value,.token.class-name,.token.keyword{color:#1990b8}.token.important,.token.regex{color:#e90}.language-css .token.string,.style .token.string{color:#a67f59;background:rgba(255,255,255,.5)}.token.important{font-weight:400}.token.bold{font-weight:700}.token.italic{font-style:italic}.token.entity{cursor:help}.token.namespace{opacity:.7}@media screen and (max-width:767px){pre[class*=language-]:after,pre[class*=language-]:before{bottom:14px;box-shadow:none}}pre[class*=language-].line-numbers.line-numbers{padding-left:0}pre[class*=language-].line-numbers.line-numbers code{padding-left:3.8em}pre[class*=language-].line-numbers.line-numbers .line-numbers-rows{left:0}pre[class*=language-][data-line]{padding-top:0;padding-bottom:0;padding-left:0}pre[data-line] code{position:relative;padding-left:4em}pre .line-highlight{margin-top:0}
* prism.js Coy theme for JavaScript, CoffeeScript, CSS and HTML pre[data-line]{position:relative;padding:1em 0 1em 3em}.line-highlight{position:absolute;left:0;right:0;padding:inherit 0;margin-top:1em;background:hsla(24,20%,50%,.08);background:linear-gradient(to right,hsla(24,20%,50%,.1) 70%,hsla(24,20%,50%,0));pointer-events:none;line-height:inherit;white-space:pre}@media print{.line-highlight{-webkit-print-color-adjust:exact;color-adjust:exact}}.line-highlight:before,.line-highlight[data-end]:after{content:attr(data-start);position:absolute;top:.4em;left:.6em;min-width:1em;padding:0 .5em;background-color:hsla(24,20%,50%,.4);color:#f4f1ef;font:bold 65%/1.5 sans-serif;text-align:center;vertical-align:.3em;border-radius:999px;text-shadow:none;box-shadow:0 1px #fff}.line-highlight[data-end]:after{content:attr(data-end);top:auto;bottom:.4em}.line-numbers .line-highlight:after,.line-numbers .line-highlight:before{content:none}pre[id].linkable-line-numbers span.line-numbers-rows{pointer-events:all}pre[id].linkable-line-numbers span.line-numbers-rows>span:before{cursor:pointer}pre[id].linkable-line-numbers span.line-numbers-rows>span:hover:before{background-color:rgba(128,128,128,.2)}
* Based on https://github.com/tshedor/workshop-wp-theme (Example: http://workshop.kansan.com/category/sessions/basics or http://workshop.timshedor.com/category/sessions/basics); pre[class*=language-].line-numbers{position:relative;padding-left:3.8em;counter-reset:linenumber}pre[class*=language-].line-numbers>code{position:relative;white-space:inherit}.line-numbers .line-numbers-rows{position:absolute;pointer-events:none;top:0;font-size:100%;left:-3.8em;width:3em;letter-spacing:-1px;border-right:1px solid #999;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.line-numbers-rows>span{display:block;counter-increment:linenumber}.line-numbers-rows>span:before{content:counter(linenumber);color:#999;display:block;padding-right:.8em;text-align:right}
* @author Tim Shedor
*/
code[class*="language-"],
pre[class*="language-"] {
color: black;
background: none;
font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
font-size: 1em;
text-align: left;
white-space: pre;
word-spacing: normal;
word-break: normal;
word-wrap: 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;
}
/* Code blocks */
pre[class*="language-"] {
position: relative;
margin: .5em 0;
overflow: visible;
padding: 0;
}
pre[class*="language-"]>code {
position: relative;
border-left: 10px solid #358ccb;
box-shadow: -1px 0px 0px 0px #358ccb, 0px 0px 0px 1px #dfdfdf;
background-color: #fdfdfd;
background-image: linear-gradient(transparent 50%, rgba(69, 142, 209, 0.04) 50%);
background-size: 3em 3em;
background-origin: content-box;
background-attachment: local;
}
code[class*="language-"] {
max-height: inherit;
height: inherit;
padding: 0 1em;
display: block;
overflow: auto;
}
/* Margin bottom to accommodate shadow */
:not(pre) > code[class*="language-"],
pre[class*="language-"] {
background-color: #fdfdfd;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
margin-bottom: 1em;
}
/* Inline code */
:not(pre) > code[class*="language-"] {
position: relative;
padding: .2em;
border-radius: 0.3em;
color: #c92c2c;
border: 1px solid rgba(0, 0, 0, 0.1);
display: inline;
white-space: normal;
}
pre[class*="language-"]:before,
pre[class*="language-"]:after {
content: '';
z-index: -2;
display: block;
position: absolute;
bottom: 0.75em;
left: 0.18em;
width: 40%;
height: 20%;
max-height: 13em;
box-shadow: 0px 13px 8px #979797;
-webkit-transform: rotate(-2deg);
-moz-transform: rotate(-2deg);
-ms-transform: rotate(-2deg);
-o-transform: rotate(-2deg);
transform: rotate(-2deg);
}
pre[class*="language-"]:after {
right: 0.75em;
left: auto;
-webkit-transform: rotate(2deg);
-moz-transform: rotate(2deg);
-ms-transform: rotate(2deg);
-o-transform: rotate(2deg);
transform: rotate(2deg);
}
.token.comment,
.token.block-comment,
.token.prolog,
.token.doctype,
.token.cdata {
color: #7D8B99;
}
.token.punctuation {
color: #5F6364;
}
.token.property,
.token.tag,
.token.boolean,
.token.number,
.token.function-name,
.token.constant,
.token.symbol,
.token.deleted {
color: #c92c2c;
}
.token.selector,
.token.attr-name,
.token.string,
.token.char,
.token.function,
.token.builtin,
.token.inserted {
color: #2f9c0a;
}
.token.operator,
.token.entity,
.token.url,
.token.variable {
color: #a67f59;
background: rgba(255, 255, 255, 0.5);
}
.token.atrule,
.token.attr-value,
.token.keyword,
.token.class-name {
color: #1990b8;
}
.token.regex,
.token.important {
color: #e90;
}
.language-css .token.string,
.style .token.string {
color: #a67f59;
background: rgba(255, 255, 255, 0.5);
}
.token.important {
font-weight: normal;
}
.token.bold {
font-weight: bold;
}
.token.italic {
font-style: italic;
}
.token.entity {
cursor: help;
}
.token.namespace {
opacity: .7;
}
@media screen and (max-width: 767px) {
pre[class*="language-"]:before,
pre[class*="language-"]:after {
bottom: 14px;
box-shadow: none;
}
}
/* Plugin styles: Line Numbers */
pre[class*="language-"].line-numbers.line-numbers {
padding-left: 0;
}
pre[class*="language-"].line-numbers.line-numbers code {
padding-left: 3.8em;
}
pre[class*="language-"].line-numbers.line-numbers .line-numbers-rows {
left: 0;
}
/* Plugin styles: Line Highlight */
pre[class*="language-"][data-line] {
padding-top: 0;
padding-bottom: 0;
padding-left: 0;
}
pre[data-line] code {
position: relative;
padding-left: 4em;
}
pre .line-highlight {
margin-top: 0;
}
pre[data-line] {
position: relative;
padding: 1em 0 1em 3em;
}
.line-highlight {
position: absolute;
left: 0;
right: 0;
padding: inherit 0;
margin-top: 1em; /* Same as .prisms padding-top */
background: hsla(24, 20%, 50%,.08);
background: linear-gradient(to right, hsla(24, 20%, 50%,.1) 70%, hsla(24, 20%, 50%,0));
pointer-events: none;
line-height: inherit;
white-space: pre;
}
.line-highlight:before,
.line-highlight[data-end]:after {
content: attr(data-start);
position: absolute;
top: .4em;
left: .6em;
min-width: 1em;
padding: 0 .5em;
background-color: hsla(24, 20%, 50%,.4);
color: hsl(24, 20%, 95%);
font: bold 65%/1.5 sans-serif;
text-align: center;
vertical-align: .3em;
border-radius: 999px;
text-shadow: none;
box-shadow: 0 1px white;
}
.line-highlight[data-end]:after {
content: attr(data-end);
top: auto;
bottom: .4em;
}
.line-numbers .line-highlight:before,
.line-numbers .line-highlight:after {
content: none;
}
pre[id].linkable-line-numbers span.line-numbers-rows {
pointer-events: all;
}
pre[id].linkable-line-numbers span.line-numbers-rows > span:before {
cursor: pointer;
}
pre[id].linkable-line-numbers span.line-numbers-rows > span:hover:before {
background-color: rgba(128, 128, 128, .2);
}
pre[class*="language-"].line-numbers {
position: relative;
padding-left: 3.8em;
counter-reset: linenumber;
}
pre[class*="language-"].line-numbers > code {
position: relative;
white-space: inherit;
}
.line-numbers .line-numbers-rows {
position: absolute;
pointer-events: none;
top: 0;
font-size: 100%;
left: -3.8em;
width: 3em; /* works for line-numbers below 1000 lines */
letter-spacing: -1px;
border-right: 1px solid #999;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.line-numbers-rows > span {
display: block;
counter-increment: linenumber;
}
.line-numbers-rows > span:before {
content: counter(linenumber);
color: #999;
display: block;
padding-right: 0.8em;
text-align: right;
}

File diff suppressed because one or more lines are too long

View file

@ -53,7 +53,7 @@ div.container_wrap_first {
div.container_wrap_first > div.container:first-child { div.container_wrap_first > div.container:first-child {
background-color: #fff; background-color: #fff;
} }
body.category-archivo div.container_wrap_first > div.container:first-child { body.category-blog div.container_wrap_first > div.container:first-child {
background: #fff url(images/notebook.jpg) repeat-y left top; background: #fff url(images/notebook.jpg) repeat-y left top;
padding-left: 68px; padding-left: 68px;
} }
@ -475,12 +475,12 @@ span[data-avia-tooltip] {
padding: 4%; padding: 4%;
background-color: black; background-color: black;
} }
/* Marcadores posts */ /* Notas rápidas posts */
article.category-marcadores .entry-content-wrapper div.entry-content { article.category-notes .entry-content-wrapper div.entry-content {
border-left: 7px solid #ccc; border-left: 7px solid #ccc;
padding-left: 20px; padding-left: 20px;
} }
article.category-marcadores > .entry-content-wrapper > div.entry-content::before { article.category-notes > .entry-content-wrapper > div.entry-content::before {
display: block; display: block;
content: ""; content: "";
width: 56px; width: 56px;
@ -490,21 +490,27 @@ article.category-marcadores > .entry-content-wrapper > div.entry-content::before
margin-left: -56px; margin-left: -56px;
background: transparent url(images/clip.png) no-repeat 0 0; background: transparent url(images/clip.png) no-repeat 0 0;
} }
article.category-marcadores .entry-content-wrapper p { article.category-notes .entry-content-wrapper p {
font-size: 1.1em; font-size: 1.1em;
line-height: 1.5em; line-height: 1.5em;
text-align: left; text-align: left;
color: #999999 !important; color: #999999 !important;
} }
/* Quotes posts */ /* Quotes posts */
article.type-quote .post-meta-infos {
position: absolute;
height: 100%;
}
article.type-quote .post-meta-infos > time, article.type-quote .post-meta-infos > time,
article.type-quote .post-meta-infos > span { article.type-quote .post-meta-infos > span {
display: none; display: none;
} }
article.type-quote .post-meta-infos > span.blog-categories { article.type-quote .post-meta-infos > span.blog-categories {
display: block; display: block;
text-indent: -1.325em; position: absolute;
margin-top: 1.4em; bottom: 5em;
white-space: nowrap;
text-indent: -9999px;
} }
article.type-quote .post-meta-infos span.blog-categories a:before { article.type-quote .post-meta-infos span.blog-categories a:before {
content: "— "; content: "— ";
@ -512,7 +518,7 @@ article.type-quote .post-meta-infos span.blog-categories a:before {
article.type-quote .post-meta-infos span.blog-categories a { article.type-quote .post-meta-infos span.blog-categories a {
font-size: 1.4em; font-size: 1.4em;
color: #797979; color: #797979;
padding-left: 4px; padding-left: 9999px;
} }
article.type-quote .entry-content-wrapper div.entry-content { article.type-quote .entry-content-wrapper div.entry-content {
padding-left: 60px; padding-left: 60px;
@ -609,16 +615,21 @@ li.comment {
} }
#commentform p > input[type="text"] { #commentform p > input[type="text"] {
margin-bottom: 5px; margin-bottom: 5px;
width: 220px !important;
} }
#commentform label { #commentform label {
position: absolute !important;
left: 230px; left: 230px;
font-size: 14px; font-size: 14px;
margin-top: .2em; /* margin-top: .2em;*/
line-height: 1.4em; line-height: 1.4em;
color: #777; color: #777;
} }
#commentform label .required {
display: inline;
}
#commentform input[type='checkbox'] { #commentform input[type='checkbox'] {
margin-top: 1em; margin-top: .8em;
} }
#commentform p.comment-form-av-privatepolicy { #commentform p.comment-form-av-privatepolicy {
margin: 0 !important; margin: 0 !important;
@ -628,6 +639,9 @@ li.comment {
margin-top: 0; margin-top: 0;
font-weight: normal; font-weight: normal;
} }
#commentform p.comment-form-av-privatepolicy label {
display: inline;
}
#commentform p.comment-form-av-privatepolicy label a { #commentform p.comment-form-av-privatepolicy label a {
font-weight: bold; font-weight: bold;
} }
@ -711,15 +725,31 @@ div.lwptoc_item > div.lwptoc_itemWrap span.lwptoc_item_label:before {
display: flex !important; display: flex !important;
margin: 0 !important; margin: 0 !important;
} }
.hcb_wrap.hcb_wrap pre {
padding: 0 !important;
}
.hcb_wrap.hcb_wrap code {
border-radius: 0;
border: 1px solid #e1e1e1 !important;
border-left: 10px solid #358ccb !important;
background-color: rgb(252, 252, 252) !important;
padding: .5em 1.5em !important;
}
.hcb_wrap .line-numbers .line-numbers-rows {
padding: .5em 0 !important;
top: 0 !important;
}
.hcb_wrap .line-numbers code {
padding-left: 3.8em !important;
}
.hcb_wrap .line-highlight { .hcb_wrap .line-highlight {
margin-top: 0 !important; margin-top: .5em !important;
width: 100% !important;
background: linear-gradient(to right, hsla(24, 20%, 49%, .2), #fcfcfc00) !important;
z-index: 10;
} }
.hcb_wrap .undefined-numbers .line-highlight { .hcb_wrap .line-numbers .line-highlight {
margin-top: 9px !important; margin-top: -0.5em !important;
}
.hcb_wrap .undefined-numbers code {
padding-top: 9px !important;
padding-bottom: 9px !important;
} }
/* /*
@ -1311,7 +1341,7 @@ body.tax-quote_author_tag .quote-author a:hover {
div.container_wrap_first { div.container_wrap_first {
background: #fff; background: #fff;
} }
body.category-archivo div.container_wrap_first > div.container:first-child, body.category-blog div.container_wrap_first > div.container:first-child,
body.archive.tag div.container_wrap_first > div.container:first-child, body.archive.tag div.container_wrap_first > div.container:first-child,
body.page-id-121962 div.container_wrap_first > div.container:first-child { body.page-id-121962 div.container_wrap_first > div.container:first-child {
background: #fff; background: #fff;
@ -1363,8 +1393,8 @@ body.tax-quote_author_tag .quote-author a:hover {
.page-id-5502 .avia-content-slider.avia-builder-el-2 .slide-entry-excerpt { .page-id-5502 .avia-content-slider.avia-builder-el-2 .slide-entry-excerpt {
font-size: 100%; font-size: 100%;
} }
/* Marcadores posts */ /* Notas rápidas posts */
article.category-marcadores > .entry-content-wrapper > div.entry-content::before { article.category-notes > .entry-content-wrapper > div.entry-content::before {
display: none; display: none;
} }
} }
@ -1489,7 +1519,7 @@ body.tax-quote_author_tag .quote-author a:hover {
#top .alternate_color.title_container .main-title a { #top .alternate_color.title_container .main-title a {
color: #ff3300 !important; color: #ff3300 !important;
} }
body.category-archivo div.container_wrap_first > div.container:first-child, body.category-blog div.container_wrap_first > div.container:first-child,
body.archive.tag div.container_wrap_first > div.container:first-child, body.archive.tag div.container_wrap_first > div.container:first-child,
body.page-id-121962 div.container_wrap_first > div.container:first-child { body.page-id-121962 div.container_wrap_first > div.container:first-child {
background: #fff; background: #fff;