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 95: | Line 95: | ||
.news-card__title { | .news-card__title { | ||
padding: 8px 18px | padding: 8px 18px 10px; | ||
font-size: 1.15rem; | font-size: 1.15rem; | ||
font-weight: 700; | font-weight: 700; | ||
| Line 103: | Line 103: | ||
} | } | ||
.news-card__summary { | |||
padding: 0 18px 12px; | |||
font-size: 0.95rem; | |||
line-height: 1.6; | |||
color: #34402d; | |||
} | |||
/* Metadata tags at bottom - slightly different styling */ | |||
.news-card__meta { | .news-card__meta { | ||
padding: 0 18px | padding: 0 18px 10px; | ||
display: flex; | display: flex; | ||
flex-wrap: wrap; | flex-wrap: wrap; | ||
| Line 113: | Line 121: | ||
display: inline-flex; | display: inline-flex; | ||
align-items: center; | align-items: center; | ||
font-size: 0. | font-size: 0.78rem; | ||
color: #3a4a2e; | color: #3a4a2e; | ||
background: #f0f5ed; | background: #f0f5ed; | ||
| Line 130: | Line 138: | ||
.news-card__tag a:hover { | .news-card__tag a:hover { | ||
text-decoration: underline; | text-decoration: underline; | ||
} | } | ||
| Line 170: | Line 171: | ||
text-decoration: underline; | text-decoration: underline; | ||
color: #245a42; | color: #245a42; | ||
} | } | ||
Revision as of 08:38, 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;
}
.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;
}
.news-card__date {
font-size: 0.8rem;
font-weight: 700;
color: #5a6650;
text-transform: uppercase;
letter-spacing: 0.05em;
}
.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);
}
/* 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%);
}
.news-card__region {
padding: 10px 18px 0;
font-size: 0.82rem;
color: #7a8472;
font-weight: 500;
font-style: italic;
}
.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 12px;
font-size: 0.95rem;
line-height: 1.6;
color: #34402d;
}
/* Metadata tags at bottom - slightly different styling */
.news-card__meta {
padding: 0 18px 10px;
display: flex;
flex-wrap: wrap;
gap: 6px;
}
.news-card__tag {
display: inline-flex;
align-items: center;
font-size: 0.78rem;
color: #3a4a2e;
background: #f0f5ed;
border: 1px solid #d2ddce;
padding: 4px 10px;
border-radius: 6px;
font-weight: 500;
}
.news-card__tag a {
color: #2d6a4f;
text-decoration: none;
font-weight: 600;
}
.news-card__tag a:hover {
text-decoration: underline;
}
/* Source URL display - elegant and subtle */
.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;
}