Created
July 25, 2012 17:39
-
-
Save ericmoritz/3177453 to your computer and use it in GitHub Desktop.
Check github pull requests for python file changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
*.beam |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 7285520c9638a8a846368e3bc58be6f0006a9122 Mon Sep 17 00:00:00 2001 | |
From: Robert Huhn <[email protected]> | |
Date: Thu, 6 Dec 2012 16:48:04 -0500 | |
Subject: [PATCH 01/25] 90% done lables to links | |
--- | |
relux/settings/base.py | 1 + | |
relux/static/css/modules/coverview.css | 2 +- | |
relux/static/css/print.css | 2 +- | |
relux/static/css/reset-override.css | 22 +++++++++++----------- | |
relux/templates/includes/section-label.html | 13 +++++++++++-- | |
5 files changed, 25 insertions(+), 15 deletions(-) | |
diff --git a/relux/settings/base.py b/relux/settings/base.py | |
index 7f8f7fe..e8ee1c0 100644 | |
--- a/relux/settings/base.py | |
+++ b/relux/settings/base.py | |
@@ -363,6 +363,7 @@ def config_path(filename): | |
"onpolitics": "On Politics", | |
"pac12": "PAC-12", | |
"personalfinance": "Personal Finance", | |
+ "personal": "Personal Tech", | |
"pga": "PGA", | |
"popcandy": "Pop Candy", | |
"sec": "SEC", | |
diff --git a/relux/static/css/modules/coverview.css b/relux/static/css/modules/coverview.css | |
index 50857cd..7eaf221 100644 | |
--- a/relux/static/css/modules/coverview.css | |
+++ b/relux/static/css/modules/coverview.css | |
@@ -90,7 +90,7 @@ | |
position: absolute; | |
} | |
-#cover-view .text-wrap > b.label { | |
+#cover-view .text-wrap > a.label { | |
position: static; | |
} | |
diff --git a/relux/static/css/print.css b/relux/static/css/print.css | |
index d72436d..3742a9e 100644 | |
--- a/relux/static/css/print.css | |
+++ b/relux/static/css/print.css | |
@@ -36,7 +36,7 @@ footer, | |
.quick, | |
p.example, | |
.theatre, | |
-b.label, | |
+a.label, | |
.nextPrev, | |
.open-sidebar.sidebar-button, | |
.partner-leavebehind, | |
diff --git a/relux/static/css/reset-override.css b/relux/static/css/reset-override.css | |
index 9a0c963..f7ad3e3 100644 | |
--- a/relux/static/css/reset-override.css | |
+++ b/relux/static/css/reset-override.css | |
@@ -128,8 +128,8 @@ p { | |
* Label - For section labels | |
* News is the default color | |
*/ | |
- | |
-b.label { | |
+b.label, | |
+a.label { | |
background-color: rgb(0,80,161); | |
color: rgb(255,255,255); | |
font-family: 'Futura Today Bold', arial, sans-serif; | |
@@ -144,39 +144,39 @@ b.label { | |
top: 20px; | |
z-index:40; | |
} | |
-.hero b.label{ | |
+.hero a.label{ | |
z-index: 51; /*needs to at least be 51 to sit on top of the pic in hero*/ | |
} | |
-b.label.news { | |
+a.label.news { | |
background-color: rgb(0,155,255); | |
} | |
-b.label.sports { | |
+a.label.sports { | |
background-color: rgb(235,30,0); | |
} | |
-b.label.life { | |
+a.label.life { | |
background-color: rgb(150,0,180); | |
} | |
-b.label.money { | |
+a.label.money { | |
background-color: rgb(0,165,60); | |
} | |
-b.label.tech { | |
+a.label.tech { | |
background-color: rgb(250,95,0); | |
} | |
-b.label.travel { | |
+a.label.travel { | |
background-color: rgb(0,195,195); | |
} | |
-b.label.weather { | |
+a.label.weather { | |
background-color: rgb(255,192,0); | |
} | |
-b.label.opinion { | |
+a.label.opinion { | |
background-color: rgb(102,102,102); | |
} | |
diff --git a/relux/templates/includes/section-label.html b/relux/templates/includes/section-label.html | |
index 368ba13..feef7e2 100644 | |
--- a/relux/templates/includes/section-label.html | |
+++ b/relux/templates/includes/section-label.html | |
@@ -1,4 +1,13 @@ | |
-<b class="label {% firstof label_section_name card_section_name ssts.section "home" %}"> | |
+<a class="label {% firstof label_section_name card_section_name ssts.section "home" %}" | |
+href="/{% spaceless %}{% if not label_section_name and not label_subsection_name %} | |
+ {{ card_section_name }} | |
+ {% elif card_section_name == "home" or not label_subsection_name %} | |
+ {{ label_section_name }} | |
+ {% elif ssts.section and not label_subsection_name %} | |
+ {{ ssts.section }} | |
+ {% else %} | |
+ {% firstof label_section_name card_section_name ssts.section "home" %}/{{ label_subsection_name|section_display_name|slugify }} | |
+ {% endif %}{% endspaceless %}/"> | |
{% spaceless %}{% if not label_section_name and not label_subsection_name %} | |
{{ card_section_name|capfirst }} | |
{% elif card_section_name == "home" or not label_subsection_name %} | |
@@ -8,4 +17,4 @@ | |
{% else %} | |
{{ label_subsection_name|section_display_name|capfirst }} | |
{% endif %}{% endspaceless %} | |
-</b> | |
\ No newline at end of file | |
+</a> | |
\ No newline at end of file | |
-- | |
1.7.10 | |
From 97a77bc8ee9087c0530c59115a2ee1a89e362ef9 Mon Sep 17 00:00:00 2001 | |
From: Robert Huhn <[email protected]> | |
Date: Thu, 6 Dec 2012 17:48:46 -0500 | |
Subject: [PATCH 02/25] updates for labels | |
--- | |
relux/static/css/media-view.css | 12 ++++++------ | |
relux/templates/media/cinematic.html | 7 ++++--- | |
relux/templates/media/default.html | 9 ++++++--- | |
relux/templates/partials/search-result-items.html | 2 +- | |
4 files changed, 17 insertions(+), 13 deletions(-) | |
diff --git a/relux/static/css/media-view.css b/relux/static/css/media-view.css | |
index 965a04c..221ec9b 100644 | |
--- a/relux/static/css/media-view.css | |
+++ b/relux/static/css/media-view.css | |
@@ -626,21 +626,21 @@ Search | |
} | |
-.media-list-link:hover .media-figure-meta, | |
+.media-grid-ul .media-list-link:hover .media-figure-meta, | |
.mediaview-featured .media-figure-meta | |
{ | |
opacity: 1; | |
visibility: visible; | |
- | |
+ display:block; | |
-webkit-transform: rotateX(0deg); | |
-moz-transform: rotateX(0deg); | |
-o-transform: rotateX(0deg); | |
-ms-transform: rotateX(0deg); | |
transform: rotateX(0deg); | |
+ height:auto; | |
} | |
- | |
-.grid-figure > .media-figure-meta > .label { | |
+.grid-figure > .media-figure-meta > a.label { | |
display: block; | |
float: left; | |
left: 3px; | |
@@ -774,7 +774,7 @@ Search | |
empty-cells:show; | |
} | |
-.cinematic-side-nav-ul .label{ | |
+.cinematic-side-nav-ul a.label{ | |
position:relative; | |
left:0; | |
top:-2px; | |
@@ -1108,7 +1108,7 @@ Search | |
margin: 3px 8px; | |
} | |
-.media-view .gallery .header .label { | |
+.media-view .gallery .header a.label { | |
position: inherit; | |
} | |
diff --git a/relux/templates/media/cinematic.html b/relux/templates/media/cinematic.html | |
index 347ba44..c37d53c 100644 | |
--- a/relux/templates/media/cinematic.html | |
+++ b/relux/templates/media/cinematic.html | |
@@ -42,7 +42,7 @@ | |
{% if video %} | |
<li class="cinematic-side-nav-li cinematic-header-headline"> | |
<div class="meta cinematic-headline-div"> | |
- <b class="label {{ video.ssts.section }}">{% firstof video.ssts.subsection|section_display_name video.ssts.section "home" %}</b> | |
+ <a href="/{{ video.ssts.section }}/{% if video.ssts.subsection %}{{ video.ssts.subsection|section_display_name|slugify }}/{% endif %}" class="label {{ video.ssts.section }}">{% firstof video.ssts.subsection|section_display_name video.ssts.section "home" %}</a> | |
</div> | |
<div class="title cinematic-headline-div" itemprop="name" > | |
{{ video.asset_metadata.items.name }} | |
@@ -58,9 +58,10 @@ | |
<section class="header cinematic-header-headline"> | |
<div class="meta cinematic-headline-div"> | |
{% if photos.Gallery.GallerySstsPublishLocation and photos.Gallery.GallerySstsPublishLocation != "home" %} | |
- <b class="label {% firstof photos.Gallery.handling.publishto.ssts.section photos.Gallery.GallerySstsPublishLocation "home" %}"> | |
+ <a href="/{% firstof photos.Gallery.handling.publishto.ssts.section photos.Gallery.GallerySstsPublishLocation "home" %}/{% if photos.Gallery.handling.publishto.ssts.subsection %}{{photos.Gallery.handling.publishto.ssts.subsection|section_display_name|slugify }}/{% endif %}" | |
+ class="label {% firstof photos.Gallery.handling.publishto.ssts.section photos.Gallery.GallerySstsPublishLocation "home" %}"> | |
{% firstof photos.Gallery.handling.publishto.ssts.subsection|section_display_name photos.Gallery.handling.publishto.ssts.section photos.Gallery.GallerySstsPublishLocation %} | |
- </b> | |
+ </a> | |
{% endif %} | |
</div> | |
<div class="title cinematic-headline-div" itemprop="name" >{{ photos.Gallery.Title }}</div> | |
diff --git a/relux/templates/media/default.html b/relux/templates/media/default.html | |
index dfd09e4..21d2d2e 100644 | |
--- a/relux/templates/media/default.html | |
+++ b/relux/templates/media/default.html | |
@@ -110,14 +110,17 @@ <h1 class="media-grid-section-h1"> | |
<span class="play-btn-xl"></span> | |
{% endif %} | |
</span> | |
- <span class="meta media-figure-meta"> | |
+ | |
+ <div class="meta media-figure-meta"> | |
{% if item.taxonomy.section or item.taxonomy.subsection or item.ssts.section or item.ssts.subsection %} | |
- <b class="label {% firstof item.ssts.section item.taxonomy.section "home" %}">{% firstof item.ssts.subsection|section_display_name item.taxonomy.subsection|section_display_name item.ssts.section item.taxonomy.section "home" %}</b> | |
+ <a href="/{% firstof item.ssts.section item.taxonomy.section "home" %}/{% if item.ssts.subsection or item.taxonomy.subsection%}{% filter section_display_name|slugify %}{% firstof item.ssts.subsection item.taxonomy.subsection %}{% endfilter %}/{% endif %}" | |
+ class="label {% firstof item.ssts.section item.taxonomy.section "home" %}">{% firstof item.ssts.subsection|section_display_name item.taxonomy.subsection|section_display_name item.ssts.section item.taxonomy.section "home" %}</a> | |
{% endif %} | |
{% if item.content_type == "video" and item.attrs.length %} | |
<span class="duration">{{ item.attrs.length }}</span> | |
{% endif %} | |
- </span> | |
+ </div> | |
+ </a> | |
<figcaption class="grid-fig-capt">{{ item.headline }}</figcaption> | |
</figure> | |
<ul class="meta type-{{ item.content_type }} media-grid-list-meta"> | |
diff --git a/relux/templates/partials/search-result-items.html b/relux/templates/partials/search-result-items.html | |
index 4f6097d..a9b0060 100644 | |
--- a/relux/templates/partials/search-result-items.html | |
+++ b/relux/templates/partials/search-result-items.html | |
@@ -6,7 +6,7 @@ | |
<li class="{{item.content_type}} {% if forloop.first and page_num == 1 %}topresult{% endif %}"> | |
<a href="{{item|content_url}}" data-ht="search_results_{{item.content_type}}_{{forloop.counter}}"> | |
{% if item.ssts.section and item.photo.crops %} | |
- <b class="label {{item.ssts.section}} {% if forloop.counter <= 3 and page_num == 1 %}recommended{% endif %}">{{item.ssts.section|capfirst}}</b> | |
+ <a href="/{{item.ssts.section}}/" class="label {{item.ssts.section}} {% if forloop.counter <= 3 and page_num == 1 %}recommended{% endif %}">{{item.ssts.section|capfirst}}</a> | |
{% endif %} | |
<div class="front"> | |
<figure> | |
-- | |
1.7.10 | |
From acb68d780a19f86f2f52a1e9fa3074e774934a9d Mon Sep 17 00:00:00 2001 | |
From: Robert Huhn <[email protected]> | |
Date: Mon, 10 Dec 2012 10:09:08 -0500 | |
Subject: [PATCH 03/25] updated label link stuff for mediaview and coverview | |
--- | |
relux/static/css/media-view.css | 9 +++------ | |
relux/static/css/reset-override.css | 2 +- | |
2 files changed, 4 insertions(+), 7 deletions(-) | |
diff --git a/relux/static/css/media-view.css b/relux/static/css/media-view.css | |
index 221ec9b..9c2ce8a 100644 | |
--- a/relux/static/css/media-view.css | |
+++ b/relux/static/css/media-view.css | |
@@ -602,7 +602,7 @@ Search | |
visibility: hidden; | |
position: absolute; | |
top: 5px; | |
- left: 3px; | |
+ left: 2px; | |
font-style: normal; | |
margin: 0; | |
@@ -626,18 +626,15 @@ Search | |
} | |
-.media-grid-ul .media-list-link:hover .media-figure-meta, | |
-.mediaview-featured .media-figure-meta | |
-{ | |
+.media-grid-ul .medialistitems:hover .media-figure-meta, | |
+.mediaview-featured .media-figure-meta { | |
opacity: 1; | |
visibility: visible; | |
- display:block; | |
-webkit-transform: rotateX(0deg); | |
-moz-transform: rotateX(0deg); | |
-o-transform: rotateX(0deg); | |
-ms-transform: rotateX(0deg); | |
transform: rotateX(0deg); | |
- height:auto; | |
} | |
.grid-figure > .media-figure-meta > a.label { | |
diff --git a/relux/static/css/reset-override.css b/relux/static/css/reset-override.css | |
index f7ad3e3..f74caa6 100644 | |
--- a/relux/static/css/reset-override.css | |
+++ b/relux/static/css/reset-override.css | |
@@ -145,7 +145,7 @@ a.label { | |
z-index:40; | |
} | |
.hero a.label{ | |
- z-index: 51; /*needs to at least be 51 to sit on top of the pic in hero*/ | |
+ z-index: 54; /*needs to at least be 51 to sit on top of the pic in hero, needs 54 to be clickable on top of hero*/ | |
} | |
a.label.news { | |
-- | |
1.7.10 | |
From 52eef5c47ced286083ec32a3b4fa08e504a9f6a4 Mon Sep 17 00:00:00 2001 | |
From: Robert Huhn <[email protected]> | |
Date: Mon, 10 Dec 2012 13:28:04 -0500 | |
Subject: [PATCH 04/25] updated labels site wide with handling for correct | |
blog links | |
--- | |
relux/static/css/media-view.css | 6 +++--- | |
relux/static/css/modules/headlines.css | 4 ++-- | |
relux/static/css/print.css | 2 +- | |
relux/templates/fronts/coverview.html | 2 +- | |
relux/templates/fronts/default.html | 2 +- | |
relux/templates/includes/section-label.html | 4 +++- | |
relux/templates/modules/7-up-portrait.html | 2 +- | |
relux/templates/modules/headline-grid.html | 3 +-- | |
relux/templates/modules/hero/1-up.html | 2 +- | |
relux/templates/modules/hero/2-up.html | 2 +- | |
relux/templates/modules/hero/3-up.html | 2 +- | |
relux/templates/modules/hero/6-up-with-carousel.html | 2 +- | |
relux/templates/modules/hero/7-up-portrait.html | 2 +- | |
relux/templates/modules/hero/election-night-large-story.html | 2 +- | |
relux/templates/modules/hero/headline-pack.html | 2 +- | |
relux/templates/modules/hero/news-rotator.html | 2 +- | |
relux/templates/modules/sp-hero-2up.html | 2 +- | |
relux/templates/modules/sp-hero-3up.html | 2 +- | |
relux/templates/modules/stag-front/headline-grid.html | 7 ++++--- | |
relux/templates/stag-front.html | 4 ---- | |
20 files changed, 27 insertions(+), 29 deletions(-) | |
diff --git a/relux/static/css/media-view.css b/relux/static/css/media-view.css | |
index 9c2ce8a..e1d728f 100644 | |
--- a/relux/static/css/media-view.css | |
+++ b/relux/static/css/media-view.css | |
@@ -637,7 +637,7 @@ Search | |
transform: rotateX(0deg); | |
} | |
-.grid-figure > .media-figure-meta > a.label { | |
+.grid-figure > .media-figure-meta > b.label { | |
display: block; | |
float: left; | |
left: 3px; | |
@@ -771,7 +771,7 @@ Search | |
empty-cells:show; | |
} | |
-.cinematic-side-nav-ul a.label{ | |
+.cinematic-side-nav-ul b.label{ | |
position:relative; | |
left:0; | |
top:-2px; | |
@@ -1105,7 +1105,7 @@ Search | |
margin: 3px 8px; | |
} | |
-.media-view .gallery .header a.label { | |
+.media-view .gallery .header b.label { | |
position: inherit; | |
} | |
diff --git a/relux/static/css/modules/headlines.css b/relux/static/css/modules/headlines.css | |
index 3679061..0ac65d7 100644 | |
--- a/relux/static/css/modules/headlines.css | |
+++ b/relux/static/css/modules/headlines.css | |
@@ -100,8 +100,8 @@ | |
} | |
.headlines .headline .label { | |
- left: 0; | |
- top: 0; | |
+ left: 10px; | |
+ top: 10px; | |
} | |
.headlines .headline .tile { | |
diff --git a/relux/static/css/print.css b/relux/static/css/print.css | |
index 3742a9e..d72436d 100644 | |
--- a/relux/static/css/print.css | |
+++ b/relux/static/css/print.css | |
@@ -36,7 +36,7 @@ footer, | |
.quick, | |
p.example, | |
.theatre, | |
-a.label, | |
+b.label, | |
.nextPrev, | |
.open-sidebar.sidebar-button, | |
.partner-leavebehind, | |
diff --git a/relux/templates/fronts/coverview.html b/relux/templates/fronts/coverview.html | |
index 6d05a98..24ba13c 100644 | |
--- a/relux/templates/fronts/coverview.html | |
+++ b/relux/templates/fronts/coverview.html | |
@@ -19,7 +19,7 @@ | |
{% endif %} | |
); background-attachment: scroll; background-position: 50% 40px;"></div> | |
<div class="text-wrap"> | |
- {% include "includes/section-label.html" with card_section_name=section_name label_section_name=object.taxonomy.section label_subsection_name=object.taxonomy.subsection %} | |
+ {% include "includes/section-label.html" with card_section_name=section_name label_section_name=object.taxonomy.section label_subsection_name=object.taxonomy.subsection label_texttype=object.attrs.texttype %} | |
<span class="date">{{object.timestamp.published|parse_date|date:"M d, Y"}}</span> | |
{% include "modules/hero/text.html" with object=object show_byline='False' %} | |
</div> | |
diff --git a/relux/templates/fronts/default.html b/relux/templates/fronts/default.html | |
index cdd866f..c329b62 100644 | |
--- a/relux/templates/fronts/default.html | |
+++ b/relux/templates/fronts/default.html | |
@@ -51,7 +51,7 @@ | |
<div id="disaster-promo"> | |
<a href="{{ front_attrs.disaster_link }}"> | |
<h1>{{ front_attrs.disaster_headline }}</h1> | |
- <p><b class="label {{ front_attrs.disaster_section|slugify }}">{{ front_attrs.disaster_section }}</b>{{ front_attrs.disaster_chatter }} <span class="full-coverage">{{ front_attrs.disaster_kicker }}</span></p> | |
+ <p><a href="/{{ front_attrs.disaster_section }}/" class="label {{ front_attrs.disaster_section|slugify }}">{{ front_attrs.disaster_section }}</a>{{ front_attrs.disaster_chatter }} <span class="full-coverage">{{ front_attrs.disaster_kicker }}</span></p> | |
</a> | |
</div> | |
{% endif %} | |
diff --git a/relux/templates/includes/section-label.html b/relux/templates/includes/section-label.html | |
index feef7e2..1c66689 100644 | |
--- a/relux/templates/includes/section-label.html | |
+++ b/relux/templates/includes/section-label.html | |
@@ -5,8 +5,10 @@ | |
{{ label_section_name }} | |
{% elif ssts.section and not label_subsection_name %} | |
{{ ssts.section }} | |
+ {% elif label_texttype == "blog" %} | |
+ {{ label_texttype }}/{{ label_subsection_name }} | |
{% else %} | |
- {% firstof label_section_name card_section_name ssts.section "home" %}/{{ label_subsection_name|section_display_name|slugify }} | |
+ {% firstof label_blog label_section_name card_section_name ssts.section "home" %}/{{ label_subsection_name|section_display_name|slugify }} | |
{% endif %}{% endspaceless %}/"> | |
{% spaceless %}{% if not label_section_name and not label_subsection_name %} | |
{{ card_section_name|capfirst }} | |
diff --git a/relux/templates/modules/7-up-portrait.html b/relux/templates/modules/7-up-portrait.html | |
index 0020fdd..a07ee7f 100644 | |
--- a/relux/templates/modules/7-up-portrait.html | |
+++ b/relux/templates/modules/7-up-portrait.html | |
@@ -4,7 +4,7 @@ | |
<div class="stage"> | |
{% with module.contents|first as object %} | |
<div class="slide {{ object.taxonomy.section }} {% if forloop.first %}active{% endif %} slide-{{ forloop.counter }}" data-href="{{ object.links.html }}"> | |
- {% include "includes/section-label.html" with card_section_name=section_name label_section_name=object.taxonomy.section label_subsection_name=object.taxonomy.subsection %} | |
+ {% include "includes/section-label.html" with card_section_name=section_name label_section_name=object.taxonomy.section label_subsection_name=object.taxonomy.subsection label_texttype=object.attrs.texttype %} | |
{% include "modules/hero/text.html" with object=object module=module %} | |
{% include "modules/hero/media.html" with object=object %} | |
</div> | |
diff --git a/relux/templates/modules/headline-grid.html b/relux/templates/modules/headline-grid.html | |
index 54463fe..a7c2066 100644 | |
--- a/relux/templates/modules/headline-grid.html | |
+++ b/relux/templates/modules/headline-grid.html | |
@@ -43,9 +43,9 @@ <h5 class="title">Headlines</h5> | |
{% endif %} | |
{#</a>#} | |
</div> | |
+ {% include "includes/section-label.html" with card_section_name=section_name label_section_name=object.taxonomy.section label_subsection_name=object.taxonomy.subsection label_texttype=object.attrs.texttype %} | |
<a class="anchor" href="{{ object.links.html }}" data-ht="HeadlineGrid{{ forloop.counter }}"> | |
<div class="front tile"> | |
- {% include "includes/section-label.html" with card_section_name=section_name label_section_name=object.taxonomy.section label_subsection_name=object.taxonomy.subsection %} | |
{% if object.photo.crops or object.video %} | |
<div class="image-wrap"> | |
{% if object.photo.crops.1_1 %} | |
@@ -74,7 +74,6 @@ <h3 class="title noimage">{{ object.headline|safe|truncatechars:70|initial_quote | |
{% endif %} | |
</div> | |
<div class="back tile"> | |
- {% include "includes/section-label.html" with card_section_name=section_name label_section_name=object.taxonomy.section label_subsection_name=object.taxonomy.subsection %} | |
<h3 class="title">{{ object.headline|safe|truncatechars:70|initial_quotes|smartypants }}</h3> | |
{% if object.summary %} | |
<p class="text" data-fulltext="{{ object.summary|safe }}">{{ object.summary|safe|truncatechars:90 }}</p> | |
diff --git a/relux/templates/modules/hero/1-up.html b/relux/templates/modules/hero/1-up.html | |
index 9eeeb3b..bda676d 100644 | |
--- a/relux/templates/modules/hero/1-up.html | |
+++ b/relux/templates/modules/hero/1-up.html | |
@@ -4,7 +4,7 @@ | |
<div class="stage" data-vr-zone="1up" > | |
{% for object in module.contents|cap:module.max_content_count %} | |
<div class="slide {{ object.taxonomy.section }} {% if forloop.first %}active{% endif %} slide-{{ forloop.counter }}" data-href="{{ object.links.html }}" data-vr-contentbox="" > | |
- {% include "includes/section-label.html" with card_section_name=section_name label_section_name=object.taxonomy.section label_subsection_name=object.taxonomy.subsection %} | |
+ {% include "includes/section-label.html" with card_section_name=section_name label_section_name=object.taxonomy.section label_subsection_name=object.taxonomy.subsection label_texttype=object.attrs.texttype %} | |
{% include "modules/hero/text.html" with object=object module=module %} | |
{% include "modules/hero/media.html" with object=object %} | |
</div> | |
diff --git a/relux/templates/modules/hero/2-up.html b/relux/templates/modules/hero/2-up.html | |
index 6d55736..417b291 100644 | |
--- a/relux/templates/modules/hero/2-up.html | |
+++ b/relux/templates/modules/hero/2-up.html | |
@@ -7,7 +7,7 @@ | |
<div class="stage"> | |
{% for object in module.contents|cap:module.max_content_count %} | |
<div class="slide {{ object.taxonomy.section }} {% if forloop.first %}active{% endif %} slide-{{ forloop.counter }}" data-href="{{ object.links.html }}"> | |
- {% include "includes/section-label.html" with card_section_name=section_name label_section_name=object.taxonomy.section label_subsection_name=object.taxonomy.subsection %} | |
+ {% include "includes/section-label.html" with card_section_name=section_name label_section_name=object.taxonomy.section label_subsection_name=object.taxonomy.subsection label_texttype=object.attrs.texttype %} | |
{% include "modules/hero/text.html" with object=object module=module %} | |
{% include "modules/hero/media.html" with object=object %} | |
</div> | |
diff --git a/relux/templates/modules/hero/3-up.html b/relux/templates/modules/hero/3-up.html | |
index ff5905e..96563bc 100644 | |
--- a/relux/templates/modules/hero/3-up.html | |
+++ b/relux/templates/modules/hero/3-up.html | |
@@ -4,7 +4,7 @@ | |
<div class="stage" data-vr-zone="3up"> | |
{% for object in module.contents|cap:module.max_content_count %} | |
<div class="slide {{ object.taxonomy.section }} {% if forloop.first %}active{% endif %} slide-{{ forloop.counter }}" data-href="{{ object.links.html }}" data-vr-contentbox="" > | |
- {% include "includes/section-label.html" with card_section_name=section_name label_section_name=object.taxonomy.section label_subsection_name=object.taxonomy.subsection %} | |
+ {% include "includes/section-label.html" with card_section_name=section_name label_section_name=object.taxonomy.section label_subsection_name=object.taxonomy.subsection label_texttype=object.attrs.texttype %} | |
{% include "modules/hero/text.html" with object=object module=module %} | |
{% include "modules/hero/media.html" with object=object %} | |
</div> | |
diff --git a/relux/templates/modules/hero/6-up-with-carousel.html b/relux/templates/modules/hero/6-up-with-carousel.html | |
index 0216e0c..bb20c69 100644 | |
--- a/relux/templates/modules/hero/6-up-with-carousel.html | |
+++ b/relux/templates/modules/hero/6-up-with-carousel.html | |
@@ -7,7 +7,7 @@ | |
<div class="stage" data-vr-zone="6-up-with-carousel"> | |
{% for object in module.contents|cap:module.max_content_count %} | |
<div class="slide {{ object.taxonomy.section }} {% if forloop.first %}active{% endif %} slide-{{ forloop.counter }}" data-href="{{ object.links.html }}" data-vr-contentbox=""> | |
- {% include "includes/section-label.html" with card_section_name=section_name label_section_name=object.taxonomy.section label_subsection_name=object.taxonomy.subsection %} | |
+ {% include "includes/section-label.html" with card_section_name=section_name label_section_name=object.taxonomy.section label_subsection_name=object.taxonomy.subsection label_texttype=object.attrs.texttype %} | |
{% include "modules/hero/text.html" with object=object module=module %} | |
{% include "modules/hero/media.html" with object=object %} | |
</div> | |
diff --git a/relux/templates/modules/hero/7-up-portrait.html b/relux/templates/modules/hero/7-up-portrait.html | |
index c9d791c..02adaef 100644 | |
--- a/relux/templates/modules/hero/7-up-portrait.html | |
+++ b/relux/templates/modules/hero/7-up-portrait.html | |
@@ -4,7 +4,7 @@ | |
<div class="stage" data-vr-zone="6-up-protrait"> | |
{% with module.contents|first as object %} | |
<div class="slide {{ object.taxonomy.section }} {% if forloop.first %}active{% endif %} slide-{{ forloop.counter }}" data-href="{{ object.links.html }}" data-vr-contentbox=""> | |
- {% include "includes/section-label.html" with card_section_name=section_name label_section_name=object.taxonomy.section label_subsection_name=object.taxonomy.subsection %} | |
+ {% include "includes/section-label.html" with card_section_name=section_name label_section_name=object.taxonomy.section label_subsection_name=object.taxonomy.subsection label_texttype=object.attrs.texttype %} | |
{% include "modules/hero/text.html" with object=object module=module %} | |
{% include "modules/hero/media.html" with object=object %} | |
</div> | |
diff --git a/relux/templates/modules/hero/election-night-large-story.html b/relux/templates/modules/hero/election-night-large-story.html | |
index 2b7bd17..0d7b068 100644 | |
--- a/relux/templates/modules/hero/election-night-large-story.html | |
+++ b/relux/templates/modules/hero/election-night-large-story.html | |
@@ -4,7 +4,7 @@ | |
<div class="hero-left-pane {{ object.taxonomy.section }}"> | |
{% for object in module.contents|cap:module.max_content_count %} | |
<div class="slide {{ object.taxonomy.section }} {% if forloop.first %}active{% endif %} slide-{{ forloop.counter }}" data-href="{{ object.links.html }}"> | |
- {% include "includes/section-label.html" with card_section_name=section_name label_section_name=object.taxonomy.section label_subsection_name=object.taxonomy.subsection %} | |
+ {% include "includes/section-label.html" with card_section_name=section_name label_section_name=object.taxonomy.section label_subsection_name=object.taxonomy.subsection label_texttype=object.attrs.texttype %} | |
{% include "modules/hero/text.html" with object=object module=module %} | |
{% include "modules/hero/media.html" with object=object %} | |
</div> | |
diff --git a/relux/templates/modules/hero/headline-pack.html b/relux/templates/modules/hero/headline-pack.html | |
index 84a4198..4d2cd92 100644 | |
--- a/relux/templates/modules/hero/headline-pack.html | |
+++ b/relux/templates/modules/hero/headline-pack.html | |
@@ -5,7 +5,7 @@ | |
<div class="ui-placer" data-vr-zone="headline-pack"> | |
{% with module.contents|first as object %} | |
<div class="hero-left-pane {{ object.taxonomy.section }}" data-vr-contentbox="" > | |
- {% include "includes/section-label.html" with card_section_name=section_name label_section_name=object.taxonomy.section label_subsection_name=object.taxonomy.subsection %} | |
+ {% include "includes/section-label.html" with card_section_name=section_name label_section_name=object.taxonomy.section label_subsection_name=object.taxonomy.subsection label_texttype=object.attrs.texttype %} | |
{% include "modules/hero/text.html" with object=object module=module %} | |
{% include "modules/hero/media.html" with object=object %} | |
</div> | |
diff --git a/relux/templates/modules/hero/news-rotator.html b/relux/templates/modules/hero/news-rotator.html | |
index d26614b..cff6873 100644 | |
--- a/relux/templates/modules/hero/news-rotator.html | |
+++ b/relux/templates/modules/hero/news-rotator.html | |
@@ -4,7 +4,7 @@ | |
<div class="stage" data-vr-zone="News-Rotator"> | |
{% for object in module.contents|cap:module.max_content_count %} | |
<div class="slide {{ object.taxonomy.section }} {% if forloop.first %}active{% endif %} slide-{{ forloop.counter }}" data-href="{{ object.links.html }}"data-vr-contentbox=""> | |
- {% include "includes/section-label.html" with card_section_name=section_name label_section_name=object.taxonomy.section label_subsection_name=object.taxonomy.subsection %} | |
+ {% include "includes/section-label.html" with card_section_name=section_name label_section_name=object.taxonomy.section label_subsection_name=object.taxonomy.subsection label_texttype=object.attrs.texttype %} | |
{% include "modules/hero/text.html" with object=object module=module %} | |
{% include "modules/hero/media.html" with object=object %} | |
</div> | |
diff --git a/relux/templates/modules/sp-hero-2up.html b/relux/templates/modules/sp-hero-2up.html | |
index fd8400b..a5825ee 100644 | |
--- a/relux/templates/modules/sp-hero-2up.html | |
+++ b/relux/templates/modules/sp-hero-2up.html | |
@@ -5,7 +5,7 @@ | |
<div class="stage" data-vr-zone="sp-hero-2up"> | |
{% for object in module.contents|cap:module.max_content_count %} | |
<div class="slide {{ object.taxonomy.section }} {% if forloop.first %}active{% endif %} slide-{{ forloop.counter }}" data-href="{{ object.links.html }}" data-vr-contentbox="" > | |
- {% include "includes/section-label.html" with card_section_name=section_name label_section_name=object.taxonomy.section label_subsection_name=object.taxonomy.subsection %} | |
+ {% include "includes/section-label.html" with card_section_name=section_name label_section_name=object.taxonomy.section label_subsection_name=object.taxonomy.subsection label_texttype=object.attrs.texttype %} | |
{% include "modules/hero/text.html" with object=object module=module %} | |
{% include "modules/hero/media.html" with object=object %} | |
</div> | |
diff --git a/relux/templates/modules/sp-hero-3up.html b/relux/templates/modules/sp-hero-3up.html | |
index 7728a64..507cf6c 100644 | |
--- a/relux/templates/modules/sp-hero-3up.html | |
+++ b/relux/templates/modules/sp-hero-3up.html | |
@@ -5,7 +5,7 @@ | |
<div class="stage" data-vr-zone="sp-hero-3up"> | |
{% for object in module.contents|cap:2 %} | |
<div class="slide {{ object.taxonomy.section }} {% if forloop.first %}active{% endif %} slide-{{ forloop.counter }}" data-href="{{ object.links.html }}" data-vr-contentbox="" > | |
- {% include "includes/section-label.html" with card_section_name=section_name label_section_name=object.taxonomy.section label_subsection_name=object.taxonomy.subsection %} | |
+ {% include "includes/section-label.html" with card_section_name=section_name label_section_name=object.taxonomy.section label_subsection_name=object.taxonomy.subsection label_texttype=object.attrs.texttype %} | |
{% if forloop.first %} | |
{% include "modules/hero/text.html" with object=object module=module %} | |
{% else %} | |
diff --git a/relux/templates/modules/stag-front/headline-grid.html b/relux/templates/modules/stag-front/headline-grid.html | |
index df1e1c0..8fde938 100644 | |
--- a/relux/templates/modules/stag-front/headline-grid.html | |
+++ b/relux/templates/modules/stag-front/headline-grid.html | |
@@ -23,10 +23,11 @@ | |
{% endif %} | |
{#</a>#} | |
</div> | |
+ {% include "includes/section-label.html" with card_section_name=section_name label_section_name=content.taxonomy.section label_subsection_name=content.taxonomy.subsection %} | |
+ {% if content.photo.crops or content.attrs.videostill %} | |
<a class="anchor" href="{{ content|content_url }}"> | |
<div class="front tile"> | |
- {% include "includes/section-label.html" with card_section_name=section_name label_section_name=content.taxonomy.section label_subsection_name=content.taxonomy.subsection %} | |
- {% if content.photo.crops or content.attrs.videostill %} | |
+ | |
{% if content.photo.crops.1_1 %} | |
<img class="tileImage" src="{{ content.photo.crops.1_1|pathify|resize:'220x220'|crop:'200x220' }}" width="200" height="220" /> | |
{% elif content.photo.crops.4_3 %} | |
@@ -48,7 +49,7 @@ <h3 class="title noimage">{{ content.headline|safe|truncatechars:70|initial_quot | |
<h3 class="title image">{{ content.headline|safe|truncatechars:70|initial_quotes|smartypants }}</h3> | |
</div> | |
<div class="back tile"> | |
- {% include "includes/section-label.html" with card_section_name=section_name label_section_name=content.taxonomy.section label_subsection_name=content.taxonomy.subsection %} | |
+ | |
<h3 class="title">{{ content.headline|safe|truncatechars:70|initial_quotes|smartypants }}</h3> | |
<div class="authors byline byline-nopub{% if content.byline.avatar %} with-avatar{% endif %} list-view-byline"> | |
{# Uncomment the anchor tag when the authors become rockstars #} | |
diff --git a/relux/templates/stag-front.html b/relux/templates/stag-front.html | |
index aaf7a44..8f0cdd2 100644 | |
--- a/relux/templates/stag-front.html | |
+++ b/relux/templates/stag-front.html | |
@@ -38,11 +38,7 @@ | |
{% for content in module.contents|slice:"3" %} | |
<div class="slide None active slide-{{ forloop.counter }}" data-href="{{ content|content_url }}"> | |
- {% if base_page_type == "topic" %} | |
{% include "includes/section-label.html" with card_section_name=section_name label_section_name=content.taxonomy.section label_subsection_name=content.taxonomy.subsection %} | |
- {% elif base_page_type == "blog" %} | |
- <b class="label None">{{ content.timestamp.updated|parse_date|date:"M d, Y" }}</b> | |
- {% endif %} | |
<div class="media"> | |
{% if content.photo.crops.16_9 or content.attrs.videostill %} | |
{% if forloop.first %} | |
-- | |
1.7.10 | |
From a62b39561baed8224877b52dc43cfd3c43ef8c3c Mon Sep 17 00:00:00 2001 | |
From: Robert Huhn <[email protected]> | |
Date: Mon, 10 Dec 2012 15:33:18 -0500 | |
Subject: [PATCH 05/25] updated site wide labels, fixed issues on stag-frotns | |
with headline grid items with no image | |
--- | |
relux/templates/fronts/coverview.html | 2 +- | |
relux/templates/includes/section-label.html | 6 ++++-- | |
relux/templates/modules/7-up-portrait.html | 2 +- | |
relux/templates/modules/headline-grid.html | 2 +- | |
relux/templates/modules/hero/1-up.html | 4 ++-- | |
relux/templates/modules/hero/2-up.html | 4 ++-- | |
relux/templates/modules/hero/3-up.html | 4 ++-- | |
relux/templates/modules/hero/6-up-with-carousel.html | 4 ++-- | |
relux/templates/modules/hero/7-up-portrait.html | 2 +- | |
.../modules/hero/election-night-large-story.html | 4 ++-- | |
relux/templates/modules/hero/news-rotator.html | 2 +- | |
relux/templates/modules/sp-hero-2up.html | 4 ++-- | |
relux/templates/modules/sp-hero-3up.html | 2 +- | |
relux/templates/modules/stag-front/headline-grid.html | 13 +++++++++---- | |
relux/templates/stag-front.html | 8 ++++++-- | |
15 files changed, 37 insertions(+), 26 deletions(-) | |
diff --git a/relux/templates/fronts/coverview.html b/relux/templates/fronts/coverview.html | |
index 8f7e8ff..32d41ce 100644 | |
--- a/relux/templates/fronts/coverview.html | |
+++ b/relux/templates/fronts/coverview.html | |
@@ -19,7 +19,7 @@ | |
{% endif %} | |
); background-attachment: scroll; background-position: 50% 40px;"></div> | |
<div class="text-wrap"> | |
- {% include "includes/section-label.html" with card_section_name=section_name label_section_name=object.taxonomy.section label_subsection_name=object.taxonomy.subsection label_texttype=object.attrs.texttype %} | |
+ {% include "includes/section-label.html" with card_section_name=section_name label_section_name=object.taxonomy.section label_subsection_name=object.taxonomy.subsection label_texttype=object.attrs.texttype label_blogname=object.attrs.sitename %} | |
<span class="date">{{object.timestamp.published|parse_date|date:"M d, Y"}}</span> | |
{% include "modules/hero/text.html" with object=object show_byline='False' %} | |
</div> | |
diff --git a/relux/templates/includes/section-label.html b/relux/templates/includes/section-label.html | |
index 1c66689..406325b 100644 | |
--- a/relux/templates/includes/section-label.html | |
+++ b/relux/templates/includes/section-label.html | |
@@ -5,8 +5,8 @@ | |
{{ label_section_name }} | |
{% elif ssts.section and not label_subsection_name %} | |
{{ ssts.section }} | |
- {% elif label_texttype == "blog" %} | |
- {{ label_texttype }}/{{ label_subsection_name }} | |
+ {% elif label_texttype == "blog" and label_blogname %} | |
+ {{ label_texttype }}/{{ label_blogname|slugify|cut:"-" }} | |
{% else %} | |
{% firstof label_blog label_section_name card_section_name ssts.section "home" %}/{{ label_subsection_name|section_display_name|slugify }} | |
{% endif %}{% endspaceless %}/"> | |
@@ -16,6 +16,8 @@ | |
{{ label_section_name|capfirst }} | |
{% elif ssts.section and not label_subsection_name %} | |
{{ ssts.section|capfirst }} | |
+ {% elif label_texttype == "blog" and label_blogname %} | |
+ {{ label_blogname|capfirst }} | |
{% else %} | |
{{ label_subsection_name|section_display_name|capfirst }} | |
{% endif %}{% endspaceless %} | |
diff --git a/relux/templates/modules/7-up-portrait.html b/relux/templates/modules/7-up-portrait.html | |
index a07ee7f..d45a229 100644 | |
--- a/relux/templates/modules/7-up-portrait.html | |
+++ b/relux/templates/modules/7-up-portrait.html | |
@@ -4,7 +4,7 @@ | |
<div class="stage"> | |
{% with module.contents|first as object %} | |
<div class="slide {{ object.taxonomy.section }} {% if forloop.first %}active{% endif %} slide-{{ forloop.counter }}" data-href="{{ object.links.html }}"> | |
- {% include "includes/section-label.html" with card_section_name=section_name label_section_name=object.taxonomy.section label_subsection_name=object.taxonomy.subsection label_texttype=object.attrs.texttype %} | |
+ {% include "includes/section-label.html" with card_section_name=section_name label_section_name=object.taxonomy.section label_subsection_name=object.taxonomy.subsection label_texttype=object.attrs.texttype label_blogname=object.attrs.sitename %} | |
{% include "modules/hero/text.html" with object=object module=module %} | |
{% include "modules/hero/media.html" with object=object %} | |
</div> | |
diff --git a/relux/templates/modules/headline-grid.html b/relux/templates/modules/headline-grid.html | |
index a4f7c15..8e13674 100644 | |
--- a/relux/templates/modules/headline-grid.html | |
+++ b/relux/templates/modules/headline-grid.html | |
@@ -43,7 +43,7 @@ <h5 class="title">Headlines</h5> | |
{% endif %} | |
{#</a>#} | |
</div> | |
- {% include "includes/section-label.html" with card_section_name=section_name label_section_name=object.taxonomy.section label_subsection_name=object.taxonomy.subsection label_texttype=object.attrs.texttype %} | |
+ {% include "includes/section-label.html" with card_section_name=section_name label_section_name=object.taxonomy.section label_subsection_name=object.taxonomy.subsection label_texttype=object.attrs.texttype label_blogname=object.attrs.sitename %} | |
<a class="anchor" href="{{ object.links.html }}" data-ht="HeadlineGrid{{ forloop.counter }}"> | |
<div class="front tile"> | |
{% if object.photo.crops or object.video %} | |
diff --git a/relux/templates/modules/hero/1-up.html b/relux/templates/modules/hero/1-up.html | |
index 3ac4c8b..1aa9be0 100644 | |
--- a/relux/templates/modules/hero/1-up.html | |
+++ b/relux/templates/modules/hero/1-up.html | |
@@ -1,10 +1,10 @@ | |
{% load typogrify_tags %} | |
-<div class="mod hero gallery hero-flip {{ module.attrs.variant }} {% if bump %}bump{% endif %} clearfix" data-gallery-id="{{ module.layout_name|slugify }}" > | |
+<div class="mod hero gallery hero-flip {{ module.attrs.variant }} {% if section_name == 'home' %}bump{% endif %} clearfix" data-gallery-id="{{ module.layout_name|slugify }}" > | |
<div class="stage" data-vr-zone="1up" > | |
{% for object in module.contents|cap:module.max_content_count %} | |
<div class="slide {{ object.taxonomy.section }} {% if forloop.first %}active{% endif %} slide-{{ forloop.counter }}" data-href="{{ object.links.html }}" data-vr-contentbox="" > | |
- {% include "includes/section-label.html" with card_section_name=section_name label_section_name=object.taxonomy.section label_subsection_name=object.taxonomy.subsection label_texttype=object.attrs.texttype %} | |
+ {% include "includes/section-label.html" with card_section_name=section_name label_section_name=object.taxonomy.section label_subsection_name=object.taxonomy.subsection label_texttype=object.attrs.texttype label_blogname=object.attrs.sitename %} | |
{% include "modules/hero/text.html" with object=object module=module %} | |
{% include "modules/hero/media.html" with object=object %} | |
</div> | |
diff --git a/relux/templates/modules/hero/2-up.html b/relux/templates/modules/hero/2-up.html | |
index d9a7992..934f70f 100644 | |
--- a/relux/templates/modules/hero/2-up.html | |
+++ b/relux/templates/modules/hero/2-up.html | |
@@ -1,13 +1,13 @@ | |
{% load typogrify_tags %} | |
-<div class="mod hero gallery hero-page-turn two-up {{ module.attrs.variant }} {% if bump %}bump{% endif %} clearfix" data-gallery-id="{{ module.layout_name|slugify }}"> | |
+<div class="mod hero gallery hero-page-turn two-up {{ module.attrs.variant }} {% if section_name == 'home' %}bump{% endif %} clearfix" data-gallery-id="{{ module.layout_name|slugify }}"> | |
<div class="ui-page-turn active" data-vr-zone="2up"> | |
<div class="ui-placer"> | |
<div class="hero-6up-ribbon hero-turn-trigger ui-sprite-after" data-side="front">Most Popular</div> | |
<div class="stage"> | |
{% for object in module.contents|cap:module.max_content_count %} | |
<div class="slide {{ object.taxonomy.section }} {% if forloop.first %}active{% endif %} slide-{{ forloop.counter }}" data-href="{{ object.links.html }}"> | |
- {% include "includes/section-label.html" with card_section_name=section_name label_section_name=object.taxonomy.section label_subsection_name=object.taxonomy.subsection label_texttype=object.attrs.texttype %} | |
+ {% include "includes/section-label.html" with card_section_name=section_name label_section_name=object.taxonomy.section label_subsection_name=object.taxonomy.subsection label_texttype=object.attrs.texttype label_blogname=object.attrs.sitename %} | |
{% include "modules/hero/text.html" with object=object module=module %} | |
{% include "modules/hero/media.html" with object=object %} | |
</div> | |
diff --git a/relux/templates/modules/hero/3-up.html b/relux/templates/modules/hero/3-up.html | |
index cea6369..7313384 100644 | |
--- a/relux/templates/modules/hero/3-up.html | |
+++ b/relux/templates/modules/hero/3-up.html | |
@@ -1,10 +1,10 @@ | |
{% load typogrify_tags %} | |
-<div class="mod hero gallery hero-flip three-up {{ module.attrs.variant }} {% if bump %}bump{% endif %} clearfix" data-gallery-id="{{ module.layout_name|slugify }}" > | |
+<div class="mod hero gallery hero-flip three-up {{ module.attrs.variant }} {% if section_name == 'home' %}bump{% endif %} clearfix" data-gallery-id="{{ module.layout_name|slugify }}" > | |
<div class="stage" data-vr-zone="3up"> | |
{% for object in module.contents|cap:module.max_content_count %} | |
<div class="slide {{ object.taxonomy.section }} {% if forloop.first %}active{% endif %} slide-{{ forloop.counter }}" data-href="{{ object.links.html }}" data-vr-contentbox="" > | |
- {% include "includes/section-label.html" with card_section_name=section_name label_section_name=object.taxonomy.section label_subsection_name=object.taxonomy.subsection label_texttype=object.attrs.texttype %} | |
+ {% include "includes/section-label.html" with card_section_name=section_name label_section_name=object.taxonomy.section label_subsection_name=object.taxonomy.subsection label_texttype=object.attrs.texttype label_blogname=object.attrs.sitename %} | |
{% include "modules/hero/text.html" with object=object module=module %} | |
{% include "modules/hero/media.html" with object=object %} | |
</div> | |
diff --git a/relux/templates/modules/hero/6-up-with-carousel.html b/relux/templates/modules/hero/6-up-with-carousel.html | |
index 5451f62..342086c 100644 | |
--- a/relux/templates/modules/hero/6-up-with-carousel.html | |
+++ b/relux/templates/modules/hero/6-up-with-carousel.html | |
@@ -1,13 +1,13 @@ | |
{% load typogrify_tags %} | |
-<div class="hero-6up mod hero gallery hero-page-turn carousel {{ module.attrs.variant }} {% if bump %}bump{% endif %} clearfix" data-gallery-id="{{ module.layout_name|slugify }}"> | |
+<div class="hero-6up mod hero gallery hero-page-turn carousel {{ module.attrs.variant }} {% if section_name == 'home' %}bump{% endif %} clearfix" data-gallery-id="{{ module.layout_name|slugify }}"> | |
<div class="ui-page-turn active"> | |
<div class="ui-placer"> | |
<div class="hero-6up-ribbon hero-turn-trigger ui-sprite-after" data-side="front">Most Popular</div> | |
<div class="stage" data-vr-zone="6-up-with-carousel"> | |
{% for object in module.contents|cap:module.max_content_count %} | |
<div class="slide {{ object.taxonomy.section }} {% if forloop.first %}active{% endif %} slide-{{ forloop.counter }}" data-href="{{ object.links.html }}" data-vr-contentbox=""> | |
- {% include "includes/section-label.html" with card_section_name=section_name label_section_name=object.taxonomy.section label_subsection_name=object.taxonomy.subsection label_texttype=object.attrs.texttype %} | |
+ {% include "includes/section-label.html" with card_section_name=section_name label_section_name=object.taxonomy.section label_subsection_name=object.taxonomy.subsection label_texttype=object.attrs.texttype label_blogname=object.attrs.sitename %} | |
{% include "modules/hero/text.html" with object=object module=module %} | |
{% include "modules/hero/media.html" with object=object %} | |
</div> | |
diff --git a/relux/templates/modules/hero/7-up-portrait.html b/relux/templates/modules/hero/7-up-portrait.html | |
index 02adaef..f305b82 100644 | |
--- a/relux/templates/modules/hero/7-up-portrait.html | |
+++ b/relux/templates/modules/hero/7-up-portrait.html | |
@@ -4,7 +4,7 @@ | |
<div class="stage" data-vr-zone="6-up-protrait"> | |
{% with module.contents|first as object %} | |
<div class="slide {{ object.taxonomy.section }} {% if forloop.first %}active{% endif %} slide-{{ forloop.counter }}" data-href="{{ object.links.html }}" data-vr-contentbox=""> | |
- {% include "includes/section-label.html" with card_section_name=section_name label_section_name=object.taxonomy.section label_subsection_name=object.taxonomy.subsection label_texttype=object.attrs.texttype %} | |
+ {% include "includes/section-label.html" with card_section_name=section_name label_section_name=object.taxonomy.section label_subsection_name=object.taxonomy.subsection label_texttype=object.attrs.texttype label_blogname=object.attrs.sitename %} | |
{% include "modules/hero/text.html" with object=object module=module %} | |
{% include "modules/hero/media.html" with object=object %} | |
</div> | |
diff --git a/relux/templates/modules/hero/election-night-large-story.html b/relux/templates/modules/hero/election-night-large-story.html | |
index e92f382..82ab9c7 100644 | |
--- a/relux/templates/modules/hero/election-night-large-story.html | |
+++ b/relux/templates/modules/hero/election-night-large-story.html | |
@@ -1,10 +1,10 @@ | |
-<div class="mod hero basic {{ module.attrs.variant }} {% if bump %}bump{% endif %} clearfix" data-gallery-id="{{ module.layout_name|slugify }}" > | |
+<div class="mod hero basic {{ module.attrs.variant }} {% if section_name == 'home' %}bump{% endif %} clearfix" data-gallery-id="{{ module.layout_name|slugify }}" > | |
<div class="stage election-night-large-story"> | |
<div class="hero-page-front active"> | |
<div class="hero-left-pane {{ object.taxonomy.section }}"> | |
{% for object in module.contents|cap:module.max_content_count %} | |
<div class="slide {{ object.taxonomy.section }} {% if forloop.first %}active{% endif %} slide-{{ forloop.counter }}" data-href="{{ object.links.html }}"> | |
- {% include "includes/section-label.html" with card_section_name=section_name label_section_name=object.taxonomy.section label_subsection_name=object.taxonomy.subsection label_texttype=object.attrs.texttype %} | |
+ {% include "includes/section-label.html" with card_section_name=section_name label_section_name=object.taxonomy.section label_subsection_name=object.taxonomy.subsection label_texttype=object.attrs.texttype label_blogname=object.attrs.sitename %} | |
{% include "modules/hero/text.html" with object=object module=module %} | |
{% include "modules/hero/media.html" with object=object %} | |
</div> | |
diff --git a/relux/templates/modules/hero/news-rotator.html b/relux/templates/modules/hero/news-rotator.html | |
index cff6873..6d18fd7 100644 | |
--- a/relux/templates/modules/hero/news-rotator.html | |
+++ b/relux/templates/modules/hero/news-rotator.html | |
@@ -4,7 +4,7 @@ | |
<div class="stage" data-vr-zone="News-Rotator"> | |
{% for object in module.contents|cap:module.max_content_count %} | |
<div class="slide {{ object.taxonomy.section }} {% if forloop.first %}active{% endif %} slide-{{ forloop.counter }}" data-href="{{ object.links.html }}"data-vr-contentbox=""> | |
- {% include "includes/section-label.html" with card_section_name=section_name label_section_name=object.taxonomy.section label_subsection_name=object.taxonomy.subsection label_texttype=object.attrs.texttype %} | |
+ {% include "includes/section-label.html" with card_section_name=section_name label_section_name=object.taxonomy.section label_subsection_name=object.taxonomy.subsection label_texttype=object.attrs.texttype label_blogname=object.attrs.sitename %} | |
{% include "modules/hero/text.html" with object=object module=module %} | |
{% include "modules/hero/media.html" with object=object %} | |
</div> | |
diff --git a/relux/templates/modules/sp-hero-2up.html b/relux/templates/modules/sp-hero-2up.html | |
index b5c190f..85e338b 100644 | |
--- a/relux/templates/modules/sp-hero-2up.html | |
+++ b/relux/templates/modules/sp-hero-2up.html | |
@@ -5,14 +5,14 @@ | |
<div class="stage" data-vr-zone="sp-hero-2up"> | |
{% for object in module.contents|cap:module.max_content_count %} | |
<div class="slide {{ object.taxonomy.section }} {% if forloop.first %}active{% endif %} slide-{{ forloop.counter }}" data-href="{{ object.links.html }}" data-vr-contentbox="" > | |
- {% include "includes/section-label.html" with card_section_name=section_name label_section_name=object.taxonomy.section label_subsection_name=object.taxonomy.subsection label_texttype=object.attrs.texttype %} | |
+ {% include "includes/section-label.html" with card_section_name=section_name label_section_name=object.taxonomy.section label_subsection_name=object.taxonomy.subsection label_texttype=object.attrs.texttype label_blogname=object.attrs.sitename %} | |
{% include "modules/hero/text.html" with object=object module=module %} | |
{% include "modules/hero/media.html" with object=object %} | |
</div> | |
{% endfor %} | |
</div> | |
<ul class="contents stack" data-vr-zone="Top-Stories"> | |
- <h2>Top Stories</h2> | |
+ <h2>Top Stories</h2> | |
{% for object in module.contents|slice:"1:"|cap:"12" %} | |
<li data-vr-contentbox="" ><a href="{{ object.links.html }}" data-ht="heromodule{{ section_name }}{% if sub_section_name %}{{ sub_section_name|slugify }}{% endif %}">{{ object.headline|safe|truncatechars:42|initial_quotes|smartypants }}</a> | |
</li> | |
diff --git a/relux/templates/modules/sp-hero-3up.html b/relux/templates/modules/sp-hero-3up.html | |
index 507cf6c..fcf5045 100644 | |
--- a/relux/templates/modules/sp-hero-3up.html | |
+++ b/relux/templates/modules/sp-hero-3up.html | |
@@ -5,7 +5,7 @@ | |
<div class="stage" data-vr-zone="sp-hero-3up"> | |
{% for object in module.contents|cap:2 %} | |
<div class="slide {{ object.taxonomy.section }} {% if forloop.first %}active{% endif %} slide-{{ forloop.counter }}" data-href="{{ object.links.html }}" data-vr-contentbox="" > | |
- {% include "includes/section-label.html" with card_section_name=section_name label_section_name=object.taxonomy.section label_subsection_name=object.taxonomy.subsection label_texttype=object.attrs.texttype %} | |
+ {% include "includes/section-label.html" with card_section_name=section_name label_section_name=object.taxonomy.section label_subsection_name=object.taxonomy.subsection label_texttype=object.attrs.texttype label_blogname=object.attrs.sitename %} | |
{% if forloop.first %} | |
{% include "modules/hero/text.html" with object=object module=module %} | |
{% else %} | |
diff --git a/relux/templates/modules/stag-front/headline-grid.html b/relux/templates/modules/stag-front/headline-grid.html | |
index 8fde938..933a5a4 100644 | |
--- a/relux/templates/modules/stag-front/headline-grid.html | |
+++ b/relux/templates/modules/stag-front/headline-grid.html | |
@@ -23,11 +23,15 @@ | |
{% endif %} | |
{#</a>#} | |
</div> | |
- {% include "includes/section-label.html" with card_section_name=section_name label_section_name=content.taxonomy.section label_subsection_name=content.taxonomy.subsection %} | |
- {% if content.photo.crops or content.attrs.videostill %} | |
+ {% if base_page_type == "topic" %} | |
+ {% include "includes/section-label.html" with card_section_name=section_name label_section_name=content.taxonomy.section label_subsection_name=content.taxonomy.subsection label_texttype=content.attrs.texttype label_blogname=content.attrs.sitename %} | |
+ {% elif front_attrs.texttype == "blog index" %} | |
+ {% include "includes/section-label.html" with card_section_name=section_name label_section_name=content.taxonomy.section %} | |
+ {% endif %} | |
+ | |
<a class="anchor" href="{{ content|content_url }}"> | |
<div class="front tile"> | |
- | |
+ {% if content.photo.crops or content.attrs.videostill %} | |
{% if content.photo.crops.1_1 %} | |
<img class="tileImage" src="{{ content.photo.crops.1_1|pathify|resize:'220x220'|crop:'200x220' }}" width="200" height="220" /> | |
{% elif content.photo.crops.4_3 %} | |
@@ -43,10 +47,11 @@ | |
{% else %} | |
<h3 class="title noimage">{{ content.headline|safe|truncatechars:70|initial_quotes|smartypants }}</h3> | |
{% endif %} | |
+ <h3 class="title image">{{ content.headline|safe|truncatechars:70|initial_quotes|smartypants }}</h3> | |
{% else %} | |
<h3 class="title noimage">{{ content.headline|safe|truncatechars:70|initial_quotes|smartypants }}</h3> | |
{% endif %} | |
- <h3 class="title image">{{ content.headline|safe|truncatechars:70|initial_quotes|smartypants }}</h3> | |
+ | |
</div> | |
<div class="back tile"> | |
diff --git a/relux/templates/stag-front.html b/relux/templates/stag-front.html | |
index 2aafe15..8f5333c 100644 | |
--- a/relux/templates/stag-front.html | |
+++ b/relux/templates/stag-front.html | |
@@ -38,7 +38,11 @@ | |
{% for content in module.contents|slice:"3" %} | |
<div class="slide None active slide-{{ forloop.counter }}" data-href="{{ content|content_url }}"> | |
- {% include "includes/section-label.html" with card_section_name=section_name label_section_name=content.taxonomy.section label_subsection_name=content.taxonomy.subsection %} | |
+ {% if base_page_type == "topic" %} | |
+ {% include "includes/section-label.html" with card_section_name=section_name label_section_name=content.taxonomy.section label_subsection_name=content.taxonomy.subsection label_texttype=content.attrs.texttype label_blogname=content.attrs.sitename %} | |
+ {% elif front_attrs.texttype == "blog index" %} | |
+ {% include "includes/section-label.html" with card_section_name=section_name label_section_name=content.taxonomy.section %} | |
+ {% endif %} | |
<div class="media"> | |
{% if content.photo.crops.16_9 or content.attrs.videostill %} | |
{% if forloop.first %} | |
@@ -64,7 +68,7 @@ | |
<ul class="actions clearfix"> | |
<li> | |
<a class="read" href="{{ content|content_url }}"> | |
- {% if 'interactive:' in content.summary|lower or 'interactive:' in content.headline|lower %} | |
+ {% if 'INTERACTIVE:' in content.summary %} | |
View Interactive | |
{% else %} | |
View Story | |
-- | |
1.7.10 | |
From 1be2ec0af453f96d768bbc7080dda1b55066c0d5 Mon Sep 17 00:00:00 2001 | |
From: Robert Huhn <[email protected]> | |
Date: Mon, 10 Dec 2012 18:01:36 -0500 | |
Subject: [PATCH 06/25] updated labels for topics | |
--- | |
relux/static/css/modules/search.css | 117 +++++++------------- | |
relux/templates/includes/section-label.html | 2 +- | |
relux/templates/partials/search-result-items.html | 37 +++++-- | |
relux/templates/topics/elections-2012/default.html | 6 +- | |
4 files changed, 71 insertions(+), 91 deletions(-) | |
diff --git a/relux/static/css/modules/search.css b/relux/static/css/modules/search.css | |
index f8964f4..c6bc2ba 100644 | |
--- a/relux/static/css/modules/search.css | |
+++ b/relux/static/css/modules/search.css | |
@@ -53,7 +53,7 @@ article.search-results.ui-loading{ | |
padding: 20px; | |
} | |
-.search-results .ad figure { | |
+.search-results .ad .search-result-figure { | |
text-align: center; | |
} | |
@@ -101,12 +101,12 @@ article.search-results.ui-loading{ | |
box-shadow: inset 0 1px rgb(59,59,59); | |
} | |
-.results li figure { | |
+.results li .search-result-figure { | |
padding: 16px 17px 11px 17px; | |
position: relative; | |
} | |
-.view-list li figure { | |
+.view-list li .search-result-figure { | |
float: left; | |
padding: 0; | |
} | |
@@ -121,7 +121,7 @@ li.topresult .search-result-image { | |
width: 200px; | |
} | |
-.topresult figure { | |
+.topresult .search-result-figure { | |
height: 106px; | |
margin-bottom: 13px; | |
overflow: hidden; | |
@@ -138,14 +138,14 @@ li.topresult .search-result-image { | |
width: 200px; | |
} | |
-.results li a { | |
+.search-result-item-link { | |
display: block; | |
} | |
-.search-results .view-list li a .front { | |
+.search-results .view-list li .search-result-item-link .front { | |
position: relative; | |
} | |
-.results li a .front { | |
+.results li .search-result-item-link .front { | |
opacity: 1; | |
position: absolute; | |
-webkit-transition: opacity .15s ease-in-out; | |
@@ -161,15 +161,15 @@ li.topresult .search-result-image { | |
display: none; | |
} | |
-.lt-ie9 .view-grid li a .back { | |
+.lt-ie9 .view-grid li .search-result-item-link .back { | |
visibility: hidden; | |
} | |
-.lt-ie9 .view-grid li a:hover .front { | |
+.lt-ie9 .view-grid li .search-result-item-link:hover .front { | |
visibility: hidden; | |
} | |
-.view-grid li a .back { | |
+.view-grid li .search-result-item-link .back { | |
display: block; | |
opacity: 0; | |
position: absolute; | |
@@ -181,34 +181,34 @@ li.topresult .search-result-image { | |
width: 100%; | |
} | |
-.view-grid li a:hover .front { | |
+.view-grid li .search-result-item-link:hover .front { | |
opacity: 0; | |
} | |
-.view-grid li a:hover .back { | |
+.view-grid li .search-result-item-link:hover .back { | |
visibility: visible; | |
opacity: 1; | |
} | |
-.view-grid .list-content li a { | |
+.view-grid .list-content li .search-result-item-link { | |
height: 257px; | |
width: 238px; | |
} | |
-.view-grid li a:hover { | |
+.view-grid li .search-result-item-link:hover { | |
background: rgb(77, 77, 77); | |
} | |
-.view-list li a:hover { | |
+.view-list li .search-result-item-link:hover { | |
background: rgb(77, 77, 77); | |
} | |
.view-list .none-link-borders, | |
-.view-list li a { | |
+.view-list li .search-result-item-link { | |
padding: 10px 0 10px 10px; | |
} | |
-.results li a { | |
+.results li .search-result-item-link { | |
color: rgb(204, 204, 204); | |
} | |
@@ -227,7 +227,7 @@ li.topresult .search-result-image { | |
text-shadow: 0 1px 1px rgb(0, 0, 0); | |
} | |
-.results li a:hover h3 { | |
+.results li .search-result-item-link:hover h3 { | |
color: rgb(255, 255, 255); | |
} | |
@@ -237,54 +237,50 @@ li.topresult .search-result-image { | |
margin: -4px 0 0; | |
} | |
-.results li a .label { | |
- color: rgb(255, 255, 255); | |
- font-family: 'Futura Today', arial, sans-serif; | |
- font-size: 10px; | |
+.results li .label { | |
+ | |
left: 19px; | |
- letter-spacing: 1px; | |
- line-height: 8px; | |
- padding: 6px; | |
+ | |
position: absolute; | |
- text-transform: uppercase; | |
+ | |
top: 19px; | |
} | |
-.results.view-list li a .label { | |
+.results.view-list li .label { | |
display: none; | |
} | |
-.results li a .label.recommended:after { | |
+.results li .label.recommended:after { | |
background: transparent url('/static/images/modules/search/search-icons.png') no-repeat -76px -160px; | |
content: 'Recommended'; | |
padding-left: 23px; | |
} | |
-.results li a .label.news { | |
+.results li .label.news { | |
background-color: rgb(0,155,255); | |
} | |
-.results li a .label.sports { | |
+.results li .label.sports { | |
background-color: rgb(235,30,0); | |
} | |
-.results li a .label.life { | |
+.results li .label.life { | |
background-color: rgb(150,0,180); | |
} | |
-.results li a .label.money { | |
+.results li .label.money { | |
background-color: rgb(0,165,60); | |
} | |
-.results li a .label.tech { | |
+.results li .label.tech { | |
background-color: rgb(250,95,0); | |
} | |
-.results li a .label.travel { | |
+.results li .label.travel { | |
background-color: rgb(0,195,195); | |
} | |
-.results li a .label.weather { | |
+.results li .label.weather { | |
background-color: rgb(255,192,0); | |
} | |
@@ -367,32 +363,7 @@ li.topresult .search-result-image { | |
margin: -16px 0 0 -14px; | |
} | |
-/* Gallery */ | |
-.results .gallery figure { | |
- background: transparent url('/static/images/modules/search/result-gallery.png') 0 100% no-repeat; | |
- height: 135px; | |
- margin: 0 13px 13px 19px; | |
- padding: 23px 0 0 5px; | |
-} | |
- | |
-.view-list .gallery figure { | |
- background: transparent url('/static/images/modules/search/result-gallery-sm.png') 0 100% no-repeat; | |
- float: left; | |
- height: 76px; | |
- margin: 0; | |
- padding: 0 20px 0 1px; | |
-} | |
- | |
-.view-list .gallery figure .search-result-image { | |
- margin: 0; | |
- padding: 3px 0; | |
-} | |
- | |
-.view-grid .video figure .search-result-image { | |
- width: 200px; | |
-} | |
- | |
-.video figure > .search-video:after { | |
+.video .search-result-figure > .search-video:after { | |
background: transparent url('/static/images/modules/search/search-icons.png') no-repeat 0 -219px; | |
content: ''; | |
width: 30px; | |
@@ -402,7 +373,7 @@ li.topresult .search-result-image { | |
position: absolute; | |
} | |
-.view-list .video figure > .search-video:after { | |
+.view-list .video .search-result-figure > .search-video:after { | |
top: 25px; | |
left: 37px; | |
} | |
@@ -439,12 +410,6 @@ li.topresult .search-result-image { | |
display: none; | |
} | |
-.results .gallery figure .search-result-image { | |
- border: 0; | |
- float: left; | |
- margin: 0 4px 4px 0; | |
-} | |
- | |
/* Result topic */ | |
.search-results .view-grid .list-content .topic, | |
.search-results .view-grid .list-content .topic a { | |
@@ -452,18 +417,18 @@ li.topresult .search-result-image { | |
width: 477px; | |
} | |
-.results .topic a h3 { | |
+.results .topic .search-result-item-link h3 { | |
font-size: 25px; | |
line-height: 120%; | |
} | |
-.results .topic a .back h3 { | |
+.results .topic .search-result-item-link .back h3 { | |
font-size: 42px; | |
line-height: 120%; | |
color: rgb(204, 204, 204); | |
} | |
-.results .topic a .back .text { | |
+.results .topic .search-result-item-link .back .text { | |
line-height: 200%; | |
height: 246px; | |
margin: 0 20px; | |
@@ -534,14 +499,14 @@ li.topresult .search-result-image { | |
line-height: 130%; | |
} | |
-.results .related-searches a { | |
+.results .related-searches .search-result-item-link { | |
color: rgb(30, 163, 255); | |
font-size: 13px; | |
font-weight: bold; | |
line-height: 150%; | |
} | |
-.results .related-searches a:hover { | |
+.results .related-searches .search-result-item-link:hover { | |
background: none; | |
color: rgb(30, 163, 255); | |
} | |
@@ -683,7 +648,7 @@ li.topresult .search-result-image { | |
} | |
.view-grid .list-content li.topresult, | |
- .view-grid .list-content li.topresult a { | |
+ .view-grid .list-content li.topresult .search-result-item-link { | |
height: 516px; | |
width: 477px; | |
} | |
@@ -692,12 +657,12 @@ li.topresult .search-result-image { | |
width: 440px; | |
} | |
- .view-grid .list-content li.topresult figure { | |
+ .view-grid .list-content li.topresult .search-result-figure { | |
height: auto; | |
margin-bottom: 0; | |
} | |
- .results li.topresult a .label { | |
+ .results li.topresult .label { | |
left: 20px; | |
} | |
diff --git a/relux/templates/includes/section-label.html b/relux/templates/includes/section-label.html | |
index 406325b..f279643 100644 | |
--- a/relux/templates/includes/section-label.html | |
+++ b/relux/templates/includes/section-label.html | |
@@ -8,7 +8,7 @@ | |
{% elif label_texttype == "blog" and label_blogname %} | |
{{ label_texttype }}/{{ label_blogname|slugify|cut:"-" }} | |
{% else %} | |
- {% firstof label_blog label_section_name card_section_name ssts.section "home" %}/{{ label_subsection_name|section_display_name|slugify }} | |
+ {% firstof label_section_name card_section_name ssts.section "home" %}/{{ label_subsection_name }} | |
{% endif %}{% endspaceless %}/"> | |
{% spaceless %}{% if not label_section_name and not label_subsection_name %} | |
{{ card_section_name|capfirst }} | |
diff --git a/relux/templates/partials/search-result-items.html b/relux/templates/partials/search-result-items.html | |
index a9b0060..55eb425 100644 | |
--- a/relux/templates/partials/search-result-items.html | |
+++ b/relux/templates/partials/search-result-items.html | |
@@ -4,12 +4,27 @@ | |
{% for item in results %} | |
{% if item.photo.crops or item.attrs.videostill %} | |
<li class="{{item.content_type}} {% if forloop.first and page_num == 1 %}topresult{% endif %}"> | |
- <a href="{{item|content_url}}" data-ht="search_results_{{item.content_type}}_{{forloop.counter}}"> | |
- {% if item.ssts.section and item.photo.crops %} | |
- <a href="/{{item.ssts.section}}/" class="label {{item.ssts.section}} {% if forloop.counter <= 3 and page_num == 1 %}recommended{% endif %}">{{item.ssts.section|capfirst}}</a> | |
- {% endif %} | |
+ <a class="label {% if forloop.counter <= 3 and page_num == 1 %}recommended{% endif %} {% firstof item.ssts.section "home" %}" | |
+ href="/{% spaceless %} | |
+ {% if item.ssts.section and not item.ssts.subsection %} | |
+ {{ item.ssts.section }} | |
+ {% elif item.attrs.texttype == "blog" and item.attrs.sitename %} | |
+ {{ item.attrs.texttype }}/{{ item.attrs.sitename|slugify|cut:"-" }} | |
+ {% else %} | |
+ {% firstof item.ssts.section "home" %}/{{ item.ssts.subsection }} | |
+ {% endif %}{% endspaceless %}/"> | |
+ {% spaceless %} | |
+ {% if item.ssts.section and not item.ssts.subsection %} | |
+ {{ item.ssts.section|capfirst }} | |
+ {% elif item.attrs.texttype == "blog" and item.attrs.sitename %} | |
+ {{ item.attrs.sitename|capfirst }} | |
+ {% else %} | |
+ {{ item.ssts.subsection|section_display_name|capfirst }} | |
+ {% endif %}{% endspaceless %} | |
+ </a> | |
+ <a href="{{item|content_url}}" data-ht="search_results_{{item.content_type}}_{{forloop.counter}}" class="search-result-item-link"> | |
<div class="front"> | |
- <figure> | |
+ <figure class="search-result-figure"> | |
{% if item.content_type == 'video' %} | |
<div class="search-video"> | |
{% endif %} | |
@@ -25,12 +40,6 @@ | |
{% else %} | |
<img class="search-result-image" src="{{ item.video.attrs.videostill|pathify|resize:"200"|crop:"200x115" }}"/> | |
{% endif %} | |
- {% elif item.photo.crops.1_1 %} | |
- {% if forloop.first and page_num == 1 %} | |
- <img class="search-result-image" src="{{ item.photo.crops.1_1|pathify|resize:"440"|crop:"440x325" }}"/> | |
- {% else %} | |
- <img class="search-result-image" src="{{ item.photo.crops.1_1|pathify|resize:"200"|crop:"200x115" }}"/> | |
- {% endif %} | |
{% elif item.photo.crops.3_4 %} | |
{% if forloop.first and page_num == 1 %} | |
<img class="search-result-image" src="{{ item.photo.crops.3_4|pathify|resize:"440"|crop:"440x325" }}"/> | |
@@ -43,6 +52,12 @@ | |
{% else %} | |
<img class="search-result-image" src="{{ item.photo.crops.16_9|pathify|resize:"200"|crop:"200x115" }}"/> | |
{% endif %} | |
+ {% elif item.photo.crops.1_1 %} | |
+ {% if forloop.first and page_num == 1 %} | |
+ <img class="search-result-image" src="{{ item.photo.crops.1_1|pathify|resize:"440"|crop:"440x325" }}"/> | |
+ {% else %} | |
+ <img class="search-result-image" src="{{ item.photo.crops.1_1|pathify|resize:"200"|crop:"200x115" }}"/> | |
+ {% endif %} | |
{% elif item.attrs.thumbnailPath %} | |
{% if forloop.first and page_num == 1 %} | |
<img class="search-result-image" src="{{ item.attrs.thumbnailPath|pathify|resize:"440"|crop:"440x325" }}"/> | |
diff --git a/relux/templates/topics/elections-2012/default.html b/relux/templates/topics/elections-2012/default.html | |
index 5b8a955..231eb84 100644 | |
--- a/relux/templates/topics/elections-2012/default.html | |
+++ b/relux/templates/topics/elections-2012/default.html | |
@@ -183,9 +183,9 @@ <h2 class="date">SEPT 2-6</h2> | |
<div class="slide None active slide-{{ forloop.counter }}" data-href="{{ content|content_url }}"> | |
{% if base_page_type == "topic" %} | |
- {% include "includes/section-label.html" with card_section_name=section_name label_section_name=content.taxonomy.section label_subsection_name=content.taxonomy.subsection %} | |
- {% elif base_page_type == "blog" %} | |
- <b class="label None">{{ content.timestamp.updated|parse_date|date:"M d, Y" }}</b> | |
+ {% include "includes/section-label.html" with card_section_name=section_name label_section_name=content.taxonomy.section label_subsection_name=content.taxonomy.subsection label_texttype=content.attrs.texttype label_blogname=content.attrs.sitename %} | |
+ {% elif front_attrs.texttype == "blog index" %} | |
+ {% include "includes/section-label.html" with card_section_name=section_name label_section_name=content.taxonomy.section %} | |
{% endif %} | |
<div class="media"> | |
{% if content.photo.crops.16_9 %} | |
-- | |
1.7.10 | |
From d09f14091aed4a108dd16ea405a3c3bc40b31878 Mon Sep 17 00:00:00 2001 | |
From: Robert Huhn <[email protected]> | |
Date: Tue, 11 Dec 2012 10:00:30 -0500 | |
Subject: [PATCH 07/25] updated links | |
--- | |
relux/static/css/media-view.css | 16 ++++++++++++---- | |
relux/static/js/views/modules/coverview.js | 4 ++-- | |
relux/templates/media/default.html | 8 ++++---- | |
3 files changed, 18 insertions(+), 10 deletions(-) | |
diff --git a/relux/static/css/media-view.css b/relux/static/css/media-view.css | |
index e1d728f..85510f3 100644 | |
--- a/relux/static/css/media-view.css | |
+++ b/relux/static/css/media-view.css | |
@@ -637,7 +637,7 @@ Search | |
transform: rotateX(0deg); | |
} | |
-.grid-figure > .media-figure-meta > b.label { | |
+.grid-figure > .media-figure-meta > a.label { | |
display: block; | |
float: left; | |
left: 3px; | |
@@ -689,12 +689,20 @@ Search | |
margin: 0 2px; | |
padding: 0; | |
} | |
+.media-grid-list-meta .media-list-link, | |
+.media-grid-list-meta .media-list-link:visited{ | |
+ color:rgb(102, 102, 102); | |
+} | |
+.media-nav-link:visited, | |
+.media-nav-sub-link:visited{ | |
+ color:inherit; | |
+} | |
.media-grid-list-meta-li { | |
overflow: hidden; | |
text-overflow: ellipsis; | |
white-space: nowrap; | |
- width: 64px; | |
+ width: 6em; | |
} | |
.media-grid-list-meta-li.date{ | |
padding-left:18px; | |
@@ -771,7 +779,7 @@ Search | |
empty-cells:show; | |
} | |
-.cinematic-side-nav-ul b.label{ | |
+.cinematic-side-nav-ul a.label{ | |
position:relative; | |
left:0; | |
top:-2px; | |
@@ -1105,7 +1113,7 @@ Search | |
margin: 3px 8px; | |
} | |
-.media-view .gallery .header b.label { | |
+.media-view .gallery .header a.label { | |
position: inherit; | |
} | |
diff --git a/relux/static/js/views/modules/coverview.js b/relux/static/js/views/modules/coverview.js | |
index 1d5e0e5..7a34905 100644 | |
--- a/relux/static/js/views/modules/coverview.js | |
+++ b/relux/static/js/views/modules/coverview.js | |
@@ -62,8 +62,8 @@ function( | |
}, | |
palmSlide: function(e){ | |
- // let clicks of stories through | |
- if ($(e.target).hasClass('load-story')){ | |
+ // let clicks of stories and section labels through | |
+ if ($(e.target).hasClass('load-story') || $(e.target).hasClass('label')){ | |
return; | |
} | |
var screenX = e.screenX; | |
diff --git a/relux/templates/media/default.html b/relux/templates/media/default.html | |
index 21d2d2e..bc468a4 100644 | |
--- a/relux/templates/media/default.html | |
+++ b/relux/templates/media/default.html | |
@@ -110,7 +110,7 @@ <h1 class="media-grid-section-h1"> | |
<span class="play-btn-xl"></span> | |
{% endif %} | |
</span> | |
- | |
+ </a> | |
<div class="meta media-figure-meta"> | |
{% if item.taxonomy.section or item.taxonomy.subsection or item.ssts.section or item.ssts.subsection %} | |
<a href="/{% firstof item.ssts.section item.taxonomy.section "home" %}/{% if item.ssts.subsection or item.taxonomy.subsection%}{% filter section_display_name|slugify %}{% firstof item.ssts.subsection item.taxonomy.subsection %}{% endfilter %}/{% endif %}" | |
@@ -120,15 +120,15 @@ <h1 class="media-grid-section-h1"> | |
<span class="duration">{{ item.attrs.length }}</span> | |
{% endif %} | |
</div> | |
- </a> | |
- <figcaption class="grid-fig-capt">{{ item.headline }}</figcaption> | |
+ <a href="/media/cinematic/{{ item.content_type|slugify }}/{{ item.id|slugify }}/{{ item.headline|slugify }}/" data-ht="mediaview-grid{{ forloop.counter }}" class="media-list-link"> | |
+ <figcaption class="grid-fig-capt">{{ item.headline }}</figcaption> | |
</figure> | |
<ul class="meta type-{{ item.content_type }} media-grid-list-meta"> | |
<li class="date media-grid-list-meta-li">{{ item.timestamp.updated|parse_date|date:"M d, Y" }}</li> | |
{% if item.content_type == "gallery" and item.content.count %} | |
<li class="media media-grid-list-meta-li"><span class='gallery-icon'>{{ item.content.count }} media items</span></li> | |
{% endif %} | |
- </ul> | |
+ </ul> | |
</a> | |
</li> | |
{% endfor %} | |
-- | |
1.7.10 | |
From ece93e25b3eaf0ebcce51c773105cbd449748b54 Mon Sep 17 00:00:00 2001 | |
From: Robert Huhn <[email protected]> | |
Date: Tue, 11 Dec 2012 10:37:20 -0500 | |
Subject: [PATCH 08/25] updated labels | |
--- | |
relux/static/css/modules/search.css | 2 +- | |
relux/templates/includes/section-label.html | 2 +- | |
relux/templates/media/default.html | 8 ++------ | |
relux/templates/partials/search-result-items.html | 21 ++------------------- | |
4 files changed, 6 insertions(+), 27 deletions(-) | |
diff --git a/relux/static/css/modules/search.css b/relux/static/css/modules/search.css | |
index c6bc2ba..13342c9 100644 | |
--- a/relux/static/css/modules/search.css | |
+++ b/relux/static/css/modules/search.css | |
@@ -250,7 +250,7 @@ li.topresult .search-result-image { | |
display: none; | |
} | |
-.results li .label.recommended:after { | |
+.results li.recommended a.label:after { | |
background: transparent url('/static/images/modules/search/search-icons.png') no-repeat -76px -160px; | |
content: 'Recommended'; | |
padding-left: 23px; | |
diff --git a/relux/templates/includes/section-label.html b/relux/templates/includes/section-label.html | |
index f279643..a535aaa 100644 | |
--- a/relux/templates/includes/section-label.html | |
+++ b/relux/templates/includes/section-label.html | |
@@ -8,7 +8,7 @@ | |
{% elif label_texttype == "blog" and label_blogname %} | |
{{ label_texttype }}/{{ label_blogname|slugify|cut:"-" }} | |
{% else %} | |
- {% firstof label_section_name card_section_name ssts.section "home" %}/{{ label_subsection_name }} | |
+ {% firstof label_section_name card_section_name ssts.section "home" %}/{{ label_subsection_name|section_display_name|slugify }} | |
{% endif %}{% endspaceless %}/"> | |
{% spaceless %}{% if not label_section_name and not label_subsection_name %} | |
{{ card_section_name|capfirst }} | |
diff --git a/relux/templates/media/default.html b/relux/templates/media/default.html | |
index bc468a4..ccc868d 100644 | |
--- a/relux/templates/media/default.html | |
+++ b/relux/templates/media/default.html | |
@@ -87,11 +87,9 @@ <h1 class="media-grid-section-h1"> | |
{% endif %} | |
<span class="thumbnail"> | |
{% if item.video.attrs.videostill %} | |
- | |
<img src="{{ item.video.attrs.videostill|pathify|resize:"340"|crop:"0-0-340-190" }}" alt="{{ item.attrs.shortdescription }}" class="thumb-img" /> | |
{% elif item.photo.crops.16_9 %} | |
<img src="{{ item.photo.crops.16_9|pathify|resize:"340"|crop:"0-0-340-190" }}" alt="{% filter force_escape %}{% firstof item.photo.attrs.alternate|striptags item.photo.caption|striptags %}{% endfilter %}" class="thumb-img"/> | |
- | |
{% elif item.video.attrs.thumbnail %} | |
<img src="{{ item.video.attrs.thumbnail|pathify|resize:"340"|crop:"0-0-340-190" }}" alt="{{ item.attrs.shortdescription }}" class="thumb-img"/> | |
{% elif item.photo.crops.4_3 %} | |
@@ -112,10 +110,8 @@ <h1 class="media-grid-section-h1"> | |
</span> | |
</a> | |
<div class="meta media-figure-meta"> | |
- {% if item.taxonomy.section or item.taxonomy.subsection or item.ssts.section or item.ssts.subsection %} | |
- <a href="/{% firstof item.ssts.section item.taxonomy.section "home" %}/{% if item.ssts.subsection or item.taxonomy.subsection%}{% filter section_display_name|slugify %}{% firstof item.ssts.subsection item.taxonomy.subsection %}{% endfilter %}/{% endif %}" | |
- class="label {% firstof item.ssts.section item.taxonomy.section "home" %}">{% firstof item.ssts.subsection|section_display_name item.taxonomy.subsection|section_display_name item.ssts.section item.taxonomy.section "home" %}</a> | |
- {% endif %} | |
+ {% include "includes/section-label.html" with card_section_name=item.ssts.section label_section_name=item.taxonomy.section label_subsection_name=item.taxonomy.subsection label_texttype=item.attrs.texttype label_blogname=item.attrs.sitename %} | |
+ <span class="hidden">{{ item.attrs }}</span> | |
{% if item.content_type == "video" and item.attrs.length %} | |
<span class="duration">{{ item.attrs.length }}</span> | |
{% endif %} | |
diff --git a/relux/templates/partials/search-result-items.html b/relux/templates/partials/search-result-items.html | |
index 55eb425..49cd949 100644 | |
--- a/relux/templates/partials/search-result-items.html | |
+++ b/relux/templates/partials/search-result-items.html | |
@@ -3,25 +3,8 @@ | |
{% if next_page %} | |
{% for item in results %} | |
{% if item.photo.crops or item.attrs.videostill %} | |
- <li class="{{item.content_type}} {% if forloop.first and page_num == 1 %}topresult{% endif %}"> | |
- <a class="label {% if forloop.counter <= 3 and page_num == 1 %}recommended{% endif %} {% firstof item.ssts.section "home" %}" | |
- href="/{% spaceless %} | |
- {% if item.ssts.section and not item.ssts.subsection %} | |
- {{ item.ssts.section }} | |
- {% elif item.attrs.texttype == "blog" and item.attrs.sitename %} | |
- {{ item.attrs.texttype }}/{{ item.attrs.sitename|slugify|cut:"-" }} | |
- {% else %} | |
- {% firstof item.ssts.section "home" %}/{{ item.ssts.subsection }} | |
- {% endif %}{% endspaceless %}/"> | |
- {% spaceless %} | |
- {% if item.ssts.section and not item.ssts.subsection %} | |
- {{ item.ssts.section|capfirst }} | |
- {% elif item.attrs.texttype == "blog" and item.attrs.sitename %} | |
- {{ item.attrs.sitename|capfirst }} | |
- {% else %} | |
- {{ item.ssts.subsection|section_display_name|capfirst }} | |
- {% endif %}{% endspaceless %} | |
- </a> | |
+ <li class="{{item.content_type}} {% if forloop.first and page_num == 1 %}topresult{% endif %} {% if forloop.counter <= 3 and page_num == 1 %}recommended{% endif %}"> | |
+ {% include "includes/section-label.html" with card_section_name=item.ssts.section label_section_name=item.taxonomy.section label_subsection_name=item.taxonomy.subsection label_texttype=item.attrs.texttype label_blogname=item.attrs.sitename %} | |
<a href="{{item|content_url}}" data-ht="search_results_{{item.content_type}}_{{forloop.counter}}" class="search-result-item-link"> | |
<div class="front"> | |
<figure class="search-result-figure"> | |
-- | |
1.7.10 | |
From 14788b4c25a9e31d1700ec01c9585d550c8a8b67 Mon Sep 17 00:00:00 2001 | |
From: Robert Huhn <[email protected]> | |
Date: Tue, 11 Dec 2012 11:29:46 -0500 | |
Subject: [PATCH 09/25] Updated links in most popular to match section label | |
work | |
--- | |
relux/templates/includes/section-label.html | 8 ++++---- | |
relux/templates/modules/content-list/text.html | 2 +- | |
relux/templates/modules/more.html | 2 +- | |
relux/templates/partials/search-result-items.html | 1 + | |
4 files changed, 7 insertions(+), 6 deletions(-) | |
diff --git a/relux/templates/includes/section-label.html b/relux/templates/includes/section-label.html | |
index a535aaa..7d54f6e 100644 | |
--- a/relux/templates/includes/section-label.html | |
+++ b/relux/templates/includes/section-label.html | |
@@ -3,10 +3,10 @@ | |
{{ card_section_name }} | |
{% elif card_section_name == "home" or not label_subsection_name %} | |
{{ label_section_name }} | |
- {% elif ssts.section and not label_subsection_name %} | |
- {{ ssts.section }} | |
{% elif label_texttype == "blog" and label_blogname %} | |
{{ label_texttype }}/{{ label_blogname|slugify|cut:"-" }} | |
+ {% elif label_subsection_name == "sciencefair" or label_subsection_name == "columnist" %} | |
+ {{ label_section_name }} | |
{% else %} | |
{% firstof label_section_name card_section_name ssts.section "home" %}/{{ label_subsection_name|section_display_name|slugify }} | |
{% endif %}{% endspaceless %}/"> | |
@@ -14,10 +14,10 @@ | |
{{ card_section_name|capfirst }} | |
{% elif card_section_name == "home" or not label_subsection_name %} | |
{{ label_section_name|capfirst }} | |
- {% elif ssts.section and not label_subsection_name %} | |
- {{ ssts.section|capfirst }} | |
{% elif label_texttype == "blog" and label_blogname %} | |
{{ label_blogname|capfirst }} | |
+ {% elif label_subsection_name == "sciencefair" or label_subsection_name == "columnist" %} | |
+ {{ label_section_name }} | |
{% else %} | |
{{ label_subsection_name|section_display_name|capfirst }} | |
{% endif %}{% endspaceless %} | |
diff --git a/relux/templates/modules/content-list/text.html b/relux/templates/modules/content-list/text.html | |
index a62e5c9..23ee5fc 100644 | |
--- a/relux/templates/modules/content-list/text.html | |
+++ b/relux/templates/modules/content-list/text.html | |
@@ -48,7 +48,7 @@ | |
</div> | |
{% endif %} | |
<p class="headline"><a href="{{ object.links.html }}" data-ht="morefromusat{{ position }}"><strong>{{ object.headline|safe|truncatechars:70|initial_quotes|smartypants }}</strong></a></p> | |
- <p class="meta"><strong><a href="/{{ object.taxonomy.section|slugify }}/{% if object.taxonomy.subsection %}{{ object.taxonomy.subsection|slugify }}/{% endif %}" data-ht="morefromusat{{ position }}"> | |
+ <p class="meta"><strong><a href="/{{ object.taxonomy.section|slugify }}/{% if object.taxonomy.subsection %}{{ object.taxonomy.subsection|section_display_name|slugify }}/{% endif %}" data-ht="morefromusat{{ position }}"> | |
{% if module.attrs.show_source %}{% if object.source %}{{ object.source }}{% else %}USATODAY{% endif %}{% elif object.taxonomy.subsection != None %}{{ object.taxonomy.subsection|section_display_name|capfirst }}{% elif object.taxonomy.section != None %}{{ object.taxonomy.section|capfirst }}{% else %}USAToday{% endif %}</a></strong> <span class="time" data-date-time="{% if object.timestamp.updated %}{{ object.timestamp.updated }}{% else %}{{ object.timestamp.published }}{% endif %}"> | |
{% if object.timestamp.updated %} | |
{{ object.timestamp.updated|parse_date|timesince }} | |
diff --git a/relux/templates/modules/more.html b/relux/templates/modules/more.html | |
index cc15ae7..85dbc7a 100644 | |
--- a/relux/templates/modules/more.html | |
+++ b/relux/templates/modules/more.html | |
@@ -31,7 +31,7 @@ | |
{% if object.headline %} | |
<p class="headline"><a href="/"><strong>{{ object.headline }}</strong></a></p> | |
{% endif %} | |
- <p class="meta"><strong><a href="/">{{ object.taxonomy.subsection|section_display_name }}</a></strong> <span class="time" data-date-time="timestamp">{{ object.timestamp.updated }}</span></p> | |
+ <p class="meta"><strong><a href="/{% if object.taxonomy.section %}{{ object.taxonomy.section }}{% endif %}{% if object.taxonomy.subsection %}/{{ object.taxonomy.subsection|section_display_name|slugify }}{% endif %}/">{{ object.taxonomy.subsection|section_display_name }}</a></strong> <span class="time" data-date-time="timestamp">{{ object.timestamp.updated }}</span></p> | |
</li> | |
{% endfor %} | |
</ul> | |
diff --git a/relux/templates/partials/search-result-items.html b/relux/templates/partials/search-result-items.html | |
index 49cd949..1068815 100644 | |
--- a/relux/templates/partials/search-result-items.html | |
+++ b/relux/templates/partials/search-result-items.html | |
@@ -87,6 +87,7 @@ <h3 class="search-result-title-back">{{ item.headline }}</h3> | |
</li> | |
{% else %} | |
<li class="message"> | |
+ {% include "includes/section-label.html" with card_section_name=item.ssts.section label_section_name=item.taxonomy.section label_subsection_name=item.taxonomy.subsection label_texttype=item.attrs.texttype label_blogname=item.attrs.sitename %} | |
<a href="{{ item|content_url }}"> | |
<p class="meta"> | |
<span class="date-created">{{ item.timestamp.published|parse_date|date:"M j, Y" }}</span> | |
-- | |
1.7.10 | |
From 913c24ca82cec16530b488808cfd091f33558593 Mon Sep 17 00:00:00 2001 | |
From: Robert Huhn <[email protected]> | |
Date: Tue, 11 Dec 2012 13:56:33 -0500 | |
Subject: [PATCH 10/25] updates for labels | |
--- | |
relux/static/css/interactives/timeline.css | 1 + | |
relux/static/css/media-view.css | 8 +++--- | |
relux/static/css/modules/coverview.css | 2 +- | |
relux/static/css/reset-override.css | 27 ++++++++++++--------- | |
relux/templates/media/default.html | 2 +- | |
relux/templates/partials/search-result-items.html | 8 +++--- | |
relux/templates/search-index.html | 4 +-- | |
relux/templates/search-results.html | 2 +- | |
8 files changed, 30 insertions(+), 24 deletions(-) | |
diff --git a/relux/static/css/interactives/timeline.css b/relux/static/css/interactives/timeline.css | |
index c7b00c6..3b4333f 100644 | |
--- a/relux/static/css/interactives/timeline.css | |
+++ b/relux/static/css/interactives/timeline.css | |
@@ -37,6 +37,7 @@ | |
text-align: center; | |
position: absolute; | |
color: rgb(87,87,87); | |
+ background-color:inherit; | |
font-family: Arial, Helvetica, sans-serif; | |
font-weight: bold; | |
font-size: 13px; | |
diff --git a/relux/static/css/media-view.css b/relux/static/css/media-view.css | |
index 85510f3..929d087 100644 | |
--- a/relux/static/css/media-view.css | |
+++ b/relux/static/css/media-view.css | |
@@ -401,7 +401,7 @@ Search | |
} | |
-.media-filter-wrapper .label { | |
+.media-filter-wrapper .sort-label { | |
color: rgb(153,153,153); | |
font-size: 12px; | |
font-weight: bold; | |
@@ -637,7 +637,7 @@ Search | |
transform: rotateX(0deg); | |
} | |
-.grid-figure > .media-figure-meta > a.label { | |
+.grid-figure > .media-figure-meta > .label { | |
display: block; | |
float: left; | |
left: 3px; | |
@@ -779,7 +779,7 @@ Search | |
empty-cells:show; | |
} | |
-.cinematic-side-nav-ul a.label{ | |
+.cinematic-side-nav-ul .label{ | |
position:relative; | |
left:0; | |
top:-2px; | |
@@ -1113,7 +1113,7 @@ Search | |
margin: 3px 8px; | |
} | |
-.media-view .gallery .header a.label { | |
+.media-view .gallery .header .label { | |
position: inherit; | |
} | |
diff --git a/relux/static/css/modules/coverview.css b/relux/static/css/modules/coverview.css | |
index 7eaf221..ff045eb 100644 | |
--- a/relux/static/css/modules/coverview.css | |
+++ b/relux/static/css/modules/coverview.css | |
@@ -90,7 +90,7 @@ | |
position: absolute; | |
} | |
-#cover-view .text-wrap > a.label { | |
+#cover-view .text-wrap > .label { | |
position: static; | |
} | |
diff --git a/relux/static/css/reset-override.css b/relux/static/css/reset-override.css | |
index f74caa6..aa3bdfc 100644 | |
--- a/relux/static/css/reset-override.css | |
+++ b/relux/static/css/reset-override.css | |
@@ -128,8 +128,8 @@ p { | |
* Label - For section labels | |
* News is the default color | |
*/ | |
-b.label, | |
-a.label { | |
+ | |
+.label { | |
background-color: rgb(0,80,161); | |
color: rgb(255,255,255); | |
font-family: 'Futura Today Bold', arial, sans-serif; | |
@@ -144,39 +144,44 @@ a.label { | |
top: 20px; | |
z-index:40; | |
} | |
-.hero a.label{ | |
+.label:visited, | |
+.label:hover { | |
+ color: rgb(255,255,255); | |
+} | |
+ | |
+.hero .label{ | |
z-index: 54; /*needs to at least be 51 to sit on top of the pic in hero, needs 54 to be clickable on top of hero*/ | |
} | |
-a.label.news { | |
+.label.news { | |
background-color: rgb(0,155,255); | |
} | |
-a.label.sports { | |
+.label.sports { | |
background-color: rgb(235,30,0); | |
} | |
-a.label.life { | |
+.label.life { | |
background-color: rgb(150,0,180); | |
} | |
-a.label.money { | |
+.label.money { | |
background-color: rgb(0,165,60); | |
} | |
-a.label.tech { | |
+.label.tech { | |
background-color: rgb(250,95,0); | |
} | |
-a.label.travel { | |
+.label.travel { | |
background-color: rgb(0,195,195); | |
} | |
-a.label.weather { | |
+.label.weather { | |
background-color: rgb(255,192,0); | |
} | |
-a.label.opinion { | |
+.label.opinion { | |
background-color: rgb(102,102,102); | |
} | |
diff --git a/relux/templates/media/default.html b/relux/templates/media/default.html | |
index ccc868d..50da2e3 100644 | |
--- a/relux/templates/media/default.html | |
+++ b/relux/templates/media/default.html | |
@@ -54,7 +54,7 @@ <h3 class="most-popular media-sidenav-h3"> | |
{% if section_name or sub_section_name %} | |
{% if data.0.contents|length > 0 %} | |
<div class="dropdown"> | |
- <span class="label">Sort by:</span> | |
+ <span class="sort-label">Sort by:</span> | |
<div class="ui-dropdown ui-dark"> | |
<span class="ui-btn collapsed">{% if sort_type %}Latest{% else %}Popular{% endif %}</span> | |
<ul class="expanded"> | |
diff --git a/relux/templates/partials/search-result-items.html b/relux/templates/partials/search-result-items.html | |
index 1068815..11e56b1 100644 | |
--- a/relux/templates/partials/search-result-items.html | |
+++ b/relux/templates/partials/search-result-items.html | |
@@ -3,7 +3,7 @@ | |
{% if next_page %} | |
{% for item in results %} | |
{% if item.photo.crops or item.attrs.videostill %} | |
- <li class="{{item.content_type}} {% if forloop.first and page_num == 1 %}topresult{% endif %} {% if forloop.counter <= 3 and page_num == 1 %}recommended{% endif %}"> | |
+ <li class="{{item.content_type}} {% if forloop.first and page_num == 1 %}topresult{% endif %} {% if forloop.counter <= 3 and page_num == 1 %}recommended{% endif %} search-result-li"> | |
{% include "includes/section-label.html" with card_section_name=item.ssts.section label_section_name=item.taxonomy.section label_subsection_name=item.taxonomy.subsection label_texttype=item.attrs.texttype label_blogname=item.attrs.sitename %} | |
<a href="{{item|content_url}}" data-ht="search_results_{{item.content_type}}_{{forloop.counter}}" class="search-result-item-link"> | |
<div class="front"> | |
@@ -63,14 +63,14 @@ | |
<span class="date-created">{{ item.timestamp.published|parse_date|date:"M j, Y" }}</span> | |
</p> | |
{% endif %} | |
- <h3 class="{% if not item.photo.crops.4_3 and not item.video.attrs.videostill and not item.photo.crops.1_1 and not item.photo.crops.3_4 and not item.photo.crops.16_9 and not item.attrs.thumbnailPath and not item.video.attrs.thumbnail %}search-result-title-noimage{% else %}search-result-title{% endif %}">{{ item.headline }}</h3> | |
+ <h3 class="{% if not item.photo.crops.4_3 and not item.video.attrs.videostill and not item.photo.crops.1_1 and not item.photo.crops.3_4 and not item.photo.crops.16_9 and not item.attrs.thumbnailPath and not item.video.attrs.thumbnail %}search-result-title-noimage{% else %}search-result-title{% endif %} search-results-h3">{{ item.headline }}</h3> | |
{% if item.summary %} | |
<p class="text">{{ item.summary }}</p> | |
{% endif %} | |
<div class="clearleft"></div> | |
</div> | |
<div class="back"> | |
- <h3 class="search-result-title-back">{{ item.headline }}</h3> | |
+ <h3 class="search-result-title-back search-results-h3">{{ item.headline }}</h3> | |
{% if item.summary %} | |
<p class="text">{{ item.summary }}</p> | |
{% endif %} | |
@@ -92,7 +92,7 @@ <h3 class="search-result-title-back">{{ item.headline }}</h3> | |
<p class="meta"> | |
<span class="date-created">{{ item.timestamp.published|parse_date|date:"M j, Y" }}</span> | |
</p> | |
- <h3 class="search-result-title-noimage">{{ item.headline }}</h3> | |
+ <h3 class="search-result-title-noimage search-results-h3">{{ item.headline }}</h3> | |
<div class="clearleft"></div> | |
</a> | |
</li> | |
diff --git a/relux/templates/search-index.html b/relux/templates/search-index.html | |
index 4057e48..b8f93a9 100644 | |
--- a/relux/templates/search-index.html | |
+++ b/relux/templates/search-index.html | |
@@ -19,8 +19,8 @@ | |
{% if index %} | |
<div class="no-results"> | |
- <h3>Sorry! There are no results for your search term.</h3> | |
- <p>Please check the spelling of your search term, or try a different word or phrase.</p> | |
+ <h3 class="search-results-h3">Sorry! There are no results for your search term.</h3> | |
+ <p class="search-results-p">Please check the spelling of your search term, or try a different word or phrase.</p> | |
</div> | |
{% endif %} | |
diff --git a/relux/templates/search-results.html b/relux/templates/search-results.html | |
index d8c3957..8f8ff07 100644 | |
--- a/relux/templates/search-results.html | |
+++ b/relux/templates/search-results.html | |
@@ -35,7 +35,7 @@ | |
</div> | |
{% endif %} | |
- <ul class="clearfix"> | |
+ <ul class="clearfix search-results-ul"> | |
{% comment %} | |
<li class="topic"> | |
-- | |
1.7.10 | |
From 02fa283d3852eca97c91e00759468f2cb30f2050 Mon Sep 17 00:00:00 2001 | |
From: Robert Huhn <[email protected]> | |
Date: Wed, 12 Dec 2012 13:49:52 -0500 | |
Subject: [PATCH 11/25] updated code | |
--- | |
relux/templates/includes/section-label.html | 2 +- | |
1 file changed, 1 insertion(+), 1 deletion(-) | |
diff --git a/relux/templates/includes/section-label.html b/relux/templates/includes/section-label.html | |
index 7d54f6e..6c981cc 100644 | |
--- a/relux/templates/includes/section-label.html | |
+++ b/relux/templates/includes/section-label.html | |
@@ -4,7 +4,7 @@ | |
{% elif card_section_name == "home" or not label_subsection_name %} | |
{{ label_section_name }} | |
{% elif label_texttype == "blog" and label_blogname %} | |
- {{ label_texttype }}/{{ label_blogname|slugify|cut:"-" }} | |
+ blog/{{ label_blogname|slugify|cut:"-" }} | |
{% elif label_subsection_name == "sciencefair" or label_subsection_name == "columnist" %} | |
{{ label_section_name }} | |
{% else %} | |
-- | |
1.7.10 | |
From 9f961ff3ebff44aa400f12a7f30a13066d42254f Mon Sep 17 00:00:00 2001 | |
From: Robert Huhn <[email protected]> | |
Date: Mon, 17 Dec 2012 16:02:57 -0500 | |
Subject: [PATCH 12/25] updated label codes | |
--- | |
.gitignore | 1 + | |
relux/templates/fronts/coverview.html | 2 +- | |
relux/templates/includes/section-label.html | 48 +++++++++++--------- | |
relux/templates/media/default.html | 2 +- | |
relux/templates/modules/7-up-portrait.html | 2 +- | |
relux/templates/modules/headline-grid.html | 2 +- | |
relux/templates/modules/hero/1-up.html | 2 +- | |
relux/templates/modules/hero/2-up.html | 2 +- | |
relux/templates/modules/hero/3-up.html | 2 +- | |
.../templates/modules/hero/6-up-with-carousel.html | 2 +- | |
relux/templates/modules/hero/7-up-portrait.html | 2 +- | |
.../modules/hero/election-night-large-story.html | 2 +- | |
relux/templates/modules/hero/headline-pack.html | 2 +- | |
relux/templates/modules/hero/news-rotator.html | 2 +- | |
relux/templates/modules/sp-hero-2up.html | 2 +- | |
relux/templates/modules/sp-hero-3up.html | 2 +- | |
.../modules/stag-front/headline-grid.html | 2 +- | |
relux/templates/partials/search-result-items.html | 4 +- | |
relux/templates/stag-front.html | 2 +- | |
relux/templates/topics/elections-2012/default.html | 4 +- | |
20 files changed, 48 insertions(+), 41 deletions(-) | |
diff --git a/.gitignore b/.gitignore | |
index bf53ff7..e57acea 100644 | |
--- a/.gitignore | |
+++ b/.gitignore | |
@@ -10,6 +10,7 @@ activate* | |
dist | |
django-relux.iml | |
relux/static/crossdomain.xml | |
+relux/static/jsb/ | |
build/ | |
src/ | |
dist/ | |
diff --git a/relux/templates/fronts/coverview.html b/relux/templates/fronts/coverview.html | |
index 32d41ce..524c35b 100644 | |
--- a/relux/templates/fronts/coverview.html | |
+++ b/relux/templates/fronts/coverview.html | |
@@ -19,7 +19,7 @@ | |
{% endif %} | |
); background-attachment: scroll; background-position: 50% 40px;"></div> | |
<div class="text-wrap"> | |
- {% include "includes/section-label.html" with card_section_name=section_name label_section_name=object.taxonomy.section label_subsection_name=object.taxonomy.subsection label_texttype=object.attrs.texttype label_blogname=object.attrs.sitename %} | |
+ {% include "includes/section-label.html" with card_section_name=section_name label_item=object %} | |
<span class="date">{{object.timestamp.published|parse_date|date:"M d, Y"}}</span> | |
{% include "modules/hero/text.html" with object=object show_byline='False' %} | |
</div> | |
diff --git a/relux/templates/includes/section-label.html b/relux/templates/includes/section-label.html | |
index 6c981cc..9793096 100644 | |
--- a/relux/templates/includes/section-label.html | |
+++ b/relux/templates/includes/section-label.html | |
@@ -1,24 +1,30 @@ | |
-<a class="label {% firstof label_section_name card_section_name ssts.section "home" %}" | |
-href="/{% spaceless %}{% if not label_section_name and not label_subsection_name %} | |
- {{ card_section_name }} | |
- {% elif card_section_name == "home" or not label_subsection_name %} | |
- {{ label_section_name }} | |
- {% elif label_texttype == "blog" and label_blogname %} | |
- blog/{{ label_blogname|slugify|cut:"-" }} | |
- {% elif label_subsection_name == "sciencefair" or label_subsection_name == "columnist" %} | |
- {{ label_section_name }} | |
+{# now passes through the object as label_item #} | |
+ | |
+<a class="label {% firstof label_section_name card_section_name label_item.ssts.section label_item.taxonomy.section "home" %}" | |
+href="{% spaceless %}{% if not label_item.ssts.section and not label_item.ssts.subsection %} | |
+ /{{ card_section_name }}/ | |
+ {% elif card_section_name == "home" or not label_item.ssts.subsection %} | |
+ /{% firstof label_section_name label_item.ssts.section %}/ | |
+ {% elif label_item.parentlink %} | |
+ {{ label_item.parentlink.url }} | |
+ {% elif label_item.attrs.texttype == "blog" and label_item.attrs.sitename %} | |
+ /blog/{{ label_item.attrs.sitename|slugify|cut:"-" }}/ | |
+ {% elif label_item.ssts.subsection == "sciencefair" or label_item.ssts.subsection == "columnist" %} | |
+ /{{ label_item.ssts.section }}/ | |
{% else %} | |
- {% firstof label_section_name card_section_name ssts.section "home" %}/{{ label_subsection_name|section_display_name|slugify }} | |
- {% endif %}{% endspaceless %}/"> | |
- {% spaceless %}{% if not label_section_name and not label_subsection_name %} | |
- {{ card_section_name|capfirst }} | |
- {% elif card_section_name == "home" or not label_subsection_name %} | |
- {{ label_section_name|capfirst }} | |
- {% elif label_texttype == "blog" and label_blogname %} | |
- {{ label_blogname|capfirst }} | |
- {% elif label_subsection_name == "sciencefair" or label_subsection_name == "columnist" %} | |
- {{ label_section_name }} | |
+ /{% firstof label_section_name card_section_name ssts.section "home" %}/{{ label_item.ssts.subsection|section_display_name|slugify }}/ | |
+ {% endif %}{% endspaceless %}"> | |
+ {% spaceless %}{% filter capfirst %}{% if not label_item.ssts.section and not label_item.ssts.subsection %} | |
+ {{ card_section_name }} | |
+ {% elif card_section_name == "home" or not label_item.ssts.subsection %} | |
+ {% firstof label_section_name label_item.ssts.section %} | |
+ {% elif label_item.parentlink %} | |
+ {{ label_item.parentlink.display_name }} | |
+ {% elif label_item.attrs.texttype == "blog" and label_item.attrs.sitename %} | |
+ {{ label_item.attrs.sitename }} | |
+ {% elif label_item.ssts.subsection == "sciencefair" or label_item.ssts.subsection == "columnist" %} | |
+ {{ label_item.ssts.section }} | |
{% else %} | |
- {{ label_subsection_name|section_display_name|capfirst }} | |
- {% endif %}{% endspaceless %} | |
+ {{ label_item.ssts.subsection|section_display_name }} | |
+ {% endif %}{% endfilter %}{% endspaceless %} | |
</a> | |
\ No newline at end of file | |
diff --git a/relux/templates/media/default.html b/relux/templates/media/default.html | |
index 50da2e3..a017ff5 100644 | |
--- a/relux/templates/media/default.html | |
+++ b/relux/templates/media/default.html | |
@@ -110,7 +110,7 @@ <h1 class="media-grid-section-h1"> | |
</span> | |
</a> | |
<div class="meta media-figure-meta"> | |
- {% include "includes/section-label.html" with card_section_name=item.ssts.section label_section_name=item.taxonomy.section label_subsection_name=item.taxonomy.subsection label_texttype=item.attrs.texttype label_blogname=item.attrs.sitename %} | |
+ {% include "includes/section-label.html" with card_section_name=section_name label_item=item %} | |
<span class="hidden">{{ item.attrs }}</span> | |
{% if item.content_type == "video" and item.attrs.length %} | |
<span class="duration">{{ item.attrs.length }}</span> | |
diff --git a/relux/templates/modules/7-up-portrait.html b/relux/templates/modules/7-up-portrait.html | |
index d45a229..326bd8c 100644 | |
--- a/relux/templates/modules/7-up-portrait.html | |
+++ b/relux/templates/modules/7-up-portrait.html | |
@@ -4,7 +4,7 @@ | |
<div class="stage"> | |
{% with module.contents|first as object %} | |
<div class="slide {{ object.taxonomy.section }} {% if forloop.first %}active{% endif %} slide-{{ forloop.counter }}" data-href="{{ object.links.html }}"> | |
- {% include "includes/section-label.html" with card_section_name=section_name label_section_name=object.taxonomy.section label_subsection_name=object.taxonomy.subsection label_texttype=object.attrs.texttype label_blogname=object.attrs.sitename %} | |
+ {% include "includes/section-label.html" with card_section_name=section_name label_item=object %} | |
{% include "modules/hero/text.html" with object=object module=module %} | |
{% include "modules/hero/media.html" with object=object %} | |
</div> | |
diff --git a/relux/templates/modules/headline-grid.html b/relux/templates/modules/headline-grid.html | |
index 8e13674..ba67aad 100644 | |
--- a/relux/templates/modules/headline-grid.html | |
+++ b/relux/templates/modules/headline-grid.html | |
@@ -43,7 +43,7 @@ <h5 class="title">Headlines</h5> | |
{% endif %} | |
{#</a>#} | |
</div> | |
- {% include "includes/section-label.html" with card_section_name=section_name label_section_name=object.taxonomy.section label_subsection_name=object.taxonomy.subsection label_texttype=object.attrs.texttype label_blogname=object.attrs.sitename %} | |
+ {% include "includes/section-label.html" with card_section_name=section_name label_item=object %} | |
<a class="anchor" href="{{ object.links.html }}" data-ht="HeadlineGrid{{ forloop.counter }}"> | |
<div class="front tile"> | |
{% if object.photo.crops or object.video %} | |
diff --git a/relux/templates/modules/hero/1-up.html b/relux/templates/modules/hero/1-up.html | |
index 1aa9be0..5143ed2 100644 | |
--- a/relux/templates/modules/hero/1-up.html | |
+++ b/relux/templates/modules/hero/1-up.html | |
@@ -4,7 +4,7 @@ | |
<div class="stage" data-vr-zone="1up" > | |
{% for object in module.contents|cap:module.max_content_count %} | |
<div class="slide {{ object.taxonomy.section }} {% if forloop.first %}active{% endif %} slide-{{ forloop.counter }}" data-href="{{ object.links.html }}" data-vr-contentbox="" > | |
- {% include "includes/section-label.html" with card_section_name=section_name label_section_name=object.taxonomy.section label_subsection_name=object.taxonomy.subsection label_texttype=object.attrs.texttype label_blogname=object.attrs.sitename %} | |
+ {% include "includes/section-label.html" with card_section_name=section_name label_item=object %} | |
{% include "modules/hero/text.html" with object=object module=module %} | |
{% include "modules/hero/media.html" with object=object %} | |
</div> | |
diff --git a/relux/templates/modules/hero/2-up.html b/relux/templates/modules/hero/2-up.html | |
index 934f70f..e3e82af 100644 | |
--- a/relux/templates/modules/hero/2-up.html | |
+++ b/relux/templates/modules/hero/2-up.html | |
@@ -7,7 +7,7 @@ | |
<div class="stage"> | |
{% for object in module.contents|cap:module.max_content_count %} | |
<div class="slide {{ object.taxonomy.section }} {% if forloop.first %}active{% endif %} slide-{{ forloop.counter }}" data-href="{{ object.links.html }}"> | |
- {% include "includes/section-label.html" with card_section_name=section_name label_section_name=object.taxonomy.section label_subsection_name=object.taxonomy.subsection label_texttype=object.attrs.texttype label_blogname=object.attrs.sitename %} | |
+ {% include "includes/section-label.html" with card_section_name=section_name label_item=object %} | |
{% include "modules/hero/text.html" with object=object module=module %} | |
{% include "modules/hero/media.html" with object=object %} | |
</div> | |
diff --git a/relux/templates/modules/hero/3-up.html b/relux/templates/modules/hero/3-up.html | |
index 7313384..4e77be5 100644 | |
--- a/relux/templates/modules/hero/3-up.html | |
+++ b/relux/templates/modules/hero/3-up.html | |
@@ -4,7 +4,7 @@ | |
<div class="stage" data-vr-zone="3up"> | |
{% for object in module.contents|cap:module.max_content_count %} | |
<div class="slide {{ object.taxonomy.section }} {% if forloop.first %}active{% endif %} slide-{{ forloop.counter }}" data-href="{{ object.links.html }}" data-vr-contentbox="" > | |
- {% include "includes/section-label.html" with card_section_name=section_name label_section_name=object.taxonomy.section label_subsection_name=object.taxonomy.subsection label_texttype=object.attrs.texttype label_blogname=object.attrs.sitename %} | |
+ {% include "includes/section-label.html" with card_section_name=section_name label_item=object %} | |
{% include "modules/hero/text.html" with object=object module=module %} | |
{% include "modules/hero/media.html" with object=object %} | |
</div> | |
diff --git a/relux/templates/modules/hero/6-up-with-carousel.html b/relux/templates/modules/hero/6-up-with-carousel.html | |
index 342086c..1c2542e 100644 | |
--- a/relux/templates/modules/hero/6-up-with-carousel.html | |
+++ b/relux/templates/modules/hero/6-up-with-carousel.html | |
@@ -7,7 +7,7 @@ | |
<div class="stage" data-vr-zone="6-up-with-carousel"> | |
{% for object in module.contents|cap:module.max_content_count %} | |
<div class="slide {{ object.taxonomy.section }} {% if forloop.first %}active{% endif %} slide-{{ forloop.counter }}" data-href="{{ object.links.html }}" data-vr-contentbox=""> | |
- {% include "includes/section-label.html" with card_section_name=section_name label_section_name=object.taxonomy.section label_subsection_name=object.taxonomy.subsection label_texttype=object.attrs.texttype label_blogname=object.attrs.sitename %} | |
+ {% include "includes/section-label.html" with card_section_name=section_name label_item=object %} | |
{% include "modules/hero/text.html" with object=object module=module %} | |
{% include "modules/hero/media.html" with object=object %} | |
</div> | |
diff --git a/relux/templates/modules/hero/7-up-portrait.html b/relux/templates/modules/hero/7-up-portrait.html | |
index f305b82..c76d673 100644 | |
--- a/relux/templates/modules/hero/7-up-portrait.html | |
+++ b/relux/templates/modules/hero/7-up-portrait.html | |
@@ -4,7 +4,7 @@ | |
<div class="stage" data-vr-zone="6-up-protrait"> | |
{% with module.contents|first as object %} | |
<div class="slide {{ object.taxonomy.section }} {% if forloop.first %}active{% endif %} slide-{{ forloop.counter }}" data-href="{{ object.links.html }}" data-vr-contentbox=""> | |
- {% include "includes/section-label.html" with card_section_name=section_name label_section_name=object.taxonomy.section label_subsection_name=object.taxonomy.subsection label_texttype=object.attrs.texttype label_blogname=object.attrs.sitename %} | |
+ {% include "includes/section-label.html" with card_section_name=section_name label_item=object %} | |
{% include "modules/hero/text.html" with object=object module=module %} | |
{% include "modules/hero/media.html" with object=object %} | |
</div> | |
diff --git a/relux/templates/modules/hero/election-night-large-story.html b/relux/templates/modules/hero/election-night-large-story.html | |
index 82ab9c7..0125d6b 100644 | |
--- a/relux/templates/modules/hero/election-night-large-story.html | |
+++ b/relux/templates/modules/hero/election-night-large-story.html | |
@@ -4,7 +4,7 @@ | |
<div class="hero-left-pane {{ object.taxonomy.section }}"> | |
{% for object in module.contents|cap:module.max_content_count %} | |
<div class="slide {{ object.taxonomy.section }} {% if forloop.first %}active{% endif %} slide-{{ forloop.counter }}" data-href="{{ object.links.html }}"> | |
- {% include "includes/section-label.html" with card_section_name=section_name label_section_name=object.taxonomy.section label_subsection_name=object.taxonomy.subsection label_texttype=object.attrs.texttype label_blogname=object.attrs.sitename %} | |
+ {% include "includes/section-label.html" with card_section_name=section_name label_item=object %} | |
{% include "modules/hero/text.html" with object=object module=module %} | |
{% include "modules/hero/media.html" with object=object %} | |
</div> | |
diff --git a/relux/templates/modules/hero/headline-pack.html b/relux/templates/modules/hero/headline-pack.html | |
index 68d6e3c..84bd1e6 100644 | |
--- a/relux/templates/modules/hero/headline-pack.html | |
+++ b/relux/templates/modules/hero/headline-pack.html | |
@@ -5,7 +5,7 @@ | |
<div class="ui-placer" data-vr-zone="headline-pack"> | |
{% with module.contents|first as object %} | |
<div class="hero-left-pane {{ object.taxonomy.section }}" data-vr-contentbox="" > | |
- {% include "includes/section-label.html" with card_section_name=section_name label_section_name=object.taxonomy.section label_subsection_name=object.taxonomy.subsection label_texttype=object.attrs.texttype %} | |
+ {% include "includes/section-label.html" with card_section_name=section_name label_item=object %} | |
{% include "modules/hero/text.html" with object=object module=module %} | |
{% include "modules/hero/media.html" with object=object %} | |
</div> | |
diff --git a/relux/templates/modules/hero/news-rotator.html b/relux/templates/modules/hero/news-rotator.html | |
index 6d18fd7..fdc64ec 100644 | |
--- a/relux/templates/modules/hero/news-rotator.html | |
+++ b/relux/templates/modules/hero/news-rotator.html | |
@@ -4,7 +4,7 @@ | |
<div class="stage" data-vr-zone="News-Rotator"> | |
{% for object in module.contents|cap:module.max_content_count %} | |
<div class="slide {{ object.taxonomy.section }} {% if forloop.first %}active{% endif %} slide-{{ forloop.counter }}" data-href="{{ object.links.html }}"data-vr-contentbox=""> | |
- {% include "includes/section-label.html" with card_section_name=section_name label_section_name=object.taxonomy.section label_subsection_name=object.taxonomy.subsection label_texttype=object.attrs.texttype label_blogname=object.attrs.sitename %} | |
+ {% include "includes/section-label.html" with card_section_name=section_name label_item=object %} | |
{% include "modules/hero/text.html" with object=object module=module %} | |
{% include "modules/hero/media.html" with object=object %} | |
</div> | |
diff --git a/relux/templates/modules/sp-hero-2up.html b/relux/templates/modules/sp-hero-2up.html | |
index 7df43ef..1628045 100644 | |
--- a/relux/templates/modules/sp-hero-2up.html | |
+++ b/relux/templates/modules/sp-hero-2up.html | |
@@ -5,7 +5,7 @@ | |
<div class="stage" data-vr-zone="sp-hero-2up"> | |
{% for object in module.contents|cap:module.max_content_count %} | |
<div class="slide {{ object.taxonomy.section }} {% if forloop.first %}active{% endif %} slide-{{ forloop.counter }}" data-href="{{ object.links.html }}" data-vr-contentbox="" > | |
- {% include "includes/section-label.html" with card_section_name=section_name label_section_name=object.taxonomy.section label_subsection_name=object.taxonomy.subsection label_texttype=object.attrs.texttype label_blogname=object.attrs.sitename %} | |
+ {% include "includes/section-label.html" with card_section_name=section_name label_item=object %} | |
{% include "modules/hero/text.html" with object=object module=module %} | |
{% include "modules/hero/media.html" with object=object %} | |
</div> | |
diff --git a/relux/templates/modules/sp-hero-3up.html b/relux/templates/modules/sp-hero-3up.html | |
index 6592b1a..f19de41 100644 | |
--- a/relux/templates/modules/sp-hero-3up.html | |
+++ b/relux/templates/modules/sp-hero-3up.html | |
@@ -5,7 +5,7 @@ | |
<div class="stage" data-vr-zone="sp-hero-3up"> | |
{% for object in module.contents|cap:2 %} | |
<div class="slide {{ object.taxonomy.section }} {% if forloop.first %}active{% endif %} slide-{{ forloop.counter }}" data-href="{{ object.links.html }}" data-vr-contentbox="" > | |
- {% include "includes/section-label.html" with card_section_name=section_name label_section_name=object.taxonomy.section label_subsection_name=object.taxonomy.subsection label_texttype=object.attrs.texttype label_blogname=object.attrs.sitename %} | |
+ {% include "includes/section-label.html" with card_section_name=section_name label_item=object %} | |
{% if forloop.first %} | |
{% include "modules/hero/text.html" with object=object module=module %} | |
{% else %} | |
diff --git a/relux/templates/modules/stag-front/headline-grid.html b/relux/templates/modules/stag-front/headline-grid.html | |
index 933a5a4..a6742e9 100644 | |
--- a/relux/templates/modules/stag-front/headline-grid.html | |
+++ b/relux/templates/modules/stag-front/headline-grid.html | |
@@ -24,7 +24,7 @@ | |
{#</a>#} | |
</div> | |
{% if base_page_type == "topic" %} | |
- {% include "includes/section-label.html" with card_section_name=section_name label_section_name=content.taxonomy.section label_subsection_name=content.taxonomy.subsection label_texttype=content.attrs.texttype label_blogname=content.attrs.sitename %} | |
+ {% include "includes/section-label.html" with card_section_name=section_name label_item=content %} | |
{% elif front_attrs.texttype == "blog index" %} | |
{% include "includes/section-label.html" with card_section_name=section_name label_section_name=content.taxonomy.section %} | |
{% endif %} | |
diff --git a/relux/templates/partials/search-result-items.html b/relux/templates/partials/search-result-items.html | |
index 11e56b1..53e9661 100644 | |
--- a/relux/templates/partials/search-result-items.html | |
+++ b/relux/templates/partials/search-result-items.html | |
@@ -4,7 +4,7 @@ | |
{% for item in results %} | |
{% if item.photo.crops or item.attrs.videostill %} | |
<li class="{{item.content_type}} {% if forloop.first and page_num == 1 %}topresult{% endif %} {% if forloop.counter <= 3 and page_num == 1 %}recommended{% endif %} search-result-li"> | |
- {% include "includes/section-label.html" with card_section_name=item.ssts.section label_section_name=item.taxonomy.section label_subsection_name=item.taxonomy.subsection label_texttype=item.attrs.texttype label_blogname=item.attrs.sitename %} | |
+ {% include "includes/section-label.html" with card_section_name=section_name label_item=item %} | |
<a href="{{item|content_url}}" data-ht="search_results_{{item.content_type}}_{{forloop.counter}}" class="search-result-item-link"> | |
<div class="front"> | |
<figure class="search-result-figure"> | |
@@ -87,7 +87,7 @@ <h3 class="search-result-title-back search-results-h3">{{ item.headline }}</h3> | |
</li> | |
{% else %} | |
<li class="message"> | |
- {% include "includes/section-label.html" with card_section_name=item.ssts.section label_section_name=item.taxonomy.section label_subsection_name=item.taxonomy.subsection label_texttype=item.attrs.texttype label_blogname=item.attrs.sitename %} | |
+ {% include "includes/section-label.html" with card_section_name=section_name label_item=item %} | |
<a href="{{ item|content_url }}"> | |
<p class="meta"> | |
<span class="date-created">{{ item.timestamp.published|parse_date|date:"M j, Y" }}</span> | |
diff --git a/relux/templates/stag-front.html b/relux/templates/stag-front.html | |
index 8f5333c..6d7b74e 100644 | |
--- a/relux/templates/stag-front.html | |
+++ b/relux/templates/stag-front.html | |
@@ -39,7 +39,7 @@ | |
<div class="slide None active slide-{{ forloop.counter }}" data-href="{{ content|content_url }}"> | |
{% if base_page_type == "topic" %} | |
- {% include "includes/section-label.html" with card_section_name=section_name label_section_name=content.taxonomy.section label_subsection_name=content.taxonomy.subsection label_texttype=content.attrs.texttype label_blogname=content.attrs.sitename %} | |
+ {% include "includes/section-label.html" with card_section_name=section_name label_item=content %} | |
{% elif front_attrs.texttype == "blog index" %} | |
{% include "includes/section-label.html" with card_section_name=section_name label_section_name=content.taxonomy.section %} | |
{% endif %} | |
diff --git a/relux/templates/topics/elections-2012/default.html b/relux/templates/topics/elections-2012/default.html | |
index 55e5519..0a5d818 100644 | |
--- a/relux/templates/topics/elections-2012/default.html | |
+++ b/relux/templates/topics/elections-2012/default.html | |
@@ -183,9 +183,9 @@ <h2 class="date">SEPT 2-6</h2> | |
<div class="slide None active slide-{{ forloop.counter }}" data-href="{{ content|content_url }}"> | |
{% if base_page_type == "topic" %} | |
- {% include "includes/section-label.html" with card_section_name=section_name label_section_name=content.taxonomy.section label_subsection_name=content.taxonomy.subsection label_texttype=content.attrs.texttype label_blogname=content.attrs.sitename %} | |
+ {% include "includes/section-label.html" with card_section_name=section_name label_item=content %} | |
{% elif front_attrs.texttype == "blog index" %} | |
- {% include "includes/section-label.html" with card_section_name=section_name label_section_name=content.taxonomy.section %} | |
+ {% include "includes/section-label.html" with card_section_name=section_name label_section_name=content.ssts.section %} | |
{% endif %} | |
<div class="media"> | |
{% if content.photo.crops.16_9 %} | |
-- | |
1.7.10 | |
From 2b963991987f4b8ab2426cd65368ff77b9049107 Mon Sep 17 00:00:00 2001 | |
From: Robert Huhn <[email protected]> | |
Date: Tue, 18 Dec 2012 11:05:59 -0500 | |
Subject: [PATCH 13/25] updated logic to quit making everythign on the home | |
page default to the home blue | |
--- | |
relux/templates/includes/section-label.html | 3 ++- | |
1 file changed, 2 insertions(+), 1 deletion(-) | |
diff --git a/relux/templates/includes/section-label.html b/relux/templates/includes/section-label.html | |
index 9793096..0471326 100644 | |
--- a/relux/templates/includes/section-label.html | |
+++ b/relux/templates/includes/section-label.html | |
@@ -1,6 +1,6 @@ | |
{# now passes through the object as label_item #} | |
-<a class="label {% firstof label_section_name card_section_name label_item.ssts.section label_item.taxonomy.section "home" %}" | |
+<a class="label {% firstof label_item.ssts.section label_item.taxonomy.section "home" %}" | |
href="{% spaceless %}{% if not label_item.ssts.section and not label_item.ssts.subsection %} | |
/{{ card_section_name }}/ | |
{% elif card_section_name == "home" or not label_item.ssts.subsection %} | |
@@ -27,4 +27,5 @@ | |
{% else %} | |
{{ label_item.ssts.subsection|section_display_name }} | |
{% endif %}{% endfilter %}{% endspaceless %} | |
+ <span class="hidden">{{ label_item }}</span> | |
</a> | |
\ No newline at end of file | |
-- | |
1.7.10 | |
From 043df3c9f7aa0a149b6e02bec58dfbbce4081bdb Mon Sep 17 00:00:00 2001 | |
From: Robert Huhn <[email protected]> | |
Date: Tue, 18 Dec 2012 11:24:29 -0500 | |
Subject: [PATCH 14/25] updated section label code, now only passes through | |
the object, or if on a blog index, the section name | |
--- | |
relux/templates/fronts/coverview.html | 2 +- | |
relux/templates/includes/section-label.html | 17 +++++++---------- | |
relux/templates/media/default.html | 2 +- | |
relux/templates/modules/7-up-portrait.html | 2 +- | |
relux/templates/modules/headline-grid.html | 2 +- | |
relux/templates/modules/hero/1-up.html | 2 +- | |
relux/templates/modules/hero/2-up.html | 2 +- | |
relux/templates/modules/hero/3-up.html | 2 +- | |
relux/templates/modules/hero/6-up-with-carousel.html | 2 +- | |
relux/templates/modules/hero/7-up-portrait.html | 2 +- | |
.../modules/hero/election-night-large-story.html | 2 +- | |
relux/templates/modules/hero/headline-pack.html | 2 +- | |
relux/templates/modules/hero/news-rotator.html | 2 +- | |
relux/templates/modules/sp-hero-2up.html | 2 +- | |
relux/templates/modules/sp-hero-3up.html | 2 +- | |
relux/templates/modules/stag-front/headline-grid.html | 4 ++-- | |
relux/templates/stag-front.html | 4 ++-- | |
relux/templates/topics/elections-2012/default.html | 4 ++-- | |
18 files changed, 27 insertions(+), 30 deletions(-) | |
diff --git a/relux/templates/fronts/coverview.html b/relux/templates/fronts/coverview.html | |
index 524c35b..e6d60b0 100644 | |
--- a/relux/templates/fronts/coverview.html | |
+++ b/relux/templates/fronts/coverview.html | |
@@ -19,7 +19,7 @@ | |
{% endif %} | |
); background-attachment: scroll; background-position: 50% 40px;"></div> | |
<div class="text-wrap"> | |
- {% include "includes/section-label.html" with card_section_name=section_name label_item=object %} | |
+ {% include "includes/section-label.html" with label_item=object %} | |
<span class="date">{{object.timestamp.published|parse_date|date:"M d, Y"}}</span> | |
{% include "modules/hero/text.html" with object=object show_byline='False' %} | |
</div> | |
diff --git a/relux/templates/includes/section-label.html b/relux/templates/includes/section-label.html | |
index 0471326..2a38715 100644 | |
--- a/relux/templates/includes/section-label.html | |
+++ b/relux/templates/includes/section-label.html | |
@@ -1,31 +1,28 @@ | |
{# now passes through the object as label_item #} | |
-<a class="label {% firstof label_item.ssts.section label_item.taxonomy.section "home" %}" | |
+<a class="label {% firstof label_section_name label_item.ssts.section label_item.taxonomy.section "home" %}" | |
href="{% spaceless %}{% if not label_item.ssts.section and not label_item.ssts.subsection %} | |
/{{ card_section_name }}/ | |
- {% elif card_section_name == "home" or not label_item.ssts.subsection %} | |
- /{% firstof label_section_name label_item.ssts.section %}/ | |
+ {% elif label_section_name == "home" or not label_item.ssts.subsection %} | |
+ /{% firstof label_item.taxonomy.section label_item.ssts.section %}/ | |
{% elif label_item.parentlink %} | |
{{ label_item.parentlink.url }} | |
{% elif label_item.attrs.texttype == "blog" and label_item.attrs.sitename %} | |
/blog/{{ label_item.attrs.sitename|slugify|cut:"-" }}/ | |
- {% elif label_item.ssts.subsection == "sciencefair" or label_item.ssts.subsection == "columnist" %} | |
+ {% elif label_item.ssts.subsection == "sciencefair" or label_item.ssts.subsection == "columnist" or label_item.ssts.subsection == "enviroment" %} | |
/{{ label_item.ssts.section }}/ | |
{% else %} | |
- /{% firstof label_section_name card_section_name ssts.section "home" %}/{{ label_item.ssts.subsection|section_display_name|slugify }}/ | |
+ /{% firstof label_section_name label_item.ssts.section label_item.taxonomy.section %}/{{ label_item.ssts.subsection|section_display_name|slugify }}/ | |
{% endif %}{% endspaceless %}"> | |
{% spaceless %}{% filter capfirst %}{% if not label_item.ssts.section and not label_item.ssts.subsection %} | |
{{ card_section_name }} | |
- {% elif card_section_name == "home" or not label_item.ssts.subsection %} | |
- {% firstof label_section_name label_item.ssts.section %} | |
+ {% elif label_section_name == "home" or not label_item.ssts.subsection %} | |
+ {% firstof label_item.taxonomy.section label_item.ssts.section %} | |
{% elif label_item.parentlink %} | |
{{ label_item.parentlink.display_name }} | |
{% elif label_item.attrs.texttype == "blog" and label_item.attrs.sitename %} | |
{{ label_item.attrs.sitename }} | |
- {% elif label_item.ssts.subsection == "sciencefair" or label_item.ssts.subsection == "columnist" %} | |
- {{ label_item.ssts.section }} | |
{% else %} | |
{{ label_item.ssts.subsection|section_display_name }} | |
{% endif %}{% endfilter %}{% endspaceless %} | |
- <span class="hidden">{{ label_item }}</span> | |
</a> | |
\ No newline at end of file | |
diff --git a/relux/templates/media/default.html b/relux/templates/media/default.html | |
index a017ff5..35a47f8 100644 | |
--- a/relux/templates/media/default.html | |
+++ b/relux/templates/media/default.html | |
@@ -110,7 +110,7 @@ <h1 class="media-grid-section-h1"> | |
</span> | |
</a> | |
<div class="meta media-figure-meta"> | |
- {% include "includes/section-label.html" with card_section_name=section_name label_item=item %} | |
+ {% include "includes/section-label.html" with label_item=item %} | |
<span class="hidden">{{ item.attrs }}</span> | |
{% if item.content_type == "video" and item.attrs.length %} | |
<span class="duration">{{ item.attrs.length }}</span> | |
diff --git a/relux/templates/modules/7-up-portrait.html b/relux/templates/modules/7-up-portrait.html | |
index 326bd8c..b6c3d8b 100644 | |
--- a/relux/templates/modules/7-up-portrait.html | |
+++ b/relux/templates/modules/7-up-portrait.html | |
@@ -4,7 +4,7 @@ | |
<div class="stage"> | |
{% with module.contents|first as object %} | |
<div class="slide {{ object.taxonomy.section }} {% if forloop.first %}active{% endif %} slide-{{ forloop.counter }}" data-href="{{ object.links.html }}"> | |
- {% include "includes/section-label.html" with card_section_name=section_name label_item=object %} | |
+ {% include "includes/section-label.html" with label_item=object %} | |
{% include "modules/hero/text.html" with object=object module=module %} | |
{% include "modules/hero/media.html" with object=object %} | |
</div> | |
diff --git a/relux/templates/modules/headline-grid.html b/relux/templates/modules/headline-grid.html | |
index ba67aad..c949de2 100644 | |
--- a/relux/templates/modules/headline-grid.html | |
+++ b/relux/templates/modules/headline-grid.html | |
@@ -43,7 +43,7 @@ <h5 class="title">Headlines</h5> | |
{% endif %} | |
{#</a>#} | |
</div> | |
- {% include "includes/section-label.html" with card_section_name=section_name label_item=object %} | |
+ {% include "includes/section-label.html" with label_item=object %} | |
<a class="anchor" href="{{ object.links.html }}" data-ht="HeadlineGrid{{ forloop.counter }}"> | |
<div class="front tile"> | |
{% if object.photo.crops or object.video %} | |
diff --git a/relux/templates/modules/hero/1-up.html b/relux/templates/modules/hero/1-up.html | |
index 5143ed2..c892366 100644 | |
--- a/relux/templates/modules/hero/1-up.html | |
+++ b/relux/templates/modules/hero/1-up.html | |
@@ -4,7 +4,7 @@ | |
<div class="stage" data-vr-zone="1up" > | |
{% for object in module.contents|cap:module.max_content_count %} | |
<div class="slide {{ object.taxonomy.section }} {% if forloop.first %}active{% endif %} slide-{{ forloop.counter }}" data-href="{{ object.links.html }}" data-vr-contentbox="" > | |
- {% include "includes/section-label.html" with card_section_name=section_name label_item=object %} | |
+ {% include "includes/section-label.html" with label_item=object %} | |
{% include "modules/hero/text.html" with object=object module=module %} | |
{% include "modules/hero/media.html" with object=object %} | |
</div> | |
diff --git a/relux/templates/modules/hero/2-up.html b/relux/templates/modules/hero/2-up.html | |
index e3e82af..156b94b 100644 | |
--- a/relux/templates/modules/hero/2-up.html | |
+++ b/relux/templates/modules/hero/2-up.html | |
@@ -7,7 +7,7 @@ | |
<div class="stage"> | |
{% for object in module.contents|cap:module.max_content_count %} | |
<div class="slide {{ object.taxonomy.section }} {% if forloop.first %}active{% endif %} slide-{{ forloop.counter }}" data-href="{{ object.links.html }}"> | |
- {% include "includes/section-label.html" with card_section_name=section_name label_item=object %} | |
+ {% include "includes/section-label.html" with label_item=object %} | |
{% include "modules/hero/text.html" with object=object module=module %} | |
{% include "modules/hero/media.html" with object=object %} | |
</div> | |
diff --git a/relux/templates/modules/hero/3-up.html b/relux/templates/modules/hero/3-up.html | |
index 4e77be5..8c2fc7e 100644 | |
--- a/relux/templates/modules/hero/3-up.html | |
+++ b/relux/templates/modules/hero/3-up.html | |
@@ -4,7 +4,7 @@ | |
<div class="stage" data-vr-zone="3up"> | |
{% for object in module.contents|cap:module.max_content_count %} | |
<div class="slide {{ object.taxonomy.section }} {% if forloop.first %}active{% endif %} slide-{{ forloop.counter }}" data-href="{{ object.links.html }}" data-vr-contentbox="" > | |
- {% include "includes/section-label.html" with card_section_name=section_name label_item=object %} | |
+ {% include "includes/section-label.html" with label_item=object %} | |
{% include "modules/hero/text.html" with object=object module=module %} | |
{% include "modules/hero/media.html" with object=object %} | |
</div> | |
diff --git a/relux/templates/modules/hero/6-up-with-carousel.html b/relux/templates/modules/hero/6-up-with-carousel.html | |
index 1c2542e..0577fa4 100644 | |
--- a/relux/templates/modules/hero/6-up-with-carousel.html | |
+++ b/relux/templates/modules/hero/6-up-with-carousel.html | |
@@ -7,7 +7,7 @@ | |
<div class="stage" data-vr-zone="6-up-with-carousel"> | |
{% for object in module.contents|cap:module.max_content_count %} | |
<div class="slide {{ object.taxonomy.section }} {% if forloop.first %}active{% endif %} slide-{{ forloop.counter }}" data-href="{{ object.links.html }}" data-vr-contentbox=""> | |
- {% include "includes/section-label.html" with card_section_name=section_name label_item=object %} | |
+ {% include "includes/section-label.html" with label_item=object %} | |
{% include "modules/hero/text.html" with object=object module=module %} | |
{% include "modules/hero/media.html" with object=object %} | |
</div> | |
diff --git a/relux/templates/modules/hero/7-up-portrait.html b/relux/templates/modules/hero/7-up-portrait.html | |
index c76d673..5bf5fae 100644 | |
--- a/relux/templates/modules/hero/7-up-portrait.html | |
+++ b/relux/templates/modules/hero/7-up-portrait.html | |
@@ -4,7 +4,7 @@ | |
<div class="stage" data-vr-zone="6-up-protrait"> | |
{% with module.contents|first as object %} | |
<div class="slide {{ object.taxonomy.section }} {% if forloop.first %}active{% endif %} slide-{{ forloop.counter }}" data-href="{{ object.links.html }}" data-vr-contentbox=""> | |
- {% include "includes/section-label.html" with card_section_name=section_name label_item=object %} | |
+ {% include "includes/section-label.html" with label_item=object %} | |
{% include "modules/hero/text.html" with object=object module=module %} | |
{% include "modules/hero/media.html" with object=object %} | |
</div> | |
diff --git a/relux/templates/modules/hero/election-night-large-story.html b/relux/templates/modules/hero/election-night-large-story.html | |
index 0125d6b..4d4366e 100644 | |
--- a/relux/templates/modules/hero/election-night-large-story.html | |
+++ b/relux/templates/modules/hero/election-night-large-story.html | |
@@ -4,7 +4,7 @@ | |
<div class="hero-left-pane {{ object.taxonomy.section }}"> | |
{% for object in module.contents|cap:module.max_content_count %} | |
<div class="slide {{ object.taxonomy.section }} {% if forloop.first %}active{% endif %} slide-{{ forloop.counter }}" data-href="{{ object.links.html }}"> | |
- {% include "includes/section-label.html" with card_section_name=section_name label_item=object %} | |
+ {% include "includes/section-label.html" with label_item=object %} | |
{% include "modules/hero/text.html" with object=object module=module %} | |
{% include "modules/hero/media.html" with object=object %} | |
</div> | |
diff --git a/relux/templates/modules/hero/headline-pack.html b/relux/templates/modules/hero/headline-pack.html | |
index 84bd1e6..5ffc214 100644 | |
--- a/relux/templates/modules/hero/headline-pack.html | |
+++ b/relux/templates/modules/hero/headline-pack.html | |
@@ -5,7 +5,7 @@ | |
<div class="ui-placer" data-vr-zone="headline-pack"> | |
{% with module.contents|first as object %} | |
<div class="hero-left-pane {{ object.taxonomy.section }}" data-vr-contentbox="" > | |
- {% include "includes/section-label.html" with card_section_name=section_name label_item=object %} | |
+ {% include "includes/section-label.html" with label_item=object %} | |
{% include "modules/hero/text.html" with object=object module=module %} | |
{% include "modules/hero/media.html" with object=object %} | |
</div> | |
diff --git a/relux/templates/modules/hero/news-rotator.html b/relux/templates/modules/hero/news-rotator.html | |
index fdc64ec..9bca139 100644 | |
--- a/relux/templates/modules/hero/news-rotator.html | |
+++ b/relux/templates/modules/hero/news-rotator.html | |
@@ -4,7 +4,7 @@ | |
<div class="stage" data-vr-zone="News-Rotator"> | |
{% for object in module.contents|cap:module.max_content_count %} | |
<div class="slide {{ object.taxonomy.section }} {% if forloop.first %}active{% endif %} slide-{{ forloop.counter }}" data-href="{{ object.links.html }}"data-vr-contentbox=""> | |
- {% include "includes/section-label.html" with card_section_name=section_name label_item=object %} | |
+ {% include "includes/section-label.html" with label_item=object %} | |
{% include "modules/hero/text.html" with object=object module=module %} | |
{% include "modules/hero/media.html" with object=object %} | |
</div> | |
diff --git a/relux/templates/modules/sp-hero-2up.html b/relux/templates/modules/sp-hero-2up.html | |
index 1628045..abacf37 100644 | |
--- a/relux/templates/modules/sp-hero-2up.html | |
+++ b/relux/templates/modules/sp-hero-2up.html | |
@@ -5,7 +5,7 @@ | |
<div class="stage" data-vr-zone="sp-hero-2up"> | |
{% for object in module.contents|cap:module.max_content_count %} | |
<div class="slide {{ object.taxonomy.section }} {% if forloop.first %}active{% endif %} slide-{{ forloop.counter }}" data-href="{{ object.links.html }}" data-vr-contentbox="" > | |
- {% include "includes/section-label.html" with card_section_name=section_name label_item=object %} | |
+ {% include "includes/section-label.html" with label_item=object %} | |
{% include "modules/hero/text.html" with object=object module=module %} | |
{% include "modules/hero/media.html" with object=object %} | |
</div> | |
diff --git a/relux/templates/modules/sp-hero-3up.html b/relux/templates/modules/sp-hero-3up.html | |
index f19de41..7830a30 100644 | |
--- a/relux/templates/modules/sp-hero-3up.html | |
+++ b/relux/templates/modules/sp-hero-3up.html | |
@@ -5,7 +5,7 @@ | |
<div class="stage" data-vr-zone="sp-hero-3up"> | |
{% for object in module.contents|cap:2 %} | |
<div class="slide {{ object.taxonomy.section }} {% if forloop.first %}active{% endif %} slide-{{ forloop.counter }}" data-href="{{ object.links.html }}" data-vr-contentbox="" > | |
- {% include "includes/section-label.html" with card_section_name=section_name label_item=object %} | |
+ {% include "includes/section-label.html" with label_item=object %} | |
{% if forloop.first %} | |
{% include "modules/hero/text.html" with object=object module=module %} | |
{% else %} | |
diff --git a/relux/templates/modules/stag-front/headline-grid.html b/relux/templates/modules/stag-front/headline-grid.html | |
index a6742e9..dffe48d 100644 | |
--- a/relux/templates/modules/stag-front/headline-grid.html | |
+++ b/relux/templates/modules/stag-front/headline-grid.html | |
@@ -24,9 +24,9 @@ | |
{#</a>#} | |
</div> | |
{% if base_page_type == "topic" %} | |
- {% include "includes/section-label.html" with card_section_name=section_name label_item=content %} | |
+ {% include "includes/section-label.html" with label_item=content %} | |
{% elif front_attrs.texttype == "blog index" %} | |
- {% include "includes/section-label.html" with card_section_name=section_name label_section_name=content.taxonomy.section %} | |
+ {% include "includes/section-label.html" with label_section_name=content.ssts.section %} | |
{% endif %} | |
<a class="anchor" href="{{ content|content_url }}"> | |
diff --git a/relux/templates/stag-front.html b/relux/templates/stag-front.html | |
index 6d7b74e..7e85f4c 100644 | |
--- a/relux/templates/stag-front.html | |
+++ b/relux/templates/stag-front.html | |
@@ -39,9 +39,9 @@ | |
<div class="slide None active slide-{{ forloop.counter }}" data-href="{{ content|content_url }}"> | |
{% if base_page_type == "topic" %} | |
- {% include "includes/section-label.html" with card_section_name=section_name label_item=content %} | |
+ {% include "includes/section-label.html" with label_item=content %} | |
{% elif front_attrs.texttype == "blog index" %} | |
- {% include "includes/section-label.html" with card_section_name=section_name label_section_name=content.taxonomy.section %} | |
+ {% include "includes/section-label.html" with label_section_name=content.ssts.section %} | |
{% endif %} | |
<div class="media"> | |
{% if content.photo.crops.16_9 or content.attrs.videostill %} | |
diff --git a/relux/templates/topics/elections-2012/default.html b/relux/templates/topics/elections-2012/default.html | |
index 0a5d818..f6f801b 100644 | |
--- a/relux/templates/topics/elections-2012/default.html | |
+++ b/relux/templates/topics/elections-2012/default.html | |
@@ -183,9 +183,9 @@ <h2 class="date">SEPT 2-6</h2> | |
<div class="slide None active slide-{{ forloop.counter }}" data-href="{{ content|content_url }}"> | |
{% if base_page_type == "topic" %} | |
- {% include "includes/section-label.html" with card_section_name=section_name label_item=content %} | |
+ {% include "includes/section-label.html" with label_item=content %} | |
{% elif front_attrs.texttype == "blog index" %} | |
- {% include "includes/section-label.html" with card_section_name=section_name label_section_name=content.ssts.section %} | |
+ {% include "includes/section-label.html" with label_section_name=content.ssts.section %} | |
{% endif %} | |
<div class="media"> | |
{% if content.photo.crops.16_9 %} | |
-- | |
1.7.10 | |
From af2d5c5134868d49a7d3c48d64835dea81a0710a Mon Sep 17 00:00:00 2001 | |
From: Robert Huhn <[email protected]> | |
Date: Tue, 18 Dec 2012 12:21:30 -0500 | |
Subject: [PATCH 15/25] updated section labels, made blog index twitter use | |
section | |
--- | |
blogs/views.py | 5 +++++ | |
relux/static/js/views/modules/twitter.js | 5 +++-- | |
relux/templates/includes/section-label.html | 8 ++++---- | |
relux/templates/modules/twitter-client-side.html | 2 +- | |
relux/templates/stag-front.html | 2 ++ | |
relux/templates/topics/elections-2012/default.html | 4 +++- | |
6 files changed, 18 insertions(+), 8 deletions(-) | |
diff --git a/blogs/views.py b/blogs/views.py | |
index 3a6fda5..87da48f 100644 | |
--- a/blogs/views.py | |
+++ b/blogs/views.py | |
@@ -25,6 +25,10 @@ def blog(request, blog_name, format="html"): | |
ssts = utils.get_nested(front_attrs, "ssts", default="") \ | |
if len(data) > 0 else "" | |
+ ssts_split = ssts.split('/') | |
+ | |
+ section = ssts_split[0] | |
+ | |
videoincluded="no" | |
# extract the video from the first module | |
if len(data) > 0: | |
@@ -47,6 +51,7 @@ def blog(request, blog_name, format="html"): | |
u"front_attrs": front_attrs, | |
u'next_page_num': 2, | |
u'ssts': ssts, | |
+ u'section': section, | |
u"metadata" : metadata | |
} | |
diff --git a/relux/static/js/views/modules/twitter.js b/relux/static/js/views/modules/twitter.js | |
index 98142b7..fcad8e4 100644 | |
--- a/relux/static/js/views/modules/twitter.js | |
+++ b/relux/static/js/views/modules/twitter.js | |
@@ -57,10 +57,11 @@ function( | |
// Check if the JSON user attr is there otherwise use current section feed. | |
var userID = this.twitter_el.attr('data-user-id'); | |
- | |
+ var default_account = this.twitter_el.attr('data-section-id'); | |
+ console.log(default_account); | |
// Logic and fallbacks for twitter user, will try json user, than section, than USAToday users. | |
if (!userID) { | |
- userID = this.options.default_account || 'USAToday'; | |
+ userID = default_account || 'USAToday'; | |
} | |
this.loadTweets(userID, this.options.num_tweets, this.createTweetsHTML); | |
diff --git a/relux/templates/includes/section-label.html b/relux/templates/includes/section-label.html | |
index 2a38715..7a75368 100644 | |
--- a/relux/templates/includes/section-label.html | |
+++ b/relux/templates/includes/section-label.html | |
@@ -1,8 +1,8 @@ | |
{# now passes through the object as label_item #} | |
<a class="label {% firstof label_section_name label_item.ssts.section label_item.taxonomy.section "home" %}" | |
-href="{% spaceless %}{% if not label_item.ssts.section and not label_item.ssts.subsection %} | |
- /{{ card_section_name }}/ | |
+href="{% spaceless %}{% if not label_item %} | |
+ /{{ label_section_name }}/ | |
{% elif label_section_name == "home" or not label_item.ssts.subsection %} | |
/{% firstof label_item.taxonomy.section label_item.ssts.section %}/ | |
{% elif label_item.parentlink %} | |
@@ -14,8 +14,8 @@ | |
{% else %} | |
/{% firstof label_section_name label_item.ssts.section label_item.taxonomy.section %}/{{ label_item.ssts.subsection|section_display_name|slugify }}/ | |
{% endif %}{% endspaceless %}"> | |
- {% spaceless %}{% filter capfirst %}{% if not label_item.ssts.section and not label_item.ssts.subsection %} | |
- {{ card_section_name }} | |
+ {% spaceless %}{% filter capfirst %}{% if not label_item %} | |
+ {{ label_section_name }} | |
{% elif label_section_name == "home" or not label_item.ssts.subsection %} | |
{% firstof label_item.taxonomy.section label_item.ssts.section %} | |
{% elif label_item.parentlink %} | |
diff --git a/relux/templates/modules/twitter-client-side.html b/relux/templates/modules/twitter-client-side.html | |
index c57ed11..c22083d 100644 | |
--- a/relux/templates/modules/twitter-client-side.html | |
+++ b/relux/templates/modules/twitter-client-side.html | |
@@ -1,6 +1,6 @@ | |
<div class="mod clst twitter"> | |
<h2 class="twitter">From Twitter</h2> | |
- <ul class="split-two clearfix tweet-list" data-user-id="{{ module.front_attrs.twitter_handle }}" data-section-id="USATODAY{{ section_name }}" data-vr-zone="twitter-client" ></ul> | |
+ <ul class="split-two clearfix tweet-list" data-user-id="{{ module.front_attrs.twitter_handle }}" data-section-id="USATODAY{% firstof section_name section %} " data-vr-zone="twitter-client" ></ul> | |
<script type="text/template" id="tweet-list-template"> | |
<% _.each(data, function(item) { %> | |
<li data-vr-contentbox="" > | |
diff --git a/relux/templates/stag-front.html b/relux/templates/stag-front.html | |
index 7e85f4c..dec0d2e 100644 | |
--- a/relux/templates/stag-front.html | |
+++ b/relux/templates/stag-front.html | |
@@ -46,7 +46,9 @@ | |
<div class="media"> | |
{% if content.photo.crops.16_9 or content.attrs.videostill %} | |
{% if forloop.first %} | |
+ <a class="load-story" href="{{ content|content_url }}"> | |
<img src="{% firstof content.photo.crops.16_9|pathify|resize:'722'|crop:'720x400' content.attrs.videostill|pathify|resize:'722'|crop:'720x400' %}" alt="{{ content.photo.caption }}" width="720px" height="400px" /> | |
+ </a> | |
{% else %} | |
<a class="load-story" href="{{ content|content_url }}"> | |
<img src="{% firstof content.photo.crops.16_9|pathify|resize:'x113'|crop:'200x113' content.attrs.videostill|pathify|resize:'x113'|crop:'200x113' %}" alt="{{ content.photo.caption }}" width="200px" height="113px"/> | |
diff --git a/relux/templates/topics/elections-2012/default.html b/relux/templates/topics/elections-2012/default.html | |
index f6f801b..1ecf056 100644 | |
--- a/relux/templates/topics/elections-2012/default.html | |
+++ b/relux/templates/topics/elections-2012/default.html | |
@@ -190,7 +190,9 @@ <h2 class="date">SEPT 2-6</h2> | |
<div class="media"> | |
{% if content.photo.crops.16_9 %} | |
{% if forloop.first %} | |
- <img src="{{ content.photo.crops.16_9|pathify|resize:'722'|crop:'720x400' }}" alt="{{ content.photo.caption }}" width="720px" height="400px" /> | |
+ <a class="load-story" href="{{ content|content_url }}"> | |
+ <img src="{{ content.photo.crops.16_9|pathify|resize:'722'|crop:'720x400' }}" alt="{{ content.photo.caption }}" width="720px" height="400px" /> | |
+ </a> | |
{% else %} | |
<a class="load-story" href="{{ content|content_url }}"> | |
<img src="{{ content.photo.crops.16_9|pathify|resize:'x113'|crop:'200x113' }}" alt="{{ content.photo.caption }}" width="200px" height="113px"/> | |
-- | |
1.7.10 | |
From 56c770ca615fdd4943be67421f9d50bb8f5573ca Mon Sep 17 00:00:00 2001 | |
From: Robert Huhn <[email protected]> | |
Date: Tue, 18 Dec 2012 12:44:00 -0500 | |
Subject: [PATCH 16/25] updated to undo change for seperate branch | |
--- | |
blogs/views.py | 5 ----- | |
relux/static/js/views/modules/twitter.js | 5 ++--- | |
relux/templates/modules/twitter-client-side.html | 2 +- | |
3 files changed, 3 insertions(+), 9 deletions(-) | |
diff --git a/blogs/views.py b/blogs/views.py | |
index 87da48f..3a6fda5 100644 | |
--- a/blogs/views.py | |
+++ b/blogs/views.py | |
@@ -25,10 +25,6 @@ def blog(request, blog_name, format="html"): | |
ssts = utils.get_nested(front_attrs, "ssts", default="") \ | |
if len(data) > 0 else "" | |
- ssts_split = ssts.split('/') | |
- | |
- section = ssts_split[0] | |
- | |
videoincluded="no" | |
# extract the video from the first module | |
if len(data) > 0: | |
@@ -51,7 +47,6 @@ def blog(request, blog_name, format="html"): | |
u"front_attrs": front_attrs, | |
u'next_page_num': 2, | |
u'ssts': ssts, | |
- u'section': section, | |
u"metadata" : metadata | |
} | |
diff --git a/relux/static/js/views/modules/twitter.js b/relux/static/js/views/modules/twitter.js | |
index fcad8e4..98142b7 100644 | |
--- a/relux/static/js/views/modules/twitter.js | |
+++ b/relux/static/js/views/modules/twitter.js | |
@@ -57,11 +57,10 @@ function( | |
// Check if the JSON user attr is there otherwise use current section feed. | |
var userID = this.twitter_el.attr('data-user-id'); | |
- var default_account = this.twitter_el.attr('data-section-id'); | |
- console.log(default_account); | |
+ | |
// Logic and fallbacks for twitter user, will try json user, than section, than USAToday users. | |
if (!userID) { | |
- userID = default_account || 'USAToday'; | |
+ userID = this.options.default_account || 'USAToday'; | |
} | |
this.loadTweets(userID, this.options.num_tweets, this.createTweetsHTML); | |
diff --git a/relux/templates/modules/twitter-client-side.html b/relux/templates/modules/twitter-client-side.html | |
index c22083d..1aa6809 100644 | |
--- a/relux/templates/modules/twitter-client-side.html | |
+++ b/relux/templates/modules/twitter-client-side.html | |
@@ -1,6 +1,6 @@ | |
<div class="mod clst twitter"> | |
<h2 class="twitter">From Twitter</h2> | |
- <ul class="split-two clearfix tweet-list" data-user-id="{{ module.front_attrs.twitter_handle }}" data-section-id="USATODAY{% firstof section_name section %} " data-vr-zone="twitter-client" ></ul> | |
+ <ul class="split-two clearfix tweet-list" data-user-id="{{ module.front_attrs.twitter_handle }}" data-section-id="USATODAY{{ section_name }} " data-vr-zone="twitter-client" ></ul> | |
<script type="text/template" id="tweet-list-template"> | |
<% _.each(data, function(item) { %> | |
<li data-vr-contentbox="" > | |
-- | |
1.7.10 | |
From acceb73004de11f240b08c422928788aaa068012 Mon Sep 17 00:00:00 2001 | |
From: Robert Huhn <[email protected]> | |
Date: Tue, 18 Dec 2012 13:30:03 -0500 | |
Subject: [PATCH 17/25] updated search css slightly | |
--- | |
relux/static/css/modules/search.css | 82 ++++++++++----------- | |
relux/templates/partials/search-result-items.html | 2 +- | |
relux/templates/search-results.html | 2 +- | |
3 files changed, 43 insertions(+), 43 deletions(-) | |
diff --git a/relux/static/css/modules/search.css b/relux/static/css/modules/search.css | |
index 13342c9..ad0ca18 100644 | |
--- a/relux/static/css/modules/search.css | |
+++ b/relux/static/css/modules/search.css | |
@@ -79,14 +79,14 @@ article.search-results.ui-loading{ | |
clear: left; | |
} | |
-.results .list-content ul { | |
+.results .list-content .search-results-list { | |
border-left: 1px solid rgb(10, 10, 10); | |
list-style: none; | |
margin: 0; | |
padding: 0; | |
} | |
-.view-grid .list-content li { | |
+.view-grid .list-content .search-result-item { | |
float: left; | |
height: 257px; | |
margin: 0; | |
@@ -94,19 +94,19 @@ article.search-results.ui-loading{ | |
width: 238px; | |
} | |
-.search-results .list-content li { | |
+.search-results .list-content .search-result-item { | |
border-bottom: 1px solid rgb(10, 10, 10); | |
border-right: 1px solid rgb(10,10,10); | |
position: relative; | |
box-shadow: inset 0 1px rgb(59,59,59); | |
} | |
-.results li .search-result-figure { | |
+.results .search-result-item .search-result-figure { | |
padding: 16px 17px 11px 17px; | |
position: relative; | |
} | |
-.view-list li .search-result-figure { | |
+.view-list .search-result-item .search-result-figure { | |
float: left; | |
padding: 0; | |
} | |
@@ -141,11 +141,11 @@ li.topresult .search-result-image { | |
.search-result-item-link { | |
display: block; | |
} | |
-.search-results .view-list li .search-result-item-link .front { | |
+.search-results .view-list .search-result-item .search-result-item-link .front { | |
position: relative; | |
} | |
-.results li .search-result-item-link .front { | |
+.results .search-result-item .search-result-item-link .front { | |
opacity: 1; | |
position: absolute; | |
-webkit-transition: opacity .15s ease-in-out; | |
@@ -157,19 +157,19 @@ li.topresult .search-result-image { | |
} | |
-.results li .back{ | |
+.results .search-result-item .back{ | |
display: none; | |
} | |
-.lt-ie9 .view-grid li .search-result-item-link .back { | |
+.lt-ie9 .view-grid .search-result-item .search-result-item-link .back { | |
visibility: hidden; | |
} | |
-.lt-ie9 .view-grid li .search-result-item-link:hover .front { | |
+.lt-ie9 .view-grid .search-result-item .search-result-item-link:hover .front { | |
visibility: hidden; | |
} | |
-.view-grid li .search-result-item-link .back { | |
+.view-grid .search-result-item .search-result-item-link .back { | |
display: block; | |
opacity: 0; | |
position: absolute; | |
@@ -181,34 +181,34 @@ li.topresult .search-result-image { | |
width: 100%; | |
} | |
-.view-grid li .search-result-item-link:hover .front { | |
+.view-grid .search-result-item .search-result-item-link:hover .front { | |
opacity: 0; | |
} | |
-.view-grid li .search-result-item-link:hover .back { | |
+.view-grid .search-result-item .search-result-item-link:hover .back { | |
visibility: visible; | |
opacity: 1; | |
} | |
-.view-grid .list-content li .search-result-item-link { | |
+.view-grid .list-content .search-result-item .search-result-item-link { | |
height: 257px; | |
width: 238px; | |
} | |
-.view-grid li .search-result-item-link:hover { | |
+.view-grid .search-result-item .search-result-item-link:hover { | |
background: rgb(77, 77, 77); | |
} | |
-.view-list li .search-result-item-link:hover { | |
+.view-list .search-result-item .search-result-item-link:hover { | |
background: rgb(77, 77, 77); | |
} | |
.view-list .none-link-borders, | |
-.view-list li .search-result-item-link { | |
+.view-list .search-result-item .search-result-item-link { | |
padding: 10px 0 10px 10px; | |
} | |
-.results li .search-result-item-link { | |
+.results .search-result-item .search-result-item-link { | |
color: rgb(204, 204, 204); | |
} | |
@@ -227,7 +227,7 @@ li.topresult .search-result-image { | |
text-shadow: 0 1px 1px rgb(0, 0, 0); | |
} | |
-.results li .search-result-item-link:hover h3 { | |
+.results .search-result-item .search-result-item-link:hover h3 { | |
color: rgb(255, 255, 255); | |
} | |
@@ -237,7 +237,7 @@ li.topresult .search-result-image { | |
margin: -4px 0 0; | |
} | |
-.results li .label { | |
+.results .search-result-item .label { | |
left: 19px; | |
@@ -246,7 +246,7 @@ li.topresult .search-result-image { | |
top: 19px; | |
} | |
-.results.view-list li .label { | |
+.results.view-list .search-result-item .label { | |
display: none; | |
} | |
@@ -256,41 +256,41 @@ li.topresult .search-result-image { | |
padding-left: 23px; | |
} | |
-.results li .label.news { | |
+.results .search-result-item .label.news { | |
background-color: rgb(0,155,255); | |
} | |
-.results li .label.sports { | |
+.results .search-result-item .label.sports { | |
background-color: rgb(235,30,0); | |
} | |
-.results li .label.life { | |
+.results .search-result-item .label.life { | |
background-color: rgb(150,0,180); | |
} | |
-.results li .label.money { | |
+.results .search-result-item .label.money { | |
background-color: rgb(0,165,60); | |
} | |
-.results li .label.tech { | |
+.results .search-result-item .label.tech { | |
background-color: rgb(250,95,0); | |
} | |
-.results li .label.travel { | |
+.results .search-result-item .label.travel { | |
background-color: rgb(0,195,195); | |
} | |
-.results li .label.weather { | |
+.results .search-result-item .label.weather { | |
background-color: rgb(255,192,0); | |
} | |
-.results li .meta { | |
+.results .search-result-item .meta { | |
color: rgb(102, 102, 102); | |
font-size: 65%; | |
font-style: italic; | |
} | |
-.results.view-grid li .front .text { | |
+.results.view-grid .search-result-item .front .text { | |
display: none; | |
} | |
@@ -298,7 +298,7 @@ li.topresult .search-result-image { | |
margin-left: 18px; | |
} | |
-.results li .back .text { | |
+.results .search-result-item .back .text { | |
padding-top: 19px; | |
font-size: 12px; | |
height: 98px; | |
@@ -307,13 +307,13 @@ li.topresult .search-result-image { | |
margin: 0 18px; | |
} | |
-.view-grid li .meta .photo { | |
+.view-grid .search-result-item .meta .photo { | |
display: inline-block; | |
background-color: rgb(255, 255, 255); | |
border: 2px solid rgb(255, 255, 255); | |
} | |
-.view-grid li .meta .byLine { | |
+.view-grid .search-result-item .meta .byLine { | |
color: rgb(255, 255, 255); | |
display: inline-block; | |
font-weight: bold; | |
@@ -321,13 +321,13 @@ li.topresult .search-result-image { | |
padding-left: 7px; | |
} | |
-.view-grid li .meta { | |
+.view-grid .search-result-item .meta { | |
bottom: 16px; | |
left: 20px; | |
position: absolute; | |
} | |
-.view-list li .meta { | |
+.view-list .search-result-item .meta { | |
margin: 0; | |
padding: 0 0 0 18px; | |
} | |
@@ -336,19 +336,19 @@ li.topresult .search-result-image { | |
padding: 0; | |
} | |
-.results li .meta span { | |
+.results .search-result-item .meta span { | |
border-left: none; | |
margin: 0; | |
padding: 0; | |
} | |
-.results li .meta .last-update { | |
+.results .search-result-item .meta .last-update { | |
border-right: rgb(68, 68, 68) 1px solid; | |
margin-right: 10px; | |
padding-right: 10px; | |
} | |
-.results li .video-icon { | |
+.results .search-result-item .video-icon { | |
background: url('/static/images/modules/search/search-icons.png') 0 -219px no-repeat; | |
height: 30px; | |
left: 50%; | |
@@ -358,7 +358,7 @@ li.topresult .search-result-image { | |
width: 30px; | |
} | |
-.view-list li .video-icon { | |
+.view-list .search-result-item .video-icon { | |
left: 50px; | |
margin: -16px 0 0 -14px; | |
} | |
@@ -489,13 +489,13 @@ li.topresult .search-result-image { | |
box-shadow: none; | |
} | |
-.results .related-searches ul { | |
+.results .related-searches .search-results-list { | |
color: rgb(30, 163, 255); | |
list-style: disc; | |
padding: 0 0 0 30px; | |
} | |
-.results .related-searches li { | |
+.results .related-searches .search-result-item { | |
line-height: 130%; | |
} | |
diff --git a/relux/templates/partials/search-result-items.html b/relux/templates/partials/search-result-items.html | |
index 53e9661..75f5391 100644 | |
--- a/relux/templates/partials/search-result-items.html | |
+++ b/relux/templates/partials/search-result-items.html | |
@@ -3,7 +3,7 @@ | |
{% if next_page %} | |
{% for item in results %} | |
{% if item.photo.crops or item.attrs.videostill %} | |
- <li class="{{item.content_type}} {% if forloop.first and page_num == 1 %}topresult{% endif %} {% if forloop.counter <= 3 and page_num == 1 %}recommended{% endif %} search-result-li"> | |
+ <li class="{{item.content_type}} {% if forloop.first and page_num == 1 %}topresult{% endif %} {% if forloop.counter <= 3 and page_num == 1 %}recommended{% endif %} search-result-item"> | |
{% include "includes/section-label.html" with card_section_name=section_name label_item=item %} | |
<a href="{{item|content_url}}" data-ht="search_results_{{item.content_type}}_{{forloop.counter}}" class="search-result-item-link"> | |
<div class="front"> | |
diff --git a/relux/templates/search-results.html b/relux/templates/search-results.html | |
index 8f8ff07..24d78ac 100644 | |
--- a/relux/templates/search-results.html | |
+++ b/relux/templates/search-results.html | |
@@ -35,7 +35,7 @@ | |
</div> | |
{% endif %} | |
- <ul class="clearfix search-results-ul"> | |
+ <ul class="clearfix search-results-list"> | |
{% comment %} | |
<li class="topic"> | |
-- | |
1.7.10 | |
From 8bb144a9ad4385d667e8e85e60df3d223e0cd437 Mon Sep 17 00:00:00 2001 | |
From: Robert Huhn <[email protected]> | |
Date: Tue, 18 Dec 2012 13:55:06 -0500 | |
Subject: [PATCH 18/25] updated search css | |
--- | |
relux/static/css/modules/search.css | 32 ++++++++++----------- | |
relux/templates/partials/search-result-items.html | 16 +++++------ | |
2 files changed, 24 insertions(+), 24 deletions(-) | |
diff --git a/relux/static/css/modules/search.css b/relux/static/css/modules/search.css | |
index ad0ca18..b7f3f9c 100644 | |
--- a/relux/static/css/modules/search.css | |
+++ b/relux/static/css/modules/search.css | |
@@ -2,12 +2,12 @@ | |
* @fileoverview Search results specific styles. | |
*/ | |
-body.show-search .ui-loader.global-loader.active, | |
- body.search-open .ui-loader.global-loader.active{ | |
+.show-search .ui-loader.global-loader.active, | |
+.search-open .ui-loader.global-loader.active{ | |
top: 120px; | |
} | |
-article.search-results.ui-loading{ | |
+.search-results.ui-loading{ | |
background-color: rgb(50,50,50); | |
} | |
@@ -117,7 +117,7 @@ article.search-results.ui-loading{ | |
margin: 0 auto; | |
} | |
-li.topresult .search-result-image { | |
+.search-result-item.topresult .search-result-image { | |
width: 200px; | |
} | |
@@ -227,7 +227,7 @@ li.topresult .search-result-image { | |
text-shadow: 0 1px 1px rgb(0, 0, 0); | |
} | |
-.results .search-result-item .search-result-item-link:hover h3 { | |
+.results .search-result-item .search-result-item-link:hover .search-results-headline { | |
color: rgb(255, 255, 255); | |
} | |
@@ -336,7 +336,7 @@ li.topresult .search-result-image { | |
padding: 0; | |
} | |
-.results .search-result-item .meta span { | |
+.results .search-result-item .meta .meta-info-text { | |
border-left: none; | |
margin: 0; | |
padding: 0; | |
@@ -417,12 +417,12 @@ li.topresult .search-result-image { | |
width: 477px; | |
} | |
-.results .topic .search-result-item-link h3 { | |
+.results .topic .search-result-item-link .search-results-headline { | |
font-size: 25px; | |
line-height: 120%; | |
} | |
-.results .topic .search-result-item-link .back h3 { | |
+.results .topic .search-result-item-link .back .search-results-headline { | |
font-size: 42px; | |
line-height: 120%; | |
color: rgb(204, 204, 204); | |
@@ -435,13 +435,13 @@ li.topresult .search-result-image { | |
} | |
/* Result message */ | |
-.view-grid .message h3 { | |
+.view-grid .message .search-results-headline { | |
font-size: 145%; | |
line-height: 110%; | |
padding-top: 37px; | |
} | |
-.view-list .message h3 { | |
+.view-list .message .search-results-headline { | |
margin: 0; | |
padding: 0; | |
} | |
@@ -469,7 +469,7 @@ li.topresult .search-result-image { | |
text-transform: uppercase; | |
} | |
-.results .related-searches h3 { | |
+.results .related-searches .search-results-headline { | |
color: rgb(204, 204, 204); | |
font-size: 20px; | |
padding: 10px 0 18px; | |
@@ -647,17 +647,17 @@ li.topresult .search-result-image { | |
width: 1202px; | |
} | |
- .view-grid .list-content li.topresult, | |
- .view-grid .list-content li.topresult .search-result-item-link { | |
+ .view-grid .list-content .search-result-item.topresult, | |
+ .view-grid .list-content .search-result-item.topresult .search-result-item-link { | |
height: 516px; | |
width: 477px; | |
} | |
- .view-grid .list-content li.topresult img { | |
+ .view-grid .list-content .search-result-item.topresult img { | |
width: 440px; | |
} | |
- .view-grid .list-content li.topresult .search-result-figure { | |
+ .view-grid .list-content .search-result-item.topresult .search-result-figure { | |
height: auto; | |
margin-bottom: 0; | |
} | |
@@ -674,7 +674,7 @@ li.topresult .search-result-image { | |
padding: 20px 20px 0 0; | |
} | |
-.no-results h3 { | |
+.no-results .search-results-headline { | |
margin-top: 0; | |
font-size: 18px; | |
} | |
diff --git a/relux/templates/partials/search-result-items.html b/relux/templates/partials/search-result-items.html | |
index 75f5391..e806ff4 100644 | |
--- a/relux/templates/partials/search-result-items.html | |
+++ b/relux/templates/partials/search-result-items.html | |
@@ -37,9 +37,9 @@ | |
{% endif %} | |
{% elif item.photo.crops.1_1 %} | |
{% if forloop.first and page_num == 1 %} | |
- <img class="search-result-image" src="{{ item.photo.crops.1_1|pathify|resize:"440"|crop:"440x325" }}"/> | |
+ <img class="search-result-image" src="{{ item.photo.crops.1_1|pathify|resize:"440"|crop:"0-0-440-325" }}"/> | |
{% else %} | |
- <img class="search-result-image" src="{{ item.photo.crops.1_1|pathify|resize:"200"|crop:"200x115" }}"/> | |
+ <img class="search-result-image" src="{{ item.photo.crops.1_1|pathify|resize:"200"|crop:"0-0-200-115" }}"/> | |
{% endif %} | |
{% elif item.attrs.thumbnailPath %} | |
{% if forloop.first and page_num == 1 %} | |
@@ -60,17 +60,17 @@ | |
</figure> | |
{% if item.timestamp %} | |
<p class="meta"> | |
- <span class="date-created">{{ item.timestamp.published|parse_date|date:"M j, Y" }}</span> | |
+ <span class="date-created meta-info-text">{{ item.timestamp.published|parse_date|date:"M j, Y" }}</span> | |
</p> | |
{% endif %} | |
- <h3 class="{% if not item.photo.crops.4_3 and not item.video.attrs.videostill and not item.photo.crops.1_1 and not item.photo.crops.3_4 and not item.photo.crops.16_9 and not item.attrs.thumbnailPath and not item.video.attrs.thumbnail %}search-result-title-noimage{% else %}search-result-title{% endif %} search-results-h3">{{ item.headline }}</h3> | |
+ <h3 class="{% if not item.photo.crops.4_3 and not item.video.attrs.videostill and not item.photo.crops.1_1 and not item.photo.crops.3_4 and not item.photo.crops.16_9 and not item.attrs.thumbnailPath and not item.video.attrs.thumbnail %}search-result-title-noimage{% else %}search-result-title{% endif %} search-results-headline">{{ item.headline }}</h3> | |
{% if item.summary %} | |
<p class="text">{{ item.summary }}</p> | |
{% endif %} | |
<div class="clearleft"></div> | |
</div> | |
<div class="back"> | |
- <h3 class="search-result-title-back search-results-h3">{{ item.headline }}</h3> | |
+ <h3 class="search-result-title-back search-results-headline">{{ item.headline }}</h3> | |
{% if item.summary %} | |
<p class="text">{{ item.summary }}</p> | |
{% endif %} | |
@@ -79,7 +79,7 @@ <h3 class="search-result-title-back search-results-h3">{{ item.headline }}</h3> | |
{% if item.byline.avatar %} | |
<img class="photo" src="{{ item.byline.avatar|pathify|resize:26|crop:"26x26" }}"/> | |
{% endif %} | |
- <span class="byline">{{ item.byline.author }}{% if item.byline.publication %}, {{ item.byline.publication }}{% endif %}</span> | |
+ <span class="byline meta-info-text">{{ item.byline.author }}{% if item.byline.publication %}, {{ item.byline.publication }}{% endif %}</span> | |
</p> | |
{% endif %} | |
</div> | |
@@ -90,9 +90,9 @@ <h3 class="search-result-title-back search-results-h3">{{ item.headline }}</h3> | |
{% include "includes/section-label.html" with card_section_name=section_name label_item=item %} | |
<a href="{{ item|content_url }}"> | |
<p class="meta"> | |
- <span class="date-created">{{ item.timestamp.published|parse_date|date:"M j, Y" }}</span> | |
+ <span class="date-created meta-info-text">{{ item.timestamp.published|parse_date|date:"M j, Y" }}</span> | |
</p> | |
- <h3 class="search-result-title-noimage search-results-h3">{{ item.headline }}</h3> | |
+ <h3 class="search-result-title-noimage search-results-headline">{{ item.headline }}</h3> | |
<div class="clearleft"></div> | |
</a> | |
</li> | |
-- | |
1.7.10 | |
From c8f60891afe2e0b2875510ba99dca54ba16f5415 Mon Sep 17 00:00:00 2001 | |
From: Robert Huhn <[email protected]> | |
Date: Wed, 19 Dec 2012 10:22:11 -0500 | |
Subject: [PATCH 19/25] updated section label code | |
--- | |
relux/templates/includes/section-label.html | 2 +- | |
1 file changed, 1 insertion(+), 1 deletion(-) | |
diff --git a/relux/templates/includes/section-label.html b/relux/templates/includes/section-label.html | |
index 7a75368..eee731b 100644 | |
--- a/relux/templates/includes/section-label.html | |
+++ b/relux/templates/includes/section-label.html | |
@@ -9,7 +9,7 @@ | |
{{ label_item.parentlink.url }} | |
{% elif label_item.attrs.texttype == "blog" and label_item.attrs.sitename %} | |
/blog/{{ label_item.attrs.sitename|slugify|cut:"-" }}/ | |
- {% elif label_item.ssts.subsection == "sciencefair" or label_item.ssts.subsection == "columnist" or label_item.ssts.subsection == "enviroment" %} | |
+ {% elif label_item.ssts.subsection == "sciencefair" or label_item.ssts.subsection == "columnist" or label_item.ssts.subsection == "enviroment" or label_item.ssts.subsection == "gameon" %} | |
/{{ label_item.ssts.section }}/ | |
{% else %} | |
/{% firstof label_section_name label_item.ssts.section label_item.taxonomy.section %}/{{ label_item.ssts.subsection|section_display_name|slugify }}/ | |
-- | |
1.7.10 | |
From 0ef8d2115bbfe469ea95826bb54f1c1a5f4ad8d4 Mon Sep 17 00:00:00 2001 | |
From: Robert Huhn <[email protected]> | |
Date: Wed, 19 Dec 2012 14:54:41 -0500 | |
Subject: [PATCH 20/25] updated section labels for blogs/topics | |
--- | |
relux/templates/includes/section-label.html | 10 ++++++++-- | |
relux/templates/modules/stag-front/headline-grid.html | 17 +---------------- | |
relux/templates/stag-front.html | 2 +- | |
3 files changed, 10 insertions(+), 19 deletions(-) | |
diff --git a/relux/templates/includes/section-label.html b/relux/templates/includes/section-label.html | |
index eee731b..3ff2a31 100644 | |
--- a/relux/templates/includes/section-label.html | |
+++ b/relux/templates/includes/section-label.html | |
@@ -5,12 +5,14 @@ | |
/{{ label_section_name }}/ | |
{% elif label_section_name == "home" or not label_item.ssts.subsection %} | |
/{% firstof label_item.taxonomy.section label_item.ssts.section %}/ | |
+ {% elif label_item.ssts.subsection == topic_name %} | |
+ /{{ label_item.ssts.section }}/ | |
+ {% elif label_item.ssts.subsection != topic_name %} | |
+ /{{ label_item.ssts.section }}/{{ label_item.ssts.subsection }}/ | |
{% elif label_item.parentlink %} | |
{{ label_item.parentlink.url }} | |
{% elif label_item.attrs.texttype == "blog" and label_item.attrs.sitename %} | |
/blog/{{ label_item.attrs.sitename|slugify|cut:"-" }}/ | |
- {% elif label_item.ssts.subsection == "sciencefair" or label_item.ssts.subsection == "columnist" or label_item.ssts.subsection == "enviroment" or label_item.ssts.subsection == "gameon" %} | |
- /{{ label_item.ssts.section }}/ | |
{% else %} | |
/{% firstof label_section_name label_item.ssts.section label_item.taxonomy.section %}/{{ label_item.ssts.subsection|section_display_name|slugify }}/ | |
{% endif %}{% endspaceless %}"> | |
@@ -18,6 +20,10 @@ | |
{{ label_section_name }} | |
{% elif label_section_name == "home" or not label_item.ssts.subsection %} | |
{% firstof label_item.taxonomy.section label_item.ssts.section %} | |
+ {% elif label_item.ssts.subsection == topic_name %} | |
+ {{ label_item.ssts.section }} | |
+ {% elif label_item.ssts.subsection != topic_name %} | |
+ {{ label_item.ssts.subsection }} | |
{% elif label_item.parentlink %} | |
{{ label_item.parentlink.display_name }} | |
{% elif label_item.attrs.texttype == "blog" and label_item.attrs.sitename %} | |
diff --git a/relux/templates/modules/stag-front/headline-grid.html b/relux/templates/modules/stag-front/headline-grid.html | |
index dffe48d..ce529d8 100644 | |
--- a/relux/templates/modules/stag-front/headline-grid.html | |
+++ b/relux/templates/modules/stag-front/headline-grid.html | |
@@ -5,30 +5,15 @@ | |
<div class="page clearfix active"> | |
{% for content in module.contents|slice:"8" %} | |
<div class="headline {{ content.taxonomy.section }} {% cycle '' 'even' %}" data-href="{{ content|content_url }}"> | |
- {# Uncomment to view test author for styling - remove before launch #} | |
- {#<div class="authors byline byline-nopub{% if content.byline.avatar %} with-avatar{% endif %}">#} | |
- {#<a href="/author/{{ content.byline.0.author|slugify }}" class="clearfix">#} | |
- {#<img class="avatar" src="">#} | |
- {#<span class="author"><em>John Smith</em></span>#} | |
- {#</a>#} | |
- {#</div>#} | |
<div class="authors byline byline-nopub{% if content.byline.avatar %} with-avatar{% endif %}"> | |
- {# Uncomment the anchor tag when the authors become rockstars #} | |
- {#<a href="/author/{{ content.byline.0.author|slugify }}" class="clearfix">#} | |
{% if content.byline.avatar %} | |
<img class="avatar" src="{{ content.byline.avatar|resize:"26x26" }}"> | |
{% endif %} | |
{% if content.byline.author %} | |
<span class="author"><em>{{ content.byline.author }}</em></span> | |
{% endif %} | |
- {#</a>#} | |
</div> | |
- {% if base_page_type == "topic" %} | |
- {% include "includes/section-label.html" with label_item=content %} | |
- {% elif front_attrs.texttype == "blog index" %} | |
- {% include "includes/section-label.html" with label_section_name=content.ssts.section %} | |
- {% endif %} | |
- | |
+ {% include "includes/section-label.html" with topic_name=front_attrs.topic_name|slugify|cut:"-" label_item=content %} | |
<a class="anchor" href="{{ content|content_url }}"> | |
<div class="front tile"> | |
{% if content.photo.crops or content.attrs.videostill %} | |
diff --git a/relux/templates/stag-front.html b/relux/templates/stag-front.html | |
index dec0d2e..d7f61b5 100644 | |
--- a/relux/templates/stag-front.html | |
+++ b/relux/templates/stag-front.html | |
@@ -41,7 +41,7 @@ | |
{% if base_page_type == "topic" %} | |
{% include "includes/section-label.html" with label_item=content %} | |
{% elif front_attrs.texttype == "blog index" %} | |
- {% include "includes/section-label.html" with label_section_name=content.ssts.section %} | |
+ {% include "includes/section-label.html" with topic_name=front_attrs.topic_name|slugify|cut:"-" label_item=content %} | |
{% endif %} | |
<div class="media"> | |
{% if content.photo.crops.16_9 or content.attrs.videostill %} | |
-- | |
1.7.10 | |
From 1880a766c9a035d2ec1294cfa25319784d0ea30d Mon Sep 17 00:00:00 2001 | |
From: Robert Huhn <[email protected]> | |
Date: Wed, 19 Dec 2012 15:04:17 -0500 | |
Subject: [PATCH 21/25] updated section label code | |
--- | |
relux/templates/includes/section-label.html | 34 ++++++++++++++++++--------- | |
1 file changed, 23 insertions(+), 11 deletions(-) | |
diff --git a/relux/templates/includes/section-label.html b/relux/templates/includes/section-label.html | |
index 3ff2a31..ab910cf 100644 | |
--- a/relux/templates/includes/section-label.html | |
+++ b/relux/templates/includes/section-label.html | |
@@ -1,34 +1,46 @@ | |
-{# now passes through the object as label_item #} | |
- | |
+{# | |
+now passes through the object as label_item | |
+now with much jumping through hoops that could easily be avoided if: | |
+1: ssts was always good (section is only in section sbusection is only in subsection, blog names are NOT in subsection) | |
+2: sitename and site url were always good | |
+#} | |
<a class="label {% firstof label_section_name label_item.ssts.section label_item.taxonomy.section "home" %}" | |
-href="{% spaceless %}{% if not label_item %} | |
+href="{% spaceless %} | |
+ {% if not label_item %} | |
/{{ label_section_name }}/ | |
{% elif label_section_name == "home" or not label_item.ssts.subsection %} | |
/{% firstof label_item.taxonomy.section label_item.ssts.section %}/ | |
- {% elif label_item.ssts.subsection == topic_name %} | |
+ {% elif topic_name and label_item.ssts.subsection == topic_name %} | |
/{{ label_item.ssts.section }}/ | |
- {% elif label_item.ssts.subsection != topic_name %} | |
+ {% elif topic_name and label_item.ssts.subsection != topic_name %} | |
/{{ label_item.ssts.section }}/{{ label_item.ssts.subsection }}/ | |
+ {% elif label_item.ssts.subsection == "sciencefair" or label_item.ssts.subsection == "columnist" or label_item.ssts.subsection == "enviroment" or label_item.ssts.subsection == "gameon" %} | |
+ /{{ label_item.ssts.section }}/ | |
{% elif label_item.parentlink %} | |
{{ label_item.parentlink.url }} | |
{% elif label_item.attrs.texttype == "blog" and label_item.attrs.sitename %} | |
/blog/{{ label_item.attrs.sitename|slugify|cut:"-" }}/ | |
{% else %} | |
/{% firstof label_section_name label_item.ssts.section label_item.taxonomy.section %}/{{ label_item.ssts.subsection|section_display_name|slugify }}/ | |
- {% endif %}{% endspaceless %}"> | |
- {% spaceless %}{% filter capfirst %}{% if not label_item %} | |
+ {% endif %} | |
+ {% endspaceless %}"> | |
+ {% spaceless %} | |
+ {% filter capfirst %} | |
+ {% if not label_item %} | |
{{ label_section_name }} | |
{% elif label_section_name == "home" or not label_item.ssts.subsection %} | |
{% firstof label_item.taxonomy.section label_item.ssts.section %} | |
- {% elif label_item.ssts.subsection == topic_name %} | |
+ {% elif topic_name and label_item.ssts.subsection == topic_name %} | |
{{ label_item.ssts.section }} | |
- {% elif label_item.ssts.subsection != topic_name %} | |
- {{ label_item.ssts.subsection }} | |
+ {% elif topic_name and label_item.ssts.subsection != topic_name %} | |
+ {{ label_item.ssts.subsection|section_display_name }} | |
{% elif label_item.parentlink %} | |
{{ label_item.parentlink.display_name }} | |
{% elif label_item.attrs.texttype == "blog" and label_item.attrs.sitename %} | |
{{ label_item.attrs.sitename }} | |
{% else %} | |
{{ label_item.ssts.subsection|section_display_name }} | |
- {% endif %}{% endfilter %}{% endspaceless %} | |
+ {% endif %} | |
+ {% endfilter %} | |
+ {% endspaceless %} | |
</a> | |
\ No newline at end of file | |
-- | |
1.7.10 | |
From 2918410d675e30b60dd4bda2d00d9396b4ef1f93 Mon Sep 17 00:00:00 2001 | |
From: Robert Huhn <[email protected]> | |
Date: Wed, 19 Dec 2012 15:12:42 -0500 | |
Subject: [PATCH 22/25] updated comments | |
--- | |
relux/templates/includes/section-label.html | 4 ++-- | |
1 file changed, 2 insertions(+), 2 deletions(-) | |
diff --git a/relux/templates/includes/section-label.html b/relux/templates/includes/section-label.html | |
index ab910cf..4ccda23 100644 | |
--- a/relux/templates/includes/section-label.html | |
+++ b/relux/templates/includes/section-label.html | |
@@ -1,9 +1,9 @@ | |
-{# | |
+{% comment %} | |
now passes through the object as label_item | |
now with much jumping through hoops that could easily be avoided if: | |
1: ssts was always good (section is only in section sbusection is only in subsection, blog names are NOT in subsection) | |
2: sitename and site url were always good | |
-#} | |
+{% endcomment %} | |
<a class="label {% firstof label_section_name label_item.ssts.section label_item.taxonomy.section "home" %}" | |
href="{% spaceless %} | |
{% if not label_item %} | |
-- | |
1.7.10 | |
From cd131a55dc5c75cd37f406813b09d67164832f5d Mon Sep 17 00:00:00 2001 | |
From: Robert Huhn <[email protected]> | |
Date: Wed, 19 Dec 2012 15:57:50 -0500 | |
Subject: [PATCH 23/25] updated search stuff | |
--- | |
relux/static/css/modules/search.css | 1 + | |
relux/static/js/views/pages/search.js | 6 +++--- | |
2 files changed, 4 insertions(+), 3 deletions(-) | |
diff --git a/relux/static/css/modules/search.css b/relux/static/css/modules/search.css | |
index b7f3f9c..24d982f 100644 | |
--- a/relux/static/css/modules/search.css | |
+++ b/relux/static/css/modules/search.css | |
@@ -95,6 +95,7 @@ | |
} | |
.search-results .list-content .search-result-item { | |
+ background: rgb(51, 51, 51) url('/static/images/patterns/dark-noise.png') 0 0 repeat; | |
border-bottom: 1px solid rgb(10, 10, 10); | |
border-right: 1px solid rgb(10,10,10); | |
position: relative; | |
diff --git a/relux/static/js/views/pages/search.js b/relux/static/js/views/pages/search.js | |
index 1f79c7d..d3f8655 100644 | |
--- a/relux/static/js/views/pages/search.js | |
+++ b/relux/static/js/views/pages/search.js | |
@@ -188,13 +188,13 @@ function( | |
// grab element | |
var id = 'partner_search_text_ads' + new Date().getTime(); | |
$('.tile.ad', this.$el).attr('id', id); | |
- var pageOptions = { | |
+ var pageOptions = { | |
'pubId': 'partner-gannett', | |
'query': term, | |
'hl': 'en' | |
}; | |
- var adblock1 = { | |
+ var adblock1 = { | |
'container': id, | |
//'number': '3', // Let Google decide | |
'lines': '3', | |
@@ -276,7 +276,7 @@ function( | |
done= new google.ads.search.Ads(pageOptions, adblock1); | |
document.write.delOnWrite('searchads'); | |
document.write.delOnScript('searchads'); | |
- } | |
+ }; | |
if (!ads()) { | |
document.write.addOnWrite('searchads', ads); | |
document.write.addOnScript('searchads', ads); | |
-- | |
1.7.10 | |
From 3ee5630935cdddf67de5db2bc072347ab987dee8 Mon Sep 17 00:00:00 2001 | |
From: Robert Huhn <[email protected]> | |
Date: Wed, 19 Dec 2012 16:41:00 -0500 | |
Subject: [PATCH 24/25] switch .label to .parent-label | |
--- | |
relux/static/css/interactives/timeline.css | 4 ++-- | |
relux/static/css/media-view.css | 6 ++--- | |
relux/static/css/modules/coverview.css | 2 +- | |
relux/static/css/modules/headlines.css | 6 ++--- | |
relux/static/css/modules/hero.css | 2 +- | |
relux/static/css/modules/search.css | 22 +++++++++--------- | |
relux/static/css/print.css | 2 +- | |
relux/static/css/reset-override.css | 24 ++++++++++---------- | |
relux/static/css/stag.css | 2 +- | |
relux/templates/includes/section-label.html | 4 ++-- | |
relux/templates/search-index.html | 2 +- | |
relux/templates/search-results.html | 8 +++---- | |
.../stories/components/interactive_timeline.html | 2 +- | |
13 files changed, 43 insertions(+), 43 deletions(-) | |
diff --git a/relux/static/css/interactives/timeline.css b/relux/static/css/interactives/timeline.css | |
index 3b4333f..591b9f7 100644 | |
--- a/relux/static/css/interactives/timeline.css | |
+++ b/relux/static/css/interactives/timeline.css | |
@@ -30,7 +30,7 @@ | |
position: relative; | |
} | |
-.interactive.timeline .timeslider .label { | |
+.interactive.timeline .timeslider .parent-label { | |
width: 66px; | |
height: 13px; | |
padding-bottom: 20px; | |
@@ -44,7 +44,7 @@ | |
top: 0px; | |
} | |
-.interactive.timeline .timeslider .label .date-label-hdr { | |
+.interactive.timeline .timeslider .parent-label .date-label-hdr { | |
font-size: 10px; | |
display: block; | |
margin-top: -10px; | |
diff --git a/relux/static/css/media-view.css b/relux/static/css/media-view.css | |
index a3fd234..6a0b9fd 100644 | |
--- a/relux/static/css/media-view.css | |
+++ b/relux/static/css/media-view.css | |
@@ -637,7 +637,7 @@ Search | |
transform: rotateX(0deg); | |
} | |
-.grid-figure > .media-figure-meta > .label { | |
+.grid-figure > .media-figure-meta > .parent-label { | |
display: block; | |
float: left; | |
left: 3px; | |
@@ -781,7 +781,7 @@ Search | |
empty-cells:show; | |
} | |
-.cinematic-side-nav-ul .label{ | |
+.cinematic-side-nav-ul .parent-label{ | |
position:relative; | |
left:0; | |
top:-2px; | |
@@ -1141,7 +1141,7 @@ Search | |
margin: 3px 8px; | |
} | |
-.media-view .gallery .header .label { | |
+.media-view .gallery .header .parent-label { | |
position: inherit; | |
} | |
diff --git a/relux/static/css/modules/coverview.css b/relux/static/css/modules/coverview.css | |
index ff045eb..93782ac 100644 | |
--- a/relux/static/css/modules/coverview.css | |
+++ b/relux/static/css/modules/coverview.css | |
@@ -90,7 +90,7 @@ | |
position: absolute; | |
} | |
-#cover-view .text-wrap > .label { | |
+#cover-view .text-wrap > .parent-label { | |
position: static; | |
} | |
diff --git a/relux/static/css/modules/headlines.css b/relux/static/css/modules/headlines.css | |
index 0ac65d7..0ca01ed 100644 | |
--- a/relux/static/css/modules/headlines.css | |
+++ b/relux/static/css/modules/headlines.css | |
@@ -99,7 +99,7 @@ | |
background-color: rgb(255,192,0); | |
} | |
-.headlines .headline .label { | |
+.headlines .headline .parent-label { | |
left: 10px; | |
top: 10px; | |
} | |
@@ -302,11 +302,11 @@ | |
width: 80px; | |
} | |
-.headlines.section-card .listview .label { | |
+.headlines.section-card .listview .parent-label { | |
display: none; | |
} | |
-.headlines .listview .headline .label { | |
+.headlines .listview .headline .parent-label { | |
margin: 20px 0 0 20px; | |
} | |
diff --git a/relux/static/css/modules/hero.css b/relux/static/css/modules/hero.css | |
index 9801f9a..a8b46cb 100644 | |
--- a/relux/static/css/modules/hero.css | |
+++ b/relux/static/css/modules/hero.css | |
@@ -423,7 +423,7 @@ | |
* Three Up modifications | |
*/ | |
-.hero.three-up .label { | |
+.hero.three-up .parent-label { | |
left: 10px; | |
top: 10px; | |
} | |
diff --git a/relux/static/css/modules/search.css b/relux/static/css/modules/search.css | |
index 24d982f..df8ade9 100644 | |
--- a/relux/static/css/modules/search.css | |
+++ b/relux/static/css/modules/search.css | |
@@ -238,7 +238,7 @@ | |
margin: -4px 0 0; | |
} | |
-.results .search-result-item .label { | |
+.results .search-result-item .parent-label { | |
left: 19px; | |
@@ -247,11 +247,11 @@ | |
top: 19px; | |
} | |
-.results.view-list .search-result-item .label { | |
+.results.view-list .search-result-item .parent-label { | |
display: none; | |
} | |
-.results li.recommended a.label:after { | |
+.results .search-result-item.recommended .parent-label:after { | |
background: transparent url('/static/images/modules/search/search-icons.png') no-repeat -76px -160px; | |
content: 'Recommended'; | |
padding-left: 23px; | |
@@ -412,7 +412,7 @@ | |
} | |
/* Result topic */ | |
-.search-results .view-grid .list-content .topic, | |
+/*.search-results .view-grid .list-content .topic, | |
.search-results .view-grid .list-content .topic a { | |
height: 516px; | |
width: 477px; | |
@@ -433,7 +433,7 @@ | |
line-height: 200%; | |
height: 246px; | |
margin: 0 20px; | |
-} | |
+}*/ | |
/* Result message */ | |
.view-grid .message .search-results-headline { | |
@@ -478,9 +478,9 @@ | |
text-shadow: 0 1px 1px black; | |
} | |
-.results .related-searches ul, | |
-.results .related-searches li, | |
-.results .related-searches a { | |
+.results .related-searches-list, | |
+.results .related-searches-item, | |
+.results .related-searches-link { | |
border: 0; | |
float: none; | |
height: auto; | |
@@ -654,7 +654,7 @@ | |
width: 477px; | |
} | |
- .view-grid .list-content .search-result-item.topresult img { | |
+ .view-grid .list-content .search-result-item.topresult .search-result-image { | |
width: 440px; | |
} | |
@@ -663,7 +663,7 @@ | |
margin-bottom: 0; | |
} | |
- .results li.topresult .label { | |
+ .results li.topresult .parent-label { | |
left: 20px; | |
} | |
@@ -680,6 +680,6 @@ | |
font-size: 18px; | |
} | |
-.no-results p { | |
+.no-results .search-results-tryagain { | |
font-size: 16px; | |
} | |
diff --git a/relux/static/css/print.css b/relux/static/css/print.css | |
index d72436d..0953936 100644 | |
--- a/relux/static/css/print.css | |
+++ b/relux/static/css/print.css | |
@@ -36,7 +36,7 @@ footer, | |
.quick, | |
p.example, | |
.theatre, | |
-b.label, | |
+.parent-label, | |
.nextPrev, | |
.open-sidebar.sidebar-button, | |
.partner-leavebehind, | |
diff --git a/relux/static/css/reset-override.css b/relux/static/css/reset-override.css | |
index dbc8601..222fb17 100644 | |
--- a/relux/static/css/reset-override.css | |
+++ b/relux/static/css/reset-override.css | |
@@ -129,7 +129,7 @@ p { | |
* News is the default color | |
*/ | |
-.label { | |
+.parent-label { | |
background-color: rgb(0,80,161); | |
color: rgb(255,255,255); | |
font-family: 'Futura Today Bold', arial, sans-serif; | |
@@ -144,44 +144,44 @@ p { | |
top: 20px; | |
z-index:40; | |
} | |
-.label:visited, | |
-.label:hover { | |
+.parent-label:visited, | |
+.parent-label:hover { | |
color: rgb(255,255,255); | |
} | |
-.hero .label{ | |
+.hero .parent-label{ | |
z-index: 54; /*needs to at least be 51 to sit on top of the pic in hero, needs 54 to be clickable on top of hero*/ | |
} | |
-.label.news { | |
+.parent-label.news { | |
background-color: rgb(0,155,255); | |
} | |
-.label.sports { | |
+.parent-label.sports { | |
background-color: rgb(235,30,0); | |
} | |
-.label.life { | |
+.parent-label.life { | |
background-color: rgb(150,0,180); | |
} | |
-.label.money { | |
+.parent-label.money { | |
background-color: rgb(0,165,60); | |
} | |
-.label.tech { | |
+.parent-label.tech { | |
background-color: rgb(250,95,0); | |
} | |
-.label.travel { | |
+.parent-label.travel { | |
background-color: rgb(0,195,195); | |
} | |
-.label.weather { | |
+.parent-label.weather { | |
background-color: rgb(255,192,0); | |
} | |
-.label.opinion { | |
+.parent-label.opinion { | |
background-color: rgb(102,102,102); | |
} | |
diff --git a/relux/static/css/stag.css b/relux/static/css/stag.css | |
index 71e162f..8594290 100644 | |
--- a/relux/static/css/stag.css | |
+++ b/relux/static/css/stag.css | |
@@ -175,7 +175,7 @@ article.cards.stag .content-wrap { | |
padding: 20px 0 10px; | |
} | |
-.stag.hero.three-up .label { | |
+.stag.hero.three-up .parent-label { | |
left: 20px; | |
top: 20px; | |
z-index: 60; | |
diff --git a/relux/templates/includes/section-label.html b/relux/templates/includes/section-label.html | |
index 4ccda23..d58055f 100644 | |
--- a/relux/templates/includes/section-label.html | |
+++ b/relux/templates/includes/section-label.html | |
@@ -4,7 +4,7 @@ | |
1: ssts was always good (section is only in section sbusection is only in subsection, blog names are NOT in subsection) | |
2: sitename and site url were always good | |
{% endcomment %} | |
-<a class="label {% firstof label_section_name label_item.ssts.section label_item.taxonomy.section "home" %}" | |
+<a class="parent-label {% firstof label_section_name label_item.ssts.section label_item.taxonomy.section "home" %}" | |
href="{% spaceless %} | |
{% if not label_item %} | |
/{{ label_section_name }}/ | |
@@ -14,7 +14,7 @@ | |
/{{ label_item.ssts.section }}/ | |
{% elif topic_name and label_item.ssts.subsection != topic_name %} | |
/{{ label_item.ssts.section }}/{{ label_item.ssts.subsection }}/ | |
- {% elif label_item.ssts.subsection == "sciencefair" or label_item.ssts.subsection == "columnist" or label_item.ssts.subsection == "enviroment" or label_item.ssts.subsection == "gameon" %} | |
+ {% elif label_item.ssts.subsection == "sciencefair" or label_item.ssts.subsection == "columnist" or label_item.ssts.subsection == "enviroment" %} | |
/{{ label_item.ssts.section }}/ | |
{% elif label_item.parentlink %} | |
{{ label_item.parentlink.url }} | |
diff --git a/relux/templates/search-index.html b/relux/templates/search-index.html | |
index b8f93a9..40a2bd9 100644 | |
--- a/relux/templates/search-index.html | |
+++ b/relux/templates/search-index.html | |
@@ -20,7 +20,7 @@ | |
{% if index %} | |
<div class="no-results"> | |
<h3 class="search-results-h3">Sorry! There are no results for your search term.</h3> | |
- <p class="search-results-p">Please check the spelling of your search term, or try a different word or phrase.</p> | |
+ <p class="search-results-tryagain">Please check the spelling of your search term, or try a different word or phrase.</p> | |
</div> | |
{% endif %} | |
diff --git a/relux/templates/search-results.html b/relux/templates/search-results.html | |
index 24d78ac..155e414 100644 | |
--- a/relux/templates/search-results.html | |
+++ b/relux/templates/search-results.html | |
@@ -18,9 +18,9 @@ | |
<div class="sidebar"> | |
{% if related_searches %} | |
<div class="tile related-searches"> | |
- <h3>Related searches:</h3> | |
- <ul> | |
- <li><a href="#">MAKE THIS DYNAMIC</a></li> | |
+ <h3 class="related-searches-title">Related searches:</h3> | |
+ <ul class="related-searches-list"> | |
+ <li class="related-searches-item"><a class="related-searches-link" href="#">MAKE THIS DYNAMIC</a></li> | |
</ul> | |
</div> | |
{% endif %} | |
@@ -31,7 +31,7 @@ | |
{% if total_results == 0 %} | |
<div class="no-results"> | |
<h3>Sorry! There are no results for your search term.</h3> | |
- <p>Please check the spelling of your search term, or try a different word or phrase.</p> | |
+ <p class="search-results-tryagain">Please check the spelling of your search term, or try a different word or phrase.</p> | |
</div> | |
{% endif %} | |
diff --git a/relux/templates/stories/components/interactive_timeline.html b/relux/templates/stories/components/interactive_timeline.html | |
index 73c48b7..ef6352b 100644 | |
--- a/relux/templates/stories/components/interactive_timeline.html | |
+++ b/relux/templates/stories/components/interactive_timeline.html | |
@@ -9,7 +9,7 @@ | |
<div class="timeslider"> | |
<div class="labels"> | |
{% for item in data.interactive.graphLabels %} | |
- <div class="label" data-labelms="{{ item|date:"U" }}"> | |
+ <div class="parent-label" data-labelms="{{ item|date:"U" }}"> | |
-- | |
1.7.10 | |
From 5c5339e63b77c3e768de792238866f01701be865 Mon Sep 17 00:00:00 2001 | |
From: Robert Huhn <[email protected]> | |
Date: Wed, 19 Dec 2012 16:42:46 -0500 | |
Subject: [PATCH 25/25] updated gitignore | |
--- | |
.gitignore | 1 - | |
1 file changed, 1 deletion(-) | |
diff --git a/.gitignore b/.gitignore | |
index e57acea..bf53ff7 100644 | |
--- a/.gitignore | |
+++ b/.gitignore | |
@@ -10,7 +10,6 @@ activate* | |
dist | |
django-relux.iml | |
relux/static/crossdomain.xml | |
-relux/static/jsb/ | |
build/ | |
src/ | |
dist/ | |
-- | |
1.7.10 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
compile: *.beam | |
clean: | |
rm -f *.beam | |
test: compile | |
erl -noshell -run 'python-pull-requests' test -run init stop | |
*.beam: | |
erlc *.erl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
REALPATH=$(readlink "$0") | |
HERE=$(dirname "$REALPATH") | |
escript "$HERE/python-pull-requests.erl" "$1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%% -*- erlang -*- | |
%%! -smp enabled | |
-module('python-pull-requests'). | |
-mode(compile). | |
-compile(export_all). | |
-include_lib("eunit/include/eunit.hrl"). | |
-record(config, {username, password, remote}). | |
main([Remote]) -> | |
ok = application:start(crypto), | |
ok = application:start(public_key), | |
ok = application:start(ssl), | |
ok = application:start(inets), | |
Credentials = credentials("api.github.com"), | |
Config = #config{username=proplists:get_value(username, Credentials), | |
password=proplists:get_value(password, Credentials), | |
remote=Remote}, | |
PullRequestData = fetch_open_pull_requests( | |
Config | |
), | |
Result = plists:mapreduce( | |
fun({PR}) -> | |
mapper(PR, Config) | |
end, | |
PullRequestData, | |
[], | |
fun reducer/3, | |
1 | |
), | |
%% report the results | |
lists:foreach(fun({PR, Files}) -> | |
Title = pull_request_prop(<<"title">>, PR), | |
Url = pull_request_prop(<<"html_url">>, PR), | |
io:format("~s:~n ~s~n", [Title, Url]), | |
lists:foreach( | |
fun(F) -> | |
io:format(" ~s~n", [F]) | |
end, | |
Files), | |
io:format("~n", []) | |
end, | |
Result | |
). | |
%% | |
%% side-effected code | |
%% | |
mapper(PR, Config) -> | |
PythonFiles = patch_match_files( | |
".py$", | |
fetch_pull_request_patch( | |
PR, | |
Config | |
) | |
), | |
{pull_request_url(PR), {PR, PythonFiles}}. | |
reducer(Accum, _, {_, []}) -> | |
Accum; | |
reducer(Accum, _, {PR, Files}) -> | |
[{PR,Files}|Accum]. | |
fetch_url(Url, Config) -> | |
Request = {Url, [http_auth_header(basic, | |
Config#config.username, | |
Config#config.password)]}, | |
{ok, {{_, 200, _}, _, Body}} = httpc:request(get, Request, [],[]), | |
Body. | |
fetch_json(Url, Config) -> | |
jiffy:decode( | |
fetch_url(Url, Config) | |
). | |
fetch_open_pull_requests(Config) -> | |
Url = open_pull_requests_url(Config#config.remote), | |
fetch_json(Url, Config). | |
fetch_pull_request_patch(PullRequest, Config) -> | |
fetch_url( | |
pull_request_patch_url(PullRequest), | |
Config | |
). | |
expand_user(Path) -> | |
{ok, Home} = init:get_argument(home), | |
re:replace(Path, "~", Home, [{return, list}]). | |
credentials(Host) -> | |
{ok, Hosts} = file:consult(expand_user("~/.netrc.config")), | |
proplists:get_value(Host, Hosts). | |
%% | |
%% side-effect free code | |
%% | |
pull_request_prop(BinKey, PullRequest) -> | |
binary_to_list( | |
proplists:get_value( | |
BinKey, | |
PullRequest | |
) | |
). | |
pull_request_prop_test_() -> | |
?_assertEqual( | |
"!url!", | |
pull_request_prop( | |
<<"url">>, | |
[ | |
{<<"url">>, <<"!url!">>} | |
] | |
) | |
). | |
pull_request_url(PullRequest) -> | |
pull_request_prop(<<"url">>, PullRequest). | |
pull_request_url_test_() -> | |
?_assertEqual( | |
"!url!", | |
pull_request_url( | |
[ | |
{<<"url">>, <<"!url!">>} | |
] | |
) | |
). | |
pull_request_patch_url(PullRequest) -> | |
pull_request_prop(<<"diff_url">>, PullRequest). | |
pull_request_patch_url_test_() -> | |
?_assertEqual( | |
"!patch_url!", | |
pull_request_patch_url( | |
[ | |
{<<"patch_url">>, <<"!patch_url!">>} | |
] | |
) | |
). | |
open_pull_requests_url(Remote) -> | |
lists:flatten( | |
[ | |
"https://api.github.com/repos/", | |
Remote, | |
"/pulls?state=open" | |
] | |
). | |
open_pull_requests_url_test_() -> | |
?_assertEqual( | |
"https://api.github.com/repos/foo/bar/pulls?state=open", | |
open_pull_requests_url( | |
"foo/bar" | |
) | |
). | |
patch_match_files(FilePattern, PatchData) -> | |
lists:foldl( | |
fun("+++ b/" ++ Filename, Accum) -> | |
case re:run(Filename, FilePattern) of | |
{match, _} -> | |
[Filename|Accum]; | |
nomatch -> | |
Accum | |
end; | |
(_, Accum) -> | |
Accum | |
end, | |
[], | |
string:tokens(PatchData, "\n\r") | |
). | |
patch_match_files_test_() -> | |
{ok, FixtureBin} = file:read_file("./fixture.patch"), | |
[ | |
?_assertEqual( | |
[ | |
"blogs/views.py", | |
"blogs/views.py", | |
"relux/settings/base.py" | |
], | |
patch_match_files( | |
".py$", | |
binary_to_list( | |
FixtureBin | |
) | |
) | |
) | |
]. | |
http_auth_header(basic, Username, Password) -> | |
Encoded = base64:encode_to_string(lists:append([Username, ":", Password])), | |
{"Authorization", "Basic " ++ Encoded}. | |
http_auth_header_test_() -> | |
?_assertEqual( | |
{"Authorization", "Basic dXNlcm5hbWU6cGFzc3dvcmQ="}, | |
http_auth_header( | |
basic, | |
"username", | |
"password" | |
) | |
). |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment