This commit is contained in:
Martin Mahner 2018-04-07 09:14:32 +02:00
parent 4f2cf9dcbc
commit 0fc6801213
5 changed files with 20 additions and 22 deletions

View file

@ -1,10 +1,5 @@
/*jshint strict:false */
if (typeof console === "undefined" || typeof console.log === "undefined") {
console = {};
console.log = function () { };
}
// -----------------------------------------------------------------------------
// Add data-platform to the body tag to show platform related shortcuts
// -----------------------------------------------------------------------------
@ -68,12 +63,12 @@ if (curLine.startsWith('#L')) {
}
}
let lines = document.querySelectorAll('.snippet-code li');
const lines = document.querySelectorAll('.snippet-code li');
lines.forEach(function(el) {
el.onclick = function() {
el.classList.toggle('marked');
let hash = 'L';
let marked = document.querySelectorAll('.snippet-code li.marked');
const marked = document.querySelectorAll('.snippet-code li.marked');
marked.forEach(function(line) {
if (hash !== 'L') {
hash += ',';

View file

@ -84,6 +84,10 @@ ul#snippetOptions {
text-decoration: underline;
}
strong {
font-weight: $baseFontBold;
}
li {
margin: 0;
padding: 0 7px;

View file

@ -1,9 +1,6 @@
/*
Generic Content pages and Text based lexer.
*/
// Generic content pages such as About/404/500
// and base styles for text based lexer.
article {
padding: 0 $boxPadding 40px $boxPadding;
margin-top: 30px;
@ -21,12 +18,10 @@ article {
h1, h2, h3, h4, h5, h6 {
font-weight: $baseFontRegular;
line-height: 1.3em;
padding-bottom: 5px;
border-bottom: 1px solid $borderColor;
}
p {
margin: 30px 0;
margin: 10px 0 20px 0;
}
strong, b {
@ -64,17 +59,24 @@ article {
font-style: italic;
}
// reStructuredText Specific
dl, ul, ol, table {
p { margin: 0; }
}
}
// Specific styles for text based lexer
article.snippet-text {
h1, h2, h3, h4, h5, h6 {
padding-bottom: 5px;
border-bottom: 1px solid $borderColor;
}
.admonition {
padding: 10px 10px;
margin: 20px 0;
background-color: $metaBgColor;
.admonition-title {
.admonition-title {
margin: 0;
font-weight: $baseFontBold;
}
@ -97,6 +99,7 @@ article {
}
// Content pages (About page)
article.content-page {
h2 { margin-top: 0; }
}

View file

@ -19,9 +19,7 @@
{% block options %}
<ul id="snippetOptions">
<li>
{% blocktrans with snippet.lexer_name as name %}{{ name }} Snippet{% endblocktrans %}
<li class="sep"></li>
<li>
<strong>{{ snippet.lexer_name }}</strong>
{% if snippet.expire_type == 1 %}
{% blocktrans with date=snippet.expires|timeuntil %}Expires in: {{ date }}{% endblocktrans %}
{% elif snippet.expire_type == 2 %}

View file

@ -34,8 +34,6 @@ def inlinestatic(path):
:param path: (string) Filename of the file to include.
:return: (string) The included File or an empty string `''` if the
file was not found, and DEBUG is disabled.
"""
# Filename in build/ directory (when in Watch mode)
filename = find(path)