Skip to content

Commit

Permalink
Add a custom CSS
Browse files Browse the repository at this point in the history
  • Loading branch information
pka committed Sep 2, 2024
1 parent e82afd8 commit de3d7d9
Show file tree
Hide file tree
Showing 35 changed files with 117 additions and 68 deletions.
13 changes: 13 additions & 0 deletions shortbread-website/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Shortbread website

The website is created using [Hugo](https://gohugo.io/).

## Theme

The theme is based on [Hextra](https://imfing.github.io/hextra/docs/).

## Development

```
hugo serve
```
63 changes: 63 additions & 0 deletions shortbread-website/assets/css/custom.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
@import url('https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,100;0,300;0,400;0,700;0,900;1,100;1,300;1,400;1,700;1,900&family=League+Gothic&display=swap');

:root {
font-family: "Lato", sans-serif;
--primary-hue: 48deg;
--primary-saturation: 93%;
}

body {
background-color: rgb(255 248 219);
}

.nav-container-blur {
background-color: hsl(48deg 93% 45% / 1);
}

.hx-bg-gray-100 {
background-color: hsl(48deg 93% 45% / 1);
}

/* Title */
.hx-font-extrabold {
font-family: "League Gothic", sans-serif;
font-size: 1.55em;
}

nav .hx-bg-white {
background-color: rgb(255 248 219);
--tw-shadow: none;
}

.content {
h1 {
font-family: "League Gothic", sans-serif;
font-size: 3.77em;
letter-spacing: normal;
}
h2 {
font-family: "League Gothic", sans-serif;
font-size: 2.11em;
letter-spacing: normal;
}
h3 {
font-family: "League Gothic", sans-serif;
font-size: 1.55em;
letter-spacing: normal;
}
}

div.example-images img {
display: initial;
width: 300px;
}

/* Reduce footer height */
footer .hx-py-12 {
padding-top: 1rem;
padding-bottom: 1rem;
}

footer .hx-mt-6 {
margin-top: 0;
}
48 changes: 1 addition & 47 deletions shortbread-website/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,47 +28,6 @@ weight = 5
[menu.main.params]
type = "search"

[[menu.sidebar]]
identifier = "license"
name = "Copyright & License"
pageRef = "/copyright"
weight = 1

[[menu.sidebar]]
identifier = "schema"
name = "Vector Tile Schema"
pageRef = "/schema"
weight = 2

[[menu.sidebar]]
identifier = "styles"
name = "Map Styles"
pageRef = "/styles"
weight = 3

[[menu.sidebar]]
identifier = "make-vectortiles"
name = "Creating Shortbread Vector Tiles"
pageRef = "/make-vectortiles"
weight = 4

[[menu.sidebar]]
identifier = "download"
name = "Downloading Shortbread Tiles"
pageRef = "/download"
weight = 5

[[menu.sidebar]]
identifier = "customizing"
name = "Customizing Shortbread"
pageRef = "/customizing"
weight = 6

[[menu.sidebar]]
identifier = "publishing"
pageRef = "/publishing"
weight = 7

[params]
description = "A free & simple Vector Tile schema for OpenStreetMap"
displayUpdatedDate = false
Expand All @@ -77,7 +36,7 @@ dateFormat = "January 2, 2006"
[params.navbar]
displayTitle = true
displayLogo = true
width = "wide"
width = "normal"

[params.navbar.logo]
path = "/shortbread_logo.svg"
Expand Down Expand Up @@ -108,11 +67,6 @@ dateFormat = "January 2, 2006"
enable = true
base = "https://github.com/shortbread-tiles/shortbread-docs/edit/main/shortbread-website/content"

[params.blog.list]
displayTags = true
sortBy = "date"
sortOrder = "desc"

[params.highlight.copy]
enable = true
display = "hover"
1 change: 0 additions & 1 deletion shortbread-website/content/_footer.md

This file was deleted.

7 changes: 6 additions & 1 deletion shortbread-website/content/_index.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
# Shortbread Tiles
+++
title = "Shortbread Tiles"
toc = false
breadcrumbs = false
cascade.type = "docs"
+++

## About

Expand Down
3 changes: 1 addition & 2 deletions shortbread-website/content/copyright/_index.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
+++
title = "Copyright & License"
breadcrumbs = false
weight = 1
+++

# Copyright

We take the position that this schema is not creative enough to be a copyrightable
work.

Expand Down
1 change: 1 addition & 0 deletions shortbread-website/content/customizing/_index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
+++
title = "Customizing Shortbread"
description = "How to create and display customized shortbread vector tiles"
breadcrumbs = false
weight = 6
+++

Expand Down
1 change: 1 addition & 0 deletions shortbread-website/content/download/_index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
+++
title = "Downloading Shortbread Tiles"
description = "How & where to download shortbread vector tiles"
breadcrumbs = false
weight = 5
+++

Expand Down
9 changes: 5 additions & 4 deletions shortbread-website/content/imprint.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
---
---

# Imprint
+++
title = "Imprint"
breadcrumbs = false
sidebar.exclude = true
+++

This web site is run by

Expand Down
1 change: 1 addition & 0 deletions shortbread-website/content/make-vectortiles/_index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
+++
title = "Creating Shortbread Vector Tiles"
description = "This page describes how to generate the vector tiles in the Shortbread schema"
breadcrumbs = false
weight = 4
+++

Expand Down
1 change: 1 addition & 0 deletions shortbread-website/content/make-vectortiles/bbox.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
+++
title = "Using BBOX"
description = "Generating vector tiles with BBOX"
breadcrumbs = false
weight = 4
+++

Expand Down
1 change: 1 addition & 0 deletions shortbread-website/content/make-vectortiles/osm2pgsql.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
+++
title = "Using osm2pgsql"
description = "Importing OSM data into PostGIS with osm2pgsql"
breadcrumbs = false
weight = 3
+++

Expand Down
1 change: 1 addition & 0 deletions shortbread-website/content/make-vectortiles/planetiler.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
+++
title = "Using Planetiler"
description = "Generating vector tiles with Planetiler"
breadcrumbs = false
weight = 2
+++

Expand Down
1 change: 1 addition & 0 deletions shortbread-website/content/make-vectortiles/tilekiln.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
+++
title = "Using Tilekiln"
description = "Generating vector tiles with Tilekiln"
breadcrumbs = false
weight = 5
+++

Expand Down
1 change: 1 addition & 0 deletions shortbread-website/content/make-vectortiles/tilemaker.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
+++
title = "Using Tilemaker"
description = "Generating vector tiles with Tilemaker"
breadcrumbs = false
weight = 1
+++

Expand Down
3 changes: 2 additions & 1 deletion shortbread-website/content/publishing/_index.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
+++
title = "Publishing Shortbread Maps"
description = "Publishing maps with Shortbread vector tiles"
weight = 6
breadcrumbs = false
weight = 7
+++

## Required resources for Shortbread maps
Expand Down
3 changes: 2 additions & 1 deletion shortbread-website/content/schema/1.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
title = "Vector Tile Schema 1.0"
linkTitle = "1.0"
description = "This page describes the layers of the Shortbread vector schema and their contents as of version 1.0"
#{{% toc /%}}
breadcrumbs = false
toc = true
+++


Expand Down
1 change: 1 addition & 0 deletions shortbread-website/content/schema/_index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
+++
title = "Vector Tile Schema"
breadcrumbs = false
weight = 2
+++

Expand Down
2 changes: 1 addition & 1 deletion shortbread-website/content/schema/versioning.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
+++
draft= false
title = "Schema Versioning Policy"
linkTitle = "Versioning"
description = "This page describes the versioning policy of the Shortbread schema"
breadcrumbs = false
+++

The shortbread schema will have to change over time to keep up with changes to OpenStreetMap data, but also because we improve the tools for generating and using the vector tiles and as we gain a better understanding on how to style vector tiles in better ways. On the other hand we need some stability in this standard for users to rely on.
Expand Down
2 changes: 1 addition & 1 deletion shortbread-website/content/styles/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title = "Map Styles"
description = "This page gives an overview about available open source maps styles for Shortbread vector tiles"
weight = 3
toc = false
breadcrumbs = false
+++

## Web mapping libraries
Expand Down
1 change: 1 addition & 0 deletions shortbread-website/i18n/en.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
copyright: "[Imprint](/imprint) | Map data by [OpenStreetMap contributors](https://www.openstreetmap.org/copyright) published under Open Database License"
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added shortbread-website/static/apple-touch-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added shortbread-website/static/favicon-16x16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added shortbread-website/static/favicon-32x32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions shortbread-website/static/favicon-dark.svg
Binary file added shortbread-website/static/favicon.ico
Binary file not shown.
1 change: 1 addition & 0 deletions shortbread-website/static/favicon.svg
Binary file removed shortbread-website/static/shortbread_logo_favicon.png
Binary file not shown.
1 change: 1 addition & 0 deletions shortbread-website/static/site.webmanifest
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"name":"Shortbread Tiles","short_name":"Shortbread","icons":[{"src":"/android-chrome-192x192.png","sizes":"192x192","type":"image/png"},{"src":"/android-chrome-512x512.png","sizes":"512x512","type":"image/png"}],"theme_color":"#ffffff","background_color":"#ffffff","display":"standalone"}
4 changes: 2 additions & 2 deletions shortbread-website/static/taginfo.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
"project": {
"name": "Shortbread Tiles",
"project_url": "https://shortbread-tiles.org/",
"contact_email": "amanda@geofabrik.de",
"contact_email": "shortbread@fossgis.de",
"contact_name": "Shortbread Project",
"doc_url": "https://shortbread-tiles.org/schema/1.0/",
"icon_url": "https://shortbread-tiles.org/shortbread_logo_favicon.png",
"icon_url": "https://shortbread-tiles.org/favicon-32x32.png",
"description": "A simple Vector Tile scheme"
},

Expand Down
2 changes: 1 addition & 1 deletion shortbread-website/themes/hextra/i18n/en.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ backToTop: "Scroll to top"
changeLanguage: "Change language"
changeTheme: "Change theme"
copyCode: "Copy code"
copyright: "[Imprint](/imprint) | Map data by [OpenStreetMap contributors](https://www.openstreetmap.org/copyright) published under Open Database License"
copyright: "© 2024 Hextra Project."
dark: "Dark"
editThisPage: "Edit this page on GitHub →"
lastUpdated: "Last updated on"
Expand Down
10 changes: 5 additions & 5 deletions shortbread-website/themes/hextra/layouts/partials/toc.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
{{- $backToTop := (T "backToTop") | default "Scroll to top" -}}

<nav class="hextra-toc hx-order-last hx-hidden hx-w-64 hx-shrink-0 xl:hx-block print:hx-hidden hx-px-4" aria-label="table of contents">
{{- if $toc }}
<div class="hextra-scrollbar hx-sticky hx-top-16 hx-overflow-y-auto hx-pr-4 hx-pt-6 hx-text-sm [hyphens:auto] hx-max-h-[calc(100vh-var(--navbar-height)-env(safe-area-inset-bottom))] ltr:hx--mr-4 rtl:hx--ml-4">
<div class="hextra-scrollbar hx-sticky hx-top-16 hx-overflow-y-auto hx-pr-4 hx-pt-6 hx-text-sm [hyphens:auto] hx-max-h-[calc(100vh-var(--navbar-height)-env(safe-area-inset-bottom))] ltr:hx--mr-4 rtl:hx--ml-4">
{{- if $toc }}
{{- with .Fragments.Headings -}}
<p class="hx-mb-4 hx-font-semibold hx-tracking-tight">{{ $onThisPage }}</p>
{{- range . -}}
Expand All @@ -16,9 +16,10 @@
</ul>
{{- end -}}
{{- end -}}
{{ end -}}

{{- $borderClass := "hx-mt-8 hx-border-t hx-bg-white hx-pt-8 hx-shadow-[0_-12px_16px_white] dark:hx-bg-dark dark:hx-shadow-[0_-12px_16px_#111]" -}}
{{- if not .Fragments.Headings -}}
{{- if or (not .Fragments.Headings) (not $toc) -}}
{{- $borderClass = "" -}}
{{- end -}}

Expand Down Expand Up @@ -50,8 +51,7 @@
</svg>
</button>
</div>
</div>
{{ end -}}
</div>
</nav>

{{/* TOC subheadings component. This is a recursive component that renders a list of headings. */}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<meta name="revised" content="{{ now.Format "2006-01-02T15:04:05 MST" }}">
<title>{{ if ne .Title "" }}{{ .Title }} :: {{end}}{{ .Site.Title }}</title>
<link rel="shortcut icon" href="{{"shortbread_logo_favicon.png" | relURL}}" type="image/x-icon" />
<link rel="shortcut icon" href="{{"favicon-32x32.png" | relURL}}" type="image/x-icon" />
<link href="{{"css/nucleus.css" | relURL}}" rel="stylesheet">
<link href="{{"css/font-awesome.min.css" | relURL}}" rel="stylesheet">
<link href="{{"css/featherlight.min.css" | relURL}}" rel="stylesheet">
Expand Down

0 comments on commit de3d7d9

Please sign in to comment.