fix code display
This commit is contained in:
parent
68cf30b2d5
commit
7f8370b67e
2 changed files with 31 additions and 10 deletions
|
@ -60,6 +60,7 @@ table.striped tr:nth-child(even) {
|
||||||
}
|
}
|
||||||
|
|
||||||
.blob-contents {
|
.blob-contents {
|
||||||
|
background-color: rgba(0, 0, 0, 0.1);
|
||||||
width: 100%;
|
width: 100%;
|
||||||
overflow-x: auto;
|
overflow-x: auto;
|
||||||
font-family: var(--mono-font);
|
font-family: var(--mono-font);
|
||||||
|
@ -67,8 +68,27 @@ table.striped tr:nth-child(even) {
|
||||||
}
|
}
|
||||||
|
|
||||||
.blob-contents .left {
|
.blob-contents .left {
|
||||||
margin-right: 12px;
|
margin-right: 8px;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
|
line-height: 20px;
|
||||||
|
background-color: rgba(0, 0, 0, 0.1);
|
||||||
|
}
|
||||||
|
|
||||||
|
.blob-contents .left ul {
|
||||||
|
display: block;
|
||||||
|
list-style-type: none;
|
||||||
|
margin-top: 0;
|
||||||
|
padding-left: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.blob-contents .left ul .line {
|
||||||
|
padding: 0 4px;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.blob-contents .right pre {
|
||||||
|
line-height: 20px;
|
||||||
|
margin-top: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.readme {
|
.readme {
|
||||||
|
|
|
@ -6,17 +6,18 @@
|
||||||
{% if blob.lines %}
|
{% if blob.lines %}
|
||||||
<div class="blob-contents">
|
<div class="blob-contents">
|
||||||
<div class="left">
|
<div class="left">
|
||||||
{% for _ in blob.lines %}
|
<ul>
|
||||||
<a name="L{{ loop.index }}" />
|
{% for _ in blob.lines %}
|
||||||
<a href="#L{{ loop.index }}" title="permalink to line {{ loop.index }}">{{ loop.index }}</a>
|
<a name="L{{ loop.index }}" />
|
||||||
<br />
|
<a href="#L{{ loop.index }}" title="permalink to line {{ loop.index }}">
|
||||||
{% endfor %}
|
<li class="line">{{ loop.index }}</li>
|
||||||
|
</a>
|
||||||
|
{% endfor %}
|
||||||
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="right">
|
<div class="right">
|
||||||
{% for line in blob.lines %}
|
<pre>{% for line in blob.lines %}{{ line }}
|
||||||
<pre>{{ line }}</pre>
|
{% endfor %}</pre>
|
||||||
<br />
|
|
||||||
{% endfor %}
|
|
||||||
</div>
|
</div>
|
||||||
</pre>
|
</pre>
|
||||||
{% else %}
|
{% else %}
|
||||||
|
|
Loading…
Add table
Reference in a new issue