descriptions for roles in public module

Josha von Gizycki 5 years ago
parent 6ab50078b9
commit 810f2ab657

@ -4,6 +4,9 @@ export SCHEMA_LEVEL=67bc62b7-77da-4a4e-9cdd-eeaa3061d0ee
export SCHEMA_MODULE=fbf30747-2fd3-4479-8e5b-e03b4509554b
export SCHEMA_COMPONENT=f229b8c7-3794-4ded-8192-052dd7af3830
export ATTR_MODULE_DESC=0924be5a-9680-44e3-986f-54b5b59631ba
export ATTR_ROLE_DESC=39e467a5-9ed2-496b-bc98-a14e3b52a8d1
export INST_DEV=73f69c1b-5106-44bb-b5e1-90c4f3847037
export INST_REQ=1d155970-f211-4699-9b90-21ef748c6afd
export INST_PRK=46dfa4e3-4223-4e76-9fb1-2fbdcec15f74

@ -186,17 +186,17 @@ table [data-sort="asc"]::after {
display: inline;
}
.module-desc {
.markdown-content {
margin-top: 3rem;
padding-left: 1rem;
}
.module-desc h1 {
.markdown-content h1 {
font-size: 2rem;
margin-left: -1rem;
}
.module-desc h1::before {
.markdown-content h1::before {
display: inline-block;
content: " ";
background-image: url('../img/klammer.svg');
@ -208,19 +208,19 @@ table [data-sort="asc"]::after {
margin-right: .5rem;
}
.module-desc h2 {
.markdown-content h2 {
font-size: 1.7rem;
}
.module-desc h3 {
.markdown-content h3 {
font-size: 1.5rem;
}
.module-desc h4 {
.markdown-content h4 {
font-size: 1.3rem;
}
.module-desc blockquote {
.markdown-content blockquote {
padding: 1rem .5rem 0 1rem;
background-color: rgba(230, 230, 230, .5);
border: 1px solid transparent;

@ -15,7 +15,9 @@
(def attribute-uuids
{:module-desc (or (System/getenv "ATTR_MODULE_DESC")
"0924be5a-9680-44e3-986f-54b5b59631ba")})
"0924be5a-9680-44e3-986f-54b5b59631ba")
:role-desc (or (System/getenv "ATTR_ROLE_DESC")
"39e467a5-9ed2-496b-bc98-a14e3b52a8d1")})
(def coc-instance-uuids
{"dev" (or (System/getenv "INST_DEV")
@ -172,3 +174,15 @@
:components comps)))
(comment
(module! "0b30521a-0727-4a6b-b69e-6f3c554a81b2"))
(defn role! [uuid]
(let [i (instance! uuid)
desc (->> (:properties i)
(filter #(= (:role-desc attribute-uuids)
(-> % :attr :uuid)))
first
:value)]
(assoc i
:desc desc)))
(comment
(role! "2c507f67-600d-4add-b648-2ea62d5a4ffc"))

@ -20,7 +20,7 @@
(defn show-role [coc-key role-uuid]
(view-public/show-role
(db-public/coc! coc-key)
(db-public/instance! role-uuid)
(db-public/role! role-uuid)
(db-public/modules-and-levels! role-uuid)))
(defn show-module [coc-key module-uuid]

@ -138,6 +138,8 @@
(h (:name role))
[[:main.main
[:h1 "Rolle " (h (:name role))]
[:div.markdown-content
(md/md-to-html-string (:desc role))]
[:div.table-responsive
[:table.table
[:thead
@ -168,7 +170,7 @@
(h (:name module))
[[:main.main
[:h1 "Modul " (h (:name module))]
[:div.module-desc
[:div.markdown-content
(md/md-to-html-string (:desc module))]
[:h2 "Komponenten"]
[:table.table

Loading…
Cancel
Save