Skip to content

Commit

Permalink
Add website
Browse files Browse the repository at this point in the history
  • Loading branch information
jbruechert committed Mar 17, 2024
1 parent af7fcbe commit 2f852bf
Show file tree
Hide file tree
Showing 36 changed files with 3,690 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@
[submodule "transitland-atlas"]
path = transitland-atlas
url = https://github.com/transitland/transitland-atlas
[submodule "website/themes/ananke"]
path = website/themes/ananke
url = https://github.com/theNewDynamic/gohugo-theme-ananke
170 changes: 170 additions & 0 deletions LICENSES/CC-BY-SA-4.0.txt

Large diffs are not rendered by default.

174 changes: 174 additions & 0 deletions LICENSES/LGPL-2.0-or-later.txt

Large diffs are not rendered by default.

9 changes: 9 additions & 0 deletions LICENSES/MIT.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
MIT License

Copyright (c) <year> <copyright holders>

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
17 changes: 17 additions & 0 deletions website/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# SPDX-License-Identifier: CC0-1.0
# SPDX-FileCopyrightText: none

/bower_components/
/node_modules/
/.pulp-cache/
/output/
/output-es/
/generated-docs/
/.psc-package/
/.psc*
/.purs*
/.psa*
/.spago
/static/index.js
/public
/resources
28 changes: 28 additions & 0 deletions website/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<!--
SPDX-FileCopyrightText: 2024 Jonah Brüchert <[email protected]>
SPDX-License-Identifier: AGPL-3.0-or-later
-->

# Website

## Development Setup

**Prerequisites**:
* hugo (only the extended version is tested at this point)
* npm

```sh
npm install
npm run start
```

All hugo content fill be automatically rebuilt on the fly, but a restart is still needed to rebuild the purescript files.

## Release builds

```sh
npm run release
```

The output will be placed in `public/`.
11 changes: 11 additions & 0 deletions website/archetypes/default.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!--
SPDX-FileCopyrightText: 2024 Jonah Brüchert <[email protected]>
SPDX-License-Identifier: AGPL-3.0-or-later
-->

+++
title = '{{ replace .File.ContentBaseName "-" " " | title }}'
date = {{ .Date }}
draft = true
+++
42 changes: 42 additions & 0 deletions website/content/_index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
description: "Get to places by public transport"
theme_version: '2.8.2'
cascade:
featured_image: '/images/train.webp'
layout: single
---

<!--
SPDX-FileCopyrightText: 2024 Jonah Brüchert <[email protected]>
SPDX-License-Identifier: AGPL-3.0-or-later
-->

<style>
h2 {
margin-top: 50px;
}

.app-icon {
margin: 10px;
}
</style>

<p>Transitous is a community-run provider-neutral international public transport routing service.</p>

<p>Using openly available data and FOSS routing engine we operate a free to use
routing service that does not stop at borders.</p>

<h2>Apps That Use Transitous</h2>

<div class="mt-4">
{{< app-card name="KDE Itinerary" website="https://apps.kde.org/org.kde.itinerary" icon="images/apps/kde-itinerary.svg" >}}
</div>

<h2>Use In Your App</h2>
<p>Transitous provides a free to use API that can provide journey planning in your app.</p>
<a class="btn btn-primary text-black" href="https://routing.spline.de/doc/index.html"><i class="bi bi-arrow-right m-1"></i>Developer Documentation</a>

<h2>Public Transport Coverage</h2>
<p>If you know were to find public transport data for your region, or if you are a public transport operator, you can help by adding the feed to our data set.</p>
<a class="btn btn-primary theme-button text-black" href="https://public-transport.github.io/transitous/#adding-a-region"><i class="bi bi-arrow-right m-1"></i>Contributor Documentation</a>
9 changes: 9 additions & 0 deletions website/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// SPDX-FileCopyrightText: 2024 Jonah Brüchert <[email protected]>
//
// SPDX-License-Identifier: AGPL-3.0-or-later

module github.com/public-transport/transitous

go 1.22.1

require github.com/theNewDynamic/gohugo-theme-ananke v0.0.0-20231122160523-91df000ca827 // indirect
2 changes: 2 additions & 0 deletions website/go.sum
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
github.com/theNewDynamic/gohugo-theme-ananke v0.0.0-20231122160523-91df000ca827 h1:70DjvollwE7ZTbgF0E9hsR/cBYrNLwv59UaOb16Tm5c=
github.com/theNewDynamic/gohugo-theme-ananke v0.0.0-20231122160523-91df000ca827/go.mod h1:yY14BLqqh5G61rO81YcJKMHY1rClY5iIiUK+K2JKSUM=
3 changes: 3 additions & 0 deletions website/go.sum.license
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
SPDX-FileCopyrightText: 2024 Jonah Brüchert <[email protected]>

SPDX-License-Identifier: AGPL-3.0-or-later
16 changes: 16 additions & 0 deletions website/hugo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# SPDX-FileCopyrightText: 2024 Jonah Brüchert <[email protected]>
#
# SPDX-License-Identifier: AGPL-3.0-or-later

baseURL = 'https://example.org/'
languageCode = 'en-us'
title = 'Transitous'
theme = "ananke"

[params]
custom_css = ["bootstrap.min.css", "bootstrap-icons.min.css", "custom.css"]

[[params.ananke_socials]]
name = "github"
url = "https://github.com/public-transport/transitous"
label = "Transitous on GitHub"
54 changes: 54 additions & 0 deletions website/layouts/partials/page-header.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
<!--
SPDX-FileCopyrightText: 2024 Jonah Brüchert <[email protected]>
SPDX-License-Identifier: AGPL-3.0-or-later
-->

{{ $featured_image := partial "func/GetFeaturedImage.html" . }}

<style>
@media only screen and (max-width: 800px) {
.reverse-column-if-small {
flex-direction: column-reverse;
}
}
</style>

{{ if $featured_image }}
{{/* Trimming the slash and adding absURL make sure the image works no matter where our site lives */}}
<header class="cover bg-top" style="background-image: url('{{ $featured_image }}');">
<div class="bg-black-60">
{{ partial "site-navigation.html" . }}
<div class="text-center pv6 ph3 ph4-ns">

<div class="container" style="max-width: 900px">
<div class="row reverse-column-if-small">
<div style="width: 350px; float: none; margin: 0 auto;">
<div id="searchbox" class="card" style="margin-bottom: 50px"></div>
<script src="index.js"></script>
<script>window.Main.main()</script>
</div>

<div class="col">
{{ if not .Params.omit_header_text }}
<div class="f2 f1-l fw2 white-90 mb0 lh-title" style="margin-top: 40px">
{{ .Title | default .Site.Title }}</div>
{{ with .Params.description }}
<div class="f5 f3-l white-80 measure-wide-l center lh-copy mt3 mb4" style="margin-bottom: 80px">
{{ . }}
</div>
{{ end }}
{{ end }}
</div>
</div>
</div>
</div>
</div>
</header>
{{ else }}
<header>
<div class="{{ .Site.Params.background_color_class | default "bg-black" }}">
{{ partial "site-navigation.html" . }}
</div>
</header>
{{ end }}
9 changes: 9 additions & 0 deletions website/layouts/shortcodes/app-card.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<div class="card app-card" style="width: 12rem;">
<a href="{{ .Get "website" }}">
<img class="card-img-top" src="{{ .Get "icon" }}">

<div class="card-body">
<h4>{{ .Get "name" }} (soon)</h4>
</div>
</a>
</div>
Loading

0 comments on commit 2f852bf

Please sign in to comment.