mirror of
https://github.com/mgrove36/bbc-young-reporter.git
synced 2026-03-03 11:27:06 +00:00
Update branding & home page
Add BBC Young Reporter branding & update positioning of articles on home page
This commit is contained in:
33
_site/css/article-page.css
Normal file
33
_site/css/article-page.css
Normal file
@@ -0,0 +1,33 @@
|
||||
.mdc-typography--headline2, .mdc-typography--subtitle1 {
|
||||
text-transform: capitalize;
|
||||
}
|
||||
.mdc-typography--headline2, .mdc-typography--subtitle1, figure {
|
||||
margin: 5px;
|
||||
}
|
||||
.mdc-typography--caption-text {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
iframe {
|
||||
width: 100%;
|
||||
height: calc(68.8vw / 16 * 9);
|
||||
}
|
||||
|
||||
@media screen and (max-width: 1550px) {
|
||||
iframe {
|
||||
width: 100%;
|
||||
height: calc(70vw / 16 * 9 - 6px);
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (max-width: 600px) {
|
||||
iframe {
|
||||
height: calc(90vw / 16 * 9 - 5px);
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (max-width: 600px) {
|
||||
iframe {
|
||||
height: calc(93.5vw / 16 * 9);
|
||||
}
|
||||
}
|
||||
113
_site/css/global.css
Normal file
113
_site/css/global.css
Normal file
@@ -0,0 +1,113 @@
|
||||
/* change theme */
|
||||
:root {
|
||||
--mdc-theme-primary: #273967;
|
||||
--mdc-theme-secondary: #ef6c00;
|
||||
}
|
||||
|
||||
.mdc-text-field--focused:not(.mdc-text-field--disabled) .mdc-floating-label, .mdc-list-item--activated .mdc-list-item__text, .mdc-drawer .mdc-list-item--activated .mdc-list-item__graphic {
|
||||
color: var(--mdc-theme-primary);
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: 'Roboto', sans-serif;
|
||||
display: flex;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
a {
|
||||
color: var(--mdc-theme-secondary);
|
||||
}
|
||||
|
||||
.mdc-list-group h3 {
|
||||
margin: 20px 16px auto 16px;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.mdc-drawer-app-content {
|
||||
flex: auto;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.main-content {
|
||||
margin: 15px;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.app-bar {
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
footer {
|
||||
margin: 15px;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
/* edit footer depending on screen size - edits alignment & changes switches between center- and left- aligned BBC Young Reporter logos */
|
||||
footer span {
|
||||
position: relative;
|
||||
top: 19px;
|
||||
}
|
||||
|
||||
footer img {
|
||||
display: block;
|
||||
width: 125px;
|
||||
float: right;
|
||||
content: url("/images/young-reporter-logo.png");
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 800px) {
|
||||
footer {
|
||||
text-align: center;
|
||||
}
|
||||
footer img {
|
||||
float: none;
|
||||
margin: auto;
|
||||
content: url("/images/young-reporter-logo-centered.png");
|
||||
width: 200px;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
footer span {
|
||||
top: 0;
|
||||
}
|
||||
}
|
||||
|
||||
/* add side margins */
|
||||
.main-content, footer {
|
||||
margin-left: 15%;
|
||||
margin-right: 15%;
|
||||
}
|
||||
@media screen and (max-width: 600px) {
|
||||
.main-content, footer {
|
||||
margin-left: 5%;
|
||||
margin-right: 5%;
|
||||
}
|
||||
}
|
||||
@media screen and (max-width: 500px) {
|
||||
.main-content, footer {
|
||||
margin-left: 2%;
|
||||
margin-right: 2%;
|
||||
}
|
||||
}
|
||||
|
||||
/* for cookie notice */
|
||||
#cookies {
|
||||
display: none;
|
||||
width: 100%;
|
||||
position: fixed;
|
||||
background: var(--mdc-theme-primary);
|
||||
color: var(--mdc-theme-background);
|
||||
text-align: center;
|
||||
bottom: -100px;
|
||||
left: 0;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
#cookies p {
|
||||
margin: 10px;
|
||||
}
|
||||
|
||||
#cookies p a {
|
||||
color: var(--mdc-theme-secondary);
|
||||
text-decoration: none;
|
||||
}
|
||||
8
_site/css/material-components-web.min.css
vendored
Normal file
8
_site/css/material-components-web.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
23
_site/css/material_icons.css
Normal file
23
_site/css/material_icons.css
Normal file
@@ -0,0 +1,23 @@
|
||||
/* fallback */
|
||||
@font-face {
|
||||
font-family: 'Material Icons';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
src: url(https://fonts.gstatic.com/s/materialicons/v41/flUhRq6tzZclQEJ-Vdg-IuiaDsNc.woff2) format('woff2');
|
||||
}
|
||||
|
||||
.material-icons {
|
||||
font-family: 'Material Icons';
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
font-size: 24px;
|
||||
line-height: 1;
|
||||
letter-spacing: normal;
|
||||
text-transform: none;
|
||||
display: inline-block;
|
||||
white-space: nowrap;
|
||||
word-wrap: normal;
|
||||
direction: ltr;
|
||||
-webkit-font-feature-settings: 'liga';
|
||||
-webkit-font-smoothing: antialiased;
|
||||
}
|
||||
116
_site/css/mdc-card-list.css
Normal file
116
_site/css/mdc-card-list.css
Normal file
@@ -0,0 +1,116 @@
|
||||
/* make article cards look nice by altering margins */
|
||||
.mdc-card {
|
||||
margin: 2px 2px 10px 2px;
|
||||
}
|
||||
|
||||
.mdc-card-content {
|
||||
margin: 5px 15px 5px 15px;
|
||||
}
|
||||
|
||||
.mdc-card .mdc-typography--headline6, .mdc-card .mdc-typography--subtitle2 {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
|
||||
/* automatically display articles on either side of the page, alternating */
|
||||
.main-content .mdc-card {
|
||||
float: left;
|
||||
clear: left;
|
||||
width: 49%;
|
||||
}
|
||||
|
||||
.main-content .mdc-card:nth-of-type(even) {
|
||||
float: right;
|
||||
clear: right;
|
||||
}
|
||||
|
||||
|
||||
/* make first article full-width */
|
||||
.main-content .mdc-card:first-of-type {
|
||||
float: none;
|
||||
clear: both;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
|
||||
/* makes last article full-width if it is on its own in a row - i.e. if there is an even number of articles in total */
|
||||
.main-content .mdc-card:nth-of-type(odd):nth-last-of-type(2) ~ .mdc-card:last-of-type {
|
||||
float: none;
|
||||
clear: both;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
|
||||
/* styling for when 1 article present */
|
||||
.main-content .mdc-card:first-of-type:last-of-type {
|
||||
float: none;
|
||||
clear: both;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
|
||||
/* styling for when 2 articles present & small screen is detected */
|
||||
@media screen and (max-width: 1000px) {
|
||||
.main-content .mdc-card:nth-child(1):nth-last-of-type(2), .main-content .mdc-card:nth-of-type(2):last-of-type {
|
||||
float: none;
|
||||
clear: both;
|
||||
width: auto;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* styling for when 3 articles present */
|
||||
.main-content .mdc-card:first-of-type:nth-last-of-type(3) {
|
||||
float: none;
|
||||
clear: both;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.main-content .mdc-card:nth-of-type(3):last-of-type {
|
||||
float: right;
|
||||
clear: right;
|
||||
}
|
||||
|
||||
.main-content .mdc-card:nth-of-type(2):nth-last-of-type(2) {
|
||||
float: left;
|
||||
clear: left;
|
||||
}
|
||||
|
||||
/* for scroll-to-top button */
|
||||
.top-scroll-button {
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
text-align: center;
|
||||
font-size: 25px;
|
||||
-webkit-border-radius: 50%;
|
||||
-moz-border-radius: 50%;
|
||||
border-radius: 50%;
|
||||
position: fixed;
|
||||
right: 20px;
|
||||
bottom: 20px;
|
||||
background-color: #273967;
|
||||
display: none;
|
||||
-webkit-transition-duration: 0.25s;
|
||||
-moz-transition-duration: 0.25s;
|
||||
-o-transition-duration: 0.25s;
|
||||
transition-duration: 0.25s;
|
||||
}
|
||||
|
||||
.top-scroll-button img {
|
||||
position: relative;
|
||||
top: 7px;
|
||||
width: 35px;
|
||||
height: auto;
|
||||
-webkit-transition-duration: 0.25s;
|
||||
-moz-transition-duration: 0.25s;
|
||||
-o-transition-duration: 0.25s;
|
||||
transition-duration: 0.25s;
|
||||
}
|
||||
|
||||
.top-scroll-button:hover, .top-scroll-button:focus {
|
||||
background-color: #1C2E56;
|
||||
}
|
||||
|
||||
.top-scroll-button:hover img {
|
||||
top: 3px;
|
||||
}
|
||||
56
_site/css/roboto.css
Normal file
56
_site/css/roboto.css
Normal file
@@ -0,0 +1,56 @@
|
||||
/* cyrillic-ext */
|
||||
@font-face {
|
||||
font-family: 'Roboto';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
src: local('Roboto'), local('Roboto-Regular'), url(https://fonts.gstatic.com/s/roboto/v18/KFOmCnqEu92Fr1Mu72xKOzY.woff2) format('woff2');
|
||||
unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
|
||||
}
|
||||
/* cyrillic */
|
||||
@font-face {
|
||||
font-family: 'Roboto';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
src: local('Roboto'), local('Roboto-Regular'), url(https://fonts.gstatic.com/s/roboto/v18/KFOmCnqEu92Fr1Mu5mxKOzY.woff2) format('woff2');
|
||||
unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
|
||||
}
|
||||
/* greek-ext */
|
||||
@font-face {
|
||||
font-family: 'Roboto';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
src: local('Roboto'), local('Roboto-Regular'), url(https://fonts.gstatic.com/s/roboto/v18/KFOmCnqEu92Fr1Mu7mxKOzY.woff2) format('woff2');
|
||||
unicode-range: U+1F00-1FFF;
|
||||
}
|
||||
/* greek */
|
||||
@font-face {
|
||||
font-family: 'Roboto';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
src: local('Roboto'), local('Roboto-Regular'), url(https://fonts.gstatic.com/s/roboto/v18/KFOmCnqEu92Fr1Mu4WxKOzY.woff2) format('woff2');
|
||||
unicode-range: U+0370-03FF;
|
||||
}
|
||||
/* vietnamese */
|
||||
@font-face {
|
||||
font-family: 'Roboto';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
src: local('Roboto'), local('Roboto-Regular'), url(https://fonts.gstatic.com/s/roboto/v18/KFOmCnqEu92Fr1Mu7WxKOzY.woff2) format('woff2');
|
||||
unicode-range: U+0102-0103, U+0110-0111, U+1EA0-1EF9, U+20AB;
|
||||
}
|
||||
/* latin-ext */
|
||||
@font-face {
|
||||
font-family: 'Roboto';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
src: local('Roboto'), local('Roboto-Regular'), url(https://fonts.gstatic.com/s/roboto/v18/KFOmCnqEu92Fr1Mu7GxKOzY.woff2) format('woff2');
|
||||
unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
|
||||
}
|
||||
/* latin */
|
||||
@font-face {
|
||||
font-family: 'Roboto';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
src: local('Roboto'), local('Roboto-Regular'), url(https://fonts.gstatic.com/s/roboto/v18/KFOmCnqEu92Fr1Mu4mxK.woff2) format('woff2');
|
||||
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
||||
}
|
||||
Reference in New Issue
Block a user