Skip to content

Commit 7cd3247

Browse files
Merge pull request #38 from mcclatchy/PE-424-author-card
PE-424 author card
2 parents 36cde35 + c7b28d3 commit 7cd3247

File tree

10 files changed

+234
-222
lines changed

10 files changed

+234
-222
lines changed

dist/saratoga.css

Lines changed: 83 additions & 91 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
--darkgray: #4B5972;
3232
--lightgray: #afb9ca;
3333
--white: #ffffff;
34+
--blue: #2760D1;
3435
--light-brown: #f7efe0;
3536
--dark-brown: #a4906e;
3637
--light-orange: #fee4d0;
@@ -51,7 +52,7 @@
5152
--sub-text-color: var(--white);
5253
--sub-secondary-text-color: var(--gray);
5354
/* Link properties */
54-
--link-color: #2760D1;
55+
--link-color: var(--blue);
5556
--link-decoration: none;
5657
/* Paper properties */
5758
--paper-color: var(--white);
@@ -127,7 +128,7 @@ h6, .h6 {
127128
}
128129
}
129130
a {
130-
color: var(--link-color);
131+
color: var(--link-color, inherit);
131132
text-decoration: var(--link-decoration);
132133
}
133134

@@ -184,17 +185,15 @@ summary, .summary {
184185
align-items: center;
185186
gap: 5px;
186187
font: 700 0.89rem/1em var(--sans);
187-
color: var(--more-link-color, var(--link-color));
188188
text-decoration: none;
189189
text-transform: uppercase;
190+
color: var(--more-link-color, var(--link-color));
191+
--fill-color: var(--more-link-color);
190192
}
191193

192194
.more-link:hover {
193195
text-decoration: none;
194-
}
195-
196-
.more-link:after {
197-
content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='8' viewBox='0 0 11 8' fill='none'%3E%3Cpath d='M10.3536 4.35355C10.5488 4.15829 10.5488 3.84171 10.3536 3.64645L7.17157 0.464467C6.97631 0.269205 6.65973 0.269204 6.46447 0.464467C6.2692 0.659729 6.2692 0.976311 6.46447 1.17157L9.29289 4L6.46447 6.82843C6.2692 7.02369 6.2692 7.34027 6.46447 7.53553C6.65973 7.7308 6.97631 7.7308 7.17157 7.53553L10.3536 4.35355ZM-4.37114e-08 4.5L10 4.5L10 3.5L4.37114e-08 3.5L-4.37114e-08 4.5Z' fill='%232760D1'/%3E%3C/svg%3E");
196+
color: var(--more-link-color, var(--link-color));
198197
}
199198

