Skip to content

Commit

Permalink
layout: Scaffolding
Browse files Browse the repository at this point in the history
  • Loading branch information
goshatch committed Sep 29, 2024
1 parent c3becb1 commit 4c2facb
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 6 deletions.
9 changes: 9 additions & 0 deletions resources/public/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,12 @@ body {
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
line-height: 1.8em;
}

footer {
width: 100%;
display: flex;
flex-direction: row;
flex-wrap: nowrap;
justify-content: space-between;
gap: 1rem;
}
Binary file added resources/public/images/icons/favicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 6 additions & 1 deletion src/tools/ifs/parts/layouts/main.clj
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,15 @@
[title & content]
(html5
[: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")]
[:body
[:div#app content]
[:secton#container content]
[:script
"window.addEventListener('load', function () { tools.ifs.parts.core.init(); });"]]))
18 changes: 16 additions & 2 deletions src/tools/ifs/parts/layouts/partials.clj
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,24 @@
"Site header"
[]
[:header
[:h1 "This is partials/header"]])
[:p {:align "center"}
[:img {:src "/images/parts-logo-horizontal.svg"}]]])

(defn footer
"Site footer"
[]
[:footer
[:p "This is partials/footer"]])
[:div.copyright
[:p
"© 2024 "
[:a {:href "https://a.possible.space"} "A Possible Space Ltd"]
[:br]
"Company number 11617016"]]
[:div.meta
[:p
[:strong "Parts"]
" is free, open source software."
[:br]
"See the "
[:a {:href "https://github.com/apossiblespace/parts"} "source code on GitHub"]
"."]]])
23 changes: 20 additions & 3 deletions src/tools/ifs/parts/pages.clj
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,19 @@
[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")))

(defn home-page
"Page rendered for GET /"
[_]
Expand All @@ -12,8 +25,12 @@
(layout "Home Page"
(header)
[:div
[:h2 "Hello this is a test"]
[:p "This page is rendered using Hiccup 2.0"]]
[:div#chart]
[:h1
{:align "center"}
"Have better conversations with your clients"]
[: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")))

0 comments on commit 4c2facb

Please sign in to comment.