fixed display on Edge.
This commit is contained in:
parent
6aded1f5a9
commit
b52b925add
|
@ -127,7 +127,7 @@ section#preview {
|
|||
max-width: none;
|
||||
text-align: center;
|
||||
transition: background 1.2s ease;
|
||||
font-size: smaller;
|
||||
font-size: 80%;
|
||||
}
|
||||
section#preview pre {
|
||||
display: inline-block;
|
||||
|
|
|
@ -15,7 +15,7 @@ var CompactPicker = Vue.component('compact-picker', {
|
|||
var CodeSnippet = Vue.component('snippet', {
|
||||
template: '#code-snippet-template',
|
||||
props: {
|
||||
id: String,
|
||||
name: String,
|
||||
current: String
|
||||
},
|
||||
data: {},
|
||||
|
@ -31,4 +31,4 @@ var codeArea = new Vue({
|
|||
theme: 'dark'
|
||||
}
|
||||
});
|
||||
codeArea.snippets = codeArea.$children.map(function(e){ return e.id }).filter(function(x){ return !!x });
|
||||
codeArea.snippets = codeArea.$children.map(function(e){ return e.name }).filter(function(x){ return !!x });
|
12
index.html
12
index.html
|
@ -42,7 +42,7 @@
|
|||
</section>
|
||||
|
||||
<section id="preview" class="{{theme}}">
|
||||
<snippet v-bind:id="('javascript')" v-bind:current="snippet"><code class="javascript hljs"><span class=hljs-keyword>var</span> languages = [
|
||||
<snippet v-bind:name="'javascript'" v-bind:current="snippet"><code class="javascript hljs"><span class=hljs-keyword>var</span> languages = [
|
||||
{lang: <span class=hljs-string>'English'</span>, sample: <span class=hljs-string>'Shaw, those twelve beige hooks are joined if I patch a young, gooey mouth.'</span>},
|
||||
{lang: <span class=hljs-string>'IPA'</span>, sample: <span class=hljs-string>'[ɢʷɯʔ.nas.doːŋ.kʰlja] [ŋan.ȵʑi̯wo.ɕi̯uĕn.ɣwa]'</span>},
|
||||
{lang: <span class=hljs-string>'Bulgarian'</span>, sample: <span class=hljs-string>'Я, пазачът Вальо уж бди, а скришом хапва кюфтенца зад щайгите.'</span>},
|
||||
|
@ -69,7 +69,7 @@
|
|||
{lang: <span class=hljs-string>'Ukrainian'</span>, sample: <span class=hljs-string>'Чуєш їх, доцю, га? Кумедна ж ти, прощайся без ґольфів!'</span>}
|
||||
]
|
||||
</code></snippet>
|
||||
<snippet v-bind:id="('cpp')" v-bind:current="snippet"><code class="cpp hljs">
|
||||
<snippet v-bind:name="'cpp'" v-bind:current="snippet"><code class="cpp hljs">
|
||||
<span class=hljs-preprocessor>#<span class=hljs-keyword>include</span> <span class=hljs-string><math.h></span> // smallpt, a Path Tracer by Kevin Beason, 2008 </span>
|
||||
<span class=hljs-preprocessor>#<span class=hljs-keyword>include</span> <span class=hljs-string><stdlib.h></span> // Make : g++ -O3 -fopenmp smallpt.cpp -o smallpt </span>
|
||||
<span class=hljs-preprocessor>#<span class=hljs-keyword>include</span> <span class=hljs-string><stdio.h></span> // </span>
|
||||
|
@ -169,7 +169,7 @@ Sphere spheres[] = {<span class=hljs-comment>//Scene: radius, position, emission
|
|||
<span class=hljs-keyword>for</span> (<span class=hljs-keyword>int</span> i=<span class=hljs-number>0</span>; i<w*h; i++)
|
||||
<span class=hljs-built_in>fprintf</span>(f,<span class=hljs-string>"%d %d %d "</span>, toInt(c[i].x), toInt(c[i].y), toInt(c[i].z));
|
||||
} </code></snippet>
|
||||
<snippet v-bind:id="('less')" v-bind:current="snippet"><code class="less hljs"><span class=hljs-comment>// Bootstrap</span>
|
||||
<snippet v-bind:name="'less'" v-bind:current="snippet"><code class="less hljs"><span class=hljs-comment>// Bootstrap</span>
|
||||
<span class=hljs-comment>// Buttons</span>
|
||||
<span class=hljs-comment>// --------------------------------------------------</span>
|
||||
|
||||
|
@ -256,7 +256,7 @@ Sphere spheres[] = {<span class=hljs-comment>//Scene: radius, position, emission
|
|||
<span class=hljs-class>.btn-danger</span> {
|
||||
<span class=hljs-class>.button-variant</span>(<span class=hljs-variable>@btn-danger-color</span>; <span class=hljs-variable>@btn-danger-bg</span>; <span class=hljs-variable>@btn-danger-border</span>);
|
||||
}</code></snippet>
|
||||
<snippet v-bind:id="('python')" v-bind:current="snippet"><code class="python hljs"><span class=hljs-comment># Curio, https://github.com/dabeaz/curio/blob/master/curio/network.py</span>
|
||||
<snippet v-bind:name="'python'" v-bind:current="snippet"><code class="python hljs"><span class=hljs-comment># Curio, https://github.com/dabeaz/curio/blob/master/curio/network.py</span>
|
||||
<span class=hljs-keyword>async</span> <span class=hljs-function><span class=hljs-keyword>def</span> <span class=hljs-title>open_connection</span><span class=hljs-params>(host, port, *, ssl=None, source_addr=None, server_hostname=None, timeout=None)</span>:</span>
|
||||
<span class=hljs-string>'''
|
||||
Create a TCP connection to a given Internet host and port with optional SSL applied to it.
|
||||
|
@ -293,7 +293,7 @@ Sphere spheres[] = {<span class=hljs-comment>//Scene: radius, position, emission
|
|||
sock._socket.close()
|
||||
<span class=hljs-keyword>raise</span>
|
||||
</code></snippet>
|
||||
<snippet v-bind:id="('elixir')" v-bind:current="snippet"><code class="elixiar hljs ruby"><span class=hljs-comment># Phoenix, https://github.com/phoenixframework/phoenix/blob/master/lib/phoenix.ex</span>
|
||||
<snippet v-bind:name="'elixir'" v-bind:current="snippet"><code class="elixiar hljs ruby"><span class=hljs-comment># Phoenix, https://github.com/phoenixframework/phoenix/blob/master/lib/phoenix.ex</span>
|
||||
defmodule <span class=hljs-constant>Phoenix</span> <span class=hljs-keyword>do</span>
|
||||
<span class=hljs-variable>@moduledoc</span> <span class=hljs-string>""</span><span class=hljs-string>"
|
||||
This is documentation for the Phoenix project.
|
||||
|
@ -337,7 +337,7 @@ defmodule <span class=hljs-constant>Phoenix</span> <span class=hljs-keyword>do</
|
|||
</template>
|
||||
</script>
|
||||
<script type="text/x-template" id="code-snippet-template">
|
||||
<pre v-bind:id="name" v-show="(id === current)">
|
||||
<pre v-bind:id="name" v-show="(name === current)">
|
||||
<slot></slot>
|
||||
</pre>
|
||||
</script>
|
||||
|
|
Loading…
Reference in New Issue
Block a user