200199
.dateline {
@@ -255,6 +254,10 @@ hr {
255254
/**
256255
* Color schemes
257256
*/
257+
.opinion svg {
258+
--fill-color: var(--purple);
259+
}
260+
258261
.impact, .in-depth {
259262
--paper-color: var(--impact-color, var(--black));
260263
--text-color: var(--impact-text-color, var(--white));
@@ -728,13 +731,13 @@ section, .section {
728731
.social-media {
729732
place-content: center;
730733
display: flex;
734+
align-items: center;
731735
gap: var(--social-media-gap, var(--space-sm));
732736
}
733737

734738
.social-media svg {
735739
display: block;
736-
width: 20px;
737-
height: 20px;
740+
--fill-color: var(--text-color);
738741
}
739742

740743
/*
@@ -2371,113 +2374,85 @@ footer {
23712374
/**
23722375
* Author card
23732376
*
2374-
* Note: the DOM is quite old and could use some love
23752377
*/
23762378
.author-card {
23772379
display: grid;
2378-
gap: 15px;
2379-
grid-template-columns: auto 1fr;
2380-
grid-template-areas: "thumb info" "bio bio";
2380+
gap: var(--space-sm) var(--space);
2381+
grid-template-columns: auto;
2382+
grid-template-areas: "thumb" "info" "bio";
23812383
font-family: var(--sans);
2382-
font-size: 0.875rem;
23832384
align-items: center;
2384-
--package-padding: var(--space-sm) 0;
2385-
--link-decoration: none;
2386-
--header-transform: none;
2387-
--gap: 0;
2385+
max-width: 980px;
23882386
}
23892387

2388+
@media (min-width: 769px) {
2389+
.author-card {
2390+
grid-template-columns: auto 1fr;
2391+
grid-template-areas: "thumb info" "bio bio";
2392+
}
2393+
}
23902394
.author-card .thumb {
2391-
position: relative;
2392-
background-color: var(--media-background-color);
2393-
width: 70px;
2394-
height: 70px;
2395-
box-sizing: border-box;
2395+
align-items: center;
2396+
align-self: start;
23962397
grid-area: thumb;
2397-
border-radius: 50%;
2398+
width: 45px;
2399+
height: 45px;
23982400
}
23992401

2400-
.author-card .thumb .initials {
2401-
align-content: center;
2402+
.author-card .thumb img {
2403+
width: 100%;
24022404
height: 100%;
2403-
font-size: 24px;
2404-
font-weight: 700;
2405-
text-align: center;
2405+
border-radius: 50%;
24062406
}
24072407

2408-
.author-card .thumb img {
2409-
position: absolute;
2410-
top: 0;
2408+
.author-card .thumb .initials {
2409+
background-color: #ECEEF2;
24112410
width: 100%;
24122411
height: 100%;
2413-
object-fit: cover;
24142412
border-radius: 50%;
2413+
font-size: 20px;
2414+
font-weight: 700;
2415+
text-align: center;
2416+
text-transform: uppercase;
2417+
align-content: center;
24152418
}
24162419

2417-
.author-card > .flex {
2418-
display: grid;
2420+
.author-card > .article-details {
24192421
grid-area: info;
2420-
justify-items: start;
2422+
font-size: 0.778em;
2423+
--link-color: var(--text-color);
2424+
--more-link-color: var(--blue);
24212425
}
24222426

2423-
.author-card .summary {
2427+
.author-description {
24242428
grid-area: bio;
2425-
}
2426-
2427-
.author-card .byline {
2428-
margin: 0;
2429+
font-size: 0.67em;
2430+
line-height: 1.5em;
24292431
}
24302432

24312433
/**
2432-
* Bio version
2434+
* Author bio
2435+
*
24332436
*/
24342437
.author-bio {
2435-
padding: 0 var(--page-padding);
2436-
grid-template-columns: auto 1fr;
2437-
grid-row-gap: var(--space-sm);
2438-
grid-template-areas: "thumb info" "bio bio" "contact contact";
2439-
--header-weight: 400;
2438+
padding: var(--space) var(--page-padding) 0;
24402439
}
24412440

2442-
.author-bio .a-details {
2443-
grid-area: info;
2444-
}
2445-
2446-
.author-bio .summary {
2447-
grid-area: bio;
2448-
align-self: start;
2449-
font-size: 0.89rem;
2450-
}
2451-
2452-
.author-bio .a-social {
2453-
grid-area: contact;
2454-
}
2455-
2456-
.author-bio .h6 {
2457-
color: var(--secondary-text-color);
2441+
@media (min-width: 769px) {
2442+
.author-card.author-bio {
2443+
grid-template-areas: "thumb info" "thumb bio";
2444+
}
24582445
}
2459-
24602446
@media (min-width: 600px) {
24612447
.author-bio {
2462-
padding: 0;
2448+
padding: var(--space) 0;
24632449
}
24642450
}
2465-
@media (min-width: 768px) {
2466-
.author-bio {
2467-
grid-template-columns: auto 3fr 2fr;
2468-
grid-template-areas: "thumb info contact" "thumb bio contact";
2469-
}
2470-
.author-bio .a-details {
2471-
align-self: end;
2472-
}
2473-
.author-bio .thumb {
2474-
width: 160px;
2475-
height: 160px;
2476-
}
2477-
.author-bio .a-social {
2478-
justify-self: end;
2479-
}
2451+
.author-bio .thumb {
2452+
width: 90px;
2453+
height: 90px;
24802454
}
2455+
24812456
/**
24822457
* Author byline
24832458
*/
@@ -2489,8 +2464,7 @@ footer {
24892464
color: var(--byline-color, var(--darkgray));
24902465
}
24912466

2492-
.author-name,
2493-
.article-details .viafoura {
2467+
.author-name {
24942468
font-weight: bold;
24952469
}
24962470

@@ -2500,7 +2474,6 @@ footer {
25002474
justify-content: flex-start;
25012475
overflow: hidden;
25022476
gap: 5px var(--space);
2503-
--link-color: var(--darkgray);
25042477
--line-offset: calc(var(--gap) / 2);
25052478
--line-thickness: 1px;
25062479
--line-color: #d9d9d9;
@@ -2509,6 +2482,9 @@ footer {
25092482
.article-details > * {
25102483
position: relative;
25112484
line-height: normal;
2485+
display: flex;
2486+
align-items: center;
2487+
gap: 5px;
25122488
}
25132489

25142490
.article-details > *::before {
@@ -2519,20 +2495,36 @@ footer {
25192495
block-size: 100vh;
25202496
inset-block-start: 0;
25212497
inset-inline-start: calc(var(--line-offset) * -1);
2498+
height: 25px;
25222499
z-index: 1;
25232500
}
25242501

2502+
.article-details svg {
2503+
align-self: center;
2504+
vertical-align: middle;
2505+
height: 1em;
2506+
}
2507+
2508+
.article-details .opinion {
2509+
color: var(--darkgray);
2510+
}
2511+
2512+
@media (max-width: 768px) {
2513+
.article-details .opinion svg {
2514+
display: none;
2515+
}
2516+
}
2517+
.article-details .social-media {
2518+
gap: var(--space-sm);
2519+
}
2520+
25252521
.article-details .comments {
2526-
display: inline-flex;
2527-
gap: 5px;
2522+
font-weight: bold;
2523+
--fill-color: var(--text-color);
25282524
}
25292525

2530-
.article-details .comments > svg {
2531-
display: inline-block;
2532-
align-self: center;
2533-
height: 1em;
2534-
padding-top: 2px;
2535-
--fill-color: var(--byline-color);
2526+
.article-details .more-link {
2527+
font-size: 1em;
25362528
}
25372529

25382530
/**

layouts/partials/footer.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<footer class="impact">
1+
<footer>
22
<section class="footer">
33
<div class="package footer-connect">
44
<h3>CONNECT</h3>

layouts/shortcodes/author-card.html

Lines changed: 41 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,60 @@
11
{{ if eq ($.Get "version") "bio" }}
22

3-
<div class="author-card author-bio package">
3+
<div class="author-card author-bio">
44
<div class="thumb">
5-
<div class="initials">AM</div>
6-
<!-- <img src="/img/aaron_moody.jpg" width="400" height="400" alt="Aaron Moody"> -->
5+
<!-- <div class="initials">AM</div> -->
6+
<img src="/img/aaron_moody.jpg" width="400" height="400" alt="Aaron Moody">
77
</div>
8-
<div class="a-details package">
9-
<!-- <span class="h6 gray">SPORTS REPORTER</span> -->
10-
<h3 class="name">Aaron Moody</h3>
11-
</div>
12-
<div class="summary">
13-
<span>Aaron Moody is a sports and general reporter for the News &amp; Observer. Here is a second sentence for the bio because it will probably be longer than this. Maybe even longer I don't know.</span>
8+
<div class="article-details">
9+
<a class="author-name" href="mailto:[email protected]">Aaron Moody</a>
10+
<!-- included if writer is an opinion contributor-->
11+
<div class="opinion">
12+
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="17" viewBox="0 0 16 17" fill="none">
13+
<path d="M0 2.50009C0 1.39691 0.896914 0.5 2.00009 0.5H14.0006C15.1038 0.5 16.0007 1.39691 16.0007 2.50009V11.5005C16.0007 12.6036 15.1038 13.5006 14.0006 13.5006H9.66604L5.80025 16.4007C5.65024 16.5132 5.44711 16.5319 5.27523 16.4476C5.10335 16.3632 5.00022 16.1913 5.00022 16.0007V13.5006H2.00009C0.896914 13.5006 0 12.6036 0 11.5005V2.50009ZM5.00022 4.00015C4.44707 4.00015 4.00017 4.44705 4.00017 5.00019V6.50026C4.00017 7.05341 4.44707 7.5003 5.00022 7.5003H6.00026V7.72844C6.00026 8.09408 5.73462 8.40659 5.37211 8.46909L5.12522 8.50972C4.71583 8.57847 4.44082 8.96286 4.50957 9.37226C4.57832 9.78165 4.96271 10.0567 5.37211 9.98791L5.61899 9.94728C6.70341 9.76602 7.50032 8.82848 7.50032 7.72844V6.50026V5.75023V5.00019C7.50032 4.44705 7.05343 4.00015 6.50028 4.00015H5.00022ZM12.0005 6.50026V5.75023V5.00019C12.0005 4.44705 11.5536 4.00015 11.0005 4.00015H9.50041C8.94726 4.00015 8.50037 4.44705 8.50037 5.00019V6.50026C8.50037 7.05341 8.94726 7.5003 9.50041 7.5003H10.5005V7.72844C10.5005 8.09408 10.2348 8.40659 9.8723 8.46909L9.62542 8.50972C9.21602 8.57847 8.94101 8.96286 9.00976 9.37226C9.07852 9.78165 9.46291 10.0567 9.8723 9.98791L10.1192 9.94728C11.2036 9.76602 12.0005 8.82848 12.0005 7.72844V6.50026Z"/>
14+
</svg>
15+
Opinion Contributor
16+
</div>
17+
{{ template "shortcodes/social-media-author.html" }}
18+
<div class="author-phone">
19+
<svg xmlns="http://www.w3.org/2000/svg" width="15" height="16" viewBox="0 0 15 16" fill="none">
20+
<path d="M3.57394 1.02345L3.57415 1.02339C3.88722 0.937861 4.21269 1.08761 4.35239 1.37488L4.36952 1.41599L5.54139 4.22849L5.54148 4.22869C5.65551 4.50205 5.57699 4.81719 5.34662 5.00552L3.9023 6.18617L3.59958 6.43364L3.76676 6.78709C4.79181 8.95415 6.54591 10.7082 8.71296 11.7333L9.06597 11.9003L9.31349 11.5982L10.4971 10.1539L10.4971 10.1539L10.4988 10.1517C10.6831 9.92425 10.9997 9.84403 11.2743 9.95858L11.2745 9.95866L14.087 11.1305L14.088 11.131C14.3994 11.2599 14.5658 11.5996 14.4767 11.9259L14.4766 11.9261L13.7739 14.5028C13.7738 14.503 13.7738 14.5032 13.7737 14.5034C13.6923 14.7976 13.4255 15 13.125 15C6.1531 15 0.5 9.34695 0.5 2.37505C0.5 2.07454 0.702379 1.8078 0.996637 1.72635C0.996832 1.72629 0.997027 1.72624 0.997222 1.72619L3.57394 1.02345Z"/>
21+
<path d="M3.57394 1.02345L3.57415 1.02339C3.88722 0.937861 4.21269 1.08761 4.35239 1.37488L4.36952 1.41599L5.54139 4.22849L5.54148 4.22869C5.65551 4.50205 5.57699 4.81719 5.34662 5.00552L3.9023 6.18617L3.59958 6.43364L3.76676 6.78709C4.79181 8.95415 6.54591 10.7082 8.71296 11.7333L9.06597 11.9003L9.31349 11.5982L10.4971 10.1539L10.4971 10.1539L10.4988 10.1517C10.6831 9.92425 10.9997 9.84403 11.2743 9.95858L11.2745 9.95866L14.087 11.1305L14.088 11.131C14.3994 11.2599 14.5658 11.5996 14.4767 11.9259L14.4766 11.9261L13.7739 14.5028C13.7738 14.503 13.7738 14.5032 13.7737 14.5034C13.6923 14.7976 13.4255 15 13.125 15C6.1531 15 0.5 9.34695 0.5 2.37505C0.5 2.07454 0.702379 1.8078 0.996637 1.72635C0.996832 1.72629 0.997027 1.72624 0.997222 1.72619L3.57394 1.02345Z"/>
22+
<path d="M3.57394 1.02345L3.57415 1.02339C3.88722 0.937861 4.21269 1.08761 4.35239 1.37488L4.36952 1.41599L5.54139 4.22849L5.54148 4.22869C5.65551 4.50205 5.57699 4.81719 5.34662 5.00552L3.9023 6.18617L3.59958 6.43364L3.76676 6.78709C4.79181 8.95415 6.54591 10.7082 8.71296 11.7333L9.06597 11.9003L9.31349 11.5982L10.4971 10.1539L10.4971 10.1539L10.4988 10.1517C10.6831 9.92425 10.9997 9.84403 11.2743 9.95858L11.2745 9.95866L14.087 11.1305L14.088 11.131C14.3994 11.2599 14.5658 11.5996 14.4767 11.9259L14.4766 11.9261L13.7739 14.5028C13.7738 14.503 13.7738 14.5032 13.7737 14.5034C13.6923 14.7976 13.4255 15 13.125 15C6.1531 15 0.5 9.34695 0.5 2.37505C0.5 2.07454 0.702379 1.8078 0.996637 1.72635C0.996832 1.72629 0.997027 1.72624 0.997222 1.72619L3.57394 1.02345Z" />
23+
</svg>
24+
000-000-0000
25+
</div>
1426
</div>
15-
<div class="a-social package">
16-
<span class="h6 connect">Connect with Aaron:</span>
17-
{{ template "shortcodes/social-media.html" }}
27+
<div class="author-description">
28+
<span>Since 1989, David J. Neal’s domain at the Miami Herald has expanded to include writing about Panthers (NHL and FIU), Dolphins, old school animation, food safety, fraud, naughty lawyers, bad doctors and all manner of breaking news. He drinks coladas whole. He does not work Indianapolis 500 Race Day.</span>
29+
<a href="#custom-url-from-cue">Support my work with a digital subscription</a>
1830
</div>
1931
</div>
2032

2133
{{- else -}}
2234

2335
<div class="story-module">
24-
<div class="author-card package">
36+
<div class="author-card">
2537
<div class="thumb">
26-
<div class="initials">AM</div>
27-
<!-- <img src="/img/aaron_moody.jpg" width="400" height="400" alt="Aaron Moody"> -->
38+
<!-- <div class="initials">AM</div> -->
39+
<img src="/img/aaron_moody.jpg" width="400" height="400" alt="Aaron Moody">
2840
</div>
29-
<div class="flex">
30-
<span class="h6 byline">
31-
<a href="mailto:[email protected]">Aaron Moody</a>
32-
</span>
41+
<div class="article-details">
42+
<a class="author-name" href="mailto:[email protected]">Aaron Moody</a>
43+
<!-- included if writer is an opinion contributor-->
44+
<div class="opinion">
45+
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="17" viewBox="0 0 16 17" fill="none">
46+
<path d="M0 2.50009C0 1.39691 0.896914 0.5 2.00009 0.5H14.0006C15.1038 0.5 16.0007 1.39691 16.0007 2.50009V11.5005C16.0007 12.6036 15.1038 13.5006 14.0006 13.5006H9.66604L5.80025 16.4007C5.65024 16.5132 5.44711 16.5319 5.27523 16.4476C5.10335 16.3632 5.00022 16.1913 5.00022 16.0007V13.5006H2.00009C0.896914 13.5006 0 12.6036 0 11.5005V2.50009ZM5.00022 4.00015C4.44707 4.00015 4.00017 4.44705 4.00017 5.00019V6.50026C4.00017 7.05341 4.44707 7.5003 5.00022 7.5003H6.00026V7.72844C6.00026 8.09408 5.73462 8.40659 5.37211 8.46909L5.12522 8.50972C4.71583 8.57847 4.44082 8.96286 4.50957 9.37226C4.57832 9.78165 4.96271 10.0567 5.37211 9.98791L5.61899 9.94728C6.70341 9.76602 7.50032 8.82848 7.50032 7.72844V6.50026V5.75023V5.00019C7.50032 4.44705 7.05343 4.00015 6.50028 4.00015H5.00022ZM12.0005 6.50026V5.75023V5.00019C12.0005 4.44705 11.5536 4.00015 11.0005 4.00015H9.50041C8.94726 4.00015 8.50037 4.44705 8.50037 5.00019V6.50026C8.50037 7.05341 8.94726 7.5003 9.50041 7.5003H10.5005V7.72844C10.5005 8.09408 10.2348 8.40659 9.8723 8.46909L9.62542 8.50972C9.21602 8.57847 8.94101 8.96286 9.00976 9.37226C9.07852 9.78165 9.46291 10.0567 9.8723 9.98791L10.1192 9.94728C11.2036 9.76602 12.0005 8.82848 12.0005 7.72844V6.50026Z"/>
47+
</svg>
48+
Opinion Contributor
49+
</div>
3350
{{ template "shortcodes/social-media-author.html" }}
51+
<a class="more-link" href="#">Send me a news tip <svg xmlns="http://www.w3.org/2000/svg" width="11" height="9" viewBox="0 0 11 9" fill="none">
52+
<path d="M10.8536 4.85355C11.0488 4.65829 11.0488 4.34171 10.8536 4.14645L7.67157 0.964467C7.47631 0.769205 7.15973 0.769204 6.96447 0.964467C6.7692 1.15973 6.7692 1.47631 6.96447 1.67157L9.79289 4.5L6.96447 7.32843C6.7692 7.52369 6.7692 7.84027 6.96447 8.03553C7.15973 8.2308 7.47631 8.2308 7.67157 8.03553L10.8536 4.85355ZM0.5 5L10.5 5L10.5 4L0.5 4L0.5 5Z"/>
53+
</svg></a>
3454
</div>
35-
<div class="summary package">
55+
<div class="author-description">
3656
<span>Aaron Moody is a sports and general reporter for the News &amp; Observer. Here is a second sentence for the bio because it will probably be longer than this. Maybe even longer I don't know.</span>
37-
<a class="h5" href="#custom-url-from-cue">Support my work with a digital subscription</a>
57+
<a href="#custom-url-from-cue">Support my work with a digital subscription</a>
3858
</div>
3959
</div>
4060
</div>

0 commit comments

Comments
 (0)