ef3b7ddb |
(defpackage :fwoar.default-layout
(:use :cl )
(:export
#:default-layout
|
6131cd63 |
#:border-color
#:background-color
#:text-color
#:link-color))
|
ef3b7ddb |
(in-package :fwoar.default-layout)
(defgeneric border-color (layout)
)
|
6131cd63 |
(defgeneric text-color (layout)
)
(defgeneric link-color (layout)
(:method (layout)
(text-color layout)))
(defgeneric background-color (layout)
)
(defclass default-layout ()
((%text-color :reader text-color :initform "#eee")
(%border-color :reader border-color :initform "#eee")
(%background-color :reader background-color :initform "#eee")))
|
ef3b7ddb |
(defmethod araneus:styles append ((layout default-layout))
`((body
|
6131cd63 |
:background ,(background-color layout)
:color ,(text-color layout)
|
ef3b7ddb |
:display flex
:flex-direction column
:min-height 100vh)
|
6131cd63 |
(a
:color ,(link-color layout))
|
ef3b7ddb |
(h1
:height 3em
|
6131cd63 |
:border-bottom 4px double ,(border-color layout)
|
ef3b7ddb |
:text-align center
:line-height 3em)
(div.main
:display flex
:width 100%
|
6131cd63 |
:flex-grow 1
:flex-shrink 1
)
|
ef3b7ddb |
(nav
|
6131cd63 |
:width 20rem
|
ef3b7ddb |
:display flex
|
6131cd63 |
:flex-grow 0
:flex-shrink 0
|
ef3b7ddb |
:flex-direction column)
|
46f06681 |
((:or (nav a) (:and a "[data-ic-get-from]"))
:cursor pointer
|
ef3b7ddb |
:font-weight bold
:text-align right
:text-decoration underline)
|
46f06681 |
((nav a)
:padding 1.5rem)
|
ef3b7ddb |
((nav (:and a :hover))
|
6131cd63 |
:background ,(link-color layout)
:color ,(background-color layout))
|
46f06681 |
(("#content" img)
:max-width "70%"
:margin 1em)
|
ef3b7ddb |
(main
|
6131cd63 |
:border-left 4px double ,(border-color layout)
|
ef3b7ddb |
:flex-grow 1
|
6131cd63 |
:flex-shrink 1
|
ef3b7ddb |
:padding 1.5rem
|
1b0bfc0f |
:max-width 50em)
("#ic-debug-panel"
:background ,(background-color layout) !important
:color ,(text-color layout))
(("#ic-debug-panel" > *)
:background ,(background-color layout) !important
:color ,(text-color layout))))
|