Convert docdock theme from submodule to native files and fix Hugo compatibility
This commit is contained in:
7
themes/docdock/layouts/shortcodes/alert.html
Normal file
7
themes/docdock/layouts/shortcodes/alert.html
Normal file
@@ -0,0 +1,7 @@
|
||||
{{ $_hugo_config := `{ "version": 1 }` }}
|
||||
<div class="alert{{- " " -}}{{- if .IsNamedParams -}}
|
||||
{{- with .Get "theme" -}}alert-{{.}}{{- else -}}alert-info{{- end -}}
|
||||
{{- else -}}
|
||||
{{- with .Get 0 -}}alert-{{.}}{{- else -}}alert-info{{- end -}}
|
||||
{{- end -}}
|
||||
" role="alert">{{- .Inner -}}</div>
|
||||
1
themes/docdock/layouts/shortcodes/anchor.html
Normal file
1
themes/docdock/layouts/shortcodes/anchor.html
Normal file
@@ -0,0 +1 @@
|
||||
<anchor id="anchor-{{.Get "default"}}">{{.Inner}}</anchor>
|
||||
1
themes/docdock/layouts/shortcodes/anchorlink.html
Normal file
1
themes/docdock/layouts/shortcodes/anchorlink.html
Normal file
@@ -0,0 +1 @@
|
||||
<a href="#anchor-{{.Get "anchor"}}" title="" >{{.Inner}}</a>
|
||||
5
themes/docdock/layouts/shortcodes/attachmentlink.html
Normal file
5
themes/docdock/layouts/shortcodes/attachmentlink.html
Normal file
@@ -0,0 +1,5 @@
|
||||
{{range $i, $att := .Page.Params.attachments }}
|
||||
{{if eq $att.filename ($.Get "filename")}}
|
||||
<a class="{{$att.iconclass}}" href="{{$.Site.BaseURL}}{{$.Page.Params.id}}/{{$att.filename}}" title="Dernière modification le {{$att.lastmodifieddate}}" >{{$.Inner}}</a> ({{$att.nicefilesize}})
|
||||
{{end}}
|
||||
{{end}}
|
||||
33
themes/docdock/layouts/shortcodes/attachments.html
Normal file
33
themes/docdock/layouts/shortcodes/attachments.html
Normal file
@@ -0,0 +1,33 @@
|
||||
<section class="attachments">
|
||||
<label>
|
||||
<span class="glyphicon glyphicon-paperclip" aria-hidden="true"></span>
|
||||
{{with .Get "title"}}{{.}}{{else}}{{T "Attachments-label"}}{{end}}
|
||||
</label>
|
||||
{{if eq .Page.File.BaseFileName "index"}}
|
||||
{{$.Scratch.Add "filesName" "files"}}
|
||||
{{else}}
|
||||
{{$.Scratch.Add "filesName" (printf "%s.files" .Page.File.BaseFileName)}}
|
||||
{{end}}
|
||||
{{ range (readDir (printf "./content/%s%s" .Page.File.Dir ($.Scratch.Get "filesName")) ) }}
|
||||
{{ $fileDir := replace $.Page.File.Dir "\\" "/" }}
|
||||
{{if ($.Get "pattern")}}
|
||||
{{if (findRE ($.Get "pattern") .Name)}}
|
||||
<li>
|
||||
<a href="{{ printf "%s/%s%s/%s" $.Site.BaseURL $fileDir ($.Scratch.Get "filesName") .Name }}" >
|
||||
{{.Name}}
|
||||
</a>
|
||||
({{div .Size 1024 }} kB)
|
||||
</li>
|
||||
{{end}}
|
||||
{{else}}
|
||||
<li>
|
||||
<a href="{{ printf "%s/%s%s/%s" $.Site.BaseURL $fileDir ($.Scratch.Get "filesName") .Name }}" >
|
||||
{{.Name}}
|
||||
</a>
|
||||
({{div .Size 1024 }} kB)
|
||||
</li>
|
||||
{{end}}
|
||||
{{end}}
|
||||
</section>
|
||||
|
||||
{{.Inner}}
|
||||
6
themes/docdock/layouts/shortcodes/button.html
Normal file
6
themes/docdock/layouts/shortcodes/button.html
Normal file
@@ -0,0 +1,6 @@
|
||||
<!-- Boutton -->
|
||||
{{ with .Get "align" }}<center>{{end}}
|
||||
<button class="btn {{with .Get "theme"}}btn-{{.}}{{else}}btn-primary{{end}}" type="button" {{ with .Get "href" }} onclick="location.href='{{.}}'"{{end}} >{{.Inner}}</button>
|
||||
{{ with .Get "align" }}</center>{{end}}
|
||||
|
||||
<!-- Boutton -->
|
||||
104
themes/docdock/layouts/shortcodes/children.html
Normal file
104
themes/docdock/layouts/shortcodes/children.html
Normal file
@@ -0,0 +1,104 @@
|
||||
{{- $showhidden := .Get "showhidden"}}
|
||||
{{- $style := .Get "style" | default "li" }}
|
||||
{{- $depth := .Get "depth" | default 1 }}
|
||||
{{- $withDescription := .Get "description" | default false }}
|
||||
{{- $sortTerm := .Get "sort" | default "Weight" }}
|
||||
|
||||
{{- .Scratch.Set "current" .Page }}
|
||||
|
||||
{{- if (.Get "page")}}
|
||||
{{- with .Site.GetPage "section" (.Get "page") }}
|
||||
{{- $.Scratch.Set "current" . }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- $cpage := (.Scratch.Get "current") }}
|
||||
|
||||
<ul class="children children-{{$style}}">
|
||||
{{- .Scratch.Set "pages" $cpage.Pages }}
|
||||
{{- if $cpage.Sections}}
|
||||
{{- .Scratch.Set "pages" ($cpage.Pages | union $cpage.Sections) }}
|
||||
{{- end}}
|
||||
{{- $pages := (.Scratch.Get "pages") }}
|
||||
|
||||
{{- if eq $sortTerm "Weight"}}
|
||||
{{- template "childs" dict "menu" $pages.ByWeight "style" $style "showhidden" $showhidden "count" 1 "depth" $depth "pages" .Site.Pages "description" $withDescription "sortTerm" $sortTerm}}
|
||||
{{- else if eq $sortTerm "Name"}}
|
||||
{{- template "childs" dict "menu" $pages.ByTitle "style" $style "showhidden" $showhidden "count" 1 "depth" $depth "pages" .Site.Pages "description" $withDescription "sortTerm" $sortTerm}}
|
||||
{{- else if eq $sortTerm "PublishDate"}}
|
||||
{{- template "childs" dict "menu" $pages.ByPublishDate "style" $style "showhidden" $showhidden "count" 1 "depth" $depth "pages" .Site.Pages "description" $withDescription "sortTerm" $sortTerm}}
|
||||
{{- else if eq $sortTerm "Date"}}
|
||||
{{- template "childs" dict "menu" $pages.ByDate "style" $style "showhidden" $showhidden "count" 1 "depth" $depth "pages" .Site.Pages "description" $withDescription "sortTerm" $sortTerm}}
|
||||
{{- else if eq $sortTerm "Length"}}
|
||||
{{- template "childs" dict "menu" $pages.ByLength "style" $style "showhidden" $showhidden "count" 1 "depth" $depth "pages" .Site.Pages "description" $withDescription "sortTerm" $sortTerm}}
|
||||
{{- else}}
|
||||
{{- template "childs" dict "menu" $pages "style" $style "showhidden" $showhidden "count" 1 "depth" $depth "pages" .Site.Pages "description" $withDescription "sortTerm" $sortTerm}}
|
||||
{{end}}
|
||||
</ul>
|
||||
|
||||
{{.Inner|safeHTML}}
|
||||
|
||||
{{ define "childs" }}
|
||||
{{- range .menu }}
|
||||
{{- if and .Params.hidden (not $.showhidden) }}
|
||||
{{- else}}
|
||||
|
||||
<span>
|
||||
{{- if hasPrefix $.style "h"}}
|
||||
{{- $num := sub ( int (trim $.style "h") ) 1 }}
|
||||
{{- $numn := add $num $.count }}
|
||||
|
||||
{{- (printf "<h%d>" $numn)|safeHTML}}
|
||||
<a href="{{.RelPermalink}}" >{{ .Title }}</a>
|
||||
{{- (printf "</h%d>" $numn)|safeHTML}}
|
||||
{{- else}}
|
||||
{{- (printf "<%s>" $.style)|safeHTML}}
|
||||
<a href="{{.RelPermalink}}" >{{ .Title }}</a>
|
||||
{{- (printf "</%s>" $.style)|safeHTML}}
|
||||
{{- end}}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
{{- if $.description}}
|
||||
{{- if .Description}}
|
||||
<p>{{.Description}}</p>
|
||||
{{- else}}
|
||||
<p>{{.Summary}}</p>
|
||||
{{- end}}
|
||||
{{- end}}
|
||||
</span>
|
||||
|
||||
|
||||
{{- if lt $.count $.depth}}
|
||||
{{- if eq $.style "li" }}
|
||||
<ul>
|
||||
{{- end}}
|
||||
{{- .Scratch.Set "pages" .Pages }}
|
||||
{{- if .Sections}}
|
||||
{{- .Scratch.Set "pages" (.Pages | union .Sections) }}
|
||||
{{- end}}
|
||||
{{- $pages := (.Scratch.Get "pages") }}
|
||||
|
||||
{{- if eq $.sortTerm "Weight"}}
|
||||
{{- template "childs" dict "menu" $pages.ByWeight "style" $.style "showhidden" $.showhidden "count" (add $.count 1) "depth" $.depth "pages" $.pages "description" $.description "sortTerm" $.sortTerm}}
|
||||
{{- else if eq $.sortTerm "Name"}}
|
||||
{{- template "childs" dict "menu" $pages.ByTitle "style" $.style "showhidden" $.showhidden "count" (add $.count 1) "depth" $.depth "pages" $.pages "description" $.description "sortTerm" $.sortTerm}}
|
||||
{{- else if eq $.sortTerm "PublishDate"}}
|
||||
{{- template "childs" dict "menu" $pages.ByPublishDate "style" $.style "showhidden" $.showhidden "count" (add $.count 1) "depth" $.depth "pages" $.pages "description" $.description "sortTerm" $.sortTerm}}
|
||||
{{- else if eq $.sortTerm "Date"}}
|
||||
{{- template "childs" dict "menu" $pages.ByDate "style" $.style "showhidden" $.showhidden "count" (add $.count 1) "depth" $.depth "pages" $.pages "description" $.description "sortTerm" $.sortTerm}}
|
||||
{{- else if eq $.sortTerm "Length"}}
|
||||
{{- template "childs" dict "menu" $pages.ByLength "style" $.style "showhidden" $.showhidden "count" (add $.count 1) "depth" $.depth "pages" $.pages "description" $.description "sortTerm" $.sortTerm}}
|
||||
{{- else}}
|
||||
{{- template "childs" dict "menu" $pages "style" $.style "showhidden" $.showhidden "count" (add $.count 1) "depth" $.depth "pages" $.pages "description" $.description "sortTerm" $.sortTerm}}
|
||||
{{- end}}
|
||||
{{- if eq $.style "li"}}
|
||||
</ul>
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
1
themes/docdock/layouts/shortcodes/code.html
Normal file
1
themes/docdock/layouts/shortcodes/code.html
Normal file
@@ -0,0 +1 @@
|
||||
<pre><code>{{.Inner}}</code></pre>
|
||||
29
themes/docdock/layouts/shortcodes/emoticon.html
Normal file
29
themes/docdock/layouts/shortcodes/emoticon.html
Normal file
@@ -0,0 +1,29 @@
|
||||
{{ $name := .Get "name"}}
|
||||
|
||||
{{ if eq "smile" $name}}
|
||||
😀
|
||||
{{ else if eq "sad" $name}}
|
||||
🙁
|
||||
{{ else if eq "cheeky" $name}}
|
||||
😛
|
||||
{{ else if eq "laugh" $name}}
|
||||
😃
|
||||
{{ else if eq "wink" $name}}
|
||||
😉
|
||||
{{ else if eq "thumbs-up" $name}}
|
||||
<span class="glyphicon glyphicon-thumbs-up" aria-hidden="true"></span>
|
||||
{{ else if eq "thumbs-down" $name}}
|
||||
<span class="glyphicon glyphicon-thumbs-down" aria-hidden="true"></span>
|
||||
{{ else if eq "information" $name}}
|
||||
<span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span>
|
||||
{{ else if eq "tick" $name}}
|
||||
<span class="glyphicon glyphicon-ok-circle" aria-hidden="true"></span>
|
||||
{{ else if eq "cross" $name}}
|
||||
<span class="glyphicon glyphicon-remove-circle" aria-hidden="true"></span>
|
||||
{{ else if eq "warning" $name}}
|
||||
<span class="glyphicon glyphicon-warning-sign" aria-hidden="true"></span>
|
||||
{{else}}
|
||||
( Emoticon: {{$name}} )
|
||||
{{end}}
|
||||
|
||||
{{.Inner}}
|
||||
15
themes/docdock/layouts/shortcodes/excerpt-include.html
Normal file
15
themes/docdock/layouts/shortcodes/excerpt-include.html
Normal file
@@ -0,0 +1,15 @@
|
||||
{{ $_hugo_config := `{ "version": 1 }` }}
|
||||
{{ $excerpt := findRE "(?ms){{%\\s*excerpt[^%]*%}}(.|\n)*?{{%\\s*/excerpt\\s*%}}" ( readFile (printf "./content/%s" (.Get "filename")) ) }}
|
||||
{{ range $excerpt }}
|
||||
{{if ($.Get "panel")}}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">{{$.Get "panel"}}</div>
|
||||
<div class="panel-body">
|
||||
{{ (replaceRE "(?ms){{%\\s*excerpt[^%]*%}}(.*){{%\\s*/excerpt\\s*%}}" "$1" .) | safeHTML | markdownify }}
|
||||
</div>
|
||||
</div>
|
||||
{{else}}
|
||||
{{ (replaceRE "(?ms){{%\\s*excerpt[^%]*%}}(.*){{%\\s*/excerpt\\s*%}}" "$1" .) | safeHTML | markdownify }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{.Inner}}
|
||||
7
themes/docdock/layouts/shortcodes/excerpt.html
Normal file
7
themes/docdock/layouts/shortcodes/excerpt.html
Normal file
@@ -0,0 +1,7 @@
|
||||
{{with .Get "hidden"}}
|
||||
{{if eq . "false"}}
|
||||
{{$.Inner}}
|
||||
{{end}}
|
||||
{{else}}
|
||||
{{.Inner}}
|
||||
{{end}}
|
||||
10
themes/docdock/layouts/shortcodes/expand.html
Normal file
10
themes/docdock/layouts/shortcodes/expand.html
Normal file
@@ -0,0 +1,10 @@
|
||||
{{$expandMessage := T "Expand-title"}}
|
||||
<div class="expand">
|
||||
<div class="expand-label" style="cursor: pointer;" onclick="$h = $(this);$h.next('div').slideToggle(100,function () {$h.children('i').attr('class',function () {return $h.next('div').is(':visible') ? 'fa fa-chevron-down' : 'fa fa-chevron-right';});});">
|
||||
<i style="font-size:x-small;" class="fa fa-chevron-right"></i>
|
||||
<span>{{ if .IsNamedParams }}{{.Get "default" | default $expandMessage}}{{else}}{{.Get 0 | default $expandMessage}}{{end}}</span>
|
||||
</div>
|
||||
<div class="expand-content" style="display: none;">
|
||||
<p>{{.Inner | safeHTML }}</p>
|
||||
</div>
|
||||
</div>
|
||||
16
themes/docdock/layouts/shortcodes/header.html
Normal file
16
themes/docdock/layouts/shortcodes/header.html
Normal file
@@ -0,0 +1,16 @@
|
||||
<div class="well">
|
||||
<strong>Résumé</strong><br/>
|
||||
{{.Inner}}
|
||||
|
||||
<div><strong>Sur cette page</strong></div>
|
||||
{{.Page.TableOfContents}}
|
||||
<div><strong>Pages liées</strong></div>
|
||||
<ul>
|
||||
{{ range sort .Page.Sections }}
|
||||
<li><a href="{{.RelPermalink}}" >{{ .Title }}</a></li>
|
||||
{{ end }}
|
||||
{{ range sort .Page.Pages }}
|
||||
<li><a href="{{.RelPermalink}}" >{{ .Title }}</a></li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</div>
|
||||
13
themes/docdock/layouts/shortcodes/icon.html
Normal file
13
themes/docdock/layouts/shortcodes/icon.html
Normal file
@@ -0,0 +1,13 @@
|
||||
{{- if .IsNamedParams -}}
|
||||
{{- if not (hasPrefix (.Get "name") "fa-") -}}
|
||||
<span class="glyphicon glyphicon-{{.Get "name"}}" {{with .Get "size"}}style="font-size:{{.}}"{{end}} aria-hidden="true"></span>
|
||||
{{- else -}}
|
||||
<span class="fa {{.Get "name"}}" {{with .Get "size"}}style="font-size:{{.}}"{{end}} aria-hidden="true"></span>
|
||||
{{- end -}}
|
||||
{{- else -}}
|
||||
{{- if not (hasPrefix (.Get 0) "fa-") -}}
|
||||
<span class="glyphicon glyphicon-{{.Get 0}}" aria-hidden="true"></span>
|
||||
{{- else -}}
|
||||
<span class="fa {{.Get 0}}" aria-hidden="true"></span>
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
5
themes/docdock/layouts/shortcodes/image.html
Normal file
5
themes/docdock/layouts/shortcodes/image.html
Normal file
@@ -0,0 +1,5 @@
|
||||
<a href="{{.Site.BaseURL}}{{.Page.Params.id}}/{{.Get "filename"}}" sdata-lightbox="{{.Get "filename"}}">
|
||||
<img src="{{.Site.BaseURL}}{{.Page.Params.id}}/{{.Get "filename"}}" style="border:0px" {{ with .Get "width"}} width="{{.}}"{{ end }} {{ with .Get "align"}} align="{{.}}"{{ end }}/>
|
||||
</a>
|
||||
{{.Inner}}
|
||||
|
||||
10
themes/docdock/layouts/shortcodes/info.html
Normal file
10
themes/docdock/layouts/shortcodes/info.html
Normal file
@@ -0,0 +1,10 @@
|
||||
<!-- Alert -->
|
||||
{{- if .Get "title" -}}
|
||||
<div class="panel panel-primary panel-info">
|
||||
{{ with .Get "title" }}<div class="panel-heading">{{htmlUnescape .}}</div>{{end}}
|
||||
<div class="panel-body">{{.Inner}}</div>
|
||||
</div>
|
||||
{{- else -}}
|
||||
<div class="alert alert-info" role="alert">{{.Inner}}</div>
|
||||
{{- end -}}
|
||||
<!-- Alert -->
|
||||
1
themes/docdock/layouts/shortcodes/label.html
Normal file
1
themes/docdock/layouts/shortcodes/label.html
Normal file
@@ -0,0 +1 @@
|
||||
<span class="label label-default label-{{.Get "type"}}">{{.Inner}}</span>
|
||||
3
themes/docdock/layouts/shortcodes/mermaid.html
Normal file
3
themes/docdock/layouts/shortcodes/mermaid.html
Normal file
@@ -0,0 +1,3 @@
|
||||
<link href="{{"mermaid/mermaid.css" | relURL}}" type="text/css" rel="stylesheet"/>
|
||||
<script defer src="{{"mermaid/mermaid.js" | relURL}}">mermaid.initialize({startOnLoad:true});</script>
|
||||
<div class="mermaid" align="{{ if .Get "align" }}{{ .Get "align" }}{{ else }}center{{ end }}" >{{ safeHTML .Inner }}</div>
|
||||
4
themes/docdock/layouts/shortcodes/note.html
Normal file
4
themes/docdock/layouts/shortcodes/note.html
Normal file
@@ -0,0 +1,4 @@
|
||||
<!-- Alert -->
|
||||
|
||||
<div class="alert alert-warning" role="alert">{{.Inner}}</div>
|
||||
<!-- Alert -->
|
||||
2
themes/docdock/layouts/shortcodes/notice.html
Normal file
2
themes/docdock/layouts/shortcodes/notice.html
Normal file
@@ -0,0 +1,2 @@
|
||||
{{ $_hugo_config := `{ "version": 1 }` }}
|
||||
<div class="notices {{ .Get 0 }}" {{ if len .Params | eq 2 }} id="{{ .Get 1 }}" {{ end }}><p>{{ .Inner }}</p></div>
|
||||
12
themes/docdock/layouts/shortcodes/pagelink.html
Normal file
12
themes/docdock/layouts/shortcodes/pagelink.html
Normal file
@@ -0,0 +1,12 @@
|
||||
{{ if ne (.Get "spacekey") "" }}
|
||||
<label class="broken" title="lien d'espace cassé">{{.Get "pagename" | htmlUnescape}}</label>
|
||||
{{else}}
|
||||
{{$pages := where .Site.AllPages "Title" (( $.Get "pagename") | htmlUnescape ) }}
|
||||
{{ if eq 0 (len $pages) }}
|
||||
<label class="broken" title="lien cassé">{{.Get "pagename" | htmlUnescape}}</label>
|
||||
{{else}}
|
||||
{{ range $pages }}
|
||||
<a href="{{$.Site.BaseURL}}{{.Params.slug | lower}}">{{$.Inner}}</a>
|
||||
{{end}}
|
||||
{{ end }}
|
||||
{{end}}
|
||||
1
themes/docdock/layouts/shortcodes/pagetreesearch.html
Normal file
1
themes/docdock/layouts/shortcodes/pagetreesearch.html
Normal file
@@ -0,0 +1 @@
|
||||
{{.Inner}}
|
||||
6
themes/docdock/layouts/shortcodes/panel.html
Normal file
6
themes/docdock/layouts/shortcodes/panel.html
Normal file
@@ -0,0 +1,6 @@
|
||||
{{ $_hugo_config := `{ "version": 1 }` }}
|
||||
<div class="panel {{with .Get "theme" }}panel-{{.}}{{else}}panel-primary{{end}}">
|
||||
{{- with .Get "header" -}}<div class="panel-heading">{{- htmlUnescape . | markdownify -}}</div>{{- end -}}
|
||||
<div class="panel-body">{{- .Inner -}}</div>
|
||||
{{- with .Get "footer" -}}<div class="panel-footer">{{- htmlUnescape . | markdownify -}}</div>{{- end -}}
|
||||
</div>
|
||||
7
themes/docdock/layouts/shortcodes/recently-updated.html
Normal file
7
themes/docdock/layouts/shortcodes/recently-updated.html
Normal file
@@ -0,0 +1,7 @@
|
||||
{{.Inner}}
|
||||
|
||||
{{- range first 10 .Site.Pages }}
|
||||
<li>
|
||||
{{ .Date.Format "02/01/2006" }} - <a href="{{ .Permalink }}">{{ .Title }}</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
14
themes/docdock/layouts/shortcodes/relref.html
Normal file
14
themes/docdock/layouts/shortcodes/relref.html
Normal file
@@ -0,0 +1,14 @@
|
||||
{{- if in (.Get 0) "/_index.md" -}}
|
||||
{{- $paths := (split (.Get 0) "_index.md") -}}
|
||||
{{- $pagepath := index $paths 0 -}}
|
||||
{{- $anchor := index $paths 1 -}}
|
||||
{{- with .Site.GetPage "section" (trim $pagepath "/") -}}
|
||||
{{- ( printf "%s%s" $pagepath $anchor ) | relLangURL -}}
|
||||
{{- end -}}
|
||||
{{- else -}}
|
||||
{{- with .Site.GetPage "section" (.Get 0) }}
|
||||
{{- .RelPermalink -}}
|
||||
{{- else -}}
|
||||
{{- .Get 0 | relref .Page -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
66
themes/docdock/layouts/shortcodes/revealjs.html
Normal file
66
themes/docdock/layouts/shortcodes/revealjs.html
Normal file
@@ -0,0 +1,66 @@
|
||||
<iframe id="slideFrame" src="{{"none.html" | relURL }}" style="width:{{with .Get "width"}}{{.}}{{else}}100%{{end}};height:{{with .Get "height"}}{{.}}{{else}}30em{{end}}; border:0px"></iframe>
|
||||
|
||||
<div id="slideContent">
|
||||
<link rel="stylesheet" href="{{"revealjs/css/reveal.css"|relURL}}">
|
||||
<link rel="stylesheet" href="{{"revealjs/css/theme/"|relURL}}{{with .Get "theme"}}{{.|safeHTML}}{{else}}league{{end}}.css" id="theme">
|
||||
<link rel="stylesheet" href="{{"revealjs/lib/css/zenburn.css"|relURL}}">
|
||||
|
||||
<div class="reveal">
|
||||
<div class="slides">
|
||||
<section data-markdown
|
||||
data-separator="^---"
|
||||
data-separator-vertical="^___"
|
||||
data-separator-notes="^Note:"
|
||||
data-charset="utf8">
|
||||
{{ .Inner | safeHTML}}
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script async src="{{"/revealjs/lib/js/head.min.js"|relURL}}"></script>
|
||||
<script async src="{{"/revealjs/js/reveal.js"|relURL}}"></script>
|
||||
<script>
|
||||
function initSlides() {
|
||||
Reveal.initialize({
|
||||
embedded : true,
|
||||
|
||||
controls : {{with .Get "controls"}}{{.|safeHTML}}{{else}}false{{end}},
|
||||
center: {{with .Get "center"}}{{.|safeHTML}}{{else}}true{{end}} ,
|
||||
history: {{with .Get "history"}}{{.|safeHTML}}{{else}}false{{end}} ,
|
||||
progress: {{with .Get "progress"}}{{.|safeHTML}}{{else}}false{{end}} ,
|
||||
transition: {{with .Get "transition"}}{{.}}{{else}}"concave"{{end}},
|
||||
|
||||
// theme: Reveal.getQueryHash().theme, // available themes are in /css/theme
|
||||
// Optional libraries used to extend on reveal.js
|
||||
dependencies: [
|
||||
{ src: '{{"revealjs/lib/js/classList.js"|relURL}}"', condition: function() { return !document.body.classList; } },
|
||||
{ src: '{{"revealjs/plugin/markdown/marked.js"|relURL}}', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
|
||||
{ src: '{{"revealjs/plugin/markdown/markdown.js"|relURL}}', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
|
||||
{ src: '{{"revealjs/plugin/highlight/highlight.js"|relURL}}', async: true, callback: function() { hljs.initHighlightingOnLoad(); } },
|
||||
{ src: '{{"revealjs/plugin/zoom-js/zoom.js"|relURL}}', async: true, condition: function() { return !!document.body.classList; } },
|
||||
{ src: '{{"revealjs/plugin/notes/notes.js"|relURL}}', async: true, condition: function() { return !!document.body.classList; } }
|
||||
]
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</div>
|
||||
<li><a href="#" onclick="slideFullScreen();">See it fullscreen</a></li>
|
||||
|
||||
<script type="text/javascript">
|
||||
var toto = document.getElementById('slideContent').innerHTML
|
||||
document.getElementById('slideFrame').contentWindow.document.write(document.getElementById('slideContent').innerHTML);
|
||||
document.getElementById('slideContent').remove();
|
||||
document.addEventListener("DOMContentLoaded",function(){
|
||||
setTimeout(function () {
|
||||
document.getElementById('slideFrame').contentWindow.initSlides() ;
|
||||
}, 2000);
|
||||
});
|
||||
|
||||
|
||||
function slideFullScreen() {
|
||||
document.open();
|
||||
document.write(toto);
|
||||
document.close();
|
||||
initSlides()
|
||||
}
|
||||
</script>
|
||||
1
themes/docdock/layouts/shortcodes/section.html
Normal file
1
themes/docdock/layouts/shortcodes/section.html
Normal file
@@ -0,0 +1 @@
|
||||
{{.Inner}}
|
||||
10
themes/docdock/layouts/shortcodes/task.html
Normal file
10
themes/docdock/layouts/shortcodes/task.html
Normal file
@@ -0,0 +1,10 @@
|
||||
<div >
|
||||
<label class="completed {{.Get "completed"}}">
|
||||
{{if eq (.Get "completed") "T"}}
|
||||
<input type="checkbox" disabled checked title="résolu le {{(time (.Get "completeddate")).Format "02/01/2006 à 15h04" }}" />
|
||||
{{else}}
|
||||
<input type="checkbox" disabled/>
|
||||
{{end}}
|
||||
</label>
|
||||
<label >{{.Inner}}</label>
|
||||
</div>
|
||||
4
themes/docdock/layouts/shortcodes/tasklist.html
Normal file
4
themes/docdock/layouts/shortcodes/tasklist.html
Normal file
@@ -0,0 +1,4 @@
|
||||
<div class="tasklist">
|
||||
<label><span class="glyphicon glyphicon-list" aria-hidden="true"></span>Tasklist</label>
|
||||
{{.Inner}}
|
||||
</div>
|
||||
10
themes/docdock/layouts/shortcodes/tip.html
Normal file
10
themes/docdock/layouts/shortcodes/tip.html
Normal file
@@ -0,0 +1,10 @@
|
||||
<!-- Alert -->
|
||||
{{if .Get "title" }}
|
||||
<div class="panel panel-default">
|
||||
{{ with .Get "title" }}<div class="panel-heading">{{htmlUnescape .}}</div>{{end}}
|
||||
<div class="panel-body">{{.Inner}}</div>
|
||||
</div>
|
||||
{{else}}
|
||||
<div class="alert alert-default" role="alert">{{.Inner}}</div>
|
||||
{{end}}
|
||||
<!-- Alert -->
|
||||
2
themes/docdock/layouts/shortcodes/toc.html
Normal file
2
themes/docdock/layouts/shortcodes/toc.html
Normal file
@@ -0,0 +1,2 @@
|
||||
{{ .Page.TableOfContents }}
|
||||
{{.Inner}}
|
||||
1
themes/docdock/layouts/shortcodes/unknow.html
Normal file
1
themes/docdock/layouts/shortcodes/unknow.html
Normal file
@@ -0,0 +1 @@
|
||||
<div class="unknow-macro">{{.Inner}}</div>
|
||||
1
themes/docdock/layouts/shortcodes/userlink.html
Normal file
1
themes/docdock/layouts/shortcodes/userlink.html
Normal file
@@ -0,0 +1 @@
|
||||
<a class="userlink" href="#" username="{{.Get "username"}}" title="utilisateur : {{.Get "username"}}">{{.Inner}}</a>
|
||||
5
themes/docdock/layouts/shortcodes/viewppt.html
Normal file
5
themes/docdock/layouts/shortcodes/viewppt.html
Normal file
@@ -0,0 +1,5 @@
|
||||
{{range $i, $att := .Page.Params.attachments }}
|
||||
{{if eq $att.filename ($.Get "name")}}
|
||||
<viewppt name="{{$.Site.BaseURL}}{{$.Page.Params.id}}/{{$att.filename}}">{{$.Inner}}</viewppt>
|
||||
{{end}}
|
||||
{{end}}
|
||||
5
themes/docdock/layouts/shortcodes/viewxls.html
Normal file
5
themes/docdock/layouts/shortcodes/viewxls.html
Normal file
@@ -0,0 +1,5 @@
|
||||
{{range $i, $att := .Page.Params.attachments }}
|
||||
{{if eq $att.filename ($.Get "name")}}
|
||||
<viewxls name="{{$.Site.BaseURL}}{{$.Page.Params.id}}/{{$att.filename}}">{{$.Inner}}</viewxls>
|
||||
{{end}}
|
||||
{{end}}
|
||||
12
themes/docdock/layouts/shortcodes/warning.html
Normal file
12
themes/docdock/layouts/shortcodes/warning.html
Normal file
@@ -0,0 +1,12 @@
|
||||
<!-- Alert -->
|
||||
|
||||
|
||||
{{if .Get "title" }}
|
||||
<div class="panel panel-primary panel-warning">
|
||||
{{ with .Get "title" }}<div class="panel-heading">{{htmlUnescape .}}</div>{{end}}
|
||||
<div class="panel-body">{{.Inner}}</div>
|
||||
</div>
|
||||
{{else}}
|
||||
<div class="alert alert-warning" role="alert">{{.Inner}}</div>
|
||||
{{end}}
|
||||
<!-- Alert -->
|
||||
1
themes/docdock/layouts/shortcodes/well.html
Normal file
1
themes/docdock/layouts/shortcodes/well.html
Normal file
@@ -0,0 +1 @@
|
||||
<div class="well">{{.Inner}}</div>
|
||||
Reference in New Issue
Block a user