mirror of
https://github.com/loikein/hugo-tufte.git
synced 2024-11-14 20:36:58 +01:00
refine blockquote & epigraph
This commit is contained in:
parent
d77a621536
commit
bb73762987
3 changed files with 14 additions and 15 deletions
4
assets/scss/vendor/tufte.scss
vendored
4
assets/scss/vendor/tufte.scss
vendored
|
@ -151,7 +151,7 @@ p {
|
|||
|
||||
/* Chapter Epigraphs */
|
||||
div.epigraph {
|
||||
margin: 5em 0;
|
||||
margin: 3em 0;
|
||||
}
|
||||
|
||||
div.epigraph > blockquote {
|
||||
|
@ -185,7 +185,7 @@ blockquote p {
|
|||
blockquote footer {
|
||||
width: 50%;
|
||||
font-size: 1.1rem;
|
||||
text-align: right;
|
||||
text-align: right !important;
|
||||
}
|
||||
|
||||
ol,
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
<blockquote cite="{{ .Get "cite" }}">
|
||||
<p>
|
||||
{{ .Inner | markdownify }}
|
||||
</p>
|
||||
<footer>{{ .Get "footer" }}{{ with .Get "cite" }}, <cite>{{ . }}</cite>{{ end }}</footer>
|
||||
{{ .Inner | $.Page.RenderString (dict "display" "block") }}
|
||||
<footer>
|
||||
{{- with .Get "author" -}}{{ . }}{{- end -}}
|
||||
{{- with .Get "cite" -}}, <cite>{{ . | markdownify }}</cite>{{- end -}}
|
||||
{{- with .Get "detail" -}}, {{ . | markdownify }}{{- end -}}
|
||||
</footer>
|
||||
</blockquote>
|
||||
|
|
|
@ -1,15 +1,12 @@
|
|||
<div class="epigraph">
|
||||
<blockquote>
|
||||
{{ $t := .Get "type" }}
|
||||
{{ if eq $t "compact" }}{{ .Inner | markdownify }}{{ else }}<p>{{ .Inner | markdownify }}</p>{{ end }}
|
||||
{{ .Inner | $.Page.RenderString (dict "display" "block") }}
|
||||
{{ if .IsNamedParams }}
|
||||
<footer>
|
||||
{{ with .Get "pre" }}{{ . }}{{ end }}
|
||||
{{ with .Get "link" }}<a href={{ . }}>{{ end }}
|
||||
{{ with .Get "cite" }}<cite>{{ . }}</cite>{{ end }}
|
||||
</a>
|
||||
{{ with .Get "post" }}{{ . }}{{ end }}
|
||||
</footer>
|
||||
<footer>
|
||||
{{- with .Get "author" -}}{{ . }}{{- end -}}
|
||||
{{- with .Get "cite" -}}, <cite>{{ . | markdownify }}</cite>{{- end -}}
|
||||
{{- with .Get "detail" -}}, {{ . | markdownify }}{{- end -}}
|
||||
</footer>
|
||||
{{ end }}
|
||||
</blockquote>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue