Revert "Revert "Merge pull request #2 from mgrove36/development""

This reverts commit fa40e6fd0e.
This commit is contained in:
2020-03-03 11:07:22 +00:00
parent fa40e6fd0e
commit e9efb7ab91
91 changed files with 4087 additions and 4517 deletions

View File

@@ -0,0 +1,51 @@
/* adjust header styling */
.article-section-header h1, .year-header h1 {
margin-block-start: 0;
margin-block-end: 0;
margin: 6px;
display: inline;
}
.article-section-header, .year-header {
background-color: rgba(24,26,27,0.5);
padding-top: 12px;
padding-bottom: 12px;
}
/* make cards display next to each other with correct dimensions and adjust styling */
.main-content .mdc-card {
display: inline-flex;
width: calc((100% / 3) - 18px);
box-shadow: none;
margin: 6px 6px 10px 6px;
background: none;
cursor: pointer;
}
/* style cards */
.mdc-card-content {
margin: 5px 15px 5px 15px;
}
.mdc-card .mdc-typography--headline6, .mdc-card .mdc-typography--subtitle2 {
margin: 0;
}
.mdc-card .mdc-typography--headline6 {
text-transform: capitalize;
}
/* change number of articles in each row depending on screen size */
@media screen and (max-width: 600px) {
.article-section .mdc-card {
width: calc((100% / 2) - 18px);
}
}
@media screen and (max-width: 350px) {
.article-section .mdc-card {
width: calc((100% / 1) - 18px);
}
}

View File

@@ -7,93 +7,59 @@
}
.mdc-typography--caption-text {
font-style: italic;
margin: 5px;
}
.mdc-typography--headline5 {
margin-bottom: 5px;
}
/* change background */
.article-content {
background-color: var(--mdc-theme-background);
padding-top: 6px;
padding-bottom: 6px;
}
/* hide empty black bar if there is no content to the article */
.article-content:empty {
display: none;
}
/* position headline in middle of image */
.parallax-section {
text-align: center;
vertical-align: middle;
padding: 150px 15px;
}
/* adjust video dimensions depending on screen size */
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: 800px) {
iframe {
height: calc(90vw / 16 * 9 - 5px);
}
.mdc-typography--headline3, .mdc-typography--headline5 {
font-size: 1.5rem;
line-height: 1.625rem;
font-size: 2.5rem;
line-height: 2.625rem;
}
}
@media screen and (max-width: 400px) {
.mdc-typography--headline3, .mdc-typography--headline5 {
font-size: 2rem;
line-height: 2.125rem;
}
}
@media screen and (max-width: 600px) {
iframe {
height: calc(93.5vw / 16 * 9);
}
}
/* make article cards look nice by altering margins */
.mdc-card-content {
margin: 5px 15px 5px 15px;
}
.mdc-card .mdc-typography--headline6, .mdc-card .mdc-typography--subtitle2 {
margin: 0;
}
/* change carousel dots' styling to make them more visible */
.slick-dots {
position: relative;
bottom: 0;
margin: auto;
}
.slick-dots li button:before {
font-size: 30px;
opacity: 1;
color: #ababab;
}
.slick-dots li.slick-active button::before {
font-size: 40px;
opacity: 1;
color: var(--mdc-theme-primary);
}
/* ensure buttons don't get in the way & enable scrolling */
.slick-next {
right: 0;
}
.slick-prev {
left: 0;
}
/* ensure MDC cards are separated enough that they are distinguishable */
.carousel-item {
margin: 4px;
}
/* remove excessive margin below carousel */
.slick-dotted.slick-slider {
margin-bottom: 13px;
}
/* align article carousel title with carousel items */
.article-carousel-title {
text-align: center;
}

View File

