diff options
Diffstat (limited to 'layouts/partials/preview.html')
| -rw-r--r-- | layouts/partials/preview.html | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/layouts/partials/preview.html b/layouts/partials/preview.html new file mode 100644 index 0000000..acaabaf --- /dev/null +++ b/layouts/partials/preview.html @@ -0,0 +1,67 @@ +<!-- +The MIT License (MIT) + +Original work Copyright (c) 2015 Dean Attali +Modified work Copyright (c) 2017 Michael Romero + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +--> +<article class="post-preview"> + <a href="{{ .Permalink }}"> + <h2 class="post-title">{{ .Title }}</h2> + {{ if .Params.subtitle }} + <h3 class="post-subtitle"> + {{ .Params.subtitle }} + </h3> + {{ end }} + {{ if .Params.image }} + <img src="{{ .Params.image }}" alt="{{ .Title }}" class="img-title" /> + {{ end }} + {{ if .Params.video }} + <video loop autoplay muted playsinline class="img-title"> + <source src="{{ .Params.video }}"> + </video> + {{ end }} + </a> + + <p class="post-meta"> + {{ partial "post_meta.html" . }} + </p> + <div class="post-entry"> + {{ if or (.Truncated) (.Params.summary) }} + {{ .Summary }} + <a href="{{ .Permalink }}" class="post-read-more">[{{ i18n "readMore" }}]</a> + {{ else }} + {{ .Content }} + {{ end }} + </div> + + {{ if .Params.tags }} + <div class="blog-tags"> + {{ range .Params.tags }} + <!-- Fix for "https://github.com/halogenica/beautifulhugo/issues/349". + From "https://github.com/dovidio/personalwebsite/commit/34762e94c29fd2c26c16c45f8ae2de21bdf9b46d". + <a href="{{ $.Site.LanguagePrefix | absURL }}/tags/{{ . | urlize }}/">{{ . }}</a> + --> + <a href="{{"tags" | absLangURL}}/{{ . | urlize }}/">{{ . }}</a> + {{ end }} + </div> + {{ end }} + +</article> |
