mirror of
https://github.com/DarrenOfficial/dpaste.git
synced 2024-11-15 08:02:54 +11:00
Cleanup
This commit is contained in:
parent
4f2cf9dcbc
commit
0fc6801213
5 changed files with 20 additions and 22 deletions
|
@ -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 += ',';
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -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,17 +59,24 @@ 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;
|
||||||
margin: 20px 0;
|
margin: 20px 0;
|
||||||
background-color: $metaBgColor;
|
background-color: $metaBgColor;
|
||||||
|
|
||||||
.admonition-title {
|
.admonition-title {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
font-weight: $baseFontBold;
|
font-weight: $baseFontBold;
|
||||||
}
|
}
|
||||||
|
@ -97,6 +99,7 @@ article {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Content pages (About page)
|
||||||
article.content-page {
|
article.content-page {
|
||||||
h2 { margin-top: 0; }
|
h2 { margin-top: 0; }
|
||||||
}
|
}
|
||||||
|
|
|
@ -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 %}
|
||||||
|
|
|
@ -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)
|
||||||
|
|
Loading…
Reference in a new issue