summaryrefslogtreecommitdiff
path: root/internal/templates/markdown.gohtml
blob: 9c48fe8d3b558b46a81814585ba8bf533bcd4b59 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
{{- /*gotype: mokhan.ca/xlgmokha/gitmal/pkg/templates.MarkdownParams*/ -}}
{{- define "head" -}}
<style>
  [id] {
    scroll-margin-top: var(--header-height);
  }
  .markdown-container {
    border: 1px solid var(--c-divider);
    border-top: none;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    overflow-x: auto;
  }
  .markdown-body {
    width: 100%;
    min-width: 200px;
    max-width: 980px;
    margin: 0 auto;
    padding: 32px;
    word-wrap: break-word;
    font-size: 16px;
    line-height: 1.5;
  }
  @media (max-width: 767px) {
    .markdown-body {
      padding: 16px;
    }
  }
</style>
{{- end}}

{{- define "body" -}}
{{- template "header" .}}
<article class="markdown-container">
  <div class="markdown-body">
{{.Content}}
  </div>
</article>
{{- end}}