diff options
author | Cyris <cyris1015@gmail.com> | 2019-03-17 16:08:10 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-17 16:08:10 +0300 |
commit | 3d547ee72ab220a856c360a2cd3eac1fa535dfc9 (patch) | |
tree | c81dfe422e18fdeb809c512e76d648b0558448ae | |
parent | ce607c51c68b098385b1bb245b76f556428075bb (diff) | |
parent | e645dfcd77f6774607b6f450c96cd4d3d55d0299 (diff) |
Merge pull request #1 from digitalcraftsman/submission-fixes
Theme submission fixes
-rwxr-xr-x | exampleSite/config.toml | 20 | ||||
-rw-r--r-- | layouts/_default/taxonomy.html | 23 | ||||
-rw-r--r-- | layouts/index.html | 12 | ||||
-rw-r--r-- | layouts/partials/footer.html | 2 | ||||
-rw-r--r-- | layouts/partials/head.html | 10 | ||||
-rw-r--r-- | layouts/partials/header.html | 2 | ||||
-rw-r--r-- | layouts/post/section.html | 28 |
7 files changed, 75 insertions, 22 deletions
diff --git a/exampleSite/config.toml b/exampleSite/config.toml index f9afa76..9c6b1a1 100755 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -6,31 +6,31 @@ author = "Cyris" # Copyright notice. This will display on the footer. copyright = "" - +paginate = 10 + # Theme config [params] - Paginate = 10 - + # The content you want to be listed on list pages. mainSections = ["post"] - + # The information will display on the post pages. author = "Author" description = "Short description" authorwebsite = "https://example.com/" - + # The path to your images favicon = "images/logo.png" logo = "images/logo.png" avatar = "" displayImg = "images/display.png" - + # This will display on the index page snsTitle = "Social" - + # Google Analytics API key. ga_api_key = "Your Google Analytics tracking id" - + # Navbar config [[menu.nav]] name = "HOME" @@ -46,7 +46,7 @@ copyright = "" name = "ABOUT" url = "/about" weight = 3 - + [[menu.nav]] name = "TAGS" url = "/tags/" @@ -57,7 +57,7 @@ copyright = "" name = "Example-1" url = "/" weight = 1 - + [[menu.social]] name = "Example-2" url = "/" diff --git a/layouts/_default/taxonomy.html b/layouts/_default/taxonomy.html new file mode 100644 index 0000000..042c416 --- /dev/null +++ b/layouts/_default/taxonomy.html @@ -0,0 +1,23 @@ +{{ partial "header.html" . }} + +<div class="main-content"> + <div class="main-content__title title-type__custom u-font"> + </div> + + <article> + <div class="main-content__posts index-posts"> + {{ range .Pages }} + <div class="index-posts__list"> + <div class="l-time"><a href="{{.Permalink}}">{{ .Date.Format "2006.01.02 15:04" }}</a></div> + <div class="l-title"><a href="{{.Permalink}}">{{ .Title }}</a></div> + </div> + {{ end }} + + <div class="index-paginate"> + {{ partial "pagination.html" . }} + </div> + </div> + </article> +</div> + +{{ partial "footer.html" . }}
\ No newline at end of file diff --git a/layouts/index.html b/layouts/index.html index 0e69be0..5a712b0 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -20,17 +20,19 @@ <span class="index-line__content u-font">Home</span> </div> <div class="index-posts"> - {{ $pages := where site.RegularPages "Type" "in" site.Params.mainSections }} - {{ range $pages }} + {{ $posts := where site.RegularPages "Type" "in" site.Params.mainSections }} + {{ range (.Paginate $posts).Pages }} <div class="index-posts__list"> <div class="l-time"><a href="{{.Permalink}}">{{ .Date.Format "2006.01.02 15:04" }}</a></div> <div class="l-title"><a href="{{.Permalink}}">{{.Title}}</a></div> </div> {{ end }} -</div> -<div class="index-paginate"> - {{ partial "pagination.html" . }} + <div class="index-paginate"> + {{ partial "pagination.html" . }} + </div> </div> + + {{ partial "footer.html" . }}
\ No newline at end of file diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index d9c52f7..0fb7a26 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -17,5 +17,5 @@ </div> </div> </body> -<script src="/js/page.js"></script> +<script src="{{ "js/page.js" | absURL }}"></script> <script>hljs.initHighlightingOnLoad();</script> diff --git a/layouts/partials/head.html b/layouts/partials/head.html index a61233a..eab507a 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -12,13 +12,13 @@ <link rel='icon' type='image/x-icon' href="{{ . | absURL }}" /> <link rel="apple-touch-icon" href="{{ . | absURL }}"> {{- end -}} - <link rel="stylesheet" href="/scss/style.css"> + <link rel="stylesheet" href="{{ "scss/style.css" | absURL }}"> <!-- HighlightJS --> - <link rel="stylesheet" href="/scss/monokai-sublime.min.css"> - <script src="/js/highlight.min.js"></script> - <link rel="stylesheet" href="/scss/highlight.css"> + <link rel="stylesheet" href="{{ "scss/monokai-sublime.min.css" | absURL }}"> + <script src="{{ "js/highlight.min.js" | absURL }}"></script> + <link rel="stylesheet" href="{{ "/scss/highlight.css" | absURL }}"> <!-- Custom Style --> - <link rel="stylesheet" href="/scss/custom.css"> + <link rel="stylesheet" href="{{ "/scss/custom.css" | absURL }}"> <!-- Google Analytics --> {{ with .Site.Params.ga_api_key }} <script> diff --git a/layouts/partials/header.html b/layouts/partials/header.html index bb28746..d219d2d 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -8,7 +8,7 @@ </div> {{ $currentPage := . }} <div class='{{ if eq $currentPage.URL "/" }} site-logo site-logo__index {{ else }} site-logo {{ end }}'> - <a href="/"> + <a href="{{ .Site.BaseURL }}"> {{- with .Site.Params.logo -}} <img src="{{ . | absURL }}" /> {{- end -}} diff --git a/layouts/post/section.html b/layouts/post/section.html new file mode 100644 index 0000000..18415ba --- /dev/null +++ b/layouts/post/section.html @@ -0,0 +1,28 @@ +{{ partial "header.html" . }} + +<div class="main-content"> + {{ $baseurl := .Site.BaseURL | sanitizeurl }} + <div class="main-content__title title-type__custom u-font"> + <h1 id="title">Blog posts</h1> + </div> + + <article> + <div class="main-content__posts index-posts"> + <div class="index-posts"> + {{ $posts := where site.RegularPages "Type" "in" site.Params.mainSections }} + {{ range (.Paginate $posts).Pages }} + <div class="index-posts__list"> + <div class="l-time"><a href="{{.Permalink}}">{{ .Date.Format "2006.01.02 15:04" }}</a></div> + <div class="l-title"><a href="{{.Permalink}}">{{.Title}}</a></div> + </div> + {{ end }} + </div> + + <div class="index-paginate"> + {{ partial "pagination.html" . }} + </div> + </div> + </article> +</div> + +{{ partial "footer.html" . }}
\ No newline at end of file |