initial commit
This commit is contained in:
parent
49d7be3ce9
commit
fa31dc491c
13 changed files with 605 additions and 675 deletions
52
layouts/_default/index.html
Normal file
52
layouts/_default/index.html
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
|
||||
|
||||
{{ define "navigation" }}
|
||||
|
||||
{{ end }}
|
||||
|
||||
{{ define "hero" }}
|
||||
|
||||
{{ end }}
|
||||
|
||||
|
||||
{{ define "main" }}
|
||||
{{ $pictures := .Site.Data.pictures }}
|
||||
|
||||
|
||||
{{ range $item := $pictures }}
|
||||
<div style="border: 3px solid red; padding: 20px; margin: 20px 0;">
|
||||
|
||||
<!-- Always show kind -->
|
||||
<h2>{{ $item.content }}</h2>
|
||||
|
||||
<!-- Always show content if it exists -->
|
||||
|
||||
{{ range $tag := $item.tags }}
|
||||
{{ if eq (index $tag 0) "imeta" }}
|
||||
<div style="border: 1px solid blue; margin: 5px; padding: 5px;">
|
||||
|
||||
<!-- Extract URL -->
|
||||
{{ $imetaText := index $tag 1 }}
|
||||
{{ $words := split $imetaText " " }}
|
||||
{{ range $word := $words }}
|
||||
{{ if hasPrefix $word "http" }}
|
||||
<img src="{{ $word }}" width="200">
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
<pre>{{ debug.Dump $pictures }}</pre>
|
||||
{{ end }}
|
||||
|
||||
|
||||
|
||||
{{ define "footer"}}
|
||||
|
||||
|
||||
|
||||
{{ end }}
|
||||
Loading…
Add table
Add a link
Reference in a new issue