Skip to content

Commit ff673ca

Browse files
committed
fix no page in web portal
1 parent eedf6aa commit ff673ca

11 files changed

Lines changed: 234 additions & 0 deletions

File tree

layouts/404.html

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{{ partial "header" . }}
2+
<section class="hero is-fullheight">
3+
<div class="hero-body">
4+
<div class="container has-text-centered">
5+
<span class="">
6+
<i class="far fa-frown fa-10x"></i>
7+
</span>
8+
<h1 class="title is-2 notfound">404</h1>
9+
<h2 class="subtitle is-4">
10+
Page not found
11+
</h2>
12+
<p>The page you are looking for doesn't exist or an other error occured.</p>
13+
<p><a href="#" onclick="history.go(-1)">Go back</a>, or head over to <a href="{{ .Site.BaseURL }}">Home page</a></p>
14+
</div>
15+
</div>
16+
</section>

layouts/_default/list.html

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<!-- same as index.html for tags listing -->
2+
<div class="container">
3+
{{ partial "header" . }}
4+
{{ partial "nav" . }}
5+
<main class="container">
6+
{{ if .Site.RegularPages }}
7+
{{ range (.Paginate (.Site.RegularPages.GroupByDate "2006")).PageGroups }}
8+
<h1 class="title is-3">{{ .Key }}</h1>
9+
{{ range where .Pages "Section" "posts" }}
10+
<article class="columns">
11+
<div class="column is-2">
12+
<h6 class="is-inline" style="white-space: nowrap">{{ .Date.Format "Jan 2" }}</h2>
13+
</div>
14+
<div class="column">
15+
<h2 class="subtitle is-inline is-size-4-mobile is-size-3-desktop"><a href="{{ .Permalink }}">{{ .Title }}</a>{{
16+
if .Draft }} ::Draft{{ end }}</h1>
17+
<div class="content is-hidden-mobile">
18+
19+
<br>
20+
<a class="button is-marginless is-paddingless" href="{{ .Permalink }}">
21+
<span class="icon-link is-small" style="line-height: 100%">
22+
<i class="fa fa-angle-double-right" aria-hidden="true"></i>
23+
</span>
24+
<p style="padding:0 5px"></p>more</p>
25+
</a>
26+
{{ end }}
27+
</div>
28+
</article>
29+
{{ end }}
30+
{{ end }}
31+
</main>
32+
{{ partial "pager" . }}
33+
{{ partial "footer" . }}
34+
</div>

layouts/_default/single.html

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{{ partial "header" . }}
2+
{{ partial "nav" . }}
3+
4+
<div class="container">
5+
<h2 class="subtitle is-6">{{ .Date.Format "January 2, 2006" }}</h2>
6+
<h1 class="subtitle is-size-4-mobile is-size-3-desktop">{{ .Title }}</h1>
7+
<div class="content{{ if in .Params.tags "notes" }} notes{{ end }}">
8+
{{ .Content }}
9+
</div>
10+
</div>
11+
{{ partial "jsshare" . }}
12+
{{ partial "disqus" . }}

layouts/index.html

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<div class="container">
2+
{{ partial "header" . }}
3+
{{ partial "nav" . }}
4+
<main class="container">
5+
{{ if .Site.RegularPages }}
6+
{{ range (.Paginate (.Site.RegularPages.GroupByDate "2006")).PageGroups}}
7+
<h1 class="title is-3">{{ .Key }}</h1>
8+
{{ range where .Pages "Section" "posts" }}
9+
<article class="columns">
10+
<div class="column is-2">
11+
<h6 class="is-inline" style="white-space: nowrap">{{ .Date.Format "Jan 2" }}</h2>
12+
</div>
13+
<div class="column">
14+
<h2 class="subtitle is-inline is-size-4-mobile is-size-3-desktop"><a href="{{ .Permalink }}">{{ .Title }}</a>{{ if .Draft }} ::Draft{{ end }}</h1>
15+
<div class="content is-hidden-mobile">
16+
{{ if .Truncated }}
17+
<br>
18+
<a class="button is-marginless is-paddingless" href="{{ .Permalink }}">
19+
<span class="icon-link is-small" style="line-height: 100%">
20+
</span>
21+
</a>
22+
{{ end }}
23+
</div>
24+
</article>
25+
{{ end }}
26+
{{ end }}
27+
{{ end }}
28+
</main>
29+
{{ partial "pager" . }}
30+
{{ partial "footer" . }}
31+
</div>

layouts/partials/disqus.html

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<div class="container has-text-centered">
2+
{{ if .Site.Config.Services.Disqus.Shortname }}
3+
<div id="disqus_thread"></div>
4+
<script type="text/javascript">
5+
(function () {
6+
// Don't ever inject Disqus on localhost--it creates unwanted
7+
// discussions from 'localhost:1313' on your Disqus account...
8+
if (window.location.hostname == "localhost")
9+
return;
10+
11+
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
12+
var disqus_shortname = '{{ .Site.Config.Services.Disqus.Shortname }}';
13+
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
14+
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
15+
})();
16+
</script>
17+
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by
18+
Disqus.</a></noscript>
19+
<a href="http://disqus.com/" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
20+
{{ end }}
21+
</div>

