Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/jacobsun/edidor.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsun6eal <jacob.sun.meta@gmail.com>2019-05-16 16:48:59 +0300
committersun6eal <jacob.sun.meta@gmail.com>2019-05-16 16:48:59 +0300
commit2bfa8cfd6a02323a97c57789d4b78679650abc29 (patch)
treeedec506413ecf45130cfa16a929306cd53297f5c /layouts
parentb0afb7931a5b1793225477f2b0c01fdb66daedae (diff)
fomally publish
Diffstat (limited to 'layouts')
-rw-r--r--layouts/partials/footer.html29
-rw-r--r--layouts/partials/header.html41
-rw-r--r--layouts/partials/intro.html2
-rw-r--r--layouts/partials/js.html2
-rw-r--r--layouts/partials/logo.html19
5 files changed, 66 insertions, 27 deletions
diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html
index ff5c08f..e188c14 100644
--- a/layouts/partials/footer.html
+++ b/layouts/partials/footer.html
@@ -15,9 +15,11 @@
</ul>
<ul class="control status clearfix">
- <li><a href="#" class="btn">Posts: {{ len (where (where .Site.Pages "Section" "posts") "Params.hidden" "!=" true) }}</a>
+ <li><a href="#" class="btn">Posts:
+ {{ len (where (where .Site.Pages "Section" "posts") "Params.hidden" "!=" true) }}</a>
</li>
- <li><a href="#" class="btn">Pages: {{ len (where (where .Site.Pages "Section" "page") "Params.hidden" "!=" true) }}</a></li>
+ <li><a href="#" class="btn">Pages:
+ {{ len (where (where .Site.Pages "Section" "page") "Params.hidden" "!=" true) }}</a></li>
<li><a href="#" class="btn">{{ .Site.Language.Lang }}</a></li>
<li><a href="https://gohugo.io" class="btn">Hugo, {{ $.Hugo.Version }}</a></li>
<li><a href="https://github.com/jacobsun/edidor" class="btn">Theme: Edidor</a></li>
@@ -28,3 +30,26 @@
</li>
</ul>
</footer>
+<div class="dialog">
+ <div class="wrapper">
+ <div class="clearfix"><button class="btn close-dialog">X</button></div>
+ <header>
+ <h1 class="title">Theme Name</h1>
+ </header>
+ <main>
+ <div class="clearfix">
+ <label for="theme-name">
+ <p>Only English Character, space, hyphen are allowed!</p>
+ <p>Valid name examples: "custom", "fantastic theme", "my-theme"</p>
+ <p>Invalid name expamles: "我的主题", ":)", "123"</p>
+ </label>
+ <input type="text" name="theme-name" id="theme-name">
+ </div>
+ <div class="clearfix">
+ <button class="btn export">Export</button>
+ </div>
+
+ </main>
+ <footer></footer>
+ </div>
+</div>
diff --git a/layouts/partials/header.html b/layouts/partials/header.html
index 1f2d11e..82cd6ff 100644
--- a/layouts/partials/header.html
+++ b/layouts/partials/header.html
@@ -2,45 +2,38 @@
<ul class="menu clearfix control">
<li>
<a href="{{ .Site.BaseURL }}" class="btn logo-link">
- {{ if (eq .Site.Params.Mode "light") }}
- {{ if (fileExists "static/images/logo_light.svg") }}
- <img class="logo" src="{{ "images/logo_light.svg" | absURL }}" alt="logo"/>
- {{ else }}
- <img class="logo" src="{{ "images/logo.svg" | absURL }}" alt="logo"/>
- {{ end }}
- {{ else if (eq .Site.Params.Mode "wild") }}
- {{ if (fileExists "static/images/logo_wild.svg") }}
- <img class="logo" src="{{ "images/logo_wild.svg" | absURL }}" alt="logo"/>
- {{ else }}
- <img class="logo" src="{{ "images/logo.svg" | absURL }}" alt="logo"/>
- {{ end }}
- {{ else }}
- {{ if (fileExists "static/images/logo_dark.svg") }}
- <img class="logo" src="{{ "images/logo_dark.svg" | absURL }}" alt="logo"/>
- {{ else }}
- <img class="logo" src="{{ "images/logo.svg" | absURL }}" alt="logo"/>
- {{ end }}
- {{ end }}
+ {{ partial "logo.html" . }}
</a>
</li>
{{ $currentPage := . }}
{{ range .Site.Menus.main }}
{{ if .HasChildren }}
- <li class="{{ if $currentPage.HasMenuCurrent "main" . }}active{{ end }}">
- <a class="btn">
- {{ .Name }}
+ {{ $name := .Name }}
+ <li {{if (eq $name "Theme")}} id="theme-switcher" {{end}}
+ class="{{ if $currentPage.HasMenuCurrent "main" . }}active{{ end }}">
+ <a class="btn" id="theme-switcher-button">
+ {{ $name }}
</a>
<ul class="sub-menu control">
{{ range .Children }}
<li class="{{ if $currentPage.IsMenuCurrent "main" . }}active{{ end }}">
- <a href="{{ .URL }}" class="btn {{ if eq .Name "Toggle Sidebar" }}sidebar-toggler{{ end }}{{ if eq .Name "Light" }}to-light-mode{{ end }}{{ if eq .Name "Dark" }}to-dark-mode{{ end }}{{ if eq .Name "Wild" }}to-wild-mode{{ end }}">{{ .Name }}</a>
+ <a href="{{ .URL }}"
+ {{if (eq $name "Theme") }}
+ {{if (eq .Identifier "export-wild") }}
+ class="{{.Identifier}} btn"
+ {{else}}
+ data-theme="{{.Identifier}}" class="btn"
+ {{end}}
+ {{else}}
+ class="btn {{ .Identifier }}"
+ {{end}}>{{ .Name }}</a>
</li>
{{ end }}
</ul>
</li>
{{ else }}
<li>
- <a href="{{ .URL | absURL }}" class="btn">
+ <a href="{{ .URL }}" class="btn">
{{ .Name }}
</a>
</li>
diff --git a/layouts/partials/intro.html b/layouts/partials/intro.html
index 8c83a8a..e360b07 100644
--- a/layouts/partials/intro.html
+++ b/layouts/partials/intro.html
@@ -1,5 +1,5 @@
<div class="intro">
- <img src="{{ "images/logo.svg" | absURL }}" alt="logo">
+ {{ partial "logo.html" .}}
<h2>
{{ with .Param "title" }}
{{ . }}
diff --git a/layouts/partials/js.html b/layouts/partials/js.html
index e1a4200..b0b33d3 100644
--- a/layouts/partials/js.html
+++ b/layouts/partials/js.html
@@ -1,4 +1,6 @@
<script src="{{ "js/throttle.js" | absURL }}"></script>
+<script src="{{ "js/helpers.js" | absURL }}"></script>
+<script src="{{ "js/wild_template.js" | absURL }}"></script>
<script src="{{ "js/edidor.js" | absURL }}"></script>
{{ if (.Site.Params.isHighlightCode) }}
diff --git a/layouts/partials/logo.html b/layouts/partials/logo.html
new file mode 100644
index 0000000..db76482
--- /dev/null
+++ b/layouts/partials/logo.html
@@ -0,0 +1,19 @@
+{{ if (eq .Site.Params.Mode "light") }}
+{{ if (fileExists "static/images/logo_light.svg") }}
+<img class="logo" src="{{ "images/logo_light.svg" | absURL }}" alt="logo" />
+{{ else }}
+<img class="logo" src="{{ "images/logo.svg" | absURL }}" alt="logo" />
+{{ end }}
+{{ else if (eq .Site.Params.Mode "wild") }}
+{{ if (fileExists "static/images/logo_wild.svg") }}
+<img class="logo" src="{{ "images/logo_wild.svg" | absURL }}" alt="logo" />
+{{ else }}
+<img class="logo" src="{{ "images/logo.svg" | absURL }}" alt="logo" />
+{{ end }}
+{{ else }}
+{{ if (fileExists "static/images/logo_dark.svg") }}
+<img class="logo" src="{{ "images/logo_dark.svg" | absURL }}" alt="logo" />
+{{ else }}
+<img class="logo" src="{{ "images/logo.svg" | absURL }}" alt="logo" />
+{{ end }}
+{{ end }}