Commit 89a5a655 authored by haukao's avatar haukao
Browse files

Merge remote-tracking branch 'origin/master' into issue-12-customization

parents 7b592ee5 e54faf11
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" /> <meta name="theme-color" content="#000000" />
<meta name="description" content="Web site created using create-react-app" /> <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" /> <link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
<!-- <!--
manifest.json provides metadata used when your web app is installed on a 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 { #wrapperdiv {
background: rgb(233, 128, 116); padding-left: 5%;
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%); padding-right: 5%;
display: flex; height: 100%;
justify-content: center; }
flex-direction: column;
text-align: center; button {
margin: 0 auto 20px auto; box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.6), 0 6px 20px 0 rgba(0, 0, 0, 0.6);
width: 80vw; border: 1px solid #602080;
min-height: 80vh; box-sizing: border-box;
padding-bottom: 50px; font-weight: 300;
box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.6), 0 12px 30px 0 rgba(0, 0, 0, 0.6); 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 { #canvasAndLines {
width: 150px; display: flex;
margin: 40px; flex-direction: row-reverse;
justify-content: space-evenly;
}
p {
font-family: Esteban;
font-weight: 350;
}
#lines {
width: 50%;
} }
#wrapperdiv hr { #wrapperdiv hr {
margin-top: 60px; border: 0;
width: 600px; height: 1px;
overflow: visible; background-image: linear-gradient(to right, #202040, #b030b0, #202040);
/* For IE */ }
padding: 0;
border: none; canvas {
border-top: medium double #333; border: 7px double #b030b0;
color: #333; background: black;
text-align: center; width: 400px;
} height: 500px;
margin-left: 10%;
#wrapperdiv hr:after { margin-right: 10%;
content: "§";
display: inline-block;
position: relative;
top: -0.7em;
font-size: 1.5em;
padding: 0 0.25em;
background: #c58326;
} }
.lds-ring { .lds-ring {
display: inline-block; display: inline-block;
position: center; position: center;
width: 80px; width: 80px;
height: 80px; height: 80px;
} }
.lds-ring div { .lds-ring div {
box-sizing: border-box; box-sizing: border-box;
display: block; display: block;
position: absolute; position: absolute;
width: 64px; width: 64px;
height: 64px; height: 64px;
margin: 8px; margin: 8px;
border: 8px solid rgb(158, 45, 45); border: 8px solid rgb(158, 45, 45);
border-radius: 50%; border-radius: 50%;
animation: lds-ring 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite; animation: lds-ring 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
border-color: #59617e transparent transparent transparent; border-color: #b030b0 transparent transparent transparent;
} }
.lds-ring div:nth-child(1) { .lds-ring div:nth-child(1) {
animation-delay: -0.45s; animation-delay: -0.45s;
} }
.lds-ring div:nth-child(2) { .lds-ring div:nth-child(2) {
animation-delay: -0.3s; animation-delay: -0.3s;
} }
.lds-ring div:nth-child(3) { .lds-ring div:nth-child(3) {
animation-delay: -0.15s; animation-delay: -0.15s;
} }
@keyframes lds-ring { @keyframes lds-ring {
0% { 0% {
transform: rotate(0deg); transform: rotate(0deg);
} }
100% { 100% {
transform: rotate(360deg); transform: rotate(360deg);
} }
} }
/*Example width: ipad 768 width*/
#canvas { @media only screen and (max-width: 770px) and (min-width: 550px) {
border: 2px solid; html {
background: black; height: 100vh;
box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.6), 0 12px 30px 0 rgba(0, 0, 0, 0.6); width: 100vw;
} margin: 0;
\ No newline at end of file }
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;
}
}
...@@ -281,7 +281,8 @@ const App: React.FC = () => { ...@@ -281,7 +281,8 @@ const App: React.FC = () => {
<div> <div>
{!loading && installation !== undefined && ( {!loading && installation !== undefined && (
<div> <div>
<button <div className="buttons">
<button className="navigation"
onClick={() => { onClick={() => {
changePoetry(false); changePoetry(false);
}} }}
...@@ -289,22 +290,22 @@ const App: React.FC = () => { ...@@ -289,22 +290,22 @@ const App: React.FC = () => {
Previous poetry Previous poetry
</button> </button>
<button <button
id="themebutton"
onClick={() => { onClick={() => {
changePoetry(true); changeTheme(theme === Theme.DARK ? Theme.LIGHT : Theme.DARK);
}} }}
> >
Next poetry
{theme === 0 ? "Theme 2" : "Theme 1"}
</button> </button>
<button <button className="navigation"
id="themebutton"
onClick={() => { onClick={() => {
changeTheme( changePoetry(true);
theme === Theme.DARK ? Theme.LIGHT : Theme.DARK
);
}} }}
> >
{theme === 0 ? "Theme 1" : "Theme 2"} Next poetry
</button> </button>
</div>
{ {
<Exhibition <Exhibition
title={installation.title} title={installation.title}
...@@ -326,7 +327,7 @@ const App: React.FC = () => { ...@@ -326,7 +327,7 @@ const App: React.FC = () => {
</div> </div>
</> </>
); );
}; }
export default App; export default App;
......
...@@ -34,12 +34,13 @@ const Exhibition: React.FC<Installation> = ({ ...@@ -34,12 +34,13 @@ const Exhibition: React.FC<Installation> = ({
return ( return (
<div> <div>
<AudioPlayer source={audiosource} currentIndex={currentIndex} /> <AudioPlayer source={audiosource} currentIndex={currentIndex} />
<h1> <h2>
[{currentIndex}] {title} [{currentIndex}] {title}
</h1> </h2>
<h3> <h3>
By - <em>{author}</em> By - <em>{author}</em>
</h3> </h3>
<div className="buttons2">
<button <button
id="favouritebutton" id="favouritebutton"
onClick={() => { onClick={() => {
...@@ -48,11 +49,9 @@ const Exhibition: React.FC<Installation> = ({ ...@@ -48,11 +49,9 @@ const Exhibition: React.FC<Installation> = ({
> >
{isFavourite(currentIndex - 1) ? "Remove from fav" : "Add to fav"} {isFavourite(currentIndex - 1) ? "Remove from fav" : "Add to fav"}
</button> </button>
<br />
<canvas id="canvas" width="400" height="500" />
<br />
<button <button
className="canvascolorbutton" className="canvascolorbutton"
id="redbtn"
onClick={() => { onClick={() => {
canvasColor(Color.RED); canvasColor(Color.RED);
}} }}
...@@ -61,6 +60,7 @@ const Exhibition: React.FC<Installation> = ({ ...@@ -61,6 +60,7 @@ const Exhibition: React.FC<Installation> = ({
</button> </button>
<button <button
className="canvascolorbutton" className="canvascolorbutton"
id="greenbtn"
onClick={() => { onClick={() => {
canvasColor(Color.GREEN); canvasColor(Color.GREEN);
}} }}
...@@ -69,19 +69,23 @@ const Exhibition: React.FC<Installation> = ({ ...@@ -69,19 +69,23 @@ const Exhibition: React.FC<Installation> = ({
</button> </button>
<button <button
className="canvascolorbutton" className="canvascolorbutton"
id="bluebtn"
onClick={() => { onClick={() => {
canvasColor(Color.BLUE); canvasColor(Color.BLUE);
}} }}
> >
Blue Blue
</button> </button>
<hr />
<div id="lines">
{lines !== undefined
? lines.map((line: string) => <p key={Math.random()}>{line}</p>)
: null}
</div> </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> </div>
); );
}; };
......
...@@ -3,9 +3,9 @@ import React, { Component } from "react"; ...@@ -3,9 +3,9 @@ import React, { Component } from "react";
export class Header extends Component { export class Header extends Component {
render() { render() {
return ( return (
<div> <header>
<h1>The art of Seduction</h1> <h1>The Art of Seduction</h1>
</div> </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