Skip to content

Commit 0687556

Browse files
Merge pull request #53 from mcclatchy/amp-author-card
AMP Pages - Author Card updates
2 parents 177db1e + 3c8f4a6 commit 0687556

File tree

3 files changed

+136
-64
lines changed

3 files changed

+136
-64
lines changed

dist/amp.css

Lines changed: 132 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -1599,112 +1599,180 @@ footer {
15991599
/**
16001600
* Author card
16011601
*
1602-
* Note: the DOM is quite old and could use some love
16031602
*/
1604-
.author-card {
1603+
1604+
.author-card {
16051605
display: grid;
1606-
gap: 15px;
1607-
grid-template-columns: auto 1fr;
1608-
grid-template-areas: "thumb info" "bio bio";
1606+
align-content: start;
1607+
gap: var(--space-sm) var(--space);
1608+
grid-template-columns: auto;
1609+
grid-template-areas:
1610+
"thumb"
1611+
"info"
1612+
"bio";
16091613
font-family: var(--sans);
1610-
font-size: 0.875rem;
16111614
align-items: center;
1612-
--package-padding: var(--space-sm) 0;
1613-
--link-decoration: none;
1614-
--header-transform: none;
1615-
--gap: 0;
1615+
max-width: 980px;
1616+
}
1617+
1618+
@media(min-width: 769px) {
1619+
.author-card {
1620+
grid-template-columns: auto 1fr;
1621+
grid-template-areas:
1622+
"thumb info"
1623+
"bio bio";
1624+
}
16161625
}
16171626

16181627
.author-card .thumb {
1619-
position: relative;
1620-
background-color: var(--media-background-color);
1621-
width: 70px;
1622-
height: 70px;
1623-
box-sizing: border-box;
1628+
align-items: center;
1629+
align-self: start;
16241630
grid-area: thumb;
1625-
border-radius: 50%;
1631+
width: 45px;
1632+
height: 45px;
16261633
}
16271634

1628-
.author-card .thumb .initials {
1629-
align-content: center;
1635+
.author-card .thumb img {
1636+
width: 100%;
16301637
height: 100%;
1631-
font-size: 24px;
1632-
font-weight: 700;
1633-
text-align: center;
1638+
border-radius: 50%;
1639+
object-fit: cover;
16341640
}
16351641

1636-
.author-card .thumb img {
1637-
position: absolute;
1638-
top: 0;
1642+
.author-card .thumb .initials {
1643+
background-color: #ECEEF2;
16391644
width: 100%;
16401645
height: 100%;
1641-
object-fit: cover;
16421646
border-radius: 50%;
1647+
font-size: 20px;
1648+
font-weight: 700;
1649+
text-align: center;
1650+
text-transform: uppercase;
1651+
align-content: center;
16431652
}
16441653

1645-
.author-card > .flex {
1646-
display: grid;
1654+
.author-card > .article-details {
16471655
grid-area: info;
1648-
justify-items: start;
1656+
font-size: 0.778em;
1657+
--link-color: var(--text-color);
1658+
--more-link-color: var(--blue);
16491659
}
16501660

1651-
.author-card .summary {
1661+
.author-description {
16521662
grid-area: bio;
1663+
font-size: .67em;
1664+
line-height: 1.5em;
16531665
}
16541666

1655-
.author-card .byline {
1656-
margin: 0;
1667+
.author-description a {
1668+
display: inline-block;
1669+
}
1670+
1671+
@media (max-width: 600px) {
1672+
.grid:has(.author-card) {
1673+
--grid-row-gap: var(--space);
1674+
}
16571675
}
16581676

16591677
/**
1660-
* Bio version
1678+
* Author bio
1679+
*
16611680
*/
1681+
16621682
.author-bio {
1663-
padding: 0 var(--page-padding);
1664-
grid-template-columns: auto 1fr;
1665-
grid-row-gap: var(--space-sm);
1666-
grid-template-areas: "thumb info" "bio bio" "contact contact";
1667-
--header-weight: 400;
1683+
padding: var(--space) var(--page-padding) 0;
16681684
}
16691685

1670-
.author-bio .a-details {
1671-
grid-area: info;
1686+
@media(min-width: 769px) {
1687+
.author-card.author-bio {
1688+
grid-template-areas:
1689+
"thumb info"
1690+
"thumb bio";
1691+
}
16721692
}
16731693

1674-
.author-bio .summary {
1675-
grid-area: bio;
1676-
align-self: start;
1694+
@media(min-width: 600px) {
1695+
.author-bio {
1696+
padding: var(--space) 0;
1697+
}
16771698
}
16781699

1679-
.author-bio .a-social {
1680-
grid-area: contact;
1700+
.author-bio .thumb {
1701+
width: 90px;
1702+
height: 90px;
1703+
}
1704+
/**
1705+
* Author byline
1706+
*/
1707+
.author-byline {
1708+
display: grid;
1709+
gap: var(--byline-gap, 5px);
1710+
font-size: var(--byline-font-size, 14px);
1711+
font-family: var(--header-family);
1712+
color: var(--byline-color, var(--darkgray));
16811713
}
16821714

1683-
.author-bio .h6 {
1684-
color: var(--secondary-text-color);
1715+
.author-name {
1716+
font-weight: bold;
1717+
--link-color: var(--byline-color);
16851718
}
16861719

1687-
@media (min-width: 600px) {
1688-
.author-bio {
1689-
padding: 0;
1690-
}
1720+
.article-details {
1721+
display: flex;
1722+
flex-wrap: wrap;
1723+
justify-content: flex-start;
1724+
overflow: hidden;
1725+
gap: 5px var(--space);
1726+
--line-offset: calc(var(--gap) / 2);
1727+
--line-thickness: 1px;
1728+
--line-color: #d9d9d9;
16911729
}
1692-
@media (min-width: 768px) {
1693-
.author-bio {
1694-
grid-template-columns: auto 3fr 2fr;
1695-
grid-template-areas: "thumb info contact" "thumb bio contact";
1696-
}
1697-
.author-bio .a-details {
1698-
align-self: end;
1699-
}
1700-
.author-bio .thumb {
1701-
width: 160px;
1702-
height: 160px;
1703-
}
1704-
.author-bio .a-social {
1705-
justify-self: end;
1730+
1731+
.article-details > * {
1732+
position: relative;
1733+
line-height: normal;
1734+
display: flex;
1735+
flex-wrap: wrap;
1736+
justify-content: start;
1737+
align-items: center;
1738+
gap: 5px;
1739+
}
1740+
1741+
.article-details > *::before {
1742+
content: "";
1743+
position: absolute;
1744+
background-color: var(--line-color);
1745+
inline-size: var(--line-thickness);
1746+
block-size: 100vh;
1747+
inset-block-start: 0;
1748+
inset-inline-start: calc(var(--line-offset) * -1);
1749+
height: 25px;
1750+
z-index: 1;
1751+
}
1752+
1753+
.article-details svg {
1754+
align-self: center;
1755+
vertical-align: middle;
1756+
height: 1em;
1757+
}
1758+
1759+
@media (max-width: 768px) {
1760+
.article-details .opinion svg {
1761+
display: none;
17061762
}
17071763
}
1764+
.article-details .social-media {
1765+
gap: var(--space-sm);
1766+
}
1767+
1768+
.article-details .comments {
1769+
font-weight: bold;
1770+
--fill-color: var(--text-color);
1771+
}
1772+
1773+
.article-details .more-link {
1774+
font-size: 1em;
1775+
}
17081776
/**
17091777
* Transparency
17101778
*/

dist/saratoga.css

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2597,6 +2597,8 @@ html.msb .masthead {
25972597
position: relative;
25982598
line-height: normal;
25992599
display: flex;
2600+
flex-wrap: wrap;
2601+
justify-content: start;
26002602
align-items: center;
26012603
gap: 5px;
26022604
}

static/css/cards/author-byline.css

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@
3030
position: relative;
3131
line-height: normal;
3232
display: flex;
33+
flex-wrap: wrap;
34+
justify-content: start;
3335
align-items: center;
3436
gap: 5px;
3537
}

0 commit comments

Comments
 (0)