forked from KEMT/zpwiki
mytheme workflow
This commit is contained in:
parent
e64004f199
commit
b0d7993926
5
themes/mytheme/CHANGELOG.md
Normal file
5
themes/mytheme/CHANGELOG.md
Normal file
@ -0,0 +1,5 @@
|
||||
# v0.1.0
|
||||
## 09/30/2020
|
||||
|
||||
1. [](#new)
|
||||
* ChangeLog started...
|
21
themes/mytheme/LICENSE
Normal file
21
themes/mytheme/LICENSE
Normal file
@ -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.
|
7
themes/mytheme/README.md
Normal file
7
themes/mytheme/README.md
Normal file
@ -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
|
18
themes/mytheme/blueprints.yaml
Normal file
18
themes/mytheme/blueprints.yaml
Normal file
@ -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' }
|
9
themes/mytheme/mytheme.php
Normal file
9
themes/mytheme/mytheme.php
Normal file
@ -0,0 +1,9 @@
|
||||
<?php
|
||||
namespace Grav\Theme;
|
||||
|
||||
use Grav\Common\Theme;
|
||||
|
||||
class Mytheme extends KnowledgeBase
|
||||
{
|
||||
// Access plugin events in this class
|
||||
}
|
8
themes/mytheme/mytheme.yaml
Normal file
8
themes/mytheme/mytheme.yaml
Normal file
@ -0,0 +1,8 @@
|
||||
streams:
|
||||
schemes:
|
||||
theme:
|
||||
type: ReadOnlyStream
|
||||
prefixes:
|
||||
'':
|
||||
- user/themes/mytheme
|
||||
- user/themes/knowledge-base
|
BIN
themes/mytheme/screenshot.jpg
Normal file
BIN
themes/mytheme/screenshot.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 15 KiB |
79
themes/mytheme/templates/README.html.twig
Normal file
79
themes/mytheme/templates/README.html.twig
Normal file
@ -0,0 +1,79 @@
|
||||
{% extends 'partials/base.html.twig' %}
|
||||
|
||||
{% block content %}
|
||||
<article>
|
||||
<section class="header">
|
||||
<h1>
|
||||
{% if page.header.media == 'video' %}
|
||||
<i class="fa fa-file-video-o rightpad"></i>
|
||||
{% else %}
|
||||
<i class="fa fa-file-text-o rightpad"></i>
|
||||
{% endif %}
|
||||
{{ page.title|e }}
|
||||
</h1>
|
||||
{% 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) %}
|
||||
<div class="details">
|
||||
{% if grav.theme.config.params.articles.show.date %}
|
||||
<span>{{ page.date|date("F j, Y") }}</span>
|
||||
{% 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(['<a href="'~base_url~'/taxonomy?name=author&val='~(author|url_encode)~'">'~author~'</a>']) %}
|
||||
{% else %}
|
||||
{% set authorlist = authorlist|merge(['<a href="'~base_url~'/authors/'~slug~'">'~author~'</a>']) %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
<span><i class="fa fa-user"></i> {{ authorlist|join(', ') }}</span>
|
||||
{% endif %}
|
||||
{% if grav.theme.config.params.articles.show.topics %}
|
||||
{% set catlist = [] %}
|
||||
{% for cat in page.taxonomy.category %}
|
||||
{% set catlist = catlist|merge(['<a href="'~base_url~'/taxonomy?name=category&val='~(cat|url_encode)~'">'~cat~'</a>']) %}
|
||||
{% endfor %}
|
||||
<span>{{ catlist|join(', ') }}</span>
|
||||
{% endif %}
|
||||
{% if grav.theme.config.params.articles.show.time %}
|
||||
<span>{{ page.content|readingtime }}</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</section>
|
||||
<section class="content">
|
||||
{{ page.content }}
|
||||
{% if not page.header.hide_mediasummary %}
|
||||
<p></p>
|
||||
{% for image in page.media.images %}
|
||||
{{ image.cropResize(700, 400).html("title", "alt", "itemscreenshot") }}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
</section>
|
||||
<section class="foot">
|
||||
{% if page.taxonomy.tag|length > 0 %}
|
||||
{% set taglist = [] %}
|
||||
{% for tag in page.taxonomy.tag %}
|
||||
{% set taglist = taglist|merge(['<a href="'~base_url~'/taxonomy?name=tag&val='~(tag|url_encode)~'">'~tag~'</a>']) %}
|
||||
{% endfor %}
|
||||
<div class="tags">
|
||||
<i class="fa fa-tags rightpad"></i>{{ taglist|join(', ') }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if config.plugins.relatedpages.enabled and related_pages|length > 0 %}
|
||||
<div class="related topiclist">
|
||||
<h2>{{ 'RELATED_ARTICLES'|t }}</h2>
|
||||
{% include 'partials/relatedpages.html.twig' %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</section>
|
||||
{% if config.plugins.comments.enabled %}
|
||||
<section class="comments">
|
||||
<h2>{{ 'COMMENTS'|t }}</h2>
|
||||
</section>
|
||||
{% endif %}
|
||||
</article>
|
||||
{% endblock %}
|
BIN
themes/mytheme/thumbnail.jpg
Normal file
BIN
themes/mytheme/thumbnail.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.6 KiB |
Loading…
Reference in New Issue
Block a user