Template:NewsItem/styles.css: Difference between revisions
Template page
More actions
Eloise Zomia (talk | contribs) No edit summary |
Eloise Zomia (talk | contribs) No edit summary |
||
| Line 113: | Line 113: | ||
} | } | ||
/* Location hierarchy - italic, | /* Location hierarchy - italic, with bullet separators for better spacing */ | ||
.news-card__location { | .news-card__location { | ||
padding: 10px 18px 0; | padding: 10px 18px 0; | ||
| Line 120: | Line 120: | ||
font-weight: 500; | font-weight: 500; | ||
font-style: italic; | font-style: italic; | ||
line-height: 1. | line-height: 1.5; | ||
letter-spacing: 0.01em; | |||
} | } | ||
Revision as of 08:56, 17 January 2026
.news-card {
border: 1px solid #e8ede5;
border-left: 4px solid #c75b3c;
border-radius: 12px;
background: #fff;
padding: 0;
margin: 0 0 16px 0;
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.news-card:hover {
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
transform: translateY(-2px);
}
/* Adjust left border color by category */
.news-card--policy {
border-left-color: #5b7a45;
}
.news-card--enforcement {
border-left-color: #c75b3c;
}
.news-card--fieldwork {
border-left-color: #4a7c9d;
}
.news-card--research {
border-left-color: #7a6c3a;
}
.news-card--community {
border-left-color: #6a5b86;
}
/* Header: Date on left, badges on right */
.news-card__header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 12px 18px;
background: linear-gradient(180deg, #fafbf9 0%, #f5f7f4 100%);
border-bottom: 1px solid #e8ede5;
border-radius: 12px 12px 0 0;
gap: 12px;
}
.news-card__date {
font-size: 0.8rem;
font-weight: 700;
color: #5a6650;
text-transform: uppercase;
letter-spacing: 0.05em;
}
/* Badges container on right side */
.news-card__badges {
display: flex;
align-items: center;
gap: 8px;
}
/* Campaign badge - subtle, next to category badge */
.news-card__campaign-badge {
font-size: 0.68rem;
font-weight: 600;
padding: 4px 10px;
border-radius: 6px;
background: rgba(45, 106, 79, 0.08);
color: #2d6a4f;
border: 1px solid rgba(45, 106, 79, 0.2);
white-space: nowrap;
max-width: 200px;
overflow: hidden;
text-overflow: ellipsis;
}
/* Category badge */
.news-card__category-badge {
font-size: 0.65rem;
font-weight: 800;
padding: 5px 12px;
border-radius: 999px;
letter-spacing: 0.08em;
text-transform: uppercase;
color: #fff;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
white-space: nowrap;
flex-shrink: 0;
}
/* Category badge colors */
.news-card--policy .news-card__category-badge {
background: linear-gradient(135deg, #5b7a45 0%, #4a6337 100%);
}
.news-card--enforcement .news-card__category-badge {
background: linear-gradient(135deg, #c75b3c 0%, #a84a2f 100%);
}
.news-card--fieldwork .news-card__category-badge {
background: linear-gradient(135deg, #4a7c9d 0%, #3a6379 100%);
}
.news-card--research .news-card__category-badge {
background: linear-gradient(135deg, #7a6c3a 0%, #63572e 100%);
}
.news-card--community .news-card__category-badge {
background: linear-gradient(135deg, #6a5b86 0%, #54486b 100%);
}
/* Location hierarchy - italic, with bullet separators for better spacing */
.news-card__location {
padding: 10px 18px 0;
font-size: 0.85rem;
color: #7a8472;
font-weight: 500;
font-style: italic;
line-height: 1.5;
letter-spacing: 0.01em;
}
.news-card__title {
padding: 8px 18px 10px;
font-size: 1.15rem;
font-weight: 700;
line-height: 1.35;
color: #1a2612;
margin: 0;
}
.news-card__summary {
padding: 0 18px 14px;
font-size: 0.95rem;
line-height: 1.6;
color: #34402d;
}
/* Source URL display */
.news-card__source {
padding: 12px 18px;
font-size: 0.78rem;
color: #7a8472;
background: #fafbf9;
border-top: 1px solid #e8ede5;
border-radius: 0 0 12px 12px;
display: flex;
align-items: flex-start;
gap: 6px;
}
.news-card__source::before {
content: "🔗";
font-size: 0.85rem;
opacity: 0.5;
flex-shrink: 0;
margin-top: 1px;
}
.news-card__source a {
color: #2d6a4f;
text-decoration: none;
word-break: break-all;
font-weight: 500;
}
.news-card__source a:hover {
text-decoration: underline;
color: #245a42;
}
/* Responsive adjustments */
@media (max-width: 768px) {
.news-card__header {
flex-wrap: wrap;
gap: 8px;
}
.news-card__date {
width: 100%;
margin-bottom: 4px;
}
.news-card__badges {
width: 100%;
justify-content: flex-start;
}
.news-card__campaign-badge {
max-width: none;
flex: 1;
}
}
@media (max-width: 480px) {
.news-card__badges {
flex-direction: column;
align-items: flex-start;
gap: 6px;
}
.news-card__campaign-badge,
.news-card__category-badge {
max-width: 100%;
}
}