Modified to have a different "homepage" & it works
This commit is contained in:
parent
d52d4873d9
commit
892cc4d4cc
7 changed files with 122 additions and 66 deletions
12
templates/articles_list_page.html
Normal file
12
templates/articles_list_page.html
Normal file
|
@ -0,0 +1,12 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block content %}
|
||||
<section>
|
||||
<header class="major">
|
||||
<h2>{% block header %}{% endblock %}</h2>
|
||||
</header>
|
||||
|
||||
{% include 'include/paginated_posts.html' %}
|
||||
|
||||
</section>
|
||||
{% endblock content %}
|
|
@ -3,6 +3,9 @@
|
|||
<head>
|
||||
{% block head %}
|
||||
<title>{% block title %}{{ SITENAME }}{% endblock title %}</title>
|
||||
{% if FAVICON %}
|
||||
<link rel="icon" type="image/x-icon" href="{{ SITEURL }}/{{ FAVICON }}">
|
||||
{% endif %}
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" />
|
||||
{% if THEME_COLOUR %}
|
||||
|
@ -75,6 +78,10 @@
|
|||
{% if SOCIAL_LINKEDIN %}
|
||||
<li><a href="https://www.linkedin.com/in/{{ SOCIAL_LINKEDIN }}" class="icon brands fa-linkedin" target="_blank" rel="noopener noreferrer"><span class="label">LinkedIn</span></a></li>
|
||||
{% endif %}
|
||||
{% if SOCIAL_YOUTUBE %}
|
||||
<li><a href="https://www.youtube.com/channel/{{ SOCIAL_YOUTUBE }}" class="icon brands fa-youtube" target="_blank" rel="noopener noreferrer"><span class="label">LinkedIn</span></a></li>
|
||||
{% endif %}
|
||||
|
||||
{% if FEED_ALL_ATOM %}
|
||||
<li><a href="{{ FEED_DOMAIN }}/{% if FEED_ALL_ATOM_URL %}{{ FEED_ALL_ATOM_URL }}{% else %}{{ FEED_ALL_ATOM }}{% endif %}" type="application/atom+xml" rel="alternate" class="icon brands fa-atom"><span class="label">atom feed</span></a></li>
|
||||
{% endif %}
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
{% extends "index.html" %}
|
||||
{% extends "articles_list_page.html" %}
|
||||
|
||||
{% block title %}{{ SITENAME }} - {{ category }} category{% endblock %}
|
||||
{% block title %}{{ category }}{% endblock %}
|
||||
|
||||
{% block content_title %}
|
||||
<h2>Articles in the {{ category }} category</h2>
|
||||
{% block meta_description %}
|
||||
<meta name="description" content="{{ SITENAME }} articles about {{ category }}">
|
||||
{% endblock %}
|
||||
|
||||
{% block header %}All posts in category: {{ category }}{% endblock %}
|
|
@ -1,23 +1,32 @@
|
|||
<header class="major">
|
||||
<h2>Resources</h2>
|
||||
</header>
|
||||
<div class="posts">
|
||||
<article>
|
||||
<header>
|
||||
<h2 id="indexheader"><a href="https://jmkengineering.com" rel="bookmark" title="Link to homepage">TEST 1</a></h2>
|
||||
<h2 id="indexheader"><a href="https://jmkengineering.com/electrical-safety/" rel="bookmark" title="Electrical Safety">Electrical Safety</a></h2>
|
||||
</header>
|
||||
<a href="https://jmkengineering.com" class="image"><img src="https://jmkengineering.com/photos/stock/213892-orga.jpg" style="max-width: 100%; display: inline; float: center;" /></a>
|
||||
<div class="entry-content"> Some TEXT TO GET CLICKS</div>
|
||||
<a href="https://jmkengineering.com/electrical-safety/" class="image"><img src="https://jmkengineering.com/images/adobestock514814a.jpg" style="max-width: 100%; display: inline; float: center;" /></a>
|
||||
<div class="entry-content">Electrical safety is a nebulous thing, but we define it as the set of systems designed to lower the risks associated with the electrical hazards of shock, arc flash and arc blast, to an acceptable level. In our day-to-day life this is handled for us</div>
|
||||
<br />
|
||||
<ul class="actions">
|
||||
<li><a href="https://jmkengineering.com/electrical-safety/" class="button">Learn More</a></li>
|
||||
</ul>
|
||||
<br />
|
||||
</article>
|
||||
<article>
|
||||
<header>
|
||||
<h2 id="indexheader"><a href="https://jmkengineering.com" rel="bookmark" title="Link to homepage">TEST 1</a></h2>
|
||||
<h2 id="indexheader"><a href="https://jmkengineering.com/smart-grid/" rel="bookmark" title="Smart Grid">Smart Grid</a></h2>
|
||||
</header>
|
||||
<a href="https://jmkengineering.com" class="image"><img src="https://jmkengineering.com/photos/stock/213892-orga.jpg" style="max-width: 100%; display: inline; float: center;" /></a>
|
||||
<div class="entry-content"> Some TEXT TO GET CLICKS</div>
|
||||
</article>
|
||||
<article>
|
||||
<header>
|
||||
<h2 id="indexheader"><a href="https://jmkengineering.com" rel="bookmark" title="Link to homepage">TEST 1</a></h2>
|
||||
</header>
|
||||
<a href="https://jmkengineering.com" class="image"><img src="https://jmkengineering.com/photos/stock/213892-orga.jpg" style="max-width: 100%; display: inline; float: center;" /></a>
|
||||
<div class="entry-content"> Some TEXT TO GET CLICKS</div>
|
||||
<a href="https://jmkengineering.com/smart-grid/" class="image"><img src="https://jmkengineering.com/images/adobestock21717426a.jpg" style="max-width: 100%; display: inline; float: center;" /></a>
|
||||
<div class="entry-content">An electricity supply network that uses digital communications technology to detect and react to local changes in usage. – Oxford English Dictionary Smart Grid is a concept describing the evolution of the power system. Among the desired future power.</div>
|
||||
<br />
|
||||
<ul class="actions">
|
||||
<li><a href="https://jmkengineering.com/smart-grid/" class="button">Learn More</a></li>
|
||||
</ul>
|
||||
<br />
|
||||
|
||||
</article>
|
||||
</div>
|
||||
|
||||
|
||||
|
|
36
templates/include/paginated_posts.html
Normal file
36
templates/include/paginated_posts.html
Normal file
|
@ -0,0 +1,36 @@
|
|||
<div class="posts">
|
||||
{% for article in articles_page.object_list %}
|
||||
<article>
|
||||
<header>
|
||||
<h2 id="indexheader"><a href="{{ SITEURL }}/{{ article.url }}" rel="bookmark" title="Permalink to {{ article.title|striptags }}">{{ article.title }}</a></h2>
|
||||
</header>
|
||||
|
||||
{% if article.photo_image %}
|
||||
<a href="{{ SITEURL }}/{{ article.url }}" class="image"><img src="{{ SITEURL }}/{{ article.photo_image[1] }}" style="max-width: 100%; display: inline; float: center;" /></a>
|
||||
{% endif %}
|
||||
{% if (article.category != MICROBLOG ) %}
|
||||
<div class="entry-content"> {{ article.summary }} </div>
|
||||
{% if INCLUDECATEGORY == True %}
|
||||
{% if article.category %}
|
||||
<div class="category">
|
||||
Posted in: <a href="{{ SITEURL }}/{{ article.category.url }}">{{ article.category }}</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% if MOREBUTTON == True %}
|
||||
<br />
|
||||
<ul class="actions">
|
||||
<li><a href="{{ SITEURL }}/{{ article.url }}" class="button">More</a></li>
|
||||
</ul>
|
||||
<br />
|
||||
{% endif %}
|
||||
<!-- /.entry-content -->
|
||||
{% endif %}
|
||||
</article>
|
||||
{% endfor %}
|
||||
<!-- /#posts-list -->
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{% include 'pagination.html' %}
|
||||
</div>
|
|
@ -1,11 +1,24 @@
|
|||
{% extends "base.html" %}
|
||||
{% block content %}
|
||||
|
||||
{% if TAGLINE or TAGLINEHEAD %}
|
||||
{% if BANNER == True %}
|
||||
<!-- Banner -->
|
||||
<section id="banner">
|
||||
<h1>{{ TAGLINEHEAD }}</h1>
|
||||
<p>{{ TAGLINE }}</p>
|
||||
<div class="content">
|
||||
<header>
|
||||
<h1>{{ TAGLINEHEAD }}</h1>
|
||||
{% if TAGLINESUBHEAD %}
|
||||
<p>{{ TAGLINESUBHEAD }}</p>
|
||||
{% endif %}
|
||||
</header>
|
||||
<p>{{ TAGLINE }}</p>
|
||||
<ul class="actions">
|
||||
<li><a href="{{ BANNERLINK }}" class="button big">Learn More</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<span class="image object">
|
||||
<img src="{{ BANNERIMAGE }}" alt="" />
|
||||
</span>
|
||||
</section>
|
||||
{% endif %}
|
||||
|
||||
|
@ -19,55 +32,31 @@
|
|||
{% endif %}
|
||||
|
||||
{% if NEWSLETTER %}
|
||||
<!-- Newsletter CTA -->
|
||||
<section id="home-newsletter">
|
||||
<h2>Our Newsletter</h2>
|
||||
{{ NEWSLETTER }}
|
||||
<br />
|
||||
<section id="banner">
|
||||
<div class="content">
|
||||
<header class="major">
|
||||
<h2>Our Newsletter</h2>
|
||||
</header>
|
||||
<p>We also have a weekly-ish newsletter where I keep you up to date with my thoughts on the industry, practical tutorials and more.</p>
|
||||
<ul class="actions">
|
||||
<li><a href="nl/" class="button big">Learn More</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<span class="image object">
|
||||
{{ NEWSLETTER }}
|
||||
</span>
|
||||
</section>
|
||||
{% endif %}
|
||||
|
||||
<section>
|
||||
{% block content_title %}
|
||||
<h2>All articles</h2>
|
||||
<header class="major">
|
||||
<h2>Articles</h2>
|
||||
</header>
|
||||
{% endblock %}
|
||||
<div class="posts">
|
||||
{% for article in articles_page.object_list %}
|
||||
<article>
|
||||
<header> <h2 id="indexheader"><a href="{{ SITEURL }}/{{ article.url }}" rel="bookmark" title="Permalink to {{ article.title|striptags }}">{{ article.title }}</a></h2> </header>
|
||||
|
||||
{% if article.photo_image %}
|
||||
<a href="{{ SITEURL }}/{{ article.url }}" class="image"><img src="{{ SITEURL }}/{{ article.photo_image[1] }}" style="max-width: 100%; display: inline; float: center;" /></a>
|
||||
{% endif %}
|
||||
{% if (article.category != MICROBLOG ) %}
|
||||
<!--<footer class="post-info">
|
||||
<time class="published" datetime="{{ article.date.isoformat() }}"> {{ article.locale_date }} </time>
|
||||
</footer> -->
|
||||
|
||||
<!-- /.post-info -->
|
||||
<div class="entry-content"> {{ article.summary }} </div>
|
||||
{% if INCLUDECATEGORY == True %}
|
||||
{% if article.category %}
|
||||
<div class="category">
|
||||
Posted in: <a href="{{ SITEURL }}/{{ article.category.url }}">{{ article.category }}</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% if MOREBUTTON == True %}
|
||||
<br />
|
||||
<ul class="actions">
|
||||
<li><a href="{{ SITEURL }}/{{ article.url }}" class="button">More</a></li>
|
||||
</ul>
|
||||
<br />
|
||||
{% endif %}
|
||||
<!-- /.entry-content -->
|
||||
{% endif %}
|
||||
</article>
|
||||
{% endfor %}
|
||||
<!-- /#posts-list -->
|
||||
</div>
|
||||
{% if articles_page.has_other_pages() %}
|
||||
{% include 'pagination.html' %}
|
||||
{% endif %}
|
||||
{% include 'include/paginated_posts.html' %}
|
||||
|
||||
|
||||
</section><!-- /#content -->
|
||||
{% endblock content %}
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
{% extends "index.html" %}
|
||||
{% extends "articles_list_page.html" %}
|
||||
|
||||
{% block title %}{{ SITENAME }} - {{ tag }} tag{% endblock %}
|
||||
|
||||
{% block content_title %}
|
||||
<h2>Articles tagged with {{ tag }}</h2>
|
||||
{% block meta_description %}
|
||||
<meta name="description" content="{{ SITENAME }} articles about {{ tag }}">
|
||||
{% endblock %}
|
||||
|
||||
{% block header %}All posts tagged: {{ tag }}{% endblock %}
|
Loading…
Reference in a new issue