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 1: | Line 1: | ||
.news-card { | .news-card { | ||
border: 1px solid # | border: 1px solid #e8ede5; | ||
border-left: | border-left: 4px solid #c75b3c; | ||
border-radius: | border-radius: 12px; | ||
background: #fff; | background: #fff; | ||
padding: | 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 { | .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 { | .news-card__date { | ||
font-size: 0.8rem; | |||
font- | font-weight: 700; | ||
color: # | color: #5a6650; | ||
text-transform: uppercase; | |||
letter-spacing: 0.05em; | |||
} | } | ||
.news-card__category-badge { | .news-card__category-badge { | ||
font-size: 0.65rem; | |||
font- | font-weight: 800; | ||
padding: | padding: 5px 12px; | ||
border-radius: 999px; | border-radius: 999px; | ||
letter-spacing: 0.08em; | |||
letter-spacing: 0. | |||
text-transform: uppercase; | text-transform: uppercase; | ||
color: # | 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 { | .news-card__region { | ||
padding: 10px 18px 0; | |||
font-size: 0. | font-size: 0.82rem; | ||
color: # | color: #7a8472; | ||
font-weight: 500; | |||
font-style: italic; | |||
} | } | ||
.news-card__title { | .news-card__title { | ||
font-size: 1. | padding: 8px 18px 12px; | ||
font-weight: | font-size: 1.15rem; | ||
line-height: 1. | font-weight: 700; | ||
line-height: 1.35; | |||
color: #1a2612; | |||
margin: 0; | |||
} | } | ||
.news-card__meta { | .news-card__meta { | ||
padding: 0 18px 8px; | |||
display: flex; | |||
flex-wrap: wrap; | |||
gap: 6px; | |||
} | } | ||
.news-card__tag { | .news-card__tag { | ||
display: inline- | display: inline-flex; | ||
font-size: 0. | align-items: center; | ||
color: # | font-size: 0.8rem; | ||
background: # | color: #3a4a2e; | ||
border: 1px solid # | background: #f0f5ed; | ||
border: 1px solid #d2ddce; | |||
padding: 4px 10px; | padding: 4px 10px; | ||
border-radius: 6px; | border-radius: 6px; | ||
font-weight: 500; | |||
} | } | ||
.news-card__tag a { | .news-card__tag a { | ||
color: # | color: #2d6a4f; | ||
text-decoration: none; | text-decoration: none; | ||
font-weight: 600; | |||
} | } | ||
| Line 71: | Line 133: | ||
.news-card__summary { | .news-card__summary { | ||
padding: 0 18px 14px; | |||
font-size: 0.95rem; | font-size: 0.95rem; | ||
line-height: 1. | line-height: 1.6; | ||
color: #34402d; | |||
color: # | |||
} | } | ||
/* Source URL display */ | /* Source URL display - elegant and subtle */ | ||
.news-card__source { | .news-card__source { | ||
padding: | padding: 12px 18px; | ||
font-size: 0. | font-size: 0.78rem; | ||
color: # | color: #7a8472; | ||
border-top: 1px solid # | background: #fafbf9; | ||
margin-top: | 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; | word-break: break-all; | ||
font-weight: 500; | |||
} | } | ||
.news-card__source: | .news-card__source a:hover { | ||
text-decoration: underline; | |||
color: #245a42; | |||
} | |||
/* Make "Source:" label subtle */ | |||
.news-card__source { | |||
font-weight: 400; | |||
} | } | ||
Revision as of 08:34, 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 12px;
font-size: 1.15rem;
font-weight: 700;
line-height: 1.35;
color: #1a2612;
margin: 0;
}
.news-card__meta {
padding: 0 18px 8px;
display: flex;
flex-wrap: wrap;
gap: 6px;
}
.news-card__tag {
display: inline-flex;
align-items: center;
font-size: 0.8rem;
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;
}
.news-card__summary {
padding: 0 18px 14px;
font-size: 0.95rem;
line-height: 1.6;
color: #34402d;
}
/* 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;
}
/* Make "Source:" label subtle */
.news-card__source {
font-weight: 400;
}