Skip to content

Commit

Permalink
fix: stylized attributions button and some minor design tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
afonsosousah committed Feb 17, 2024
1 parent f133819 commit 775630b
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 4 deletions.
22 changes: 21 additions & 1 deletion assets/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,24 @@ body {
left: .5em;
bottom: unset !important;
right: unset !important;
border-radius: 999px !important;
}
.ol-attribution button {
all: unset;
height: 1.375em;
width: 1.375em;
line-height: .4em;
border-radius: 999px;
background-color: var(--glass-white);
color: var(--green);
text-align: center;
font-family: Roboto, Arial, sans-serif;
font-weight: bold;
}
.ol-attribution button:focus, .ol-attribution button:hover {
outline: 1px solid var(--green);
color: var(--green);
line-height: .4em;
}
/* #endregion */

Expand Down Expand Up @@ -623,7 +641,7 @@ input[type="search"]::-webkit-search-results-decoration {
.station-card #startNavigationButton {
position: absolute;
top: -8vh;
right: 8vh;
right: 7vh;
background-color: var(--black);
border-radius: 999px;
color: white;
Expand All @@ -632,6 +650,7 @@ input[type="search"]::-webkit-search-results-decoration {
align-items: center;
height: 6vh;
width: 6vh;
box-shadow: 0px 4px 6px 0px var(--shadow-black), 0px 0px 5px 0px var(--shadow-black) inset;
}
.station-card #startNavigationButton:hover {
cursor: pointer;
Expand All @@ -657,6 +676,7 @@ input[type="search"]::-webkit-search-results-decoration {
height: 6vh;
padding: 0 2dvh;
font-size: 0.8rem;
box-shadow: 0px 4px 6px 0px var(--shadow-black), 0px 0px 5px 0px var(--shadow-black) inset;
}
/* #endregion */

Expand Down
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@

<title>mGira</title>

<link rel="stylesheet" href="assets/style.css" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/ol@v8.1.0/ol.css" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.1/font/bootstrap-icons.css" />
<link rel="stylesheet" href="assets/style.css" />

<!-- JS imports -->
<script src="scripts/bikeSerialNumberMapping.js"></script>
Expand Down
8 changes: 6 additions & 2 deletions scripts/map.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,12 @@ async function initMap() {
format: new ol.format.GeoJSON(),
});

const attribution = new ol.control.Attribution({
collapsible: true,
const infoLabel = document.createElement("i");
infoLabel.classList.add("bi", "bi-info");

const attribution = new ol.control.Attribution({
collapsible: true,
label: infoLabel,
});

map = new ol.Map({
Expand Down

0 comments on commit 775630b

Please sign in to comment.