Skip to content

Commit bc86bdd

Browse files
Merge pull request #37 from mcclatchy/PE-423-header-dom-update
PE-423 header dom update
2 parents d59d93a + c2e2180 commit bc86bdd

File tree

8 files changed

+76
-19
lines changed

8 files changed

+76
-19
lines changed

builds/saratoga.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
@use '../static/css/cards/correction';
2323
@use '../static/css/cards/related-stories';
2424
@use '../static/css/cards/author-card';
25+
@use '../static/css/cards/author-byline';
2526
@use '../static/css/cards/timeline';
2627
@use '../static/css/cards/transparency';
2728
@use '../static/css/cards/big-news';

layouts/_default/baseof.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
<link rel="stylesheet" href="/css/cards/correction.css">
4747
<link rel="stylesheet" href="/css/cards/related-stories.css">
4848
<link rel="stylesheet" href="/css/cards/author-card.css">
49+
<link rel="stylesheet" href="/css/cards/author-byline.css">
4950
<link rel="stylesheet" href="/css/cards/timeline.css">
5051
<link rel="stylesheet" href="/css/cards/transparency.css">
5152
<link rel="stylesheet" href="/css/cards/big-news.css">

layouts/shortcodes/header.html

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,18 @@
11
{{- $class := .Get "class" }}
2-
32
<header class="header {{$class}}">
4-
<a class="kicker h6" href="#">Section</a>
3+
<a class="kicker" href="#">Section</a>
54
<h1 class="h1">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce tempus lorem amet.</h1>
6-
<div class="bio">
7-
{{- if eq $class "opinion" }}
8-
<div class="thumb">
9-
<img src="/img/aaron_moody.jpg" alt="John Doe">
10-
</div>
11-
{{- end }}
5+
<div class="author-byline">
126
<div>
13-
<div class="byline">By <a href="#">John Doe</a> <span class="credit">Sample Newspaper</span></div>
14-
<div>
15-
<time>Updated August 13, 2018 3:19 PM</time>
16-
</div>
7+
By <span class="author-name">John Doe</span> and <span class="author-name">Jane Doe</span>
8+
<span class="credit">Sample Newspaper</span>
9+
</div>
10+
<div class="article-details">
11+
<time datetime="">Updated August 13, 2018 3:19 PM</time> <!--comments DOM added for demo purposes only -->
12+
<span class="comments">
13+
<svg viewBox="0 0 512 512" aria-hidden="true"><path d="M160 368c26.5 0 48 21.5 48 48l0 16 72.5-54.4c8.3-6.2 18.4-9.6 28.8-9.6L448 368c8.8 0 16-7.2 16-16l0-288c0-8.8-7.2-16-16-16L64 48c-8.8 0-16 7.2-16 16l0 288c0 8.8 7.2 16 16 16l96 0zm48 124l-.2 .2-5.1 3.8-17.1 12.8c-4.8 3.6-11.3 4.2-16.8 1.5s-8.8-8.2-8.8-14.3l0-21.3 0-6.4 0-.3 0-4 0-48-48 0-48 0c-35.3 0-64-28.7-64-64L0 64C0 28.7 28.7 0 64 0L448 0c35.3 0 64 28.7 64 64l0 288c0 35.3-28.7 64-64 64l-138.7 0L208 492z"></path></svg>
14+
<span class="vf-comments-count vf-body-text--deprecated viafoura vf-is-logged-in" style="min-height: 0px;">35</span>
15+
</span>
1716
</div>
1817
</div>
19-
</header>
18+
</header>

