diff options
| author | clubby789 <jamie@hill-daniel.co.uk> | 2023-03-12 16:55:32 +0000 |
|---|---|---|
| committer | clubby789 <jamie@hill-daniel.co.uk> | 2023-03-16 14:33:51 +0000 |
| commit | 102c8fa29028e3fd501fe297a5d7edc86697f3d9 (patch) | |
| tree | 5614f3a01a1dcaf1b1bad88ccf642555ee8fb05a /src/librustdoc/html/templates/source.html | |
| parent | 24c0b81c1fd5de8e00276524896d3352ed91a8cb (diff) | |
Render source page layout with Askama
Co-authored-by: Michael Howell <michael@notriddle.com>
Diffstat (limited to 'src/librustdoc/html/templates/source.html')
| -rw-r--r-- | src/librustdoc/html/templates/source.html | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/librustdoc/html/templates/source.html b/src/librustdoc/html/templates/source.html new file mode 100644 index 00000000000..968b55ac158 --- /dev/null +++ b/src/librustdoc/html/templates/source.html @@ -0,0 +1,19 @@ +<div class="example-wrap"> {# #} + <pre class="src-line-numbers"> + {% for line in lines.clone() %} + {% if embedded %} + <span>{{line}}</span> + {%~ else %} + <a href="#{{line}}" id="{{line}}">{{line}}</a> + {%~ endif %} + {% endfor %} + </pre> {# #} + <pre class="rust"> {# #} + <code> + {% if needs_expansion %} + <button class="expand">↕</button> + {% endif %} + {{code_html|safe}} + </code> {# #} + </pre> {# #} +</div> |
