-
Notifications
You must be signed in to change notification settings - Fork 13.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of #109187 - clubby789:askama-source, r=GuillaumeGomez
Render source page layout with Askama ~~I was looking at making `code_html` render into the buffer instead of in advance, but it turned out to need a pretty big refactor, so starting with rearranging the high-level layout.~~ Found another approach which required much less changes cc #108868
- Loading branch information
Showing
3 changed files
with
67 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<div class="example-wrap"> {# #} | ||
<pre class="src-line-numbers"> | ||
{% for line in lines.clone() %} | ||
{% if embedded %} | ||
<span>{{line|safe}}</span> | ||
{%~ else %} | ||
<a href="#{{line|safe}}" id="{{line|safe}}">{{line|safe}}</a> | ||
{%~ endif %} | ||
{% endfor %} | ||
</pre> {# #} | ||
<pre class="rust"> {# #} | ||
<code> | ||
{% if needs_expansion %} | ||
<button class="expand">↕</button> | ||
{% endif %} | ||
{{code_html|safe}} | ||
</code> {# #} | ||
</pre> {# #} | ||
</div> |