Skip to content
This repository has been archived by the owner on May 31, 2024. It is now read-only.

Commit

Permalink
upudate
Browse files Browse the repository at this point in the history
  • Loading branch information
davidmasp committed Jun 20, 2021
1 parent c3cc77e commit 29ae229
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 19 deletions.
33 changes: 15 additions & 18 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,41 +5,38 @@
<script src="https://cdn.jsdelivr.net/npm/p5@1.3.1/lib/p5.js"></script>
<!-- <script src="main.js" type="text/javascript"></script> -->
<script src="sketch.js" type="text/javascript"></script>
<link rel="stylesheet" href="styles.css">
<!-- CSS only -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.5.0/font/bootstrap-icons.css">
<link rel="stylesheet" href="styles.css">
</head>

<body>
<h1 id="code">Municipi
<h1 id="tt1">Quantes vacunes s'han posat al teu municipi?</h1>
<h1 id="municipi">Municipi
<!-- <input id="cdeIN" type="text" value="082606">
<button id="submit">submit</button> -->
</h1>
<div id="canvasDiv" class="center"> </div>
<p>
nfsdkjfkjdhf
</p>
<div class="container">
<div class="row">
<div class="col">

</div>
<div class="col">
<div class="input-group mb-3">
<input type="text" id="codeX" value="Amposta" class="form-control">
<button id="submit" type="button" class="btn btn-dark">

<div class="row">
<p id="introdueix">
Introdueix el teu municipi...
</p>
</div>
<div class="row">
<div class="col">
<div class="input-group mb-3">
<input type="text" id="codeX" value="Amposta" class="form-control">
<button id="submit" type="button" class="btn btn-dark">
<i class="bi bi-hand-index-thumb"></i>
</button>
</div>

</div>
<div class="col">

</div>
</div>

</div>
<div></div>


<p>
Expand Down
3 changes: 2 additions & 1 deletion sketch.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ var input;

// RANDOM VARS

// this is a comment"""

// FUNCTIONS

Expand All @@ -14,7 +15,7 @@ async function obtainCode(query, element = 0) {
//return data;
const citySelected = data[1][0]
console.log(citySelected)
document.getElementById("code").textContent = citySelected
document.getElementById("municipi").textContent = citySelected
urlSearch = `https://api.idescat.cat/pob/v1/cerca.json?p=q/${citySelected};tipus/mun`
const responseSearch = await fetch(urlSearch);
const dataSearch = await responseSearch.json();
Expand Down
50 changes: 50 additions & 0 deletions styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,54 @@
width: 100%;
border: 5px solid #FFFF00;
padding: 10px;
}

.row {
border: 5px solid #FFFF00;
}

body {
background: #F0EEEE !important;
}

#tt1 {
position: absolute;
width: 852px;
height: 44px;
left: 294px;
top: 86px;
font-family: Montserrat;
font-style: normal;
font-weight: 600;
font-size: 36px;
line-height: 44px;
/* identical to box height */
color: #000000;
}

#municipi {
position: absolute;
width: 152px;
height: 59px;
left: 644px;
top: 130px;
font-family: Montserrat;
font-style: normal;
font-weight: 600;
font-size: 48px;
line-height: 59px;
/* identical to box height */
display: flex;
align-items: center;
text-align: center;
color: #000000;
}

#introdueix {
font-family: Roboto;
font-style: normal;
font-weight: 500;
font-size: 24px;
line-height: 28px;
color: #000000;
}

0 comments on commit 29ae229

Please sign in to comment.