layouts/partials/footer.html

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{{ if or .IsPage (eq .RelPermalink "/about/") }}
2+
<section class="section py-0">
3+
<div class="container has-text-centered">
4+
<p>{{ .Site.Copyright | safeHTML }}</p>
5+
</div>
6+
</section>
7+
{{ else if .IsNode }}
8+
<section class="section columns py-0">
9+
<div class="column is-2"></div>
10+
<div class="column container has-text-centered">
11+
<p>{{ .Site.Copyright | safeHTML }}</p>
12+
</div>
13+
</section>
14+
{{ end }}

layouts/partials/header.html

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<!DOCTYPE html>
2+
<html{{ with .Site.LanguageCode }} lang="{{ . }}" {{ end }} data-theme="light">
3+
4+
<meta charset="UTF-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6+
7+
<title>{{ .Title }}{{ if eq .IsHome false }} | {{ .Site.Title }}{{ end }}</title>
8+
<link rel="stylesheet" href="{{"css/custom.css" | relURL }}">
9+
10+
<link rel="stylesheet" href="{{ .Site.BaseURL }}/css/styles.css">
11+
12+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css"
13+
integrity="sha512-DTOQO9RWCH3ppGqcWaEA1BIZOC6xxalwEsw9c2QQeAIftl+Vegovlnee1c9QX4TctnWMn13TZye+giMm8e2LwA=="
14+
crossorigin="anonymous" referrerpolicy="no-referrer" />
15+
<script src="https://code.jquery.com/jquery-3.3.1.js"
16+
integrity="sha256-2Kok7MbOyxpgUVvAk/HJ2jigOSYS2auK4Pfzbm7uH60=" crossorigin="anonymous"></script>
17+
18+
{{ if eq "true" .Site.Params.share.enabled }}
19+
<link type="text/css" rel="stylesheet" href="https://cdn.jsdelivr.net/jquery.jssocials/1.4.0/jssocials.css" />
20+
<link type="text/css" rel="stylesheet"
21+
href="https://cdn.jsdelivr.net/jquery.jssocials/1.4.0/jssocials-theme-minima.css" />
22+
<script type="text/javascript" src="{{ .Site.BaseURL }}/js/jssocials.js"></script>
23+
{{ end }}

layouts/partials/jsshare.html

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<div class="container has-text-centered">
2+
{{ if .Site.Params.share.enabled }}
3+
<aside><div id="share"></div></aside>
4+
<script type="text/javascript">
5+
$("#share").jsSocials({
6+
showLabel: false,
7+
showCount: false,
8+
shares: ["email", "twitter", "facebook", "googleplus", "linkedin", "pinterest", "stumbleupon", "whatsapp"]
9+
});
10+
</script>
11+
{{ end }}
12+
</div>

layouts/partials/nav.html

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<div class="container">
2+
<nav class="navbar level">
3+
<div class="navbar-brand">
4+
<a class="nav-item" href="{{ .Site.BaseURL }}"><h1 class="title is-3">{{ .Site.Title }}</h1></a>
5+
</div>
6+
<div class="navbar-menu has-text-centered is-active">
7+
<div class="navbar-end is-centered">
8+
{{ range .Site.Params.social }}
9+
<a href="{{ .url | absURL }}" rel="me">
10+
<span class="icon">
11+
<i class="{{ .fa_icon }}"></i>
12+
</span>
13+
</a>
14+
{{ end }}
15+
</div>
16+
</div>
17+
</nav>
18+
</div>

layouts/partials/pager.html

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<section class="section px-0">
2+
<div class="container columns">
3+
<div class="column is-2"></div>
4+
<nav class="level column px-0">
5+
<div class="level-left">
6+
<div class="level-item">
7+
{{ if .Paginator.HasPrev }}
8+
<a class="button is-rounded" href="{{ .Paginator.Prev.URL }}">
9+
<i class="fa fa-angle-left"></i>
10+
<span class="ml-2">Newer</span>
11+
</a>
12+
{{ else }}
13+
<a class="button is-rounded" disabled>
14+
<i class="fa fa-angle-left"></i>
15+
<span class="ml-2">Newer</span>
16+
</a>
17+
{{ end }}
18+
</div>
19+
</div>
20+
<div class="level-right">
21+
<div class="level-item">
22+
{{ if .Paginator.HasNext }}
23+
<a class="button is-rounded" href="{{ .Paginator.Next.URL }}">
24+
<span class="mr-2">Older</span>
25+
<i class="fa fa-angle-right"></i>
26+
</a>
27+
{{ else }}
28+
<a class="button is-rounded" disabled>
29+
<span class="mr-2">Older</span>
30+
<i class="fa fa-angle-right"></i>
31+
</a>
32+
{{ end }}
33+
</div>
34+
</div>
35+
</nav>
36+
</div>
37+
</section>

0 commit comments

Comments
 (0)