V2.00 upgrade
This commit is contained in:
@@ -6,11 +6,10 @@
|
||||
{{- block "head" . -}}{{- end }}
|
||||
|
||||
<!-- stylesheets -->
|
||||
<link rel="stylesheet" href="/css/bootstrap.min.css">
|
||||
<link rel="stylesheet" href="/css/blog.css">
|
||||
<link rel="stylesheet" href="/css/bootstrap.min.css" media="all">
|
||||
|
||||
<!-- Fonts -->
|
||||
<link href="https://fonts.googleapis.com/css2?family=Peddana&display=swap" rel="stylesheet">
|
||||
<link href="https://fonts.googleapis.com/css2?family=Peddana&display=swap" rel="stylesheet" media="all">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
{{ define "head"}}
|
||||
<meta name="description" content="blog of {{ .Site.Title}}" />
|
||||
<title>blog</title>
|
||||
<title>{{ .Title }}</title>
|
||||
{{ end }}
|
||||
|
||||
|
||||
{{ define "main" }}
|
||||
<section class="bg-light">
|
||||
<section class="bg-white">
|
||||
<div class="container-fluid">
|
||||
|
||||
<div class="row pt-3 justify-content-center">
|
||||
@@ -16,10 +16,8 @@
|
||||
{{ if .Params.tags }}
|
||||
<h5 class="card-header m-0">
|
||||
{{ if .Params.tags }}
|
||||
{{ range $tags := .Params.tags }}
|
||||
{{ with $.Site.GetPage (printf "/tags/%s" $tags) }}
|
||||
<a href="{{ .RelPermalink }}" class="btn btn-info btn-rounded mb-2">{{ $tags }}</a>
|
||||
{{ end }}
|
||||
{{ range .Params.tags }}
|
||||
<a href="{{ "/tags/" | relLangURL }}{{ . | urlize }}" class="btn btn-info btn-rounded mb-2">{{ . }}</a>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</h5>
|
||||
|
||||
+166
-21
@@ -1,12 +1,131 @@
|
||||
{{ define "head"}}
|
||||
<meta name="description" content="{{ .Params.description }}" />
|
||||
<title>{{ .Title }}</title>
|
||||
<style>
|
||||
article {
|
||||
font-family: 'Peddana', serif;
|
||||
line-height: 1.3;
|
||||
font-size: 30px;
|
||||
}
|
||||
|
||||
article blockquote {
|
||||
margin: 0 !;
|
||||
border-left: 4px solid #248aaa !important;
|
||||
background-color: #248baa15 !important;
|
||||
padding: 0.3rem !important;
|
||||
padding-left: 1rem !important;
|
||||
}
|
||||
|
||||
article blockquote>p {
|
||||
color: #3c4858 !important;
|
||||
margin-top: 0.5rem !important;
|
||||
margin-bottom: 0.5rem !important;
|
||||
}
|
||||
|
||||
article h1,
|
||||
h2 {
|
||||
font-size: 52px;
|
||||
}
|
||||
|
||||
article h3,
|
||||
h4,
|
||||
h5,
|
||||
h6 {
|
||||
margin-top: 1.3rem;
|
||||
}
|
||||
|
||||
article table {
|
||||
border-radius: 0.1rem;
|
||||
background: #e5e9f2;
|
||||
border: 1px solid #c0ccda;
|
||||
padding: 0.1rem;
|
||||
}
|
||||
|
||||
article table tr {
|
||||
height: 40px !important;
|
||||
}
|
||||
|
||||
article table th,
|
||||
td {
|
||||
padding: 0.5rem;
|
||||
border-left: 1px solid #8392a5;
|
||||
border-bottom: 1px solid #8392a5;
|
||||
}
|
||||
|
||||
article table thead tr {
|
||||
background: #248aaa;
|
||||
color: #e5e9f2;
|
||||
}
|
||||
|
||||
article tbody tr:nth-child(odd) {
|
||||
background-color: #e5e9f2;
|
||||
}
|
||||
|
||||
article tbody tr:hover {
|
||||
background: #c0ccda;
|
||||
}
|
||||
|
||||
article img {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
article caption,
|
||||
figcaption {
|
||||
caption-side: bottom;
|
||||
text-align: center;
|
||||
color: #8392a5;
|
||||
}
|
||||
|
||||
article pre {
|
||||
margin: 5px;
|
||||
padding: 5%;
|
||||
font-size: 18px;
|
||||
max-height: 400px;
|
||||
border-radius: 2%;
|
||||
background-color: #1f618d !important;
|
||||
color: white;
|
||||
}
|
||||
|
||||
article pre>code {
|
||||
padding: 10px !important;
|
||||
}
|
||||
|
||||
article a.header-anchor {
|
||||
text-decoration: none;
|
||||
color: #1c2d41;
|
||||
}
|
||||
|
||||
article a.header-anchor i {
|
||||
font-size: 10pt;
|
||||
color: #3c4858;
|
||||
display: none;
|
||||
margin-left: 0.5rem;
|
||||
}
|
||||
|
||||
article a.header-anchor:hover i {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
article a.header-anchor code {
|
||||
color: #e83e8c;
|
||||
}
|
||||
|
||||
article kbd {
|
||||
background-color: #248aaa !important;
|
||||
color: #f9fafc;
|
||||
}
|
||||
|
||||
article mark {
|
||||
background-color: #ffc21280;
|
||||
}
|
||||
</style>
|
||||
|
||||
{{ end }}
|
||||
|
||||
|
||||
{{ define "main" }}
|
||||
|
||||
<section class="bg-light">
|
||||
<section class="bg-white">
|
||||
<div class="container">
|
||||
<div class="row justify-content-md-center">
|
||||
<div class="col-md-8">
|
||||
@@ -49,23 +168,24 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{ $url := replace .Permalink ( printf "%s" .Site.BaseURL) "" }}
|
||||
{{ $.Scratch.Add "path" .Site.BaseURL }}
|
||||
|
||||
{{ $siteUrl := replace .Permalink ( printf "%s" .Site.BaseURL) "" }}
|
||||
{{ $.Scratch.Add "sitePath" .Site.BaseURL }}
|
||||
|
||||
{{ $.Scratch.Add "siteBreadcrumbs" (slice (dict "url" .Site.BaseURL "name" "home" "position" 1 )) }}
|
||||
{{ range $index, $element := split $siteUrl "/" }}
|
||||
{{ $.Scratch.Add "sitePath" $element }}
|
||||
{{ $.Scratch.Add "sitePath" "/" }}
|
||||
{{ if ne $element "" }}
|
||||
{{ $.Scratch.Add "siteBreadcrumbs" (slice (dict "url" ($.Scratch.Get "sitePath") "name" . "position" (add $index 2))) }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
<nav aria-label="breadcrumb">
|
||||
<ol class="breadcrumb">
|
||||
<li class="breadcrumb-item" aria-current="page">
|
||||
<a href="/">home</a>
|
||||
</li>
|
||||
{{ range $index, $element := split $url "/" }}
|
||||
{{ $.Scratch.Add "path" $element }}
|
||||
{{ if ne $element "" }}
|
||||
<li class="breadcrumb-item" aria-current="page">
|
||||
<a href='{{ $.Scratch.Get "path" }}'>{{ . }}</a>
|
||||
</li>
|
||||
{{ $.Scratch.Add "path" "/" }}
|
||||
{{ range $.Scratch.Get "siteBreadcrumbs" }}
|
||||
<li class="breadcrumb-item" aria-current="page"><a href="{{ .url }}"> {{ .name }} </a></li>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</ol>
|
||||
</nav>
|
||||
|
||||
<!-- image -->
|
||||
@@ -86,10 +206,8 @@
|
||||
<h5 class="card-header m-0">Tags</h5>
|
||||
<div class=" card-body">
|
||||
{{ if .Params.tags }}
|
||||
{{ range $tags := .Params.tags }}
|
||||
{{ with $.Site.GetPage (printf "/tags/%s" $tags) }}
|
||||
<a href="{{ .RelPermalink }}" class="btn btn-info btn-rounded mb-2">{{ $tags }}</a>
|
||||
{{ end }}
|
||||
{{ range .Params.tags }}
|
||||
<a href="{{ "/tags/" | relLangURL }}{{ . | urlize }}" class="btn btn-info btn-rounded mb-2">{{ . }}</a>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
@@ -97,11 +215,38 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
{{ template "_internal/disqus.html" . }}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{ $url := replace .Permalink ( printf "%s" .Site.BaseURL) "" }}
|
||||
{{ $.Scratch.Add "path" .Site.BaseURL }}
|
||||
|
||||
{{ $.Scratch.Add "breadcrumb" (slice (dict "url" .Site.BaseURL "name" "home" "position" 1 )) }}
|
||||
{{ range $index, $element := split $url "/" }}
|
||||
{{ $.Scratch.Add "path" $element }}
|
||||
{{ $.Scratch.Add "path" "/" }}
|
||||
{{ if ne $element "" }}
|
||||
{{ $.Scratch.Add "breadcrumb" (slice (dict "url" ($.Scratch.Get "path") "name" . "position" (add $index 2))) }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
<script type="application/ld+json">
|
||||
{
|
||||
"@context": "http://schema.org",
|
||||
"@type": "BreadcrumbList",
|
||||
"itemListElement": [{{ range $.Scratch.Get "breadcrumb" }}{{ if ne .position 1 }},{{ end }}{
|
||||
"@type": "ListItem",
|
||||
"position": {{ .position }},
|
||||
"item": {
|
||||
"@id": "{{ .url }}",
|
||||
"name": "{{ .name }}"
|
||||
}
|
||||
}{{ end }}]
|
||||
}
|
||||
</script>
|
||||
</section>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
Reference in New Issue
Block a user