testing
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
/*Author: Will Jeynes*/
|
||||
|
||||
/*Main form display*/
|
||||
form {
|
||||
grid-gap:10px;
|
||||
display:grid;
|
||||
grid-template-columns: max-content auto;
|
||||
|
||||
}
|
||||
/*Set minimum height, and resize instructions*/
|
||||
form textarea {
|
||||
resize: vertical;
|
||||
min-height: 150px;
|
||||
}
|
||||
/*Specify text align*/
|
||||
form label {
|
||||
display: inline-block;
|
||||
text-align: right;
|
||||
width: 100%;
|
||||
}
|
||||
/*Larger submit button*/
|
||||
input[type=submit] {
|
||||
height: 4em;
|
||||
cursor:pointer;
|
||||
}
|
||||
input, textarea {
|
||||
border-radius:3px ;
|
||||
border: 1px solid var(--accentColor);
|
||||
background-color: var(--articleBColour);
|
||||
transition: background-color 0.2s;
|
||||
color: var(--articleTextColour);
|
||||
}
|
||||
input:hover, textarea:hover {
|
||||
background-color: var(--backgroundColour);
|
||||
}
|
||||
/*Mobile set all form content to one column, reset text align*/
|
||||
@media (max-width: 1200px) {
|
||||
form {
|
||||
grid-template-columns: auto;
|
||||
|
||||
}
|
||||
form label {
|
||||
text-align: left;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,68 @@
|
||||
/*Author: Will Jeynes*/
|
||||
|
||||
/*Main image view*/
|
||||
.hoverImage {
|
||||
max-width: 100%;
|
||||
border-radius: 8px;
|
||||
}
|
||||
/*Image Display*/
|
||||
.hoverImage img {
|
||||
width: 100%;
|
||||
border-radius: 3px;
|
||||
}
|
||||
/*Set transform on hover to allow for animation*/
|
||||
.hoverImage:hover~.otherp {
|
||||
|
||||
|
||||
opacity: 0;
|
||||
transform: translate(100px,-200px) rotate(30deg) scale(0.5);
|
||||
}
|
||||
/*p is result content*/
|
||||
.p {
|
||||
height: 12em;
|
||||
overflow: hidden;
|
||||
}
|
||||
/*Covering element*/
|
||||
.otherp {
|
||||
display: block;
|
||||
position: relative;
|
||||
|
||||
/*In order to stop flexbox resizing to fit element, despite it being out of normal flow*/
|
||||
top: -12em;
|
||||
margin-bottom: -12em;
|
||||
|
||||
|
||||
left: 0px;
|
||||
width: 100%;
|
||||
height: 12em;
|
||||
background-color: var(--accentColor);
|
||||
|
||||
/*Animation with both opacity and transform*/
|
||||
transition: opacity ease-in 0.7s, transform ease 1s;
|
||||
opacity: 1;
|
||||
|
||||
/*Tweakpoint: Appear below header*/
|
||||
z-index: 0;
|
||||
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
/*Covering element "Hover image" text*/
|
||||
.otherp p {
|
||||
text-align: center;
|
||||
font-size: 1em;
|
||||
color: var(--accentVisibleColor);
|
||||
}
|
||||
.quizArticle {
|
||||
height: max-content;
|
||||
}
|
||||
|
||||
/*Override default hover behavior for article element*/
|
||||
@media(min-width:1200px) {
|
||||
.quizArticle {
|
||||
transition: transform 0.2s;
|
||||
}
|
||||
.quizArticle:hover {
|
||||
transform:scale(1.006)
|
||||
}
|
||||
}
|
||||
+385
@@ -0,0 +1,385 @@
|
||||
/*Author: Will Jeynes*/
|
||||
:root {
|
||||
--headColour: black;
|
||||
--headTextColour: white;
|
||||
--accentColor: rgb(216, 81, 81);
|
||||
--accentVisibleColor: white;
|
||||
--backgroundColour: rgb(56, 56, 56);
|
||||
--articleBColour: black;
|
||||
--articleTextColour: white;
|
||||
}
|
||||
body {
|
||||
/*Remove margin around page content*/
|
||||
margin:0;
|
||||
|
||||
/*Allow for footer to be always on the bottom of the window, even if the page is smaller than the window*/
|
||||
position: relative;
|
||||
min-height: 100vh;
|
||||
background-color: var(--backgroundColour);
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
}
|
||||
header{
|
||||
background-color: var(--headColour);
|
||||
}
|
||||
header h1 {
|
||||
font-size: 4em;
|
||||
color: var(--headTextColour);
|
||||
text-align: center;
|
||||
margin: 0;
|
||||
text-shadow: 3px 3px var(--accentColor);
|
||||
transition: text-shadow 0.3s;
|
||||
}
|
||||
header h1:hover {
|
||||
text-shadow: 6px 6px var(--accentColor);
|
||||
}
|
||||
header a {
|
||||
text-decoration: none;
|
||||
}
|
||||
/*Reduce font size on smaller form factors, to save screen space*/
|
||||
@media (max-width: 1200px) {
|
||||
header h1 {
|
||||
font-size: 2.5em;
|
||||
}
|
||||
}
|
||||
nav {
|
||||
background-color: var(--headColour);
|
||||
|
||||
/*Appear on top of screen, even when scrolled past*/
|
||||
position:sticky;
|
||||
top:0px;
|
||||
|
||||
/*Appear above all other elements*/
|
||||
z-index: 2;
|
||||
|
||||
border-bottom: 5px solid var(--accentColor);
|
||||
}
|
||||
|
||||
nav li {
|
||||
/*Remove bullet point character*/
|
||||
list-style: none;
|
||||
|
||||
padding: 30px;
|
||||
|
||||
/*Fill space as window is resized*/
|
||||
flex-grow: 1;
|
||||
text-align: center;
|
||||
}
|
||||
nav ul {
|
||||
/*Fill space as window is resized*/
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
flex-wrap: wrap;
|
||||
|
||||
/*Fill to all extent of nav element*/
|
||||
margin: 0;
|
||||
padding-left: 0;
|
||||
}
|
||||
@media (min-width: 1200px) {
|
||||
nav a:hover {
|
||||
border: 4px solid var(--headTextColour);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/*Hide checkbox on desktop view*/
|
||||
nav input {
|
||||
display: none;
|
||||
}
|
||||
nav label {
|
||||
display: none;
|
||||
}
|
||||
nav a {
|
||||
text-decoration: none;
|
||||
padding: 10px 30px 10px 30px;
|
||||
color: var(--headTextColour);
|
||||
font-weight: bold;
|
||||
transition: border 0.1s;
|
||||
border-radius: 8px;
|
||||
text-shadow: 2px 2px var(--accentColor);
|
||||
}
|
||||
nav .current {
|
||||
border: 3px solid var(--headTextColour);
|
||||
border-radius: 6px;
|
||||
|
||||
}
|
||||
footer .current {
|
||||
font-weight: bold;
|
||||
}
|
||||
/*Alternate styling for mobile view*/
|
||||
@media (max-width: 1200px) {
|
||||
nav {
|
||||
position: relative;
|
||||
padding-right: 0px;
|
||||
border-bottom: none;
|
||||
}
|
||||
nav a {
|
||||
font-weight: normal;
|
||||
text-shadow: none;
|
||||
}
|
||||
nav .current {
|
||||
font-weight: bold;
|
||||
border: 0;
|
||||
}
|
||||
nav li {
|
||||
text-align: left;
|
||||
border-bottom: 2px solid var(--accentColor);
|
||||
}
|
||||
/*Menu content. Default hidden with animation transition specified*/
|
||||
nav ul {
|
||||
display: block;
|
||||
max-height: 0px;
|
||||
overflow: hidden;
|
||||
transition: max-height 1s;
|
||||
}
|
||||
/*When the input element is checked, show the menu in the list below*/
|
||||
nav input:checked ~ ul {
|
||||
max-height: 500px;
|
||||
}
|
||||
|
||||
nav label {
|
||||
width:auto;
|
||||
background-color: var(--accentColor);
|
||||
color: var(--accentVisibleColor);
|
||||
display: block;
|
||||
padding: 10px;
|
||||
}
|
||||
/*Down arrow, position and animation specified*/
|
||||
nav img {
|
||||
transition: transform 1s;
|
||||
float:right;
|
||||
}
|
||||
/*When the menu us shown, rotate the arrow image, which is a child of the label component*/
|
||||
nav input:checked + label img {
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/*Flex content*/
|
||||
main {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: center;
|
||||
align-content: center;
|
||||
padding: 2%;
|
||||
margin-top: 30px;
|
||||
padding-bottom: 160px;
|
||||
}
|
||||
/*Main page header*/
|
||||
main>h1 {
|
||||
color:var(--articleTextColour);
|
||||
width: 100%;
|
||||
text-align: left;
|
||||
/*text-decoration: underline 10px;*/
|
||||
border-bottom: 8px solid var(--accentColor);
|
||||
}
|
||||
|
||||
/*Styling for main image display with caption*/
|
||||
.focusImage img {
|
||||
max-width: 100%;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.focusImage {
|
||||
border: 3px solid var(--accentColor);
|
||||
max-width: 300px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
.focusImage figcaption {
|
||||
background-color: var(--accentColor);
|
||||
color: var(--accentVisibleColor);
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/*Alternate CSS styling for an article element containing an image to the side of the content*/
|
||||
.asideBox img {
|
||||
float:left;
|
||||
max-width: 100%;
|
||||
padding-right: 1%;
|
||||
width: 20%;
|
||||
background-color: var(--accentColor);
|
||||
border-radius: 10px;
|
||||
margin-right: 2%;
|
||||
}
|
||||
.asideBox > p {
|
||||
padding-left: 21%;
|
||||
}
|
||||
.asideBox li {
|
||||
margin-left: 21%;
|
||||
}
|
||||
/*Tweakpoint to stop aside content entering quote content*/
|
||||
.asideBox .pquote {
|
||||
margin-left: 22%;
|
||||
}
|
||||
|
||||
/*Alternate styling to make float elements display properly on mobile form factor*/
|
||||
@media (max-width: 1200px) {
|
||||
.asideBox img {
|
||||
float:left;
|
||||
max-width: 100%;
|
||||
padding-right: 0%;
|
||||
margin-right: 2%;
|
||||
width: 40%;
|
||||
|
||||
}
|
||||
.asideBox p {
|
||||
padding-left: 1%;
|
||||
}
|
||||
.asideBox li{
|
||||
margin-left: 1%;
|
||||
}
|
||||
.asideBox .pquote {
|
||||
margin-left: 1%;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
}
|
||||
/*Tweakpoint: Force paragraph content to clear floating elements on really small displays*/
|
||||
@media(max-width: 600px) {
|
||||
p {
|
||||
clear:both;
|
||||
}
|
||||
}
|
||||
/*Article header*/
|
||||
article h1 {
|
||||
color: var(--articleTextColour);
|
||||
border-bottom: 8px solid var(--accentColor);
|
||||
}
|
||||
/*Article display*/
|
||||
article {
|
||||
background-color: var(--articleBColour);
|
||||
max-width: 100%;
|
||||
min-width: 30%;
|
||||
flex-grow: 1;
|
||||
margin: 20px;
|
||||
padding: 20px;
|
||||
width:100%;
|
||||
border-radius: 6px;
|
||||
color:var(--articleTextColour);
|
||||
}
|
||||
|
||||
/*hover effect for article elements*/
|
||||
@media(min-width:1200px) {
|
||||
article:not(.quizArticle) {
|
||||
transition: transform 0.3s;
|
||||
}
|
||||
article:hover:not(.quizArticle) {
|
||||
transform: scale(1.02);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*Alternative article display for desktop form factor*/
|
||||
@media (min-width: 1200px) {
|
||||
article{
|
||||
max-width: 43%;
|
||||
width: auto;
|
||||
}
|
||||
.fullArticle {
|
||||
max-width: 80%;
|
||||
width: 80%;
|
||||
}
|
||||
}
|
||||
|
||||
/*Footer styling*/
|
||||
footer{
|
||||
background-color: var(--headColour);
|
||||
color: white;
|
||||
padding-top: 10px;
|
||||
padding-bottom: 10px;
|
||||
position: absolute;
|
||||
bottom:0;
|
||||
width:100%;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: left;
|
||||
align-items:center;
|
||||
border-top:3px;
|
||||
border-bottom: 3px;
|
||||
color:var(--headTextColour);
|
||||
}
|
||||
|
||||
footer * {
|
||||
padding: 10px;
|
||||
}
|
||||
footer a {
|
||||
color: var(--headTextColour);
|
||||
|
||||
}
|
||||
@media (min-width: 1200px) {
|
||||
footer a:hover {
|
||||
text-decoration: underline double;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*Font size*/
|
||||
p {
|
||||
font-size: 1.2em;
|
||||
}
|
||||
@media (max-width: 1200px) {
|
||||
p {
|
||||
font-size: 1em;
|
||||
}
|
||||
|
||||
}
|
||||
/*"Extra Classes" to be used in conjunction with those above for some elements*/
|
||||
.floatRight {
|
||||
float:right;
|
||||
margin-top:0px;
|
||||
}
|
||||
@media (max-width:600px) {
|
||||
|
||||
.floatRight,.floatLeft {
|
||||
clear:both;
|
||||
}
|
||||
}
|
||||
@media(max-width:1200px) {
|
||||
.floatRight {
|
||||
float: left;
|
||||
}
|
||||
figure {
|
||||
clear:both;
|
||||
}
|
||||
p.floatRight + p {
|
||||
clear:both;
|
||||
}
|
||||
}
|
||||
.floatLeft {
|
||||
float:left;
|
||||
margin-top: 0px;
|
||||
}
|
||||
.monospace {
|
||||
font-family:monospace
|
||||
}
|
||||
.fullWidth {
|
||||
max-width:100%;
|
||||
}
|
||||
.mostWidth {
|
||||
max-width: 60%;
|
||||
}
|
||||
.halfWidth {
|
||||
max-width: 23%;
|
||||
}
|
||||
@media (max-width: 1200px) {
|
||||
.mostWidth {
|
||||
max-width: 100%;
|
||||
}
|
||||
.halfWidth {
|
||||
max-width: 50%;
|
||||
}
|
||||
.fullWidth, .mostWidth {
|
||||
margin-left: 0;
|
||||
margin-right: 0;
|
||||
}
|
||||
}
|
||||
@media (max-width: 600px) {
|
||||
.halfWidth {
|
||||
max-width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
/*Tweakpoint: define page sections */
|
||||
h2 {
|
||||
clear:both;
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
/*Author: Will Jeynes*/
|
||||
|
||||
/*Main quote container*/
|
||||
.pquote {
|
||||
background: var(--accentColor);
|
||||
padding: 20px 65px 20px 65px;
|
||||
margin: 20px 13px 13px 20px;
|
||||
line-height: 39px;
|
||||
background-image: url(../images/quote.png), url(../images/quoteend.png);
|
||||
background-position: left top, right bottom;
|
||||
background-repeat: no-repeat, no-repeat;
|
||||
border-radius: 6px;
|
||||
color: var(--accentVisibleColor)
|
||||
}
|
||||
|
||||
/*Tweakpoint: remove margins on small screen size*/
|
||||
@media(max-width:1200px) {
|
||||
.pquote {
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
|
||||
/* resets styling for blockquote */
|
||||
blockquote {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/*Sets the styling for the first letter of the quote*/
|
||||
.pquote p:first-letter {
|
||||
font-size: 39px;
|
||||
font-weight: bold;
|
||||
|
||||
}
|
||||
|
||||
/*Accessibility: reset color for visited link inside of quote element to increase contrast*/
|
||||
.pquote a:visited, .pquote a {
|
||||
color: inherit;
|
||||
}
|
||||
Reference in New Issue
Block a user