Merge pull request #7 from yuzu-emu/css

base layout changes and table shortcode
This commit is contained in:
Schplee 2021-06-11 15:05:30 -07:00 committed by GitHub
commit 42f620f14a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 12 deletions

View file

@ -62,26 +62,26 @@
</div> </div>
{{ else if eq $left_sidebar true }} {{ else if eq $left_sidebar true }}
<div class="container"> <div class="container">
<div class="columns"> <div class="columns is-centered">
<div class="column"> <div class="column is-four-fifths">
{{ block "sidebar" . }}{{ end }}
{{ partial "layout/sidebar" }}
</div>
<div class="column is-two-thirds">
{{ block "main" . }}{{ end }} {{ block "main" . }}{{ end }}
</div> </div>
</div> </div>
<div class="column">
{{ block "sidebar" . }}{{ end }}
{{ partial "layout/sidebar" }}
</div>
</div> </div>
{{ else }} {{ else }}
<div class="container"> <div class="container">
<div class="columns"> <div class="columns is-centered">
<div class="column is-two-thirds"> <div class="column is-four-fifths">
{{ block "main" . }}{{ end }} {{ block "main" . }}{{ end }}
</div> </div>
<div class="column"> </div>
{{ block "sidebar" . }}{{ end }} <div class="column">
{{ partial "layout/sidebar" }} {{ block "sidebar" . }}{{ end }}
</div> {{ partial "layout/sidebar" }}
</div> </div>
</div> </div>
{{ end }} {{ end }}

View file

@ -0,0 +1,6 @@
{{ $htmlTable := .Inner | markdownify }}
{{ $class := .Get 0 }}
{{ $old := "<table>" }}
{{ $new := printf "<table class=\"%s\">" $class }}
{{ $htmlTable := replace $htmlTable $old $new }}
{{ $htmlTable | safeHTML }}