7
1
mirror of https://gitlab.com/ansol/web-ansol.org.git synced 2024-11-22 06:11:30 +00:00
web-ansol.org/themes/academic/assets/scss/ansol.scss

415 lines
8.0 KiB
SCSS

:root {
--body-width: calc(100vw - 80px);
--menu-icon: url({{ (resources.Get "images/menu.svg").Permalink }});
--search-icon: url({{ (resources.Get "images/search.svg").Permalink }});
--news-icon: url({{ (resources.Get "images/news.svg").Permalink }});
--campaigns-icon: url({{ (resources.Get "images/campaigns.svg").Permalink }});
--events-icon: url({{ (resources.Get "images/events.svg").Permalink }});
}
body {
margin: 0px;
font-family: Roboto;
font-weight: 400;
display: flex;
flex-direction: column;
min-height: 100vh;
}
.body-width { margin: 0px auto; width: var(--body-width); max-width: 1000px; }
footer {
margin-top: auto;
background-color: #041952;
color: white;
padding: 40px 0px;
}
footer a:not(:hover) { color: white; }
footer p { margin: 10px; }
@media (max-width: 600px) {
.news-list li { flex-direction: column; }
.news-list li .text { width: 280px; }
}
@media (max-width: 1000px) {
:root { --body-width: calc(100vw - 20px); }
nav.main .menu { display: flex; }
nav.main .nav-search { font-size: 0; }
nav.main { position: relative; }
nav.main .sections { display: none; }
nav.main.menu--expanded .sections { display: block; }
nav.main .sections {
position: absolute;
top: 100%;
left: 0%;
width: 100%;
background-color: #041952;
border-top: 1px solid white;
z-index: 100;
}
}
@media (min-width: 1001px) {
nav.main .menu { display: none; }
}
/* #041952 */
/* #e7d445 */
/* #1a347b */
/* #c73447 */
/* #f1ff8e */
a { color: #041952; }
a:hover { background-color: #f1ff8e; color: black; }
nav.main { background-color: #041952; color: white; display: flex; padding: 10px 0px; }
nav.main div { display: flex; justify-content: space-between; }
nav.main img { filter: invert(100%); width: 200px; padding: 0px 0px; }
nav.main ul { display: flex; margin: 0px; padding: 0px; align-items: center; gap: 10px; width: 100%; justify-content: center; }
nav.main li { list-style-type: none; padding: 0px; font-size: 1.0rem; display: flex; }
nav.main a { text-decoration: none; padding: 10px 10px; display: block; }
nav.main a:not(:hover) { color: white; }
nav.main li a { padding: 10px 10px; display: flex; align-items: center; border-radius: 5px; }
nav.main .menu { align-items: center; }
nav.main .menu img { width: 40px; padding: 0px; }
nav.main a:hover img { filter: invert(0%); }
nav.main .nav-search {
display: flex;
padding-left: 40px;
align-items: center;
background: var(--search-icon) no-repeat;
background-size: 20px 20px;
background-position: 10px center;
}
nav.main .nav-search:hover {
color: white;
filter: invert(100%);
background-color: #0e007c;
}
.cta {
display: block;
text-decoration: none;
border: none;
cursor: pointer;
background-color: #c73447;
color: white;
border-color: #601922;
padding: 0px 20px;
font-family: Roboto;
font-size: 1.5rem;
font-weight: 400;
border-radius: 5px;
line-height: 3rem;
}
.cta-header {
display: block;
text-decoration: none;
border: none;
cursor: pointer;
background-color: #c73447;
color: white;
border-color: #601922;
padding: 0px 20px;
font-family: Roboto;
font-size: 1.0rem;
font-weight: 400;
}
.why-join {
display: flex;
flex-wrap: wrap;
justify-content: center;
align-items: center;
gap: 20px;
font-size: 1.5rem;
font-weight: 300;
margin-top: 20px;
}
.why-join span {
line-height: 3rem;
}
.campaigns-list {
margin-top: 20px;
padding: 0px;
list-style-type: none;
display: flex;
flex-wrap: wrap;
justify-content: space-around;
gap: 10px;
}
.campaigns-list li {
width: 300px;
box-shadow: 0px 0px 10px #aaa;
}
.campaigns-list .title {
font-size: 1.5rem;
font-weight: 400;
margin-top: 10px;
padding: 20px;
}
.events-list-title {
margin: 2rem auto;
font-weight: 300;
font-size: 2.25rem;
}
.events-list {
margin-top: 20px;
padding: 0px;
list-style-type: none;
gap: 20px 10px;
display: flex;
flex-direction: row;
flex-wrap: wrap;
justify-content: space-around;
align-items: start;
}
.events-list li {
min-width: 300px;
width: calc(50% - 30px);
border-radius: 5px 5px;
box-shadow: 0 0 5px #aaa;
padding-right: 1rem;
background-color: #eee;
overflow: hidden;
}
.events-list.events-list-full-width li {
width: calc(100% - 50px);
}
.events-list .wrapper {
display: grid;
grid-template-areas: "img text";
justify-content: left;
background-color: white;
column-gap: 1rem;
text-decoration: none;
align-items: center;
}
.events-list .event-cover {
width: 90px;
height: 90px;
object-fit: cover;
display: block;
background-color: white;
}
.events-list .img { grid-area: img; }
.events-list .text { grid-area: text; }
.events-list .subheader { font-size: 0.8rem; margin-top: 10px; }
.events-list .headline { font-size: 1.25rem; }
p { margin: 0px; }
.news-list {
padding: 0px;
list-style-type: none;
display: flex;
gap: 20px;
justify-content: space-between;
flex-wrap: wrap;
flex-direction: row;
}
.news-list-title {
margin: 2rem auto;
font-weight: 300;
font-size: 1.5rem;
}
.news-list li {
max-width: 320px;
padding: 0px;
position: relative;
box-shadow: 0px 0px 10px #aaa;
background-color: white;
}
.news-list li .text {
background-color: white;
padding: 20px;
margin-left: 0px;
}
.news-list h3 {
margin: 0px;
font-size: 1.2rem;
font-weight: 400;
margin-top: 0px;
}
.news-list .published-date {
font-size: 0.8rem;
color: #444;
margin-top: 15px;
margin-bottom: 10px;
}
.news-list .summary {
font-size: 0.8rem;
}
.news-list .cover {
width: 320px;
}
.news-cover {
width: 320px;
object-fit: cover;
display: block;
}
.campaign-cover {
width: 300px;
height: 150px;
object-fit: cover;
display: block;
}
.see-more { margin-top: 30px; }
.pull-header {
margin-top: 0px;
margin-bottom: 40px;
font-weight: 300;
font-size: 2.25rem;
width: calc(var(--body-width) - 100px);
}
.news-section { background-color: #f7f7f7; }
.events-section { background-color: #f7f7f7; }
main { padding: 0; }
main section h2 {
position: relative;
}
main section h2::before {
content: "";
background-size: 40px 40px;
width: 40px;
height: 40px;
position: absolute;
top: 0;
left: -50px;
}
.news-section h2::before { background-image: var(--news-icon); }
.campaigns-section h2::before { background-image: var(--campaigns-icon); }
.events-section h2::before { background-image: var(--events-icon); }
main section {
padding: 40px 0px;
}
.about { max-width: 660px; }
article.article {
color: #333;
width: calc(100vw - 80px);
max-width: 800px;
margin: 0px auto;
line-height: 1.3em;
}
article.article blockquote {
border-left: 7px solid #ccc;
margin-left: 0;
padding-left: 1em;
}
article.article li {
margin-bottom: 0.5em;
}
article.article .article-metadata {
margin-bottom: 2em;
}
article.article p {
margin-bottom: 1em;
}
article.article .featured-image {
width: 100%;
margin-bottom: 2em;
}
article.article .featured-image-caption {
margin-top: -1em;
margin-bottom: 2em;
}
article.article h1 {
font-size: 2.25rem;
font-weight: 300;
line-height: 2.5rem;
}
article.article img {
max-width: 100%;
display: block;
margin: 1em auto;
}
/* Search */
.searching .search-results { display: block; }
.searching nav.main { display: none; }
.searching main { display: none; }
.searching footer { display: none; }
.search-results { display: none; }
.search-results {
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
overflow: scroll-y;
background-color: white;
}
.search-results h1 {
font-size: 2.25rem;
font-weight: 300;
line-height: 2.5rem;
}
.search-results h3 {
font-size: 1.5rem;
font-weight: 300;
}
.search-results .search-hit {
padding: 20px 0px;
}
.search-results .search-hit-description {
margin-top: 10px;
}
.search-results .search-title { display: flex; align-items: center; justify-content: space-between; }
.search-results .search-close { font-size: 1.5rem; }
.search-results #search-query { width: calc(100% - 4px); font-size: 1.5rem; line-height: 1.5em; }