website/layouts/partials/content.html
liuboaibc 8f466739bf update: fix bugs and update style
Signed-off-by: liuboaibc <kukudehero@gmail.com>
2020-09-23 16:01:28 +08:00

61 lines
2.1 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{{ $context := .context }}
{{ $parent := .parent }}
{{ $text := .text }}
<!DOCTYPE html>
<html lang="{{ with .Site.LanguageCode }}{{ . }}{{ else }}en-US{{ end }}">
<head>
{{- partial "head.html" $context -}}
{{ $style := resources.Get "scss/content.scss" | toCSS | minify | fingerprint }}
<link rel="stylesheet" href="{{ $style.RelPermalink }}">
{{ $style := resources.Get "scss/markdown.scss" | toCSS | minify | fingerprint }}
<link rel="stylesheet" href="{{ $style.RelPermalink }}">
</head>
<body>
{{ partial "header.html" $context }}
<section class="main-section {{ if eq .context.Site.Language.Lang "zh"}} padding{{ end }}">
<div class="common-layout">
<div class='breadcrumb'>
{{ $section := $context.FirstSection }}
<span><a href='{{ $parent | relLangURL }}'>{{ i18n $text }}</a> > </span>
<span>{{ $context.Title }}</span>
</div>
<div class='main-div middle-div'>
<div class='author'>{{ $context.Params.author }}</div>
<div class='date'>{{ i18n "Published on" }}{{ string $context.Params.createTime }}</div>
<h1>{{ $context.Title }}</h1>
<div class="share-1">
{{ partial "share.html" }}
</div>
<div class='content'>
<div class='md-body'>
{{ $context.Content }}
</div>
</div>
<div class="share-2">
{{ partial "share.html" }}
</div>
</div>
<div class='aside'>
<div class="inner-div">
<div class='title'>{{ i18n "Table of Contents" }}</div>
<div class='tabs'>{{ $context.TableOfContents }}</div>
</div>
</div>
</div>
</section>
{{ partial "footer.html" $context }}
<script src='{{ "js/aside.js" | relURL }}'></script>
<script src='{{ "js/markdown-tab.js" | relURL }}'></script>
<script>
var viewer = new Viewer(document.querySelector('.md-body'), {
url: 'src'
})
</script>
</body>
</html>