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 */ /*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 // 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) { lines.forEach(function(el) {
el.onclick = function() { el.onclick = function() {
el.classList.toggle('marked'); el.classList.toggle('marked');
let hash = 'L'; let hash = 'L';
let marked = document.querySelectorAll('.snippet-code li.marked'); const marked = document.querySelectorAll('.snippet-code li.marked');
marked.forEach(function(line) { marked.forEach(function(line) {
if (hash !== 'L') { if (hash !== 'L') {
hash += ','; hash += ',';

View file

@ -84,6 +84,10 @@ ul#snippetOptions {
text-decoration: underline; text-decoration: underline;
} }
strong {
font-weight: $baseFontBold;
}
li { li {
margin: 0; margin: 0;
padding: 0 7px; 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 { article {
padding: 0 $boxPadding 40px $boxPadding; padding: 0 $boxPadding 40px $boxPadding;
margin-top: 30px; margin-top: 30px;
@ -21,12 +18,10 @@ article {
h1, h2, h3, h4, h5, h6 { h1, h2, h3, h4, h5, h6 {
font-weight: $baseFontRegular; font-weight: $baseFontRegular;
line-height: 1.3em; line-height: 1.3em;
padding-bottom: 5px;
border-bottom: 1px solid $borderColor;
} }
p { p {
margin: 30px 0; margin: 10px 0 20px 0;
} }
strong, b { strong, b {
@ -64,10 +59,17 @@ article {
font-style: italic; font-style: italic;
} }
// reStructuredText Specific
dl, ul, ol, table { dl, ul, ol, table {
p { margin: 0; } 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 { .admonition {
padding: 10px 10px; padding: 10px 10px;
@ -97,6 +99,7 @@ article {
} }
// Content pages (About page)
article.content-page { article.content-page {
h2 { margin-top: 0; } h2 { margin-top: 0; }
} }

View file

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

View file

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