Skip to content

Commit

Permalink
astro
Browse files Browse the repository at this point in the history
  • Loading branch information
hyperknot committed Jun 13, 2024
1 parent 3f26695 commit ec5bac8
Show file tree
Hide file tree
Showing 14 changed files with 786 additions and 2,524 deletions.
2,950 changes: 655 additions & 2,295 deletions website/pnpm-lock.yaml

Large diffs are not rendered by default.

61 changes: 0 additions & 61 deletions website/src/components/Card.astro

This file was deleted.

17 changes: 0 additions & 17 deletions website/src/components/Logo.astro
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
---
interface Props {
title: string
}
const { title } = Astro.props
---

Expand All @@ -16,16 +12,3 @@ const { title } = Astro.props
>
<a href="https://x.com/hyperknot" target="_blank"><img src="/x.svg" alt="x" height="28" /></a>
</div>

<style>
.logo {
margin: 0 auto;
}

.icons {
margin: 0 auto;
width: 80px;
display: flex;
justify-content: space-between;
}
</style>
82 changes: 1 addition & 81 deletions website/src/components/Map.astro
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const { showStyleURL } = Astro.props
</div>
</div>

<div class="button-container">
<div class="button-container container">
<button data-style="positron" class="btn">Positron</button>
<button data-style="bright" class="btn">Bright</button>
<button data-style="liberty" class="btn selected">Liberty</button>
Expand All @@ -24,83 +24,3 @@ const { showStyleURL } = Astro.props

<script is:inline src="https://unpkg.com/maplibre-gl/dist/maplibre-gl.js"></script>
<script is:inline src="/scripts/map.js"></script>

<style>
#map-container {
width: 100%;
height: 500px;
margin-bottom: 24px;
position: relative;
}

@media (max-width: 550px) {
#map-container {
height: 300px;
}
}

#mapbg-image {
width: 100%;
height: 100%;
position: absolute;
z-index: 1;
background-image: url('/berlin.webp');
background-size: cover;
background-position: center;
background-repeat: no-repeat;
cursor: pointer;
transition: opacity 3s;
}

.mapbg-attrib {
font:
12px / 20px Helvetica Neue,
Arial,
Helvetica,
sans-serif;
background-color: hsla(0, 0%, 100%, 0.5);
padding: 0 5px;
bottom: 0;
right: 0;
position: absolute;
}

.mapbg-attrib a {
color: rgba(0, 0, 0, 0.75);
text-decoration: none;
}

.mapbg-attrib a:hover {
text-decoration: underline;
}

.button-container {
margin: 0 auto 20px;
max-width: 600px;
display: flex;
flex-wrap: nowrap;
}

.btn {
border: 0;
border-radius: 0.25rem;
background: #2f5f8b;
color: white;
font-size: 1rem;
white-space: nowrap;
text-decoration: none;
padding: 0.25rem 0.5rem;
margin-right: 0.5rem;
cursor: pointer;
display: inline-flex;
align-items: center;
}

.btn.selected {
background: #4892d9;
}

.btn:hover {
background: #4892d9;
}
</style>
16 changes: 5 additions & 11 deletions website/src/components/StyleUrlBug.astro
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
<p>Use the following style in a MapLibre map:</p>
<pre
id="style-url-pre"><code id="style-url-code">https://tiles.openfreemap.org/styles/liberty</code></pre>

<style>
#style-url-pre {
background: #efefef;
padding: 14px;
font-weight: bold;
}
</style>
<div class="container">
<p>Use the following style in a MapLibre map:</p>
<pre
id="style-url-pre"><code id="style-url-code">https://tiles.openfreemap.org/styles/liberty</code></pre>
</div>
8 changes: 4 additions & 4 deletions website/src/layouts/Layout.astro
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
const { frontmatter } = Astro.props || {}
const { title, container } = frontmatter || Astro.props
const { title } = frontmatter || Astro.props
import '../styles/_style.css'
---
Expand Down Expand Up @@ -30,15 +30,15 @@ import '../styles/_style.css'

