-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
prelaunch: Prelaunch routes, switch to hiccup2 ns
- Loading branch information
Showing
3 changed files
with
51 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,18 @@ | ||
(ns tools.ifs.parts.layouts.main | ||
(:require [hiccup.page :refer [html5 include-css include-js]])) | ||
(:require [hiccup2.core :refer [html]])) | ||
|
||
(defn layout | ||
"Fundamental application layout" | ||
[title & content] | ||
(html5 | ||
(html | ||
[:head | ||
[:meta {:charset "utf-8"}] | ||
[:meta {:name "viewport" :content "width=device-width, initial-scale=1"}] | ||
[:meta {:name "description" :content "Toolkit for IFS practitioners and their clients"}] | ||
[:link {:rel "icon" :sizes "192x192" :href "/images/icons/favicon.png"}] | ||
[:link {:rel "apple-touch-icon" :href "/images/icons/favicon.png"}] | ||
[:title title] | ||
(include-css "/css/style.css") | ||
(include-js "/js/main.js")] | ||
[:title (str title " — Parts")] | ||
[:link {:rel "stylesheet" :href "/css/style.css"}] | ||
[:script {:src "/js/main.js"}]] | ||
[:body | ||
[:secton#container content] | ||
[:script | ||
"window.addEventListener('load', function () { tools.ifs.parts.core.init(); });"]])) | ||
[:secton#container content]])) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,34 @@ | ||
(ns tools.ifs.parts.pages | ||
(:require [hiccup.core :refer [html]] | ||
(:require [hiccup2.core :refer [html]] | ||
[tools.ifs.parts.layouts.main :refer [layout]] | ||
[tools.ifs.parts.layouts.partials :refer [header footer]] | ||
[ring.util.response :as response])) | ||
|
||
(defn system-graph | ||
"Page rendering the graph of a system" | ||
[system-id] | ||
(-> (response/response | ||
(html | ||
(layout "System" | ||
(header) | ||
[:div | ||
[:h2 "System"]] | ||
[:div#chart] | ||
(footer)))) | ||
(response/content-type "text/html"))) | ||
(response/response | ||
(html | ||
(layout "System" | ||
(header) | ||
[:div [:h2 "System"]] | ||
[:div#chart] | ||
(footer))))) | ||
|
||
(defn home-page | ||
"Page rendered for GET /" | ||
[_] | ||
(-> (response/response | ||
(html | ||
(layout "Home Page" | ||
(header) | ||
[:div#home | ||
[:h1 | ||
{:align "center"} | ||
"Understand your client's parts and their relationships"] | ||
[:h3.hook | ||
{:align "center"} | ||
[:strong "Parts"] | ||
" is a tool for IFS practitioners to keep track of, visualise, and explore the relationships between their clients’ parts."]] | ||
(footer)))) | ||
(response/content-type "text/html"))) | ||
(layout | ||
"Home Page" | ||
(header) | ||
[:div#home | ||
[:h1 | ||
{:align "center"} | ||
"Understand your client's parts and their relationships"] | ||
[:h3.hook | ||
{:align "center"} | ||
[:strong "Parts"] | ||
" is a tool for IFS practitioners to keep track of, visualise, and explore the relationships between their clients’ parts."]] | ||
(footer)))))) |