[gimp-web/gimp-web-static] Styling news page
- From: Pat David <patdavid src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp-web/gimp-web-static] Styling news page
- Date: Wed, 19 Aug 2015 21:47:23 +0000 (UTC)
commit 04641a49b6bc9a4a2a99ec01e7d0d2f83659a184
Author: Pat David <patdavid gmail com>
Date: Wed Aug 19 16:47:16 2015 -0500
Styling news page
content/news/2015-07-28 Other Stuff.md | 23 --------------
content/news/2015-07-29 Middlish.md | 23 --------------
content/news/2015-07-29 Test.md | 23 --------------
pelicanconf.py | 4 +-
themes/newgimp/static/css/news-index.css | 28 ++++++++++++++++++
themes/newgimp/templates/home.html | 16 ++++++++++
themes/newgimp/templates/index.html | 47 ++++++++++++++++++------------
7 files changed, 74 insertions(+), 90 deletions(-)
---
diff --git a/pelicanconf.py b/pelicanconf.py
index 93e7b88..dbe8e7b 100644
--- a/pelicanconf.py
+++ b/pelicanconf.py
@@ -65,6 +65,7 @@ ARTICLE_SAVE_AS = "news/{date:%Y}/{date:%m}/{date:%d}/{slug}/index.html"
# The _actual_ index.html page is located at:
# content/pages/index.md -> which simply calls the home.html template
# See: http://docs.getpelican.com/en/3.6.3/faq.html#how-can-i-use-a-static-page-as-my-home-page
+# This sets the "old" index.html page to be saved to /news/index.html.
INDEX_SAVE_AS = "/news/index.html"
TYPOGRIFY = True
@@ -78,5 +79,4 @@ MD_EXTENSIONS = ['fenced_code', 'codehilite(css_class=codehilite)', 'extra', 'he
# Pagination testing stuff
DEFAULT_ORPHANS = 0
-DEFAULT_PAGINATION = 5
-
+DEFAULT_PAGINATION = 10
diff --git a/themes/newgimp/static/css/news-index.css b/themes/newgimp/static/css/news-index.css
new file mode 100644
index 0000000..91e3627
--- /dev/null
+++ b/themes/newgimp/static/css/news-index.css
@@ -0,0 +1,28 @@
+.entry-content {
+ text-align: left;
+}
+
+.entry-content p {
+ max-width: 34rem;
+}
+
+.entry-content ul {
+ max-width: 33rem;
+ margin: 1rem auto;
+ display: block;
+}
+
+.post-info {
+ margin-bottom: 0.5rem;
+ font-size: 0.85rem;
+ color: #aaa;
+}
+
+.entry-content h2,
+.entry-content h3,
+.entry-content h4,
+.entry-content h5,
+.entry-content h6 {
+ max-width: 35rem;
+ margin: 0 auto;
+}
diff --git a/themes/newgimp/templates/home.html b/themes/newgimp/templates/home.html
index 4d6dcdb..8e28cd5 100644
--- a/themes/newgimp/templates/home.html
+++ b/themes/newgimp/templates/home.html
@@ -1,5 +1,7 @@
{% extends "base.html" %}
+{% block title %}{{ SITENAME }} - The GNU Image Manipulation Program{% endblock %}
+
{% block head %}
{{ super() }}
<link rel='stylesheet' type='text/css' href="{{ SITEURL }}/theme/css/index.css" />
@@ -128,6 +130,20 @@
{% endif %}
#}
+ <h3>Articles Object</h3>
+ <div>
+ <a href="{{ articles[0].url }}">{{ articles[0].title }}</a>
+ </div>
+ <div>
+ {{ articles[0].summary }}
+ </div>
+ <div>
+ {{ articles[0].author }}
+ </div>
+ <div>
+ {{ articles[0].date }}
+ </div>
+
</section><!-- /#content -->
{% endblock content %}
diff --git a/themes/newgimp/templates/index.html b/themes/newgimp/templates/index.html
index c1feee3..26c1e12 100644
--- a/themes/newgimp/templates/index.html
+++ b/themes/newgimp/templates/index.html
@@ -1,11 +1,15 @@
{% extends "base.html" %}
+{% block title %}{{ SITENAME }} - News{%endblock%}
+
{% block head %}
{{ super() }}
-<link rel='stylesheet' type='text/css' href="{{ SITEURL }}/theme/css/index.css" />
+<link rel='stylesheet' type='text/css' href="{{ SITEURL }}/theme/css/page.css" />
+<link rel='stylesheet' type='text/css' href="{{ SITEURL }}/theme/css/news-index.css" />
{% endblock head %}
+{#
{% block header %}
<header id="banner" class="body clearfix">
<div class="container">
@@ -16,6 +20,8 @@
<a href="{{ SITEURL }}/">GIMP</a>
{#<a href="{{ SITEURL }}/">{{ SITENAME }} <strong>{{ SITESUBTITLE }}</strong></a> #}
{# <a href="{{ SITEURL }}/"><img src="{{ SITEURL }}/theme/images/wilber-big.png"
alt="GIMP Wilber"/>{{ SITENAME }}</a> #}
+
+{#
</h1>
<div class='introInfo'>
<span id='gFirst'>GNU IMAGE</span>
@@ -31,16 +37,17 @@
</header><!-- /#banner -->
{% endblock header %}
-
+#}
{% block content %}
-
+{#
<section id='introduction'>
<div class='container'>
<div class='row clearfix'>
<div class='column two-thirds'>
<h2>The Free & Open Source Image Editor</h2>
{# <h2>This is the official GIMP website</h2> #}
+{#
<p>
This is the official GIMP website.
It contains information about downloading, installing, using, and enhancing it.
@@ -99,6 +106,7 @@
</div>
</section>
+#}
<section id="articles">
{% block content_title %}
<h2>Recent News</h2>
@@ -107,22 +115,24 @@
<div class="container">
{% for article in articles_page.object_list %}
<div class='row clearfix'>
- <h3 class="entry-title">
- <a href="{{ SITEURL }}/{{ article.url }}" rel="bookmark" title="Permalink to {{
article.title|striptags }}">
- {{ article.title }}
- </a>
- </h3>
-
- <div class='post-info'>
- <abbr class="published" title="{{ article.date.isoformat() }}"> {{
article.locale_date }} </abbr>
- <address class="vcard author">by
- {% for author in article.authors %}
- <a class="url fn" href="{{ SITEURL }}/{{ author.url }}">{{ author }}</a>
- {% endfor %}
- </address>
- </div>
+ <div class="column full">
+ <h3 class="entry-title">
+ <a href="{{ SITEURL }}/{{ article.url }}" rel="bookmark" title="Permalink to {{
article.title|striptags }}">
+ {{ article.title }}
+ </a>
+ </h3>
- <div class='entry-content'> {{ article.summary }} </div>
+ <div class='post-info'>
+ <abbr class="published" title="{{ article.date.isoformat() }}"> {{
article.locale_date }} </abbr>
+ <address class="vcard author">by
+ {% for author in article.authors %}
+ <a class="url fn" href="{{ SITEURL }}/{{ author.url }}">{{ author }}</a>
+ {% endfor %}
+ </address>
+ </div>
+
+ <div class='entry-content'> {{ article.summary }} </div>
+ </div>
</div>
<hr/>
{% endfor %}
@@ -131,7 +141,6 @@
{% endif %}
</div>
- #}
{# original stuff ...
<ol id="post-list">
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]