discourse/lib/onebox/templates/gitlabblob.mustache
David Taylor ce97e51b63
UX: Improve git blob oneboxes (#30694)
Rearranges the info at the top of github/gitlab 'blob' oneboxes to make them easier to read
2025-01-10 11:49:36 +00:00

24 lines
722 B
Plaintext

<h4><a href="{{link}}" target="_blank" rel="noopener">{{title}}</a></h4>
<div class="git-blob-info">
<a href="{{link}}" rel="noopener"><code>{{sha1}}</code></a>
</div>
{{^has_lines}}
<pre><code class="{{lang}}">{{content}}</code></pre>
{{/has_lines}}
{{#has_lines}}
<pre class="onebox"><code class="{{lang}}">
<ol class="start lines" start="{{cr_results.from}}" style="counter-reset: li-counter {{cr_results.from_minus_one}} ;">
{{#lines}}
<li{{#selected}} class="selected"{{/selected}}>{{data}}</li>
{{/lines}}
</ol>
</code></pre>
{{/has_lines}}
{{#truncated}}
{{i18n.truncated_file}} <a href="{{link}}" target="_blank" rel="noopener">{{i18n.show_original}}</a>
{{/truncated}}