about summary refs log tree commit diff
path: root/web/panettone/src/css.lisp
blob: f20ddf1dd4b08268e8d2067535645b997eb98be0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
(in-package :panettone.css)
(declaim (optimize (safety 3)))

(defparameter color/black
  "rgb(24, 24, 24)")

(defparameter color/gray
  "#8D8D8D")

(defparameter color/primary
  "rgb(106, 154, 255)")

(defparameter color/primary-light
  "rgb(150, 166, 200)")

(defparameter color/success
  "rgb(168, 249, 166)")

(defparameter color/success-2
  "rgb(168, 249, 166)")

(defun button (selector)
  `((,selector
     :background-color ,color/success
     :padding "0.5rem"
     :text-decoration "none"
     :transition "box-shadow" "0.15s" "ease-in-out")

    ((:and ,selector :hover)
     :box-shadow "0.25rem" "0.25rem" "0" "0" "rgba(0,0,0,0.08)")

    ((:and ,selector (:or :active :focus))
     :box-shadow "0.1rem" "0.1rem" "0" "0" "rgba(0,0,0,0.05)"
     :outline "none"
     :border "none"
     :background-color ,color/success-2)))

(defparameter issue-list-styles
  `((.issue-list
     :list-style-type "none"
     :padding-left 0

     (.issue-subject
      :font-weight "bold")

     (li
      :padding-bottom "1rem")

     ((li + li)
      :border-top "1px" "solid" ,color/gray)

     (a
      :text-decoration "none"
      :display "block")

     ((:and a :hover)
      :outline "none"

      (.issue-subject
       :color ,color/primary)))))

(defparameter form-styles
  `(((:or (:and input (:or (:= type "text")
                           (:= type "password")))
          textarea)
     :width "100%"
     :padding "0.5rem"
     :outline "none"
     :border-top "none"
     :border-left "none"
     :border-right "none"
     :border-bottom "1px" "solid" ,color/gray
     :margin-bottom "1rem")

    (textarea
     :resize "vertical")

    ((:and input (:= type "submit"))
     :-webkit-appearance "none"
     :border "none"
     :cursor "pointer")

    ,@(button '(:and input (:= type "submit")))))

(defparameter styles
  `(,@form-styles
    ,@issue-list-styles

    (body
     :font-family "sans-serif"
     :color ,color/black)

    (a :color "inherit")

    (.content
     :width "800px"
     :margin "0 auto")

    (header
     :display "flex"
     :align-items "center"
     :border-bottom "1px" "solid" ,color/black
     :margin-bottom "1rem"

     (h1
      :padding 0
      :flex 1)

     (.issue-number
      :color ,color/gray
      :font-size "1.5rem"))

    ,@(button '.new-issue)

    (.login-form
     :width "300px"
     :margin "0 auto")

    (.created-by-at
     :color ,color/gray)))