mirror of
https://github.com/Babibubebon/lodc2022-culture-art.git
synced 2024-09-22 17:04:21 +09:00
add highlighting support for lines
This commit is contained in:
parent
09a2f01afc
commit
1a08f7c829
2 changed files with 5 additions and 3 deletions
|
@ -6,7 +6,7 @@
|
||||||
/* CodeLine */ .chroma .cl { }
|
/* CodeLine */ .chroma .cl { }
|
||||||
/* LineTableTD */ .chroma .lntd { vertical-align: top; padding: 0; margin: 0; border: 0; }
|
/* LineTableTD */ .chroma .lntd { vertical-align: top; padding: 0; margin: 0; border: 0; }
|
||||||
/* LineTable */ .chroma .lntable { border-spacing: 0; padding: 0; margin: 0; border: 0; }
|
/* LineTable */ .chroma .lntable { border-spacing: 0; padding: 0; margin: 0; border: 0; }
|
||||||
/* LineHighlight */ .chroma .hl { background-color: #ffffcc }
|
/* LineHighlight */ .chroma .hl { background-color: #4d4f5a }
|
||||||
/* LineNumbersTable */ .chroma .lnt { white-space: pre; user-select: none; margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #7f7f7f }
|
/* LineNumbersTable */ .chroma .lnt { white-space: pre; user-select: none; margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #7f7f7f }
|
||||||
/* LineNumbers */ .chroma .ln { white-space: pre; user-select: none; margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #7f7f7f }
|
/* LineNumbers */ .chroma .ln { white-space: pre; user-select: none; margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #7f7f7f }
|
||||||
/* Line */ .chroma .line { display: flex; }
|
/* Line */ .chroma .line { display: flex; }
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
{{ $q := trim .Inner "\n" }}
|
{{- $q := trim .Inner "\n" -}}
|
||||||
|
{{- $hlLines := (default "" (.Get "hl_lines")) | printf "hl_Lines=%s" -}}
|
||||||
|
|
||||||
|
{{ highlight $q "sparql" $hlLines }}
|
||||||
|
|
||||||
{{ highlight $q "sparql" }}
|
|
||||||
<a class="book-btn"
|
<a class="book-btn"
|
||||||
onclick="setYasguiQuery('{{ .Get "yasgui-id" }}', '{{ .Get "title" }}', '{{ $q }}', '{{ .Get "endpoint" }}'); location.href='#yasgui-{{ .Get "yasgui-id" }}'">
|
onclick="setYasguiQuery('{{ .Get "yasgui-id" }}', '{{ .Get "title" }}', '{{ $q }}', '{{ .Get "endpoint" }}'); location.href='#yasgui-{{ .Get "yasgui-id" }}'">
|
||||||
▶ 実行する
|
▶ 実行する
|
||||||
|
|
Loading…
Reference in a new issue