mirror of
https://github.com/idanoo/m2.nz
synced 2025-07-03 21:52:13 +00:00
Update theme (LoveIt) + Add new fields
This commit is contained in:
parent
ec90ebd36e
commit
49c98d8fb5
87 changed files with 6900 additions and 6013 deletions
17
themes/LoveIt/layouts/partials/plugin/code-block.html
Normal file
17
themes/LoveIt/layouts/partials/plugin/code-block.html
Normal file
|
@ -0,0 +1,17 @@
|
|||
{{- $content := .Content -}}
|
||||
{{- $lang := .Lang -}}
|
||||
{{- $options := dict "lineNoStart" 1 "lineNos" true -}}
|
||||
{{- $options = .Options | partial "function/dict.html" | merge $options -}}
|
||||
{{- $lineNoStart := $options.lineNoStart | int -}}
|
||||
{{- $lineNos := $options.lineNos | partial "function/bool.html" -}}
|
||||
|
||||
{{- $options = dict "noClasses" false "lineNos" false | merge $options -}}
|
||||
{{- $result := transform.Highlight $content $lang $options -}}
|
||||
<div class="code-block{{ if $lineNos }} code-line-numbers{{ end }} open" style="counter-reset: code-block {{ sub $lineNoStart 1 }}">
|
||||
<div class="code-header language-bash">
|
||||
<span class="code-title"><i class="arrow fas fa-chevron-right fa-fw" aria-hidden="true"></i></span>
|
||||
<span class="ellipses"><i class="fas fa-ellipsis-h fa-fw" aria-hidden="true"></i></span>
|
||||
<span class="copy" title="{{ T "copyToClipboard" }}"><i class="far fa-copy fa-fw" aria-hidden="true"></i></span>
|
||||
</div>
|
||||
{{- $result -}}
|
||||
</div>
|
Loading…
Add table
Add a link
Reference in a new issue