From: mtmail Date: Tue, 23 Feb 2021 00:43:16 +0000 (+0100) Subject: allow theming (#84) X-Git-Url: https://git.openstreetmap.org./nominatim-ui.git/commitdiff_plain/71b9066d9eed97aee7eff27a25d5c317b6f89595 allow theming (#84) --- diff --git a/README.md b/README.md index 91a0220..8eb100f 100644 --- a/README.md +++ b/README.md @@ -40,6 +40,15 @@ Defaults: | `Map_Tile_Attribution` | [OpenStreetMap](https://openstreetmap.org/copyright) obviously | +## Theming + +You can customize parts of the website by overwriting files in `dist/theme/` + + * Set a `Page_Title` in the configuration + * Logo + * Content of Welcome and About&Help page + * Additional CSS styling + ## License The source code is available under a [GPLv2 license](LICENSE). diff --git a/dist/about.html b/dist/about.html new file mode 100644 index 0000000..7918259 --- /dev/null +++ b/dist/about.html @@ -0,0 +1,21 @@ + + + + + + + Nominatim Demo + + + + + + + + + + + + + + diff --git a/dist/config.example.js b/dist/config.example.js index cf4df52..e3b8a3e 100644 --- a/dist/config.example.js +++ b/dist/config.example.js @@ -25,3 +25,6 @@ var Nominatim_Config = []; // Nominatim_Config['Map_Default_Lat'] = 20.0; // Nominatim_Config['Map_Default_Lon'] = 0.0; // Nominatim_Config['Map_Default_Zoom'] = 2; + +// ---- BRANDING ---- +// Nominatim_Config['Page_Title'] = 'Nominatim Demo'; diff --git a/dist/deletable.html b/dist/deletable.html index 95d679f..7918259 100644 --- a/dist/deletable.html +++ b/dist/deletable.html @@ -4,13 +4,13 @@ - OpenStreetMap Nominatim + Nominatim Demo - - + + - + diff --git a/dist/details.html b/dist/details.html index 95d679f..7918259 100644 --- a/dist/details.html +++ b/dist/details.html @@ -4,13 +4,13 @@ - OpenStreetMap Nominatim + Nominatim Demo - - + + - + diff --git a/dist/global.css b/dist/global.css deleted file mode 100644 index 45a2648..0000000 --- a/dist/global.css +++ /dev/null @@ -1,3 +0,0 @@ -body { - font-size: 0.85em -} diff --git a/dist/images/favicon-16x16.png b/dist/images/favicon-16x16.png deleted file mode 100644 index 09213a1..0000000 Binary files a/dist/images/favicon-16x16.png and /dev/null differ diff --git a/dist/images/favicon-194x194.png b/dist/images/favicon-194x194.png deleted file mode 100644 index 7e356f1..0000000 Binary files a/dist/images/favicon-194x194.png and /dev/null differ diff --git a/dist/images/osm_logo.120px.png b/dist/images/osm_logo.120px.png deleted file mode 100755 index 22f1166..0000000 Binary files a/dist/images/osm_logo.120px.png and /dev/null differ diff --git a/dist/polygons.html b/dist/polygons.html index 95d679f..7918259 100644 --- a/dist/polygons.html +++ b/dist/polygons.html @@ -4,13 +4,13 @@ - OpenStreetMap Nominatim + Nominatim Demo - - + + - + diff --git a/dist/reverse.html b/dist/reverse.html index 95d679f..7918259 100644 --- a/dist/reverse.html +++ b/dist/reverse.html @@ -4,13 +4,13 @@ - OpenStreetMap Nominatim + Nominatim Demo - - + + - + diff --git a/dist/search.html b/dist/search.html index 95d679f..7918259 100644 --- a/dist/search.html +++ b/dist/search.html @@ -4,13 +4,13 @@ - OpenStreetMap Nominatim + Nominatim Demo - - + + - + diff --git a/dist/theme/about-help.html b/dist/theme/about-help.html new file mode 100644 index 0000000..cbf57ca --- /dev/null +++ b/dist/theme/about-help.html @@ -0,0 +1,25 @@ +

About & Help

+ +

+ This website is based on Nominatim UI, + a debugging interface for the Nominatim geocoding software. +

+ +

+ The Nominatim API is installed at Nominatim_API_Endpoint and for questions you + should contact their administrators. +

+ +

+ Nominatim is a search engine for OpenStreetMap data. + You may search for a name or address (forward search) or look up data by its geographic coordinate + (reverse search). Each result comes with a link to a details page where you can inspect what data + about the object is saved in the database and investigate how the address of the object has been + computed. +

+ + +

+ If you're the adminstrator of this website you can edit the text above in + dist/branding/about-and-help.html +

diff --git a/dist/theme/favicon-194x194.png b/dist/theme/favicon-194x194.png new file mode 100644 index 0000000..69abd1a Binary files /dev/null and b/dist/theme/favicon-194x194.png differ diff --git a/dist/theme/favicon-32x32.png b/dist/theme/favicon-32x32.png new file mode 100644 index 0000000..69abd1a Binary files /dev/null and b/dist/theme/favicon-32x32.png differ diff --git a/dist/theme/logo.png b/dist/theme/logo.png new file mode 100644 index 0000000..a39f89b Binary files /dev/null and b/dist/theme/logo.png differ diff --git a/dist/theme/style.css b/dist/theme/style.css new file mode 100644 index 0000000..51b19ee --- /dev/null +++ b/dist/theme/style.css @@ -0,0 +1,3 @@ +#theme-logo { + height: 30px; +} diff --git a/dist/theme/welcome.html b/dist/theme/welcome.html new file mode 100644 index 0000000..8bed397 --- /dev/null +++ b/dist/theme/welcome.html @@ -0,0 +1,9 @@ +

Welcome to Nominatim

+ +

+ Nominatim is a search engine for + OpenStreetMap data. This + is the debugging interface. +

+ +More information \ No newline at end of file diff --git a/screenshot.png b/screenshot.png index 48a356a..834475c 100644 Binary files a/screenshot.png and b/screenshot.png differ diff --git a/src/App.svelte b/src/App.svelte index d120173..05533e9 100644 --- a/src/App.svelte +++ b/src/App.svelte @@ -5,12 +5,12 @@ import { page, refresh_page } from './lib/stores.js'; import Footer from './components/Footer.svelte'; - import ReportIssueModal from './components/ReportIssueModal.svelte'; import SearchPage from './pages/SearchPage.svelte'; import ReversePage from './pages/ReversePage.svelte'; import DetailsPage from './pages/DetailsPage.svelte'; import PolygonsPage from './pages/PolygonsPage.svelte'; import DeletablePage from './pages/DeletablePage.svelte'; + import AboutPage from './pages/AboutPage.svelte'; $: view = $page.tab; @@ -30,6 +30,7 @@ {:else if view === 'polygons'} +{:else if view === 'about'} + {/if}