Commit e54faf11 authored by Hauk Aleksander Olaussen's avatar Hauk Aleksander Olaussen 🛀🏿
Browse files

Merge branch '11-make-an-appropriate-design-for-the-webapp' into 'master'

Resolve "Make an appropriate design for the WebApp"

See merge request !12
parents 51b9fbd8 e80405f1
......@@ -9,6 +9,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta name="description" content="Web site created using create-react-app" />
<link href='https://fonts.googleapis.com/css?family=Esteban' rel='stylesheet'>
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
<!--
manifest.json provides metadata used when your web app is installed on a
......
html {
height: 100%;
margin: 0;
}
body {
margin: 0;
width: 100%;
height: 100%;
background: #59617e;
display: flex;
justify-content: center;
font-family: 'Lobster', cursive;
}
\ No newline at end of file
html {
height: 100%;
width: 100%;
}
header {
padding-top: 2%;
padding-bottom: 2%;
margin-bottom: 2%;
background-color: #202040;
}
body {
background-color: #1b1b36;
color: #e5e5e5;
text-align: center;
padding: 0.5%;
height: 100%;
line-height: 2;
font-size: 1.1rem;
font-family: Arial, Helvetica, sans-serif;
}
h1 {
margin: auto;
line-height: 1.2;
}
header > h1 {
text-decoration: none;
font-weight: 500;
font-size: 5.05rem;
}
h2 {
line-height: 1.2;
font-weight: 400;
font-size: 3.4rem;
text-decoration: underline;
}
h3 {
line-height: 1.2;
font-size: 2.25rem;
}
#wrapperdiv {
background: rgb(233, 128, 116);
background: linear-gradient(90deg, rgba(233, 128, 116, 1) 0%, rgba(216, 195, 165, 1) 40%, rgba(216, 195, 165, 1) 60%, rgba(233, 128, 116, 1) 100%);
display: flex;
justify-content: center;
flex-direction: column;
text-align: center;
margin: 0 auto 20px auto;
width: 80vw;
min-height: 80vh;
padding-bottom: 50px;
box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.6), 0 12px 30px 0 rgba(0, 0, 0, 0.6);
padding-left: 5%;
padding-right: 5%;
height: 100%;
}
button {
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.6), 0 6px 20px 0 rgba(0, 0, 0, 0.6);
border: 1px solid #602080;
box-sizing: border-box;
font-weight: 300;
color: #e5e5e5;
text-align: center;
transition: all 0.2s ease-in-out;
background-color: #602080;
margin-bottom: 3%;
padding: 1%;
width: 20%;
}
button:hover {
color: #000000;
background-color: #e5e5e5;
transform: scale(1.1);
}
.buttons {
width: 100%;
display: flex;
flex-direction: row;
justify-content: space-around;
align-items: flex-start;
}
.buttons2 {
width: 100%;
display: flex;
flex-direction: row;
justify-content: space-around;
align-items: flex-start;
}
#redbtn {
background-color: red;
}
#greenbtn {
background-color: green;
}
#bluebtn {
background-color: blue;
}
.navigation {
background-color: #b030b0;
}
#muteButton {
display: flex;
flex-direction: row;
justify-content: space-evenly;
}
#wrapperdiv button {
width: 150px;
margin: 40px;
#canvasAndLines {
display: flex;
flex-direction: row-reverse;
justify-content: space-evenly;
}
p {
font-family: Esteban;
font-weight: 350;
}
#lines {
width: 50%;
}
#wrapperdiv hr {
margin-top: 60px;
width: 600px;
overflow: visible;
/* For IE */
padding: 0;
border: none;
border-top: medium double #333;
color: #333;
text-align: center;
}
#wrapperdiv hr:after {
content: "§";
display: inline-block;
position: relative;
top: -0.7em;
font-size: 1.5em;
padding: 0 0.25em;
background: #c58326;
border: 0;
height: 1px;
background-image: linear-gradient(to right, #202040, #b030b0, #202040);
}
canvas {
border: 7px double #b030b0;
background: black;
width: 400px;
height: 500px;
margin-left: 10%;
margin-right: 10%;
}
.lds-ring {
display: inline-block;
position: center;
width: 80px;
height: 80px;
display: inline-block;
position: center;
width: 80px;
height: 80px;
}
.lds-ring div {
box-sizing: border-box;
display: block;
position: absolute;
width: 64px;
height: 64px;
margin: 8px;
border: 8px solid rgb(158, 45, 45);
border-radius: 50%;
animation: lds-ring 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
border-color: #59617e transparent transparent transparent;
box-sizing: border-box;
display: block;
position: absolute;
width: 64px;
height: 64px;
margin: 8px;
border: 8px solid rgb(158, 45, 45);
border-radius: 50%;
animation: lds-ring 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
border-color: #b030b0 transparent transparent transparent;
}
.lds-ring div:nth-child(1) {
animation-delay: -0.45s;
animation-delay: -0.45s;
}
.lds-ring div:nth-child(2) {
animation-delay: -0.3s;
animation-delay: -0.3s;
}
.lds-ring div:nth-child(3) {
animation-delay: -0.15s;
animation-delay: -0.15s;
}
@keyframes lds-ring {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
#canvas {
border: 2px solid;
background: black;
box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.6), 0 12px 30px 0 rgba(0, 0, 0, 0.6);
}
\ No newline at end of file
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
/*Example width: ipad 768 width*/
@media only screen and (max-width: 770px) and (min-width: 550px) {
html {
height: 100vh;
width: 100vw;
margin: 0;
}
body {
margin: 0%;
padding: 0%;
width: 100vw;
height: 100vh;
}
button {
transition: 0.5s ease-in-out;
width: 100%;
border-radius: 12px;
}
.buttons {
flex-wrap: wrap;
}
/*
No hover property on tablet and mobile devices.
*/
button:hover {
transform: unset;
background-color: #602080;
color: #e5e5e5;
}
header > h1 {
text-decoration: none;
font-weight: 500;
font-size: 4rem;
}
h2 {
line-height: 1.2;
font-weight: 400;
font-size: 2.6rem;
text-decoration: underline;
}
h3 {
line-height: 1.2;
font-size: 2rem;
}
#canvasAndLines {
display: flex;
flex-direction: column;
justify-content: center;
flex-wrap: wrap;
align-items: center;
}
#lines {
margin-top: 5%;
}
}
@media only screen and (max-width: 500px) {
html {
height: 100vh;
width: 100vw;
margin: 0;
}
body {
margin: 0%;
padding: 0%;
width: 100vw;
height: 100vh;
}
button {
transition: 0.5s ease-in-out;
width: 100%;
border-radius: 12px;
}
.buttons {
flex-wrap: wrap;
}
/*
No hover property on tablet and mobile devices.
*/
button:hover {
transform: unset;
background-color: #602080;
color: #e5e5e5;
}
#canvasAndLines {
display: flex;
flex-direction: row-reverse;
flex-wrap: wrap;
}
#lines {
margin-top: 5%;
width: unset;
}
canvas {
width: 100%;
height: auto;
}
header > h1 {
text-decoration: none;
font-weight: 500;
font-size: 3rem;
}
h2 {
line-height: 1.2;
font-weight: 400;
font-size: 2rem;
text-decoration: underline;
}
h3 {
line-height: 1.2;
font-size: 1.3rem;
}
}
......@@ -195,7 +195,8 @@ const App: React.FC = () => {
<div>
{!loading && installation !== undefined && (
<div>
<button
<div className="buttons">
<button className="navigation"
onClick={() => {
changePoetry(false);
}}
......@@ -203,20 +204,22 @@ const App: React.FC = () => {
Previous poetry
</button>
<button
id="themebutton"
onClick={() => {
changePoetry(true);
changeTheme();
}}
>
Next poetry
{theme === 0 ? "Theme 2" : "Theme 1"}
</button>
<button
id="themebutton"
<button className="navigation"
onClick={() => {
changeTheme();
changePoetry(true);
}}
>
{theme === 0 ? "Theme 2" : "Theme 1"}
Next poetry
</button>
</div>
{
<Exhibition
title={installation.title}
......@@ -239,7 +242,7 @@ const App: React.FC = () => {
</div>
</>
);
};
}
export default App;
......
......@@ -35,12 +35,13 @@ const Exhibition: React.FC<Installation> = ({
return (
<div>
<AudioPlayer source={audiosource} currentIndex={currentIndex} />
<h1>
<h2>
[{currentIndex}] {title}
</h1>
</h2>
<h3>
By - <em>{author}</em>
</h3>
<div className="buttons2">
<button
id="favouritebutton"
onClick={() => {
......@@ -49,11 +50,9 @@ const Exhibition: React.FC<Installation> = ({
>
{isFavourite(currentIndex - 1) ? "Remove from fav" : "Add to fav"}
</button>
<br />
<canvas id="canvas" width="400" height="500" />
<br />
<button
className="canvascolorbutton"
id="redbtn"
onClick={() => {
canvasColor(Color.RED);
}}
......@@ -62,6 +61,7 @@ const Exhibition: React.FC<Installation> = ({
</button>
<button
className="canvascolorbutton"
id="greenbtn"
onClick={() => {
canvasColor(Color.GREEN);
}}
......@@ -70,19 +70,23 @@ const Exhibition: React.FC<Installation> = ({
</button>
<button
className="canvascolorbutton"
id="bluebtn"
onClick={() => {
canvasColor(Color.BLUE);
}}
>
Blue
</button>
<hr />
<div id="lines">
{lines !== undefined
? lines.map((line: string) => <p key={Math.random()}>{line}</p>)
: null}
</div>
<hr />
<div id="canvasAndLines">
<canvas id="canvas" width="400" height="500" />
<div id="lines">
{lines !== undefined
? lines.map((line: string) => <p key={Math.random()}>{line}</p>)
: null}
</div>
<hr />
</div>
</div>
);
};
......
......@@ -3,9 +3,9 @@ import React, { Component } from "react";
export class Header extends Component {
render() {
return (
<div>
<h1>The art of Seduction</h1>
</div>
<header>
<h1>The Art of Seduction</h1>
</header>
);
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment