Skip to content

Commit

Permalink
Lots of small changes
Browse files Browse the repository at this point in the history
1. Using Monochrome theme
2. All the `--color` theme is black
3. Add a HTML `pre` block to partials
4. Rename the current block to `pre-py`
5. Recompile all Markdown demos.

I've added a commented out chunk of code to check over later to `skylighting.less` — need to check #78 and fix.
  • Loading branch information
badlydrawnrob committed Jul 14, 2024
1 parent df11205 commit fc1694f
Show file tree
Hide file tree
Showing 12 changed files with 455 additions and 467 deletions.
93 changes: 27 additions & 66 deletions build/markdown/partials.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,72 +13,9 @@
span.underline{text-decoration: underline;}
div.column{display: inline-block; vertical-align: top; width: 50%;}
</style>
<style>
pre > code.sourceCode { white-space: pre; position: relative; }
pre > code.sourceCode > span { line-height: 1.25; }
pre > code.sourceCode > span:empty { height: 1.2em; }
.sourceCode { overflow: visible; }
code.sourceCode > span { color: inherit; text-decoration: inherit; }
div.sourceCode { margin: 1em 0; }
pre.sourceCode { margin: 0; }
@media screen {
div.sourceCode { overflow: auto; }
}
@media print {
pre > code.sourceCode { white-space: pre-wrap; }
pre > code.sourceCode > span { display: inline-block; text-indent: -5em; padding-left: 5em; }
}
pre.numberSource code
{ counter-reset: source-line 0; }
pre.numberSource code > span
{ position: relative; left: -4em; counter-increment: source-line; }
pre.numberSource code > span > a:first-child::before
{ content: counter(source-line);
position: relative; left: -1em; text-align: right; vertical-align: baseline;
border: none; display: inline-block;
-webkit-touch-callout: none; -webkit-user-select: none;
-khtml-user-select: none; -moz-user-select: none;
-ms-user-select: none; user-select: none;
padding: 0 4px; width: 4em;
color: #aaaaaa;
}
pre.numberSource { margin-left: 3em; border-left: 1px solid #aaaaaa; padding-left: 4px; }
div.sourceCode
{ }
@media screen {
pre > code.sourceCode > span > a:first-child::before { text-decoration: underline; }
}
code span.al { color: #ff0000; font-weight: bold; } /* Alert */
code span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */
code span.at { color: #7d9029; } /* Attribute */
code span.bn { color: #40a070; } /* BaseN */
code span.bu { color: #008000; } /* BuiltIn */
code span.cf { color: #007020; font-weight: bold; } /* ControlFlow */
code span.ch { color: #4070a0; } /* Char */
code span.cn { color: #880000; } /* Constant */
code span.co { color: #60a0b0; font-style: italic; } /* Comment */
code span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */
code span.do { color: #ba2121; font-style: italic; } /* Documentation */
code span.dt { color: #902000; } /* DataType */
code span.dv { color: #40a070; } /* DecVal */
code span.er { color: #ff0000; font-weight: bold; } /* Error */
code span.ex { } /* Extension */
code span.fl { color: #40a070; } /* Float */
code span.fu { color: #06287e; } /* Function */
code span.im { color: #008000; font-weight: bold; } /* Import */
code span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */
code span.kw { color: #007020; font-weight: bold; } /* Keyword */
code span.op { color: #666666; } /* Operator */
code span.ot { color: #007020; } /* Other */
code span.pp { color: #bc7a00; } /* Preprocessor */
code span.sc { color: #4070a0; } /* SpecialChar */
code span.ss { color: #bb6688; } /* SpecialString */
code span.st { color: #4070a0; } /* String */
code span.va { color: #19177c; } /* Variable */
code span.vs { color: #4070a0; } /* VerbatimString */
code span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */
</style>

<link rel="stylesheet" href="../style/print-first-markdown.css" />

</head>
<body>
<header id="title-block-header">
Expand Down Expand Up @@ -139,6 +76,7 @@ <h2 id="h2-curabitur-aliquet-sapien-non-tortor-finibus-iaculis">H2:
<p>Here is an example of inline code <code>var = 1</code>, Keyboard
controls <kbd>⌘ + V</kbd> and a sample <samp>Does not compute,
press: <kbd>Y</kbd> to continue</samp></p>
<h3 id="python-code-block">Python Code Block</h3>
<div class="sourceCode" id="cb1"><pre
class="sourceCode numberSource python numberLines"><code class="sourceCode python"><span id="cb1-1"><a href="#cb1-1"></a><span class="co"># This function adds two numbers</span></span>
<span id="cb1-2"><a href="#cb1-2"></a><span class="kw">def</span> add(x, y):</span>
Expand Down Expand Up @@ -195,6 +133,29 @@ <h2 id="h2-curabitur-aliquet-sapien-non-tortor-finibus-iaculis">H2:
<span id="cb1-53"><a href="#cb1-53"></a> <span class="cf">break</span></span>
<span id="cb1-54"><a href="#cb1-54"></a> <span class="cf">else</span>:</span>
<span id="cb1-55"><a href="#cb1-55"></a> <span class="bu">print</span>(<span class="st">&quot;Invalid Input&quot;</span>)</span></code></pre></div>
<h3 id="html-code-block">HTML Code Block</h3>
<div class="sourceCode" id="cb2"><pre
class="sourceCode html"><code class="sourceCode html"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a><span class="dt">&lt;!DOCTYPE</span> html PUBLIC &quot;-//W3C//DTD HTML 4.01 Transitional//EN&quot;<span class="dt">&gt;</span></span>
<span id="cb2-2"><a href="#cb2-2" aria-hidden="true" tabindex="-1"></a><span class="dt">&lt;</span><span class="kw">html</span><span class="dt">&gt;</span></span>
<span id="cb2-3"><a href="#cb2-3" aria-hidden="true" tabindex="-1"></a> <span class="dt">&lt;</span><span class="kw">head</span><span class="dt">&gt;</span></span>
<span id="cb2-4"><a href="#cb2-4" aria-hidden="true" tabindex="-1"></a> <span class="dt">&lt;</span><span class="kw">title</span><span class="dt">&gt;</span>A Tiny Page<span class="dt">&lt;/</span><span class="kw">title</span><span class="dt">&gt;</span></span>
<span id="cb2-5"><a href="#cb2-5" aria-hidden="true" tabindex="-1"></a> <span class="dt">&lt;</span><span class="kw">style</span><span class="ot"> type</span><span class="op">=</span><span class="st">&quot;text/css&quot;</span><span class="dt">&gt;</span></span>
<span id="cb2-6"><a href="#cb2-6" aria-hidden="true" tabindex="-1"></a> &lt;!-- p { <span class="kw">font-size</span><span class="ch">:</span><span class="dv">15</span><span class="dt">pt</span><span class="op">;</span> <span class="kw">color</span><span class="ch">:</span><span class="cn">#000</span> } --<span class="op">&gt;</span></span>
<span id="cb2-7"><a href="#cb2-7" aria-hidden="true" tabindex="-1"></a> <span class="dt">&lt;/</span><span class="kw">style</span><span class="dt">&gt;</span></span>
<span id="cb2-8"><a href="#cb2-8" aria-hidden="true" tabindex="-1"></a> <span class="dt">&lt;/</span><span class="kw">head</span><span class="dt">&gt;</span><span class="co">&lt;!-- real comment --&gt;</span></span>
<span id="cb2-9"><a href="#cb2-9" aria-hidden="true" tabindex="-1"></a> <span class="dt">&lt;</span><span class="kw">body</span><span class="ot"> bgcolor</span><span class="op">=</span><span class="st">&quot;#FFFFFF&quot;</span><span class="ot"> text</span><span class="op">=</span><span class="st">&quot;#000000&quot;</span><span class="ot"> link</span><span class="op">=</span><span class="st">&quot;#0000CC&quot;</span><span class="dt">&gt;</span></span>
<span id="cb2-10"><a href="#cb2-10" aria-hidden="true" tabindex="-1"></a> <span class="dt">&lt;</span><span class="kw">script</span><span class="ot"> language</span><span class="op">=</span><span class="st">&quot;javascript&quot;</span><span class="ot"> type=</span><span class="st">&quot;text/javascript&quot;</span><span class="dt">&gt;</span></span>
<span id="cb2-11"><a href="#cb2-11" aria-hidden="true" tabindex="-1"></a> <span class="kw">function</span> <span class="fu">changeHeight</span>(h) {</span>
<span id="cb2-12"><a href="#cb2-12" aria-hidden="true" tabindex="-1"></a> <span class="kw">var</span> tds <span class="op">=</span> <span class="bu">document</span><span class="op">.</span><span class="fu">getElementsByTagName</span>(<span class="st">&quot;td&quot;</span>)<span class="op">;</span></span>
<span id="cb2-13"><a href="#cb2-13" aria-hidden="true" tabindex="-1"></a> <span class="cf">for</span>(<span class="kw">var</span> i <span class="op">=</span> <span class="dv">0</span><span class="op">;</span> i <span class="op">&lt;</span> tds<span class="op">.</span><span class="at">length</span><span class="op">;</span> i<span class="op">++</span>) {</span>
<span id="cb2-14"><a href="#cb2-14" aria-hidden="true" tabindex="-1"></a> tds[i]<span class="op">.</span><span class="fu">setAttribute</span>(<span class="st">&quot;height&quot;</span><span class="op">,</span> h <span class="op">+</span> <span class="st">&quot;px&quot;</span>)<span class="op">;</span></span>
<span id="cb2-15"><a href="#cb2-15" aria-hidden="true" tabindex="-1"></a> }}</span>
<span id="cb2-16"><a href="#cb2-16" aria-hidden="true" tabindex="-1"></a> <span class="dt">&lt;/</span><span class="kw">script</span><span class="dt">&gt;</span></span>
<span id="cb2-17"><a href="#cb2-17" aria-hidden="true" tabindex="-1"></a> <span class="dt">&lt;</span><span class="kw">h1</span><span class="dt">&gt;</span>abc<span class="dt">&lt;/</span><span class="kw">h1</span><span class="dt">&gt;</span></span>
<span id="cb2-18"><a href="#cb2-18" aria-hidden="true" tabindex="-1"></a> <span class="dt">&lt;</span><span class="kw">h2</span><span class="dt">&gt;</span>def<span class="dt">&lt;/</span><span class="kw">h2</span><span class="dt">&gt;</span></span>
<span id="cb2-19"><a href="#cb2-19" aria-hidden="true" tabindex="-1"></a> <span class="dt">&lt;</span><span class="kw">p</span><span class="dt">&gt;</span>Testing page<span class="dt">&lt;/</span><span class="kw">p</span><span class="dt">&gt;</span></span>
<span id="cb2-20"><a href="#cb2-20" aria-hidden="true" tabindex="-1"></a> <span class="dt">&lt;/</span><span class="kw">body</span><span class="dt">&gt;</span></span>
<span id="cb2-21"><a href="#cb2-21" aria-hidden="true" tabindex="-1"></a><span class="dt">&lt;/</span><span class="kw">html</span><span class="dt">&gt;</span></span></code></pre></div>
<table>
<thead>
<tr>
Expand Down Expand Up @@ -224,4 +185,4 @@ <h2 id="h2-curabitur-aliquet-sapien-non-tortor-finibus-iaculis">H2:
</main>

</body>
</html>
</html>
Loading

0 comments on commit fc1694f

Please sign in to comment.