From f604a23cd0f2d43ef5c985fa2c88e6ec5ce55a76 Mon Sep 17 00:00:00 2001 From: Swrup Date: Wed, 16 Feb 2022 17:00:29 +0100 Subject: [PATCH] remove homepage, add /about, change navbar --- src/content/about.md | 23 +++++++++++++++++++++++ src/content/assets/css/style.css | 2 +- src/content/index.md | 2 -- src/permap.ml | 10 ++++++++-- src/template.eml.html | 10 ++++++---- 5 files changed, 38 insertions(+), 9 deletions(-) create mode 100644 src/content/about.md delete mode 100644 src/content/index.md diff --git a/src/content/about.md b/src/content/about.md new file mode 100644 index 0000000..02751a6 --- /dev/null +++ b/src/content/about.md @@ -0,0 +1,23 @@ +# What is Permap + +Permap is a open source geo-message-board software written in OCaml. + +Permap was initially made to be a gardening/permaculture forum. +Permap's aim is to help people find friends with similar interests around them +and build local communities. + +You can make threads with geographical coordinate, +this way you can find people near you doing interesting stuffs, +socialize with them and share local knowledge. + +## Permap's future + +- Make permap federate + +- More than coordinates + +Make threads on anything with a geographical position. +Instead of making threads with a simple (latitude * longitude) data, +we want to be able to make threads on any OpenStreetMap's item/ActivityPub object +that can resolve to a geographical position. + diff --git a/src/content/assets/css/style.css b/src/content/assets/css/style.css index 33542c9..c799286 100644 --- a/src/content/assets/css/style.css +++ b/src/content/assets/css/style.css @@ -1,5 +1,5 @@ body { - padding-top: 3rem; + padding-top: 0rem; padding-bottom: 3rem; color: #5a5a5a; background-color: #e8eaf6; diff --git a/src/content/index.md b/src/content/index.md deleted file mode 100644 index 1dcc1ac..0000000 --- a/src/content/index.md +++ /dev/null @@ -1,2 +0,0 @@ -# Hello world -Permap is cool diff --git a/src/permap.ml b/src/permap.ml index 6f8bff2..cf39654 100644 --- a/src/permap.ml +++ b/src/permap.ml @@ -37,7 +37,7 @@ let page name request = let content = Omd.of_string page |> Omd.to_html in render_unsafe content request -let homepage request = page "index" request +let about request = page "about" request let register_get request = render_unsafe (Register.f request) request @@ -260,11 +260,17 @@ let reply_post request = | `Wrong_content_type -> Dream.empty `Bad_Request ) +let redirect_to_babillard _request = + Dream.respond ~status:`Moved_Permanently + ~headers:[ ("Location", "/babillard") ] + "" + let () = Dream.run @@ Dream.logger @@ Dream.memory_sessions @@ Dream.router [ Dream.get "/assets/**" (Dream.static ~loader:asset_loader "") - ; Dream.get "/" homepage + ; Dream.get "/" redirect_to_babillard + ; Dream.get "/about" about ; Dream.get "/register" register_get ; Dream.post "/register" register_post ; Dream.get "/login" login_get diff --git a/src/template.eml.html b/src/template.eml.html index 4273bc5..e9e646c 100644 --- a/src/template.eml.html +++ b/src/template.eml.html @@ -12,15 +12,17 @@ let render_unsafe ~title ~content request =