Skip to content

Commit

Permalink
Merge pull request #9 from lobophf/page-create-orphanage
Browse files Browse the repository at this point in the history
Page create orphanage
  • Loading branch information
lobophf authored Oct 16, 2020
2 parents fa53fef + 34f3c56 commit 6d35e2b
Show file tree
Hide file tree
Showing 12 changed files with 440 additions and 90 deletions.
103 changes: 103 additions & 0 deletions create-orphanage.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
<!DOCTYPE html>
<html lang="pt_BR">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Adicionar orfanato | Happy</title>
<link
rel="stylesheet"
href="https://unpkg.com/[email protected]/dist/leaflet.css"
integrity="sha512-xodZBNTC5n17Xt2atTPuE1HxjVMSvLVW9ocqUKLsCC5CXdbqCmblAshOMAS6/keqq/sMZMZ19scR4PsZChSR7A=="
crossorigin="">
<script
src="https://unpkg.com/[email protected]/dist/leaflet.js"
integrity="sha512-XQoYMqMTK8LvdxXYG3nZ448hOEQiglfqkJs1NOQV44cWnUrBc8PkAOcXy20w0vlaXaVUearIOBhiXZ5V3ynxwA=="
crossorigin=""></script>

<link rel="icon" href="./public/images/logo-icon.png">
<link rel="stylesheet" href="./public/css/main.css">
<link rel="stylesheet" href="./public/css/animations.css">
<link rel="stylesheet" href="./public/css/sidebar.css">
<link rel="stylesheet" href="./public/css/map.css">
<link rel="stylesheet" href="./public/css/form.css">
<link rel="stylesheet" href="./public/css/buttons.css">
<link rel="stylesheet" href="./public/css/page-create-orphanage.css">
<link href="https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800&display=swap" rel="stylesheet">
</head>
<body>
<div id="page-create-orphanage">
<aside class="animate-right sidebar">
<img src="./public/images/map-marker.svg" alt="Happy">
<footer>
<button onclick="history.back()">
<img src="./public/images/arrow-back.svg" alt="Voltar">
</button>
</footer>
</aside>
<main class="animate-appear with-sidebar">
<form action="">
<fieldset>
<legend>Dados</legend>
<div class="map-container">
<div id="mapid"></div>
<input type="hidden" name="lat">
<input type="hidden" name="lng">
<footer>
<a href="#" id="select-point">
Clique no mapa para adicionar a localização
</a>
</footer>
</div>
<div class="input-block">
<label for="name">Nome</label>
<input id="name" name="name" required>
</div>
<div class="input-block">
<label for="about">Sobre<span>Máximo de 300 caracteres</span></label>
<textarea id="about" name="about" required></textarea>
</div>
<div class="input-block">
<label for="whatsapp">Número de WhatsApp</label>
<input id="whatsapp" name="whatsapp" required>
</div>
<div class="input-block images">
<label for="images">Fotos</label>
<div class="images-upload" id="images">
<div class="new-upload">
<input name="images" placeholder="Cole o link da foto aqui" required>
<span onclick="deleteField(event)">
<img src="./public/images/remove-file.svg" alt="Remover Foto">
</span>
</div>
</div>
<button onclick="addPhotoField()" type="button">
<img src="./public/images/add-file.svg" alt="Adicionar foto">
</button>
</div>
</fieldset>
<fieldset>
<legend>Visitação</legend>
<div class="input-block">
<label for="instructions">Instruções</label>
<textarea id="instructions" name="instructions" required></textarea>
</div>
<div class="input-block">
<label for="opening_hours">Horário das visitas</label>
<input id="opening_hours" name="opening_hours" required>
</div>
<div class="input-block">
<label for="open_on_weekends">Atende fim de semana?</label>
<input type="hidden" id="open_on_weekends" name="open_on_weekends" value="1" required>
<div class="button-select">
<button data-value="1" onclick="toggleSelect(event)" type="button" class="active">Sim</button>
<button data-value="0" onclick="toggleSelect(event)" type="button">Não</button>
</div>
<button type="submit" class="primary-button">Confirmar</button>
</div>
</fieldset>
</form>
</main>
</div>
<script src="./public/scripts/page-create-orphanage.js"></script>
</body>
</html>
3 changes: 3 additions & 0 deletions orphanage.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
<link rel="stylesheet" href="./public/css/main.css">
<link rel="stylesheet" href="./public/css/animations.css">
<link rel="stylesheet" href="./public/css/page-orphanage.css">
<link rel="stylesheet" href="./public/css/map.css">
<link rel="stylesheet" href="./public/css/buttons.css">
<link rel="stylesheet" href="./public/css/sidebar.css">
<link href="https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800&display=swap" rel="stylesheet">
</head>
<body>
Expand Down
49 changes: 49 additions & 0 deletions public/css/buttons.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
.primary-button {
margin-top: 6.4rem;
width: 100%;
height: 6.4rem;
border: 0;
cursor: pointer;
background: #3CDC8C;
border-radius: 2rem;
color: white;
display: flex;
align-items: center;
justify-content: center;
transition: background-color .2s;
}