<body>
{
container && (
frontmatter && (
<div class="container">
<slot />
</div>
)
}
{!container && <slot />}
{!frontmatter && <slot />}

<div class="footer">
<div class="footer container">
<a href="/privacy">Privacy Policy</a>
<a href="/tos">Terms of Service</a>
</div>
Expand Down
1 change: 0 additions & 1 deletion website/src/pages/privacy.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
layout: '../layouts/Layout.astro'
title: 'Privacy Policy'
container: true
---

# OpenFreeMap and your data
Expand Down
32 changes: 0 additions & 32 deletions website/src/pages/quick_start.astro
Original file line number Diff line number Diff line change
Expand Up @@ -39,35 +39,3 @@ import Donate from '../components/Donate.astro'
<Donate />
</div>
</Layout>

<!--<style>-->
<!-- .col-lbl {-->
<!-- display: block;-->
<!-- cursor: pointer;-->
<!-- color: #333;-->
<!-- }-->

<!-- .col-chk {-->
<!-- display: none;-->
<!-- }-->

<!-- .col-lbl:before {-->
<!-- content: '►';-->
<!-- margin-right: 1em;-->
<!-- color: #555;-->
<!-- font-size: 0.8em;-->
<!-- }-->

<!-- .col-cnt {-->
<!-- display: none;-->
<!-- margin: 1em 0 2em;-->
<!-- }-->

<!-- .col-chk:checked ~ .col-cnt {-->
<!-- display: block;-->
<!-- }-->

<!-- .col-chk:checked ~ .col-lbl:before {-->
<!-- content: '▼';-->
<!-- }-->
<!--</style>-->
1 change: 0 additions & 1 deletion website/src/pages/tos.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
layout: '../layouts/Layout.astro'
title: 'Terms of Services'
container: true
---

# TERMS OF SERVICES
Expand Down
4 changes: 3 additions & 1 deletion website/src/styles/_style.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@import "reset.css";
@import "global.css";
/* */
@import "map.css";
@import "donate.css";
@import "global.css";
29 changes: 29 additions & 0 deletions website/src/styles/collapsible.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
.col-lbl {
display: block;
cursor: pointer;
color: #333;
}

.col-chk {
display: none;
}

.col-lbl:before {
content: '►';
margin-right: 1em;
color: #555;
font-size: 0.8em;
}

.col-cnt {
display: none;
margin: 1em 0 2em;
}

.col-chk:checked ~ .col-cnt {
display: block;
}

.col-chk:checked ~ .col-lbl:before {
content: '▼';
}
1 change: 0 additions & 1 deletion website/src/styles/donate.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#support-plans-slider {
max-width: 600px;
margin: 200px auto 150px;
}

Expand Down
36 changes: 17 additions & 19 deletions website/src/styles/global.css
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ body {
.container {
max-width: 600px;
margin: 0 auto;
padding: 20px;
padding: 0 20px;
}

h1,
Expand Down Expand Up @@ -56,7 +56,6 @@ h1 {
}

.footer {
max-width: 600px;
margin-top: 3em;
display: flex;
justify-content: space-evenly;
Expand All @@ -69,12 +68,10 @@ h1 {

p,
ul {
max-width: 600px;
margin-bottom: 0.6em;
}

pre {
max-width: 600px;
margin-bottom: 0.6em;
font-size: 14px;
padding: 7px 14px;
Expand All @@ -91,19 +88,20 @@ hr {
margin: 2em 0;
}

/*@media (max-width: 620px) {*/
/* .static,*/
/* h1,*/
/* h2,*/
/* h3,*/
/* h4,*/
/* h5,*/
/* h6,*/
/* p,*/
/* .button-container {*/
/* max-width: 100%;*/
/* margin-left: 20px;*/
/* margin-right: 20px;*/
/* }*/
/*}*/
.logo {
margin: 0 auto;
}

.icons {
margin: 0 auto;
width: 80px;
display: flex;
justify-content: space-between;
}

#style-url-pre {
background: #efefef;
padding: 14px;
font-weight: bold;
overflow-x: auto;
}
Loading

0 comments on commit ec5bac8

Please sign in to comment.