Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ming testbranch #6

Merged
merged 8 commits into from
Dec 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions client/about_us.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Music: Broad Horizons</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<div class="Wrapper">
<div class='header'>
<h2> INST377 group 102-01 </h2>
</div>
<p>
This is Minghan Cai and Filip Radmanovic's final project for INST377
</p>
<div class='footer'>
<p>Go to <a href='index.html'>Our project's main page</a></p>
<p>MingC98 <a href='https://github.com/MingC98/INST377-Lab-Work'>My Github account</a></p>
<p>eniteCZ <a href='https://github.com/eniteCZ/INST377-Lab-Work'>My Github account</a></p>
</div>
</div>
<script src="./script.js"></script>
</body>
</html>
3 changes: 3 additions & 0 deletions client/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,11 +139,14 @@ function injectHTML(list) {
async function init(){
const submit = document.querySelector('#submit');

document.getElementById("music_list").style.display = "none";

let songArray = await songNamesArray();
submit.addEventListener('click', (e) => {
e.preventDefault();
injectHTML(songArray);
console.log(songArray);
document.getElementById("music_list").style.display = "block";
})

}
Expand Down
59 changes: 59 additions & 0 deletions client/styles.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
html {
background-color: rgb(130, 187, 231);
font-size: 16px;
min-width: 300px;
overflow-x: hidden;
overflow-y: scroll;

/* these are specific to different browsers */
-moz-osx-font-smoothing: grayscale;
-webkit-font-smoothing: antialiased;
text-rendering: optimizeLegibility;
-webkit-text-size-adjust: 100%;
-moz-text-size-adjust: 100%;
text-size-adjust: 100%;
}

.header {
font-size: 2em;
margin-block-start: 0.67em;
margin-block-end: 0.67em;
margin-inline-start: 0px;
margin-inline-end: 0px;
font-weight: bold;
}

.header h2 {
font-size: 1em;
}
.wrapper {
min-height: 100vh;
display: flex;
flex-direction: column;
margin: 0;
flex: 10;
}

.box {
background-color: rgba(36, 34, 163, 0.4);
border: 2px dashed;
border-radius: 4px;

width: fit-content;
height: fit-content;
padding: 0.5rem;
margin: 0 auto;
}

.search_bar {
background-color: rgba(240, 248, 255, 0);
height: fit-content;
padding: 1.5rem;
}

.footer {
flex-shrink: 0;
padding: 1rem;
font-size: 1.2rem;
font-weight: 600;
}
18 changes: 15 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,23 @@
<link rel="stylesheet" href="./client/styles.css">
</head>
<body>
<h1> New Horizons </h1>
<div class="Wrapper">
<button type="button", id="Submit">Broaden my horizon!</button>
<div class='header'>
<h1> New Horizons </h1>
</div>
<div>
<label for="music">Form playlist</label>
<input type="music" name="music" id="musico" />
</div>
<div class="search_bar">
<button type="button", id="Submit">Broaden my horizon!</button>
</div>
<div class="box", id="music_list"></div>
<div class='footer'>
<p>Go to <a href='https://open.spotify.com/'>Spotify</a></p>
</div>
</div>
<script src="./client/script.js"></script>
</body>
</html>
</html>