website/layouts/partials/content.html
2020-08-17 11:20:05 +08:00

57 lines
2.0 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'>
<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 aside-fixed'>
<div class='title'>{{ i18n "Table of Contents" }}</div>
<div class='tabs'>{{ $context.TableOfContents }}</div>
</div>
</div>
</section>
{{ partial "footer.html" $context }}
<script src='{{ "js/aside.js" | relURL }}'></script>
<script>
var viewer = new Viewer(document.querySelector('.md-body'), {
url: 'src'
})
</script>
</body>
</html>