layouts/shortcodes/transparency.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<div class="transparency">
22
<h3>Behind the story</h3>
33
<p class="summary">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut pretium pretium tempor. Ut eget imperdiet neque. In volutpat ante semper diam molestie, et aliquam erat laoreet. Sed sit amet arcu aliquet, molestie justo at, auctor nunc. Phasellus ligula ipsum, volutpat eget semper id, viverra eget nibh. Suspendisse luctus mattis cursus. Nam consectetur ante at nisl hendrerit gravida. Donec vehicula rhoncus mattis. Mauris dignissim semper mattis. Fusce porttitor a mi at suscipit.</p>
4-
<a class="more-link expander" onclick="this.classList.toggle('open');">Read More</a>
4+
<a class="more-link expander" onclick="this.classList.toggle('open');">More</a>
55
<div class="question">
66
<h3>What's next?</h3>
77
<p class="summary">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut pretium pretium tempor. Ut eget imperdiet neque. In volutpat ante semper diam molestie, et aliquam erat laoreet. Sed sit amet arcu aliquet, molestie justo at, auctor nunc. Phasellus ligula ipsum, volutpat eget semper id, viverra eget nibh. Suspendisse luctus mattis cursus. Nam consectetur ante at nisl hendrerit gravida. Donec vehicula rhoncus mattis. Mauris dignissim semper mattis. Fusce porttitor a mi at suscipit.</p>

static/css/atoms.css

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,15 +158,16 @@ li {
158158

159159
.kicker {
160160
color: var(--secondary-text-color);
161-
font-size: 0.667rem;
161+
font: 0.667rem/1em var(--sans);
162162
font-weight: bold;
163163
text-transform: uppercase;
164+
line-height: 1em;
164165
}
165166

166167
time, .time, .byline {
167168
display: inline-block;
168169
color: var(--secondary-text-color);
169-
font: 0.778rem/1.1em var(--sans);
170+
font: 0.778rem/1em var(--sans);
170171
}
171172

172173
.byline a {

static/css/cards/author-byline.css

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
/**
2+
* Author byline
3+
*/
4+
5+
.author-byline {
6+
display: grid;
7+
gap: var(--byline-gap, 5px);
8+
font-size: var(--byline-font-size, 14px);
9+
font-family: var(--header-family);
10+
color: var(--byline-color, var(--darkgray));
11+
}
12+
13+
.author-name,
14+
.article-details .viafoura {
15+
font-weight: bold;
16+
}
17+
18+
.article-details {
19+
display: flex;
20+
flex-wrap: wrap;
21+
justify-content: flex-start;
22+
overflow: hidden;
23+
gap: 5px var(--space);
24+
--link-color: var(--darkgray);
25+
--line-offset: calc(var(--gap) / 2);
26+
--line-thickness: 1px;
27+
--line-color: #d9d9d9;
28+
}
29+
30+
.article-details > * {
31+
position: relative;
32+
line-height: normal;
33+
}
34+
35+
.article-details > *::before {
36+
content: '';
37+
position: absolute;
38+
background-color: var(--line-color);
39+
inline-size: var(--line-thickness);
40+
block-size: 100vh;
41+
inset-block-start: 0;
42+
inset-inline-start: calc(var(--line-offset) * -1);
43+
z-index: 1;
44+
}
45+
46+
.article-details .comments {
47+
display: inline-flex;
48+
gap: 5px;
49+
}
50+
51+
.article-details .comments > svg {
52+
display: inline-block;
53+
align-self: center;
54+
height: 1em;
55+
padding-top: 2px;
56+
--fill-color: var(--byline-color);
57+
}

static/css/cards/story.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
.story-body {
66
display: flow-root;
7-
font: var(--story-font, 18px/2em var(--serif));
7+
font-family: var(--story-font, var(--serif));
88
color: var(--story-text-color, var(--text-color));
99
background-color: var(--story-background-color, var(--paper-color));
1010
--header-family: var(--story-subhead-family, var(--sans));

static/css/decks/fixes.css

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,9 +134,7 @@ custom-digest {
134134

135135
.viafoura {
136136
--dark-text-on-default-color: #0F1521;
137-
color: #0F1521;
138137
font-family: 'Noto Sans', sans-serif;
139-
font-size: 16px;
140138
}
141139

142140
.viafoura p,

0 commit comments

Comments
 (0)