Initial AD port
This commit is contained in:
34
themes/after-dark/layouts/shortcodes/blockquote.html
Normal file
34
themes/after-dark/layouts/shortcodes/blockquote.html
Normal file
@@ -0,0 +1,34 @@
|
||||
{{/*
|
||||
Copyright (C) 2019 Josh Habdas <jhabdas@protonmail.com>
|
||||
|
||||
This file is part of After Dark.
|
||||
|
||||
After Dark is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
After Dark is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/ -}}
|
||||
|
||||
{{ $_hugo_config := `{ "version": 1 }` }}
|
||||
{{ $body := .Get "text" | default .Inner }}
|
||||
{{ $class := .Get "class" }}
|
||||
{{ $citelink := .Get "citelink" }}
|
||||
{{ $cite := .Get "cite" }}
|
||||
<blockquote{{ with $class }} class="{{ . }}"{{ end }}{{ with $citelink }} cite="{{ . }}"{{ end }}>
|
||||
<p>{{- $body | plainify -}}</p>
|
||||
{{ if $citelink }}
|
||||
<cite>{{ partial "components/external.html" (dict "href" $citelink "body" $cite) }}</cite>
|
||||
{{ else if $cite }}
|
||||
<cite>{{ $cite }}</cite>
|
||||
{{ else }}
|
||||
<cite>N.N.</cite>
|
||||
{{ end }}
|
||||
</blockquote>
|
||||
40
themes/after-dark/layouts/shortcodes/external.html
Normal file
40
themes/after-dark/layouts/shortcodes/external.html
Normal file
@@ -0,0 +1,40 @@
|
||||
{{/*
|
||||
Copyright (C) 2019 Josh Habdas <jhabdas@protonmail.com>
|
||||
|
||||
This file is part of After Dark.
|
||||
|
||||
After Dark is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
After Dark is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/ -}}
|
||||
|
||||
{{ $_hugo_config := `{ "version": 1 }` }}
|
||||
{{ $href := .Get "href" | default nil -}}
|
||||
{{ $body := .Get "text" | default .Inner -}}
|
||||
{{ $class := .Get "class" -}}
|
||||
{{ $referrerpolicy := .Get "referrerpolicy" -}}
|
||||
{{ $target := .Get "target" -}}
|
||||
{{ $title := .Get "title" -}}
|
||||
{{ $type := .Get "type" -}}
|
||||
{{ $rel := .Get "rel" -}}
|
||||
{{ $itemtype := .Get "itemtype" -}}
|
||||
{{ $trusted := .Get "trusted" -}}
|
||||
{{- if .IsNamedParams -}}
|
||||
{{ partial "components/external.html" (dict "href" $href "body" $body "class" $class "referrerpolicy" $referrerpolicy "target" $target "type" $type "title" $title "rel" $rel "itemtype" $itemtype "trusted" $trusted "suppress_external" (and .Inner (eq (len (findRE "external" $rel)) 0))) }}
|
||||
{{- else if gt (len .Params) 1 -}}
|
||||
{{ partial "components/external.html" (dict "href" (.Get 0) "body" (.Get 1)) }}
|
||||
{{- else -}}
|
||||
{{ partial "components/external.html" (dict "href" (.Get 0)) }}
|
||||
{{- end -}}
|
||||
{{- if or (and .IsNamedParams (eq $href nil)) (and (eq .IsNamedParams false) (eq (.Get 0) nil)) }}
|
||||
<p>{{ partial "components/alert.html" (dict "type" "error" "body" (errorf "Invalid use of external shortcode. Please provide a URL.")) }}</p>
|
||||
{{ end -}}
|
||||
30
themes/after-dark/layouts/shortcodes/figure.html
Normal file
30
themes/after-dark/layouts/shortcodes/figure.html
Normal file
@@ -0,0 +1,30 @@
|
||||
{{/*
|
||||
Copyright (C) 2019 Josh Habdas <jhabdas@protonmail.com>
|
||||
|
||||
This file is part of After Dark.
|
||||
|
||||
After Dark is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
After Dark is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/ -}}
|
||||
|
||||
{{ $src := .Get "src" }}
|
||||
{{ $lqipsrc := .Get "lqipsrc" }}
|
||||
{{ $caption := .Get "caption" }}
|
||||
{{ $link := .Get "link" }}
|
||||
{{ $linktarget := .Get "linktarget" }}
|
||||
{{ $attr := .Get "attr" }}
|
||||
{{ $attrlink := .Get "attrlink" }}
|
||||
{{ $alt := .Get "alt" }}
|
||||
{{ $title := .Get "title" }}
|
||||
{{ $class := .Get "class" }}
|
||||
{{ partial "components/figure.html" (dict "src" $src "lqipsrc" $lqipsrc "caption" $caption "link" $link "linktarget" $linktarget "attr" $attr "attrlink" $attrlink "alt" $alt "title" $title "class" $class) }}
|
||||
24
themes/after-dark/layouts/shortcodes/hackcss-alert.html
Normal file
24
themes/after-dark/layouts/shortcodes/hackcss-alert.html
Normal file
@@ -0,0 +1,24 @@
|
||||
{{/*
|
||||
Copyright (C) 2019 Josh Habdas <jhabdas@protonmail.com>
|
||||
|
||||
This file is part of After Dark.
|
||||
|
||||
After Dark is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
After Dark is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/ -}}
|
||||
|
||||
{{ $_hugo_config := `{ "version": 1 }` }}
|
||||
{{ $type := .Get "type" }}
|
||||
{{ $class := .Get "class" }}
|
||||
{{ $body := .Get "text" | default .Inner }}
|
||||
{{ partial "components/alert.html" (dict "type" $type "class" $class "body" $body) }}
|
||||
35
themes/after-dark/layouts/shortcodes/hackcss-button.html
Normal file
35
themes/after-dark/layouts/shortcodes/hackcss-button.html
Normal file
@@ -0,0 +1,35 @@
|
||||
{{/*
|
||||
Copyright (C) 2019 Josh Habdas <jhabdas@protonmail.com>
|
||||
|
||||
This file is part of After Dark.
|
||||
|
||||
After Dark is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
After Dark is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/ -}}
|
||||
|
||||
{{ $type := .Get "type" }}
|
||||
{{ $body := .Get "text" | default .Inner }}
|
||||
{{ $isghost := .Get "isghost" }}
|
||||
{{ $isblock := .Get "isblock" }}
|
||||
{{ $id := .Get "id" }}
|
||||
{{ $name := .Get "name" }}
|
||||
{{ $class := .Get "class" }}
|
||||
{{ $action := .Get "action" }}
|
||||
{{ $form := .Get "form" }}
|
||||
{{ $value := .Get "value" }}
|
||||
{{ $onclick := .Get "onclick" }}
|
||||
{{ $disabled := .Get "disabled" }}
|
||||
{{ $tabindex := .Get "tabindex" }}
|
||||
{{ $target := .Get "target" }}
|
||||
{{ $method := .Get "method" }}
|
||||
{{ partial "components/button.html" (dict "type" $type "body" $body "isghost" $isghost "isblock" $isblock "action" $action "form" $form "value" $value "onclick" $onclick "id" $id "name" $name "class" $class "disabled" $disabled "tabindex" $tabindex "target" $target "method" $method) }}
|
||||
@@ -0,0 +1,23 @@
|
||||
{{/*
|
||||
Copyright (C) 2019 Josh Habdas <jhabdas@protonmail.com>
|
||||
|
||||
This file is part of After Dark.
|
||||
|
||||
After Dark is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
After Dark is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/ -}}
|
||||
|
||||
{{ $formactions := .Get "formactions" }}
|
||||
{{ $class := .Get "class" }}
|
||||
{{ $body := .Inner }}
|
||||
{{ partial "components/buttongroup.html" (dict "formactions" $formactions "class" $class "body" $body) }}
|
||||
22
themes/after-dark/layouts/shortcodes/hackcss-card.html
Normal file
22
themes/after-dark/layouts/shortcodes/hackcss-card.html
Normal file
@@ -0,0 +1,22 @@
|
||||
{{/*
|
||||
Copyright (C) 2019 Josh Habdas <jhabdas@protonmail.com>
|
||||
|
||||
This file is part of After Dark.
|
||||
|
||||
After Dark is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
After Dark is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/}}
|
||||
|
||||
{{ $header := .Get "header" }}
|
||||
{{ $body := .Get "text" | default .Inner }}
|
||||
{{ partial "components/card.html" (dict "header" $header "body" $body) }}
|
||||
22
themes/after-dark/layouts/shortcodes/hackcss-cell.html
Normal file
22
themes/after-dark/layouts/shortcodes/hackcss-cell.html
Normal file
@@ -0,0 +1,22 @@
|
||||
{{/*
|
||||
Copyright (C) 2019 Josh Habdas <jhabdas@protonmail.com>
|
||||
|
||||
This file is part of After Dark.
|
||||
|
||||
After Dark is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
After Dark is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/ -}}
|
||||
|
||||
{{ $class := .Get "class" }}
|
||||
{{ $body := .Get "text" | default .Inner }}
|
||||
{{- partial "components/cell.html" (dict "class" $class "body" $body) -}}
|
||||
34
themes/after-dark/layouts/shortcodes/hackcss-form.html
Normal file
34
themes/after-dark/layouts/shortcodes/hackcss-form.html
Normal file
@@ -0,0 +1,34 @@
|
||||
{{/*
|
||||
Copyright (C) 2019 Josh Habdas <jhabdas@protonmail.com>
|
||||
|
||||
This file is part of After Dark.
|
||||
|
||||
After Dark is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
After Dark is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/ -}}
|
||||
|
||||
{{ $accept_charset := .Get "acceptcharset" }}
|
||||
{{ $id := .Get "id" }}
|
||||
{{ $name := .Get "name" }}
|
||||
{{ $action := .Get "action" }}
|
||||
{{ $enctype := .Get "enctype" }}
|
||||
{{ $target := .Get "target" }}
|
||||
{{ $novalidate := .Get "novalidate" }}
|
||||
{{ $autocomplete := .Get "autocomplete" }}
|
||||
{{ $method := .Get "method" }}
|
||||
{{ $class := .Get "class" }}
|
||||
{{ $body := .Inner }}
|
||||
{{ partial "components/form.html" (dict "id" $id "name" $name "accept_charset" $accept_charset "action" $action "enctype" $enctype "target" $target "novalidate" $novalidate "method" $method "class" $class "body" $body) }}
|
||||
{{ if eq "false" $autocomplete }}
|
||||
<p>{{ partial "components/alert.html" (dict "type" "error" "body" (errorf "Invalid autocomplete value for form. Did you mean \"off\" instead of %q?" $autocomplete)) }}</p>
|
||||
{{ end }}
|
||||
28
themes/after-dark/layouts/shortcodes/hackcss-formgroup.html
Normal file
28
themes/after-dark/layouts/shortcodes/hackcss-formgroup.html
Normal file
@@ -0,0 +1,28 @@
|
||||
{{/*
|
||||
Copyright (C) 2019 Josh Habdas <jhabdas@protonmail.com>
|
||||
|
||||
This file is part of After Dark.
|
||||
|
||||
After Dark is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
After Dark is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/ -}}
|
||||
|
||||
{{ $hastextarea := .Get "hastextarea" }}
|
||||
{{ $state := .Get "state" }}
|
||||
{{ $disabled := .Get "disabled" }}
|
||||
{{ $form := .Get "form" }}
|
||||
{{ $name := .Get "name" }}
|
||||
{{ $class := .Get "class" }}
|
||||
{{ $legend := .Get "legend" }}
|
||||
{{ $body := .Get "body" | default .Inner }}
|
||||
{{ partial "components/formgroup.html" (dict "hastextarea" $hastextarea "state" $state "class" $class "disabled" $disabled "form" $form "name" $name "legend" $legend "body" $body) }}
|
||||
22
themes/after-dark/layouts/shortcodes/hackcss-grid.html
Normal file
22
themes/after-dark/layouts/shortcodes/hackcss-grid.html
Normal file
@@ -0,0 +1,22 @@
|
||||
{{/*
|
||||
Copyright (C) 2019 Josh Habdas <jhabdas@protonmail.com>
|
||||
|
||||
This file is part of After Dark.
|
||||
|
||||
After Dark is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
After Dark is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/ -}}
|
||||
|
||||
{{ $class := .Get "class" }}
|
||||
{{ $body := .Inner }}
|
||||
{{- partial "components/grid.html" (dict "class" $class "body" $body) -}}
|
||||
22
themes/after-dark/layouts/shortcodes/hackcss-helpblock.html
Normal file
22
themes/after-dark/layouts/shortcodes/hackcss-helpblock.html
Normal file
@@ -0,0 +1,22 @@
|
||||
{{/*
|
||||
Copyright (C) 2019 Josh Habdas <jhabdas@protonmail.com>
|
||||
|
||||
This file is part of After Dark.
|
||||
|
||||
After Dark is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
After Dark is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/ -}}
|
||||
|
||||
{{ $class := .Get "class" }}
|
||||
{{ $body := .Get "text" | default .Inner }}
|
||||
{{ partial "components/helpblock.html" (dict "class" $class "body" $body) }}
|
||||
23
themes/after-dark/layouts/shortcodes/hackcss-label.html
Normal file
23
themes/after-dark/layouts/shortcodes/hackcss-label.html
Normal file
@@ -0,0 +1,23 @@
|
||||
{{/*
|
||||
Copyright (C) 2019 Josh Habdas <jhabdas@protonmail.com>
|
||||
|
||||
This file is part of After Dark.
|
||||
|
||||
After Dark is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
After Dark is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/ -}}
|
||||
|
||||
{{ $for := .Get "for" }}
|
||||
{{ $form := .Get "form" }}
|
||||
{{ $body := .Get "text" | default .Inner }}
|
||||
{{ partial "components/label.html" (dict "for" $for "form" $form "body" $body) }}
|
||||
23
themes/after-dark/layouts/shortcodes/hackcss-progress.html
Normal file
23
themes/after-dark/layouts/shortcodes/hackcss-progress.html
Normal file
@@ -0,0 +1,23 @@
|
||||
{{/*
|
||||
Copyright (C) 2019 Josh Habdas <jhabdas@protonmail.com>
|
||||
|
||||
This file is part of After Dark.
|
||||
|
||||
After Dark is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
After Dark is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/ -}}
|
||||
|
||||
{{ $show_percent := .Get "showpercent" }}
|
||||
{{ $fill_text := .Get "filltext" | default "Loading" }}
|
||||
{{ $value := .Get "value" }}
|
||||
{{ partial "components/progress.html" (dict "show_percent" $show_percent "fill_text" $fill_text "value" $value) }}
|
||||
26
themes/after-dark/layouts/shortcodes/hackcss-select.html
Normal file
26
themes/after-dark/layouts/shortcodes/hackcss-select.html
Normal file
@@ -0,0 +1,26 @@
|
||||
{{/*
|
||||
Copyright (C) 2019 Josh Habdas <jhabdas@protonmail.com>
|
||||
|
||||
This file is part of After Dark.
|
||||
|
||||
After Dark is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
After Dark is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/ -}}
|
||||
|
||||
{{ $id := .Get "id" }}
|
||||
{{ $name := .Get "name" }}
|
||||
{{ $class := .Get "class" }}
|
||||
{{ $disabled := .Get "disabled" }}
|
||||
{{ $form := .Get "form" }}
|
||||
{{ $body := .Get "body" | default .Inner }}
|
||||
{{ partial "components/select.html" (dict "id" $id "name" $name "class" $class "disabled" $disabled "body" $body) }}
|
||||
44
themes/after-dark/layouts/shortcodes/hackcss-textarea.html
Normal file
44
themes/after-dark/layouts/shortcodes/hackcss-textarea.html
Normal file
@@ -0,0 +1,44 @@
|
||||
{{/*
|
||||
Copyright (C) 2019 Josh Habdas <jhabdas@protonmail.com>
|
||||
|
||||
This file is part of After Dark.
|
||||
|
||||
After Dark is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
After Dark is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/ -}}
|
||||
|
||||
{{ $id := .Get "id" | default nil }}
|
||||
{{ $name := .Get "name" | default nil }}
|
||||
{{ $class := .Get "class" | default nil }}
|
||||
{{ $autocomplete := .Get "autocomplete" | default nil }}
|
||||
{{ $autofocus := .Get "autofocus" | default nil }}
|
||||
{{ $cols := .Get "cols" | default nil }}
|
||||
{{ $disabled := .Get "disabled" | default nil }}
|
||||
{{ $form := .Get "form" | default nil }}
|
||||
{{ $maxlength := .Get "maxlength" | default nil }}
|
||||
{{ $minlength := .Get "minlength" | default nil }}
|
||||
{{ $placeholder := .Get "placeholder" | default nil }}
|
||||
{{ $readonly := .Get "readonly" | default nil }}
|
||||
{{ $required := .Get "required" | default nil }}
|
||||
{{ $rows := .Get "rows" | default nil }}
|
||||
{{ $spellcheck := .Get "spellcheck" | default nil }}
|
||||
{{ $wrap := .Get "wrap" | default nil }}
|
||||
{{ $tabindex := .Get "tabindex" | default nil }}
|
||||
{{ $body := .Get "text" | default nil }}
|
||||
{{ partial "components/textarea.html" (dict "body" $body "attrs" (dict "id" $id "name" $name "class" $class "autocomplete" $autocomplete "autofocus" $autofocus "cols" $cols "disabled" $disabled "form" $form "maxlength" $maxlength "minlength" $minlength "placeholder" $placeholder "readonly" $readonly "required" $required "rows" $rows "spellcheck" $spellcheck "wrap" $wrap "tabindex" $tabindex)) }}
|
||||
{{ if eq "false" $autocomplete }}
|
||||
<p>{{ partial "components/alert.html" (dict "type" "error" "body" (errorf "Invalid autocomplete value for textarea. Did you mean \"off\" instead of %q?" $autocomplete)) }}</p>
|
||||
{{ end }}
|
||||
{{ if eq "false" $wrap }}
|
||||
<p>{{ partial "components/alert.html" (dict "type" "error" "body" (errorf "Invalid wrap value for textarea. Did you mean \"off\" instead of %q?" $wrap)) }}</p>
|
||||
{{ end }}
|
||||
50
themes/after-dark/layouts/shortcodes/hackcss-textinput.html
Normal file
50
themes/after-dark/layouts/shortcodes/hackcss-textinput.html
Normal file
@@ -0,0 +1,50 @@
|
||||
{{/*
|
||||
Copyright (C) 2019 Josh Habdas <jhabdas@protonmail.com>
|
||||
|
||||
This file is part of After Dark.
|
||||
|
||||
After Dark is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
After Dark is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/ -}}
|
||||
|
||||
{{ $id := .Get "id" | default nil }}
|
||||
{{ $name := .Get "name" | default nil }}
|
||||
{{ $class := .Get "class" | default nil }}
|
||||
{{ $autocomplete := .Get "autocomplete" | default nil }}
|
||||
{{ $autofocus := .Get "autofocus" | default nil }}
|
||||
{{ $disabled := .Get "disabled" | default nil }}
|
||||
{{ $form := .Get "form" | default nil }}
|
||||
{{ $formaction := .Get "formaction" | default nil }}
|
||||
{{ $formmethod := .Get "formmethod" | default nil }}
|
||||
{{ $formtarget := .Get "formtarget" | default nil }}
|
||||
{{ $height := .Get "height" | default nil }}
|
||||
{{ $max := .Get "max" | default nil }}
|
||||
{{ $maxlength := .Get "maxlength" | default nil }}
|
||||
{{ $min := .Get "min" | default nil }}
|
||||
{{ $minlength := .Get "minlength" | default nil }}
|
||||
{{ $multiple := .Get "multiple" | default nil }}
|
||||
{{ $pattern := .Get "pattern" | default nil }}
|
||||
{{ $placeholder := .Get "placeholder" | default nil }}
|
||||
{{ $readonly := .Get "readonly" | default nil }}
|
||||
{{ $required := .Get "required" | default nil }}
|
||||
{{ $size := .Get "size" | default nil }}
|
||||
{{ $spellcheck := .Get "spellcheck" | default nil }}
|
||||
{{ $step := .Get "step" | default nil }}
|
||||
{{ $tabindex := .Get "tabindex" | default nil }}
|
||||
{{ $type := .Get "type" | default nil }}
|
||||
{{ $value := .Get "value" | default nil }}
|
||||
{{ $width := .Get "width" | default nil }}
|
||||
{{ partial "components/textinput.html" (dict "attrs" (dict "id" $id "name" $name "class" $class "autocomplete" $autocomplete "autofocus" $autofocus "disabled" $disabled "form" $form "formaction" $formaction "formmethod" $formmethod "formtarget" $formtarget "height" $height "max" $max "maxlength" $maxlength "min" $min "minlength" $minlength "multiple" $multiple "pattern" $pattern "placeholder" $placeholder "readonly" $readonly "required" $required "size" $size "spellcheck" $spellcheck "step" $step "tabindex" $tabindex "type" $type "value" $value "width" $width)) }}
|
||||
{{ if eq "false" $autocomplete }}
|
||||
<p>{{ partial "components/alert.html" (dict "type" "error" "body" (errorf "Invalid autocomplete value for textinput. Did you mean \"off\" instead of %q?" $autocomplete)) }}</p>
|
||||
{{ end }}
|
||||
20
themes/after-dark/layouts/shortcodes/hackcss-throbber.html
Normal file
20
themes/after-dark/layouts/shortcodes/hackcss-throbber.html
Normal file
@@ -0,0 +1,20 @@
|
||||
{{/*
|
||||
Copyright (C) 2019 Josh Habdas <jhabdas@protonmail.com>
|
||||
|
||||
This file is part of After Dark.
|
||||
|
||||
After Dark is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
After Dark is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/ -}}
|
||||
|
||||
{{ partial "components/throbber.html" . }}
|
||||
39
themes/after-dark/layouts/shortcodes/navmenu.html
Normal file
39
themes/after-dark/layouts/shortcodes/navmenu.html
Normal file
@@ -0,0 +1,39 @@
|
||||
{{/*
|
||||
Copyright (C) 2019 Josh Habdas <jhabdas@protonmail.com>
|
||||
|
||||
This file is part of After Dark.
|
||||
|
||||
After Dark is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
After Dark is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/ -}}
|
||||
|
||||
<!-- {{/*
|
||||
Attributes: name [default: "main"]
|
||||
|
||||
Display main navigation menu:
|
||||
{{< navmenu >}}
|
||||
|
||||
Display custom navigation menu:
|
||||
{{< navmenu "sidebar" >}}
|
||||
|
||||
*/}} -->
|
||||
|
||||
{{ $name := .Get 0 | default "main" }}
|
||||
{{ $entries := index .Site.Menus $name }}
|
||||
{{ $page := .Page.Page }}
|
||||
{{ with $.Site.Params.layout.menu }}
|
||||
{{ $settings := index . $name | default dict }}
|
||||
{{ partial "components/navmenu.html" (dict "name" $name "entries" $entries "settings" $settings "page" $page)}}
|
||||
{{ else }}
|
||||
{{ partial "components/navmenu.html" (dict "name" $name "entries" $entries "settings" dict "page" $page)}}
|
||||
{{ end }}
|
||||
34
themes/after-dark/layouts/shortcodes/video.html
Normal file
34
themes/after-dark/layouts/shortcodes/video.html
Normal file
@@ -0,0 +1,34 @@
|
||||
{{/*
|
||||
Copyright (C) 2019 Josh Habdas <jhabdas@protonmail.com>
|
||||
|
||||
This file is part of After Dark.
|
||||
|
||||
After Dark is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
After Dark is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/ -}}
|
||||
|
||||
{{ $class := .Get "class" }}
|
||||
{{ $autoplay := .Get "autoplay" }}
|
||||
{{ $controls := .Get "controls" }}
|
||||
{{ $crossorigin := .Get "crossorigin" }}
|
||||
{{ $height := .Get "height" }}
|
||||
{{ $loop := .Get "loop" }}
|
||||
{{ $muted := .Get "muted" }}
|
||||
{{ $preload := .Get "preload" }}
|
||||
{{ $intrinsicsize := .Get "intrinsicsize" }}
|
||||
{{ $poster := .Get "poster" }}
|
||||
{{ $src := .Get "src" }}
|
||||
{{ $width := .Get "width" }}
|
||||
{{ $playsinline := .Get "playsinline" }}
|
||||
|
||||
{{ partial "components/video.html" (dict "class" $class "autoplay" $autoplay "controls" $controls "crossorigin" $crossorigin "height" $height "loop" $loop "muted" $muted "preload" $preload "intrinsicsize" $intrinsicsize "poster" $poster "src" $src "width" $width "playsinline" $playsinline "node" .Page) }}
|
||||
Reference in New Issue
Block a user