diff --git a/themes/mytheme/CHANGELOG.md b/themes/mytheme/CHANGELOG.md new file mode 100644 index 0000000000..dcd12877e1 --- /dev/null +++ b/themes/mytheme/CHANGELOG.md @@ -0,0 +1,5 @@ +# v0.1.0 +## 09/30/2020 + +1. [](#new) + * ChangeLog started... diff --git a/themes/mytheme/LICENSE b/themes/mytheme/LICENSE new file mode 100644 index 0000000000..d46cd6c82f --- /dev/null +++ b/themes/mytheme/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2020 sadf + +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. diff --git a/themes/mytheme/README.md b/themes/mytheme/README.md new file mode 100644 index 0000000000..81887ab63a --- /dev/null +++ b/themes/mytheme/README.md @@ -0,0 +1,7 @@ +# Mytheme Theme + +The **Mytheme** Theme is for [Grav CMS](http://github.com/getgrav/grav). This README.md file should be modified to describe the features, installation, configuration, and general usage of this theme. + +## Description + +mytheme diff --git a/themes/mytheme/blueprints.yaml b/themes/mytheme/blueprints.yaml new file mode 100644 index 0000000000..8d5400cd99 --- /dev/null +++ b/themes/mytheme/blueprints.yaml @@ -0,0 +1,18 @@ +name: Mytheme +slug: mytheme +type: theme +version: 0.1.0 +description: mytheme +icon: rebel +author: + name: sadf + email: dhladek@mgial.com +homepage: https://github.com/asdf/grav-theme-mytheme +demo: http://demo.yoursite.com +keywords: grav, theme, etc +bugs: https://github.com/asdf/grav-theme-mytheme/issues +readme: https://github.com/asdf/grav-theme-mytheme/blob/develop/README.md +license: MIT + +dependencies: + - { name: grav, version: '>=1.6.0' } diff --git a/themes/mytheme/mytheme.php b/themes/mytheme/mytheme.php new file mode 100644 index 0000000000..62940a0f30 --- /dev/null +++ b/themes/mytheme/mytheme.php @@ -0,0 +1,9 @@ + +
+

+ {% if page.header.media == 'video' %} + + {% else %} + + {% endif %} + {{ page.title|e }} +

+ {% if (grav.theme.config.params.articles.show.date) or (grav.theme.config.params.articles.show.authors) or (grav.theme.config.params.articles.show.topics) or (grav.theme.config.params.articles.show.time) %} +
+ {% if grav.theme.config.params.articles.show.date %} + {{ page.date|date("F j, Y") }} + {% endif %} + {% if grav.theme.config.params.articles.show.authors %} + {% set authorlist = [] %} + {% for author in page.taxonomy['author'] %} + {# Check to see if a dedicated author page exists #} + {% set slug = author|hyphenize|url_encode %} + {% set p = page.find('/authors/'~slug) %} + {% if p == null %} + {% set authorlist = authorlist|merge([''~author~'']) %} + {% else %} + {% set authorlist = authorlist|merge([''~author~'']) %} + {% endif %} + {% endfor %} + {{ authorlist|join(', ') }} + {% endif %} + {% if grav.theme.config.params.articles.show.topics %} + {% set catlist = [] %} + {% for cat in page.taxonomy.category %} + {% set catlist = catlist|merge([''~cat~'']) %} + {% endfor %} + {{ catlist|join(', ') }} + {% endif %} + {% if grav.theme.config.params.articles.show.time %} + {{ page.content|readingtime }} + {% endif %} +
+ {% endif %} +
+
+ {{ page.content }} + {% if not page.header.hide_mediasummary %} +

+ {% for image in page.media.images %} + {{ image.cropResize(700, 400).html("title", "alt", "itemscreenshot") }} + {% endfor %} + {% endif %} + +
+
+ {% if page.taxonomy.tag|length > 0 %} + {% set taglist = [] %} + {% for tag in page.taxonomy.tag %} + {% set taglist = taglist|merge([''~tag~'']) %} + {% endfor %} +
+ {{ taglist|join(', ') }} +
+ {% endif %} + {% if config.plugins.relatedpages.enabled and related_pages|length > 0 %} + + {% endif %} +
+ {% if config.plugins.comments.enabled %} +
+

{{ 'COMMENTS'|t }}

+
+ {% endif %} + +{% endblock %} diff --git a/themes/mytheme/thumbnail.jpg b/themes/mytheme/thumbnail.jpg new file mode 100644 index 0000000000..e82d66ec04 Binary files /dev/null and b/themes/mytheme/thumbnail.jpg differ