@@ -1,57 +1,126 @@
/* change theme */
:root {
--mdc-theme-primary: #273967;
--mdc-theme-secondary: #ef6c00;
--mdc-theme-primary: #253a67;
--mdc-theme-secondary: #ea6343;
--mdc-theme-background: #181a1b;
}
.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;
background-color: var(--mdc-theme-primary);
color: #ffffff;
}
.mdc-drawer {
background-color: var(--mdc-theme-background);
}
.mdc-drawer *, .mdc-drawer .material-icons, .mdc-drawer h3 {
color: #ddd;
}
.mdc-drawer .mdc-list-group__subheader {
color: #ccc;
}
.mdc-button:not(:disabled) {
color: var(--mdc-theme-secondary);
border-color: var(--mdc-theme-secondary);
}
.mdc-button::before, .mdc-button::after {
background-color: var(--mdc-theme-secondary);
}
a {
color: var(--mdc-theme-secondary);
}
/* navbar buttons */
.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-secondary);
}
:not(.mdc-list--non-interactive)>:not(.mdc-list-item--disabled).mdc-list-item--activated::before, :not(.mdc-list--non-interactive)>:not(.mdc-list-item--disabled).mdc-list-item--activated::after {
background-color: var(--mdc-theme-secondary);
}
/* change cursor on top app bar */
.mdc-top-app-bar__title {
cursor: pointer;
}
/* remove margin above main content */
.mdc-top-app-bar--short-fixed-adjust {
padding-top: 41px;
}
/* make content display properly */
.mdc-list-group h3 {
margin: 20px 16px auto 16px;
font-weight: normal;
}
.mdc-drawer-app-content {
flex: auto;
overflow: auto;
}
.mdc-drawer {
width: 350px;
}
.main-content {
margin: 15px;
margin: 15px 0;
overflow: auto;
}
.app-bar {
position: absolute;
}
/* footer */
.footer-container {
background: var(--mdc-theme-background);
padding: 5px 0;
}
footer {
margin: 15px;
overflow: auto;
}
/* parallax backgrounds */
.parallax-section {
position: relative;
z-index: 0;
display: flow-root;
}
.parallax-section #jarallax-container-0 div, .parallax-section #jarallax-container-1 div {
background-color: rgba(0,0,0,0.45);
background-blend-mode: multiply;
}
/* splitter for between sections */
.splitter {
height: 15px;
width: 100%;
background-color: var(--mdc-theme-primary);
}
/* responsive side margins */
.article-section .articles, .article-section-header, .footer-container, .article-content, .footer-container, .article-title-section ~ .mdc-typography--caption-text, .article-title-section, .mdc-typography--subtitle1, .mdc-typography--headline3 {
padding-left: 15%;
padding-right: 15%;
}
@media screen and (max-width: 1000px) {
.article-section .articles, .article-section-header, .footer-container, .article-content, .footer-container, .article-title-section ~ .mdc-typography--caption-text, .article-title-section, .mdc-typography--subtitle1, .mdc-typography--headline3 {
padding-left: 8%;
padding-right: 8%;
}
}
@media screen and (max-width: 800px) {
.article-section .articles, .article-section-header, .footer-container, .article-content, .footer-container, .article-title-section ~ .mdc-typography--caption-text, .article-title-section, .mdc-typography--subtitle1, .mdc-typography--headline3 {
padding-left: 2%;
padding-right: 2%;
}
}
/* 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;
@@ -59,7 +128,6 @@ footer img {
content: url("/images/young-reporter-logo.png");
vertical-align: middle;
}
@media screen and (max-width: 800px) {
footer {
text-align: center;
@@ -76,25 +144,7 @@ footer img {
}
}
/* 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 */
/* cookie notice */
#cookies {
display: none;
width: 100%;
@@ -106,18 +156,15 @@ footer img {
left: 0;
z-index: 1;
}
#cookies p {
margin: 10px;
}
#cookies p a {
color: var(--mdc-theme-secondary);
text-decoration: none;
}
/* for scroll-to-top button */
/* scroll-to-top button */
.top-scroll-button {
width: 50px;
height: 50px;
@@ -136,7 +183,6 @@ footer img {
-o-transition-duration: 0.25s;
transition-duration: 0.25s;
}
.top-scroll-button img {
position: relative;
top: 7px;
@@ -147,11 +193,9 @@ footer img {
-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;
}

43
_site/css/home.css Normal file
View File

@@ -0,0 +1,43 @@
/* place button on right */
.article-section-header button {
display: inline;
padding: 5px 14px;
position: relative;
float: right;
top: 3.5px;
}
/* animate button on hover */
.article-section-header button span {
position: relative;
left: 0;
top: 1.25px;
transition: left 0.1s linear;
font-size: inherit;
}
.article-section-header button:hover span {
left: 4px;
}
/* alternate section backgrounds */
.article-section:nth-of-type(3n) {
background: var(--mdc-theme-background);
}
.article-section:nth-of-type(3n) > div:nth-of-type(3), .article-section:nth-of-type(3n+2) > div:nth-of-type(3) {
display: none;
}
.article-section:nth-of-type(3n+2) {
background: var(--mdc-theme-primary);
}
/* hide articles on smaller screen sizes */
@media screen and (max-width: 600px) {
.article-section .mdc-card:nth-of-type(3) {
display: none;
}
}
@media screen and (max-width: 350px) {
.article-section .mdc-card:nth-of-type(2) {
display: none;
}
}

View File

@@ -1,81 +0,0 @@
/* 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;
}
.mdc-card .mdc-typography--headline6 {
text-transform: capitalize;
}
/* automatically display articles on either side of the page, alternating */
.main-content .mdc-card {
float: right;
clear: right;
width: calc(50% - 6px);
}
.main-content .mdc-card:nth-of-type(even) {
float: left;
clear: left;
}
/* 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;
}

View File

@@ -1,204 +0,0 @@
@charset 'UTF-8';
/* Slider */
.slick-loading .slick-list
{
background: #fff url('./ajax-loader.gif') center center no-repeat;
}
/* Icons */
@font-face
{
font-family: 'slick';
font-weight: normal;
font-style: normal;
src: url('./fonts/slick.eot');
src: url('./fonts/slick.eot?#iefix') format('embedded-opentype'), url('./fonts/slick.woff') format('woff'), url('./fonts/slick.ttf') format('truetype'), url('./fonts/slick.svg#slick') format('svg');
}
/* Arrows */
.slick-prev,
.slick-next
{
font-size: 0;
line-height: 0;
position: absolute;
top: 50%;
display: block;
width: 20px;
height: 20px;
padding: 0;
-webkit-transform: translate(0, -50%);
-ms-transform: translate(0, -50%);
transform: translate(0, -50%);
cursor: pointer;
color: transparent;
border: none;
outline: none;
background: transparent;
}
.slick-prev:hover,
.slick-prev:focus,
.slick-next:hover,
.slick-next:focus
{
color: transparent;
outline: none;
background: transparent;
}
.slick-prev:hover:before,
.slick-prev:focus:before,
.slick-next:hover:before,
.slick-next:focus:before
{
opacity: 1;
}
.slick-prev.slick-disabled:before,
.slick-next.slick-disabled:before
{
opacity: .25;
}
.slick-prev:before,
.slick-next:before
{
font-family: 'slick';
font-size: 20px;
line-height: 1;
opacity: .75;
color: white;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.slick-prev
{
left: -25px;
}
[dir='rtl'] .slick-prev
{
right: -25px;
left: auto;
}
.slick-prev:before
{
content: '←';
}
[dir='rtl'] .slick-prev:before
{
content: '→';
}
.slick-next
{
right: -25px;
}
[dir='rtl'] .slick-next
{
right: auto;
left: -25px;
}
.slick-next:before
{
content: '→';
}
[dir='rtl'] .slick-next:before
{
content: '←';
}
/* Dots */
.slick-dotted.slick-slider
{
margin-bottom: 30px;
}
.slick-dots
{
position: absolute;
bottom: -25px;
display: block;
width: 100%;
padding: 0;
margin: 0;
list-style: none;
text-align: center;
}
.slick-dots li
{
position: relative;
display: inline-block;
width: 20px;
height: 20px;
margin: 0 5px;
padding: 0;
cursor: pointer;
}
.slick-dots li button
{
font-size: 0;
line-height: 0;
display: block;
width: 20px;
height: 20px;
padding: 5px;
cursor: pointer;
color: transparent;
border: 0;
outline: none;
background: transparent;
}
.slick-dots li button:hover,
.slick-dots li button:focus
{
outline: none;
}
.slick-dots li button:hover:before,
.slick-dots li button:focus:before
{
opacity: 1;
}
.slick-dots li button:before
{
font-family: 'slick';
font-size: 6px;
line-height: 20px;
position: absolute;
top: 0;
left: 0;
width: 20px;
height: 20px;
content: '•';
text-align: center;
opacity: .25;
color: black;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.slick-dots li.slick-active button:before
{
opacity: .75;
color: black;
}

View File

@@ -1,119 +0,0 @@
/* Slider */
.slick-slider
{
position: relative;
display: block;
box-sizing: border-box;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
-webkit-touch-callout: none;
-khtml-user-select: none;
-ms-touch-action: pan-y;
touch-action: pan-y;
-webkit-tap-highlight-color: transparent;
}
.slick-list
{
position: relative;
display: block;
overflow: hidden;
margin: 0;
padding: 0;
}
.slick-list:focus
{
outline: none;
}
.slick-list.dragging
{
cursor: pointer;
cursor: hand;
}
.slick-slider .slick-track,
.slick-slider .slick-list
{
-webkit-transform: translate3d(0, 0, 0);
-moz-transform: translate3d(0, 0, 0);
-ms-transform: translate3d(0, 0, 0);
-o-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
.slick-track
{
position: relative;
top: 0;
left: 0;
display: block;
margin-left: auto;
margin-right: auto;
}
.slick-track:before,
.slick-track:after
{
display: table;
content: '';
}
.slick-track:after
{
clear: both;
}
.slick-loading .slick-track
{
visibility: hidden;
}
.slick-slide
{
display: none;
float: left;
height: 100%;
min-height: 1px;
}
[dir='rtl'] .slick-slide
{
float: right;
}
.slick-slide img
{
display: block;
}
.slick-slide.slick-loading img
{
display: none;
}
.slick-slide.dragging img
{
pointer-events: none;
}
.slick-initialized .slick-slide
{
display: block;
}
.slick-loading .slick-slide
{
visibility: hidden;
}
.slick-vertical .slick-slide
{
display: block;
height: auto;
border: 1px solid transparent;
}
.slick-arrow.slick-hidden {
display: none;
}

12
_site/css/year.css Normal file
View File

@@ -0,0 +1,12 @@
/* position heading in middle of image */
.parallax-section {
text-align: center;
vertical-align: middle;
padding: 150px 15px;
}
/* list of articles */
.articles {
background-color: var(--mdc-theme-background);
padding-top: 12px;
padding-bottom: 12px;
}