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

Landing page + Fonts #24

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
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
Binary file added .DS_Store
Binary file not shown.
68 changes: 44 additions & 24 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,37 +1,57 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<link rel="stylesheet" type="text/css" href="style.css">
<title>
CHIRP
</title>
</head>
<body>
<div class="grid-container">
<div class="left-col">
<p>
<input type="text" placeholder="Enter chirp" id="textInput">
</p>
<button class="my-button" onclick="addDiv()">Add a chirp</button>
<p>
<input type="text" placeholder="Image url" id="imgInput">
</p>
<button class="my-button" onclick="addImage()">Add an image</button>

</div>

<div class="right-col" id="content-area">
</div>
<html lang="en">

<head>
<meta charset="UTF-8">
<link rel="stylesheet" type="text/css" href="style.css">

<!-- fonts -->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Raleway:ital,wght@0,200;0,300;0,400;0,500;0,700;1,200;1,300;1,400;1,500;1,700&display=swap" rel="stylesheet">

<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Quicksand:wght@300;400;500;600;700&display=swap" rel="stylesheet">

<title>
CHIRP
</title>
</head>

<body>
<div class="main">

<div id="top">
<h1 id="title">CHIRP</h1>
<div id="logo">
<img src="landing_logo.png" alt="logo">
</div>
</div>


<<<<<<< HEAD

<div class="text">
<p>(Code of Conduct here)</p>
</div>

<div class="button">
<button onclick="location.href = 'interface.html';" id="agree">I agree</button>
</div>

</div>


<script src="script.js" defer>
</script>

</body>

=======
<script src="script.js">
</script>

</body>
>>>>>>> 1e5465efaa1c2cf4d2de1fe72c239e6f5e53b19f
</html>
52 changes: 52 additions & 0 deletions interface.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<link rel="stylesheet" type="text/css" href="style.css">

<!-- fonts -->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Raleway:ital,wght@0,200;0,300;0,400;0,500;0,700;1,200;1,300;1,400;1,500;1,700&display=swap" rel="stylesheet">

<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Quicksand:wght@300;400;500;600;700&display=swap" rel="stylesheet">

<title>
CHIRP
</title>
</head>

<body>
<div class="grid-container">
<div class="left-col">
<p>
<input type="text" placeholder="Enter chirp" id="textInput">
</p>
<button class="basic-button" onclick="addDiv()">Add a chirp</button>
<p>
<input type="text" placeholder="Image url" id="imgInput">
</p>
<button class="basic-button" onclick="addImage()">Add an image</button>

</div>

<div class="right-col" id="content-area">
</div>
</div>






<script src="script.js" defer>


</script>

</body>

</html>
Binary file added landing_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
26 changes: 26 additions & 0 deletions script.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
<<<<<<< HEAD
function addDiv() {
//create a new P tag, save it in a variable
let theNewDiv = document.createElement("div");
//add a class to our new div element
theNewDiv.classList.add("auto-div");
//set the text inside the div
theNewDiv.innerHTML = document.getElementById("textInput").value;
=======

function addDiv() {
let currentDate = new Date();
Expand All @@ -15,6 +24,7 @@ let time = hours + ":" + currentDate.getMinutes();
//set the text inside the div
theNewDiv.innerHTML = document.getElementById("textInput").value;
timeDiv.innerHTML = time;
>>>>>>> 1e5465efaa1c2cf4d2de1fe72c239e6f5e53b19f

//find the right tag to add the div to
//we used an id of "content-area" for
Expand All @@ -23,6 +33,15 @@ let time = hours + ":" + currentDate.getMinutes();

//add the new div to that tag
theContentArea.appendChild(theNewDiv);
<<<<<<< HEAD
}

function addImage() {
//create a new P tag, save it in a variable
let theNewDiv = document.createElement("div");
//add a class to our new div element
theNewDiv.classList.add("auto-div");
=======
theContentArea.appendChild(timeDiv);
}

Expand All @@ -39,13 +58,17 @@ let time = hours + ":" + currentDate.getMinutes();
//add a class to our new div element
theNewDiv.classList.add("auto-div");
timeDiv.classList.add("right");
>>>>>>> 1e5465efaa1c2cf4d2de1fe72c239e6f5e53b19f

//create image tag to put into the div
theImgTag = "<img src='" + document.getElementById("imgInput").value + "' width = 100 height = 100>";

//set the text inside the div
theNewDiv.innerHTML = theImgTag;
<<<<<<< HEAD
=======
timeDiv.innerHTML = time;
>>>>>>> 1e5465efaa1c2cf4d2de1fe72c239e6f5e53b19f

//find the right tag to add the div to
//we used an id of "content-area" for
Expand All @@ -54,8 +77,11 @@ let time = hours + ":" + currentDate.getMinutes();

//add the new div to that tag
theContentArea.appendChild(theNewDiv);
<<<<<<< HEAD
=======
theContentArea.appendChild(timeDiv);



>>>>>>> 1e5465efaa1c2cf4d2de1fe72c239e6f5e53b19f
}
93 changes: 58 additions & 35 deletions style.css
Original file line number Diff line number Diff line change
@@ -1,62 +1,85 @@
/* div{
border: 5px solid pink;
} */
html,
body {
height: 100%;
margin: 0px;
padding: 20px;
box-sizing: border-box;
height: 100%;
margin: 0px;
padding: 20px;
box-sizing: border-box;
/* specifying length from the outside of the box */
background-color: #FDFCDC;
}

body {
.main {
text-align: center;
}

.paragraph-text {
color: blue;
color: blue;
}

.my-button {
border: 0px;
background-color: #90adc6;
padding: 10px;
border: 1px solid black;
.basic-button {
border: 0px;
background-color: #90adc6;
padding: 10px;
border: 1px solid black;
border-radius: 5px;
}

.grid-container {
/*set the positioning of the grid*/
/*so that it fills the screen*/
position: absolute;
top: 0px;
left: 0px;
height: 100%;
width: 100%;

/*set display to grid*/
display: grid;
grid-template-columns: 250px auto;
grid-template-rows: 100% 100%;
/*set the positioning of the grid*/
/*so that it fills the screen*/
position: absolute;
top: 0px;
left: 0px;
height: 100%;
width: 100%;
/*set display to grid*/
display: grid;
grid-template-columns: 250px auto;
grid-template-rows: 100% 100%;
}

.left-col {
/*style left column*/
padding: 15px;
background-color: #fad02c;
/*style left column*/
padding: 15px;
background-color: #fad02c;
}

.right-col {
/*style right column*/
padding: 15px;
background-color: coral;
/*style right column*/
padding: 15px;
background-color: coral;
}

/*format for each chirp message*/
.auto-div {
/*15px on top and botton*/
/*0 on left and right*/
margin: 15px 0;
/*15px on top and botton*/
/*0 on left and right*/
margin: 15px 0;
padding: 10px;
background-color: palevioletred;
border: 3px solid peachpuff;
}

h1 {
font-weight: 400;
font-size: 15vh;
font-family: 'Quicksand', sans-serif;
}

p {
font-family: 'Raleway', sans-serif;
}

padding: 10px;
#logo {
min-width: 100px;
margin: auto;
}

background-color: palevioletred;
border: 3px solid peachpuff;
#top {
margin-bottom: 20vh;
}
.right {
margin: -15px 0;
Expand Down