.primary-button:hover {
background: #36CF82;
}

.primary-button img {
margin-right: 1.6rem;
}

.button-select {
display: grid;
grid-template-columns: 1fr 1fr;
}

.button-select button {
height: 6.4rem;
background: #F5F8FA;
border: 1px solid #D3E2E5;
color: #5C8599;
cursor: pointer;
}

.button-select button.active {
background: #EDFFF6;
border: 1px solid #A1E9C5;
color: #37C77F;
}

.button-select button:first-child {
border-radius: 2rem 0 0 2rem;
}

.button-select button:last-child {
border-radius: 0 2rem 2rem 0;
}
101 changes: 101 additions & 0 deletions public/css/form.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
form {
width: 70rem;
margin: 6.4rem auto;
background: white;
border: 1px solid #d3e2e5;
border-radius: 2rem;
overflow: hidden;
padding: 8rem;
}

fieldset {
border: 0;
}

fieldset + fieldset {
margin-top: 8rem;
}

fieldset legend {
width: 100%;
font-size: 3.2rem;
line-height: 1.5;
color: #5c8599;
font-weight: 700;
border-bottom: 1px solid #d3e2e5;
margin-bottom: 4rem;
padding-bottom: 2.4rem;
}

.input-block + .input-block {
margin-top: 2.4rem;
}

.input-block label {
color: #8FA7B3;
margin-bottom: 0.8rem;
line-height: 1.5;
}

.input-block label span {
font-size: 1.4rem;
color: #8FA7D3;
margin-left: 2.4rem;
}

.input-block input, .input-block textarea {
width: 100%;
background: #F5F8FA;
border: 1px solid #D3E2E5;
border-radius: 2rem;
color: #5C8599;
}

.input-block input {
height: 6.4rem;
padding: 0 1.6rem;
}

.input-block input:valid,
.input-block textarea:valid {
border: 1px solid #A1E9C5;
}

.input-block textarea {
height: clamp(12rem, 16rem, 24rem);
resize: vertical;
padding: 1.6rem;
line-height: 2.8rem;
}

.input-block.images button {
border: 1px dashed #96D2F0;
width: 100%;
background: #F5F8FA;
height: 6.4rem;
padding: 0 1.6rem;
margin-top: 2.4rem;
border-radius: 2rem;
cursor: pointer;
}

.new-upload {
position: relative;
}

.new-upload + .new-upload {
margin-top: 2.4rem;
}

.new-upload span {
position: absolute;
right: 12px;
bottom: 14px;
display: flex;
background: #FFFFFF;
border: 1px solid #D3E2E5;
border-radius: 10px;
box-sizing: border-box;
padding: .6rem;
cursor: pointer;
}
27 changes: 27 additions & 0 deletions public/css/map.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
.map-container {
margin-top: 6.4rem;
background: #E6F7FB;
border: 1px solid #DDE3F0;
border-radius: 2rem;
}

#mapid {
width: 100%;
height: 28rem;
}

.map-container footer {
padding: 2rem 0;
text-align: center;
}

.map-container footer a {
color: #0089A5;
text-decoration: none;
font-weight: 700;
}

.map-container .leaflet-container {
border-bottom: 1px solid #DDE3F0;
border-radius: 2rem;
}
53 changes: 53 additions & 0 deletions public/css/page-create-orphanage.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
#page-create-orphanage {
display: flex;
min-height: 100vh;
}

main {
flex: 1;
}

.map-container {
margin-top: -60px
}

.map-container .leaflet-container {
border-radius: 20px 20px 0 0;
}

.map-container footer {
background: #F5F8FA;
border-radius: 0 0 20px 20px;
}

form {
width: 70rem;
margin: 6.4rem auto;
background: white;
border: 1px solid #D3E2E5;
border-radius: 2rem;
overflow: hidden;
padding: 8rem;
}

fieldset {
border: 0;
}

fieldset + fieldset {
margin-top: 8rem;
}

fieldset legend {
width: 100%;
font-size: 3.2rem;
line-height: 1.5;
color: #5C8599;
font-weight: 700;
border-bottom: 1px solid #D3E2E5;
}

.input-block + .input-block {
margin-top: 2.4rem;
}

Loading

0 comments on commit 6d35e2b

Please sign in to comment.