User:Erin Umbreon/Sandbox/Main page rewrite/styles.css
Jump to navigation
Jump to search
.mainpage {
--mainpage--box-bg: #eeeeee;
--mainpage--box-shadow: 0 1px 1px -1px rgb(0 0 0 / 0.3);
--mainpage--box-shadow-secondary: 0 1px 2px rgb(0 0 0 / 0.1);
--mainpage--header-bg: #293c66;
--mainpage--button-bg: #4769b3;
display: flex;
flex-direction: column;
gap: 1rem;
}
/* generic boxes */
.mainpage__box {
background: var(--mainpage--box-bg);
/* padding: 1rem; */
border-radius: 0.5rem;
box-shadow: var(--mainpage--box-shadow);
overflow: hidden;
}
/* generic buttons */
.mainpage__button {
display: block;
background-color: #4769b3;
border-radius: 1px;
text-align: center;
color: white;
text-decoration: none;
border-radius: 9999px; /* full radius */
box-shadow: var(--mainpage--box-shadow);
font-weight: bold;
}
/* hacky styles to make link the size of the whole button element */
.mainpage__button a {
display: block;
padding-block: 0.5em;
color: white;
}
.mainpage__button a:visited {
color: white;
}
/* handle vector's external link icon */
.mainpage__button a.external,
.mainpage__heading a.external {
padding-inline: 2rem;
filter: brightness(100); /* make the blue icon white */
background-size: 1rem;
background-position: center right 0.75rem;
}
/* use more subtle box shadow when already inside a box */
.mainpage__box .mainpage__button {
box-shadow: var(--mainpage--box-shadow-secondary)
}
/* welcome banner */
.mainpage__welcome {
height: var(--mainpage--welcome-height);
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
gap: 1.5rem;
}
.mainpage__welcome div {
font-family: serif;
font-size: 2rem;
display: flex;
align-items: center;
justify-content: center;
text-align: center;
position: relative;
padding-bottom: 1rem;
}
/* underline/separator thing */
/*
.mainpage__welcome div::after {
content: "";
display: block;
position: absolute;
bottom: 0;
left: 0;
right: 0;
height: 2px;
background: linear-gradient(
to right,
rgba(0, 255, 255, 0),
rgba(0, 255, 255, 0.5),
rgba(0, 255, 255, 0)
);
}
*/
/* search button (commented out for now) */
.mainpage__welcome button {
display: block;
background: rgb(255 255 255 / 0.9);
box-shadow: var(--mainpage--box-shadow);
border: none;
max-width: 75rem;
height: 50px;
padding: 0 2rem;
border-radius: 9999px;
font-size: inherit;
/* font-size: 1.125rem; */
}
.mainpage__welcome button kbd {
border: 1px solid #7C99CC;
background: #DAF6FE;
border-radius: 3px;
padding: 0 0.5rem;
font-size: 1rem;
}
/* overall layout */
.mainpage__cols {
display: flex;
flex-direction: row;
gap: inherit;
}
.mainpage__cols > div {
display: flex;
flex-direction: column;
gap: inherit;
}
.mainpage__currentevents {
flex: 2;
}
.mainpage__etc {
flex: 1;
}
.mainpage__events {
text-align: center; /* hack */
}
.mainpage__carousel {
box-shadow: var(--mainpage--box-shadow);
border-radius: 0.5rem;
overflow: hidden;
}
.mainpage__events img {
display: block;
width: 100%;
/* max-width: 100%; */
height: auto;
}
.mainpage__events .img-button {
background: rgb(0 0 0 /0.1);
border-radius: 50%;
display: inline-block;
width: 0.5rem;
height: 0.5rem;
}
.mainpage__header {
background: var(--mainpage--header-bg);
margin: 0;
padding: 0.5rem;
color: white;
font-size: larger;
text-align: center;
font-weight: bold;
}
.mainpage__header a,
.mainpage__header a:visited {
color: white;
}
.mainpage__header a.external {
filter: brightness(100); /* make vector's external link icon also white */
}
.mainpage__patch {
padding: 0;
}
.mainpage__patch-banner img {
display: block;
width: 100%;
/* max-width: 100%; */
height: auto;
aspect-ratio: 32/9;
object-fit: cover;
max-height: 20vh;
}
.mainpage__patch-list ul {
display: flex;
margin: 0;
padding: 0;
border-bottom: 1px solid #c5c5c5;
}
.mainpage__patch-list li {
list-style: none;
flex: 1;
margin: 0;
padding: 0.25rem 0;
text-align: center;
background: linear-gradient(to bottom, #d9d9d9, #d9d9d9);
}
.mainpage__patch-list li + li {
border-left: 1px solid #c5c5c5;
}
.mainpage__patch .mainpage__button {
margin: 1rem;
}
.mainpage__patch-content {
}
.mainpage__patch-content > ul {
margin: 1em;
padding: 0;
border-radius: 0.25rem;
position: relative;
overflow: hidden;
box-shadow: var(--mainpage--box-shadow-secondary);
}
.mainpage__patch-content > ul > li {
list-style: none;
background: white;
margin: 0;
padding: 0.5rem;
}
.mainpage__patch-content > ul > li:nth-child(even) {
background: #f6f6f6;
}
.mainpage__news ul {
list-style: none;
margin: 0;
padding: 0;
}
.mainpage__news li + li {
border-top: 1px solid #c7c7c7;
}
.mainpage__news li > * {
padding: 0.25rem 0.5rem;
}
.mainpage__news .mw-heading {
font-size: inherit;
margin: 0;
padding: 0 1rem;
background: #d9d9d9;
}
.mainpage__news p {
margin: 0;
}
.mainpage__concepts ul {
list-style: none;
margin: 0;
padding: 0;
display: grid;
grid-template-columns: 1fr 1fr;
gap: 1rem;
}
.mainpage__concepts li {
background: var(--mainpage--box-bg);
box-shadow: var(--mainpage--box-shadow);
border-radius: var(--mainpage--box-border-radius, 0.5rem);
padding: 0.5rem;
display: flex;
align-items: center;
gap: 0.5rem;
text-transform: uppercase;
font-weight: bold;
position: relative;
}
.mainpage__concepts img {
/* do not allow wikitext size to override, link positioning hack relies on this */
width: 40px !important;
height: auto !important;
}
.mainpage__concepts li > a:first-of-type {
/* link positioning hack to make the whole button clickable */
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
padding: 0.5rem;
padding-left: calc(1rem + 40px);
/* re-center */
display: flex;
align-items: center;
}
.mainpage__concepts li > a:first-of-type,
.mainpage__concepts li > a:first-of-type:visited {
color: inherit;
}
/* expansion stuff */
.mainpage__expansion-banner {
border-radius: 0.5rem;
overflow: hidden;
position: relative;
}
.mainpage__expansion-banner > a,
.mainpage__expansion-banner > a:visited {
display: block;
padding: 1rem;
text-align: center;
font-weight: bold;
text-shadow: 0 0 10px currentcolor;
position: relative;
color: white;
font-size: larger;
}
.mainpage__expansion-banner img {
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
z-index: -1;
background: black;
}
/* mobile */
@media screen and (max-width: 1024px) {
.mainpage__cols,
.mainpage__cols > * {
display: contents;
}
.mainpage__news {
order: 9;
}
}