Skip to content

Commit 6a0e62e

Browse files
committed
Add images and span links
1 parent c54dd6a commit 6a0e62e

File tree

5 files changed

+17
-2
lines changed

5 files changed

+17
-2
lines changed
285 KB
Loading
725 KB
Loading

src/cljc/auto_web/components/img.cljc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
(def images
1919
(->> [{:url "/images/logos/hephaistox_logo.png"
2020
:alt "Hephaistox logo"
21-
:img-id :hephaistox-log
21+
:img-id :hephaistox-logo
2222
:label "Hephaistox"}
2323
{:url "/images/logos/javascript.png"
2424
:alt "Javascript logo"
@@ -111,4 +111,4 @@
111111
[opts img]
112112
(if (nil? img) (cicon-img* {} opts) (cicon-img* opts img)))
113113

114-
(defn cicon "A font awesome icon" [opts fa] [:i.fa (assoc opts :class fa)])
114+
(defn cicon "A font awesome icon" [opts fa] [:i.fa (merge-opts opts {:class fa})])

src/cljc/auto_web/components/link.cljc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,9 @@
4848
:left "0"
4949
:bottom "1.5em"}}
5050
"Download"])])
51+
52+
(defn cspan-link
53+
"An hiccup `:a` tag to the [[auto-web.components.link]].
54+
`content` is what is wrapped by the `:a` tag."
55+
[opts link & content]
56+
[:a (merge-opts (link-opts link) (assoc-in opts [:style :text-decoration] "underline")) content])

src/cljc/auto_web/page/builder.cljc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,15 @@
5656
:rel "stylesheet"
5757
:href url}])
5858

59+
(defn print-css-meta
60+
"Add a css stylesheet used for printing"
61+
[{:keys [url]
62+
:as _link}]
63+
[:link {:type "text/css"
64+
:rel "stylesheet"
65+
:media "print"
66+
:href url}])
67+
5968
(defn css-meta-preloaded
6069
"Add a css stylesheet"
6170
[{:keys [url]

0 commit comments

Comments
 (0)