1
0
mirror of https://github.com/arsenetar/pelican-red.git synced 2024-12-21 11:19:02 +00:00

Update templates

Update the templates to remove the excessive itemprop tags as it really
is not a good idea.  Cleanup a few minor things.
This commit is contained in:
Andrew Senetar 2013-11-09 15:57:26 -05:00
parent c8803ae2d9
commit eca067ae67
14 changed files with 55 additions and 102 deletions

3
.gitattributes vendored
View File

@ -3,4 +3,5 @@
# Diff Settings
*.html diff=html
*.rb diff=ruby
*.rb diff=ruby
*.php diff=php

View File

@ -23,7 +23,7 @@ function ready(){
// zeptojs or jquery
Modernizr.load([{
test: '__proto__' in {},
yep: 'http://cdn.jsdelivr.net/foundation/4.3.1/js/vendor/zepto.js',
yep: 'http://cdn.jsdelivr.net/foundation/4.3.2/js/vendor/zepto.js',
nope: 'http://cdn.jsdelivr.net/jquery/1.10.2/jquery-1.10.2.min.js',
complete: function() {
if( !window.jQuery && !window.Zepto )
@ -37,7 +37,7 @@ Modernizr.load([{
// Foundation
{
load: 'http://cdn.jsdelivr.net/foundation/4.3.1/js/foundation.min.js',
load: 'http://cdn.jsdelivr.net/foundation/4.3.2/js/foundation.min.js',
complete: function(){
if(!window.Foundation)
Modernizr.load([{

File diff suppressed because one or more lines are too long

View File

@ -176,6 +176,7 @@ body{ background-color: #fff; }
margin-bottom: emCalc(7px);
p:last-child { margin-bottom: emCalc(5px); }
img.photo{ display: none; }
.fn{ display: none; }
}
}
ul.item-list.featured li .author {

View File

@ -41,38 +41,6 @@
{% endfor %}
</ul></li>
{% endif %}
<li class="author-details" itemprop="author" itemscope itemtype="http://schema.org/Person">
{% if article.author.name in AUTHORS %}
{% set props = AUTHORS[article.author.name] %}
{% endif %}
<ul class="vcard brief row">
{% if props and props.vcard %}
<div class="small-4 columns">
{% for key, value in props.vcard if key=='photo' %}
<img src="{{ value }}" class="photo" itemprop="image" />
{% endfor %}
</div>
<div class="small-12 columns">
{% for key, value in props.vcard if key in ['fn', 'email', 'url', 'title', 'org']%}
{% if key == 'fn' %}
<li><a href="{{ SITEURL+'/'+article.author.url }}" itemprop="url"><span class="fn" itemprop="name">{{ value }}</span></a></li>
{% elif key == 'url' %}
<li class="url"><a itemprop="sameAs" href="{{ value }}">{{ value }}</a></li>
{% elif key == 'title' %}
<li class="title" itemprop="jobTitle">{{ value }}</li>
{% elif key == 'org' %}
<li class="org" itemprop="affiliation">{{ value }}</li>
{% else %}
<li class="{{ key }}" itemprop="{{ key }}">{{ value }}</li>
{% endif %}
{% endfor %}
</div>
{% else %}
<li><a class="url" href="{{ SITEURL+'/'+article.author.url }}" itemprop="url"></a><span class="fn" itemprop="name">{{ article.author.name }}</span></a></li>
<li itemprop="affiliation" class="org">{{ SITENAME }}</li>
{% endif %}
</ul>
</li>
<li><ul class="no-bullet no-margin">
{% if article.prev_article %}
<li class="left"><a href="{{ SITEURL }}/{{ article.prev_article.url}}">{{ article.prev_article.title }} (Older)</a></li>

View File

@ -2,7 +2,7 @@
{% if name in AUTHORS %}
{% set props = AUTHORS[name] %}
{% endif %}
<li class="row" itemprop="itemListElement" itemscope itemtype="http://schema.org/Person">
<li class="row" itemscope itemtype="http://schema.org/Person">
<meta itemprop="memberOf" content="{{ SITENAME }}" />
<div class="author">
<div class="small-4 columns">
@ -27,7 +27,7 @@ <h3><a href="{{ SITEURL+'/'+author.url }}">{{ author }}</a></h3>
{% for key, value in props.vcard %}
<li class="{{key}}">
{% if key == 'fn' %}
<span itemprop="name">{{ value }}</span>
<span class="fn" itemprop="name">{{ value }}</span>
{% elif key == 'email' %}
<a href="mailto:{{ value }}"itemprop="email">{{ value }}</a>
{% elif key == 'url' %}

View File

@ -1,16 +1,15 @@
<li class="row" itemprop="itemListElement" itemscope itemtype="http://schema.org/Article">
<li class="row">
<div class="article">
<div class="small-4 columns">
{% if article.image %}
<a class="th" href="{{ SITEURL }}/{{ article.url }}"><img src="{{ SITEURL }}/static/{{article.image}}" itemprop="image" /></a>
<a class="th" href="{{ SITEURL }}/{{ article.url }}"><img src="{{ SITEURL }}/static/{{article.image}}" /></a>
{% else %}
<a class="th" href="{{ SITEURL }}/{{ article.url }}"><img src="{{ SITEURL }}/{{ FAVICON }}"/></a>
{% endif %}
</div>
<div class="small-12 columns">
<header>
<h3 itemprop="headline"><a href="{{ SITEURL }}/{{ article.url }}" itemprop="url">{{ article.title|title }}</a></h3>
<meta itemprop="name" content="{{ article.title }}"/>
<h3><a href="{{ SITEURL }}/{{ article.url }}">{{ article.title|title }}</a></h3>
{% if not category %}
<div><span>Category: <a href="{{ SITEURL }}/{{ article.category.url }}">{{ article.category }}</a></span></div>
{% endif %}
@ -31,9 +30,9 @@ <h3 itemprop="headline"><a href="{{ SITEURL }}/{{ article.url }}" itemprop="url"
</div>
<footer>
<ul class="no-bullet">
<li>Published by <span itemprop="author" itemscope itemtype="http://schema.org/Person"><a href="{{ SITEURL }}/{{ article.author.url }}" itemprop="url"><span itemprop="name">{{ article.author }}</span></a></span> on: <abbr class="published" title="{{ article.date.isoformat() }}" itemprop="datePublished">{{ article.locale_date }}</abbr></li>
<li>Published by <<a href="{{ SITEURL }}/{{ article.author.url }}" >{{ article.author }}</a> on: <abbr class="published" title="{{ article.date.isoformat() }}">{{ article.locale_date }}</abbr></li>
{% if article.modified %}
<li>Last Modified on: <abbr title="{{ article.modified }}" itemprop="dateModified">{{ article.modified }}</abbr></li>
<li>Last Modified on: <abbr title="{{ article.modified }}">{{ article.modified }}</abbr></li>
{% endif %}
</ul>
</footer>

View File

@ -7,26 +7,20 @@ <h1><a href="{{ SITEURL }}">{{ SITENAME }}</a></h1>
</li>
<li class="toggle-topbar menu-icon"><a href="#"><span>Menu</span></a></li>
</ul>
<section class="top-bar-section" itemscope itemtype="http://schema.org/SiteNavigationElement">
<meta itemprop="name" content="{{ SITENAME }} Navigation"/>
<section class="top-bar-section">
<!-- Menu -->
<ul class="left" itemscope itemtype="http://schema.org/ItemList">
<meta itemprop="name" content="{{ SITENAME }} Menu Items"/>
<meta itemprop="ItemListOrder" content="Unordered"/>
<ul class="left">
{% for item, url in MENUITEMS %}
<li itemprop="itemListElement">
<li>
<a href="{{ url }}">{{ item|title }}</a>
</li>
{% endfor %}
{% if DISPLAY_PAGES_ON_MENU != False %}
{% if DISPLAY_PAGES_ON_MENU == 'Compact' %}
<li class="has-dropdown" itemprop="itemListElement" itemscope itemtype="http://schema.org/ItemList"><a>Pages</a>
<meta itemprop="name" content="Pages"/>
<meta itemprop="url" content="{{SITEURL}}/Pages.html"/>
<meta itemprop="ItemListOrder" content="Unordered"/>
<li class="has-dropdown"><a>Pages</a>
<ul class="dropdown">
{% for p in PAGES if not p.status == 'hidden' %}
<li {% if p == page %} class='active'{% endif %} itemprop="itemListElement">
<li {% if p == page %} class='active'{% endif %}>
<a href="{{ SITEURL }}/{{ p.url }}">{{ p.title }}</a></li>
{% endfor %}
</ul>
@ -34,7 +28,7 @@ <h1><a href="{{ SITEURL }}">{{ SITENAME }}</a></h1>
{% endif %}
{% if DISPLAY_PAGES_ON_MENU == 'Expanded' %}
{% for p in PAGES if not p.status == 'hidden' %}
<li {% if p == page %} class='active'{% endif %} itemprop="itemListElement">
<li {% if p == page %} class='active'{% endif %}>
<a href="{{ SITEURL }}/{{ p.url }}">{{ p.title }}</a>
</li>
{% endfor %}
@ -42,13 +36,10 @@ <h1><a href="{{ SITEURL }}">{{ SITENAME }}</a></h1>
{% endif %}
{% if DISPLAY_CATEGORIES_ON_MENU != False %}
{% if DISPLAY_CATEGORIES_ON_MENU == 'Compact' %}
<li class="has-dropdown" itemprop="itemListElement" itemscope itemtype="http://schema.org/ItemList"><a>Categories</a>
<meta itemprop="name" content="Categories"/>
<meta itemprop="url" content="{{SITEURL}}/Categories.html"/>
<meta itemprop="ItemListOrder" content="Unordered"/>
<li class="has-dropdown"><a>Categories</a>
<ul class="dropdown">
{% for cat, null in categories %}
<li {% if cat == category %} class='active'{% endif %} itemprop="itemListElement">
<li {% if cat == category %} class='active'{% endif %}>
<a href="{{ SITEURL }}/{{ cat.url }}">{{ cat.name }}</a>
</li>
{% endfor %}
@ -57,25 +48,23 @@ <h1><a href="{{ SITEURL }}">{{ SITENAME }}</a></h1>
{% endif %}
{% if DISPLAY_CATEGORIES_ON_MENU == 'Expanded' %}
{% for cat, null in categories %}
<li {% if cat == category %} class='active'{% endif %} itemprop="itemListElement">
<li {% if cat == category %} class='active'{% endif %}>
<a href="{{ SITEURL }}/{{ cat.url }}">{}{ cat.name }}</a>
</li>
{% endfor %}
{% endif %}
{% endif %}
{% if DISPLAY_ARCHIVE_ON_MENU %}
<li itemprop="itemListElement">
<li>
<a href="{{ SITEURL }}/archives.html">Archives</a>
</li>
{% endif %}
</ul>
<!-- Social Links -->
{% if SOCIAL %}
<ul class="right" itemscope itemtype="http://schema.org/ItemList">
<meta itemprop="name" content="site-social"/>
<meta itemprop="ItemListOrder" content="Unordered"/>
<ul class="right">
{% for network, url in SOCIAL %}
<li itemprop="itemListElement"><a href="{{ url }}" title="{{ network|title }}"><i class="huge icon-{{ network }}"></i></a></li>
<li><a href="{{ url }}" title="{{ network|title }}"><i class="huge icon-{{ network }}"></i></a></li>
{% endfor %}
</ul>
{% endif %}

View File

@ -20,6 +20,7 @@
<meta itemprop="copyrightHolder" content="{{ COPYRIGHT_HOLDER|default(article.author.name) }}"/>
<div class="article-details">
<span class="published">Published on: <abbr title="{{ article.date.isoformat() }}" itemprop="datePublished">{{ article.locale_date }}</abbr></span>
<span class="author">By <a href="{{ SITEURL+'/'+article.author.url }}" rel="author">{{ article.author,name }}</a></span>
<span class="category">In <a href="{{ article.category.url }}">{{ article.category.name }}</a></span>
{% if article.modified %}
<span class="modified">Last modified on: <abbr title="{{ article.modified }}" itemprop="dateModified">{{ article.modified }}</abbr></span>
@ -27,7 +28,7 @@
{% if article.tags %}
<div>
<meta itemprop="keywords" content="{{ article.tags|join(', ') }}"/>
<span><a href="{{ SITEURL }}/tags.html"><i class="icon-tag"></i></a> </span>
<span><a href="{{ SITEURL }}/tags.html"><i class="icon-tag"></i></a></span>
<ul class="tag-list">
{% for tag in article.tags %}
<li><a href="{{ SITEURL+'/'+tag.url }}">{{ tag.name }}</a></li>

View File

@ -1,6 +1,6 @@
{% extends 'base.html' %}
{% block content %}
<ul class="item-list featured" itemscope itemtype="http://schema.org/ItemList">
<ul class="item-list featured">
{% include '_author_item.html' %}
</ul>
{{ super() }}

View File

@ -1,9 +1,7 @@
{% extends 'base.html' %}
{% block content %}
{% if authors %}
<ul class="item-list" itemscope itemtype="http://schema.org/ItemList">
<meta itemprop="name" content="Authors"/>
<meta itemprop="itemListOrder" content="Unordered"/>
<ul class="item-list">
{% for author, articles in authors %}
{% include '_author_item.html' %}
{% endfor %}

View File

@ -1,6 +1,6 @@
<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" itemscope itemtype="http://schema.org/WebPage" > <![endif]-->
<!--[if gt IE 8]><!--><html class="no-js" lang="{{ DEFAULT_LANG }}" itemscope itemtype="http://schema.org/WebPage"> <!--<![endif]-->
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--><html class="no-js" lang="{{ DEFAULT_LANG }}"> <!--<![endif]-->
<head>
<!-- meta -->
<meta charset="utf-8" />
@ -11,16 +11,16 @@
{% set page_descrip = article.summary|striptags if article else page.summary|striptags if page else PAGE_DESC[page_title.lower()]|default(SITE_DESCR) if PAGE_DESC else SITE_DESCR %}
{% set page_tags = article.tags|join(', ') if (article and article.tags) else page.tags|join(', ') if (page and page.tags) else SITE_KEY %}
{% set page_author = article.author if article else page.author if page else AUTHOR %}
<meta name="description" itemprop="description" content="{{ page_descrip }}" />
<meta name="keywords" itemprop="keywords" content="{{ page_tags }}" />
<meta name="author" itemprop="author" content="{{ page_author }}" />
<meta name="organization" itemprop="sourceOrganization" content="{{ SITENAME }}"/>
<meta name="publisher" itemprop="publisher" content="{{ SITENAME }}"/>
<meta name="language" itemprop="inLanguage" content="{{ DEFAULT_LANG }}" />
<meta name="description" content="{{ page_descrip }}" />
<meta name="keywords" content="{{ page_tags }}" />
<meta name="author" content="{{ page_author }}" />
<meta name="organization" content="{{ SITENAME }}"/>
<meta name="publisher" content="{{ SITENAME }}"/>
<meta name="language" content="{{ DEFAULT_LANG }}" />
<!-- title -->
<title itemprop="name">{% block title %}{{ SITENAME }}{{ ' - '+page_title if not page_title.lower() =='index' }}{% endblock %}</title>
<meta itemprop="url" content="{{ SITEURL+'/'+output_file }}"/>
<title>{% block title %}{{ SITENAME }}{{ ' - '+page_title if not page_title.lower() =='index' }}{% endblock %}</title>
<meta content="{{ SITEURL+'/'+output_file }}"/>
<!-- Stylesheets -->
<link rel="stylesheet" href="{{ SITEURL }}/theme/css/app.css" />
@ -29,7 +29,7 @@
<link href='http://fonts.googleapis.com/css?family=Source+Code+Pro|Open+Sans' rel='stylesheet' type='text/css'>
<!-- Favicon -->
<link rel="shortcut icon" href="{{ SITEURL }}/{{ FAVICON }}" itemprop="thumbnailUrl"/>
<link rel="shortcut icon" href="{{ SITEURL }}/{{ FAVICON }}" />
<!-- RSS/ATOM -->
{% include '_feeds.html' %}
@ -44,16 +44,15 @@
<div class="row">
<div id="main" class="large-13 columns push-3">
<section>
<header itemscope itemtype="http://schema.org/WPHeader">
<header>
{% block content_title %}
<h1 itemprop="name"><a href="{{ SITEURL+'/'+output_file }}" rel="bookmark" title="Bookmark to {{ page_title }}">{{ page_title if not page_title.lower()=='index' else SITENAME }}</a></h1>
<h1><a href="{{ SITEURL+'/'+output_file }}" rel="bookmark" title="Bookmark to {{ page_title }}">{{ page_title if not page_title.lower()=='index' else SITENAME }}</a></h1>
{% endblock %}
<h2 class="print_header subheader">From: <a href="{{ SITEURL }}">{{ SITENAME }}</a></h2>
{% block content_image %}{% endblock %}
</header>
{% block content %}
<ul class="item-list" itemscope itemtype="http://schema.org/ItemList">
<meta itemprop="name" content="Article List"/>
<ul class="item-list">
{% for article in articles_page.object_list %}
{% include '_list_item.html' %}
{% endfor %}
@ -65,28 +64,27 @@ <h2 class="print_header subheader">From: <a href="{{ SITEURL }}">{{ SITENAME }}<
</section>
</div>
<div id="mainAside" class="large-3 columns pull-13">
<aside itemscope itemtype="http://schema.org/WPSideBar">
<meta itemprop="name" content="{{ SITENAME }} Sidebar"/>
<aside>
{% block aside %}
{% if GOOGLE_SEARCH %}
{% include '_google_search.html' %}
{% endif %}
<h3>Blog Links</h3>
<ul id='blogRoll' class="no-bullet" itemscope itemtype="http://schema.org/ItemList">
<ul id='blogRoll' class="no-bullet">
{% if INCLUDE_CATS_LINK %}
<li itemprop="itemListElement"><a href="{{ SITEURL }}/categories.html">Categories</a></li>
<li><a href="{{ SITEURL }}/categories.html">Categories</a></li>
{% endif %}
{% if INCLUDE_TAGS_LINK %}
<li itemprop="itemListElement"><a href="{{ SITEURL }}/tags.html">Tags</a></li>
<li><a href="{{ SITEURL }}/tags.html">Tags</a></li>
{% endif %}
{% if INCLUDE_ARCH_LINK %}
<li itemprop="itemListElement"><a href="{{ SITEURL }}/archives.html">Archives</a></li>
<li><a href="{{ SITEURL }}/archives.html">Archives</a></li>
{% endif %}
{% if INCLUDE_AUTH_LINK %}
<li itemprop="itemListElement"><a href="{{ SITEURL }}/authors.html">Authors</a></li>
<li><a href="{{ SITEURL }}/authors.html">Authors</a></li>
{% endif %}
{% for link in LINKS %}
<li itemprop="itemListElement"><a class="external" href="{{ link[1] }}">{{ link[0] }}</a></li>
<li><a class="external" href="{{ link[1] }}">{{ link[0] }}</a></li>
{% endfor %}
</ul>
{% endblock %}
@ -96,7 +94,7 @@ <h3>Blog Links</h3>
<footer class="row" >
<div class="large-16 columns" id="mainFooter">
<span class="print_footer"><a href="{{ SITEURL }}/{{ output_file }}"> Fetched from: {{ output_file }}</a> on {{ NOW.isoformat() }}</span>
&copy;<span itemprop="copyrightHolder"> {{ COPYRIGHT_HOLDER|default(AUTHOR) }} </span><span itemprop="copyrightYear">{{ COPYRIGHT_YEAR }}</span>
&copy;<span> {{ COPYRIGHT_HOLDER|default(AUTHOR) }} </span><span>{{ COPYRIGHT_YEAR }}</span>
</div>
</footer>
<script src="{{ SITEURL }}/theme/js/app.js"></script>

View File

@ -3,8 +3,7 @@
<h2>Recent Articles by Category</h2>
{% for cat, articles in categories %}
<h3><a href="{{ SITEURL }}/{{ cat.url }}">{{ cat }}</a></h3>
<ul class="item-list" itemscope itemtype="http://schema.org/ItemList">
<meta itemprop="name" content="{{ cat }} recent articles"/>
<ul class="item-list">
{% for article in articles[0:3] %}
{% include '_list_item.html' %}
{% endfor %}

View File

@ -3,8 +3,7 @@
<p>{{ SITE_DESCR }}</p>
{% if articles and ARTICLES_ON_INDEX %}
<h2>Recent Articles:</h2>
<ul class="item-list" itemscope itemtype="http://schema.org/ItemList">
<meta name="Recent Articles"/>
<ul class="item-list">
{% for article in articles[0:ARTICLES_ON_INDEX] %}
{% include '_list_item.html' %}
{% endfor %}