Skip to content

Commit 7b6cd66

Browse files
committed
simplify home and add it to portfolio
1 parent c0c7022 commit 7b6cd66

File tree

5 files changed

+37
-21
lines changed

5 files changed

+37
-21
lines changed

.clj-kondo/metosin/malli-types-cljs/config.edn

+9-6
Original file line numberDiff line numberDiff line change
@@ -16416,14 +16416,17 @@
1641616416
renderer.utils.keyboard {key-code->key {:arities {1 {:args [:number],
1641716417
:ret :nilable/string}}},
1641816418
modifiers {:arities {1 {:args [:any], :ret :set}}}},
16419-
renderer.ruler.views {bounds-rect {:arities {0 {:args [], :ret :any}}},
16420-
pointer {:arities {0 {:args [], :ret :any}}},
16419+
renderer.ruler.views {bounds-rect {:arities {1 {:args [:keyword], :ret :any}}},
16420+
pointer {:arities {1 {:args [:keyword], :ret :any}}},
1642116421
line {:arities {1 {:args [:map], :ret :any}}},
16422-
label {:arities {3 {:args [:number :number :string],
16422+
label {:arities {4 {:args [:keyword
16423+
:number
16424+
:number
16425+
:string],
1642316426
:ret :any}}},
16424-
base-lines {:arities {0 {:args [], :ret :any}}},
16425-
ruler {:arities {0 {:args [], :ret :any}}},
16426-
grid-lines {:arities {0 {:args [], :ret :any}}}},
16427+
base-lines {:arities {1 {:args [:keyword], :ret :any}}},
16428+
ruler {:arities {1 {:args [:keyword], :ret :any}}},
16429+
grid-lines {:arities {1 {:args [:keyword], :ret :any}}}},
1642716430
renderer.utils.compatibility {version->vec {:arities {1 {:args [:string],
1642816431
:ret :seqable}}},
1642916432
requires-migration? {:arities {2 {:args [:seqable

portfolio/src/components/icon_scenes.cljs

+5-7
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,6 @@
9191
"pencil"
9292
"play"
9393
"plus"
94-
"pointer-tool"
9594
"pointer"
9695
"polygon-tool"
9796
"polygon"
@@ -141,12 +140,11 @@
141140

142141
(defscene default
143142
:title "Default icons"
144-
[ui/scroll-area
145-
[:div.flex.gap-2.p-3
146-
(for [icon-name default-icons]
147-
^{:key icon-name}
148-
[:div {:title icon-name}
149-
[ui/icon icon-name]])]])
143+
[:div.flex.flex-wrap.gap-2.p-3
144+
(for [icon-name default-icons]
145+
^{:key icon-name}
146+
[:div {:title icon-name}
147+
[ui/icon icon-name]])])
150148

151149
(def branded-icons
152150
["android_head"

portfolio/src/portfolio.cljs

+3-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
[components.icon-scenes]
44
[components.slider-scenes]
55
[components.switch-scenes]
6-
[portfolio.ui :as ui]))
6+
[portfolio.ui :as ui]
7+
[sections.home-scenes]))
78

89
(ui/start!
910
{:config
@@ -19,7 +20,7 @@
1920
:background/default-option-id :dark-mode
2021
:viewport/defaults {:viewport/padding [0]
2122
:viewport/width "100%"
22-
:viewport/height 41}
23+
:viewport/height "500px"}
2324
:canvas/gallery-defaults {:viewport/padding [0]
2425
:viewport/width "100%"
2526
:viewport/height 41}}})
+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
(ns sections.home-scenes
2+
(:require
3+
[portfolio.reagent-18 :refer-macros [defscene]]
4+
[renderer.app.subs]
5+
[renderer.app.views :as app.v]))
6+
7+
#_{:clj-kondo/ignore [:clojure-lsp/unused-public-var]}
8+
(defscene home
9+
:title "Home"
10+
:params (atom ["asdsads"])
11+
[store]
12+
[:div.flex.flex-col.h-dvh.overflow-hidden
13+
[app.v/home @store]])

src/renderer/app/views.cljs

+7-6
Original file line numberDiff line numberDiff line change
@@ -150,10 +150,10 @@
150150
10 [74 105]})
151151

152152
(defn home [recent-documents]
153-
[:div.flex.overflow-hidden.md:overflow-visible
153+
[:div.flex.overflow-hidden
154154
[ui/scroll-area
155-
[:div.flex.min-h-full.justify-center.p-2.md:h-dvh
156-
[:div.self-center.justify-between.flex.h-full.md:h-auto.w-full.lg:w-auto
155+
[:div.flex.justify-center.p-2
156+
[:div.justify-between.flex.w-full.lg:w-auto
157157
[:div.bg-primary.p-6.lg:p-12.flex.max-w-screen-xl.w-full.gap-8
158158
[:div.flex-1
159159
[:h1.text-4xl.mb-1.font-light config/app-name]
@@ -246,7 +246,7 @@
246246
"Changelog"]]]
247247

248248
[:div.hidden.md:block.flex-1
249-
[:img {:src "img/icon.svg"}]]]]]]])
249+
[:img {:src "../img/icon.svg"}]]]]]]])
250250

251251
(defn root
252252
[]
@@ -256,7 +256,7 @@
256256
active-tool (rf/subscribe [::tool.s/active])
257257
recent-docs (rf/subscribe [::document.s/recent])]
258258
[:> Tooltip/Provider
259-
[:div.flex.flex-col.flex-1.h-dvh.overflow-hidden
259+
[:div.flex.flex-col.flex-1.h-dvh.overflow-hidden.justify-between
260260
[window.v/app-header]
261261
(if (seq @documents)
262262
[:div.flex.h-full.flex-1.overflow-hidden.gap-px
@@ -279,6 +279,7 @@
279279
[:div.bg-primary.grow.flex.mr-px]]])
280280
[:div.bg-primary.flex
281281
[ui/scroll-area [toolbar.object/root]]]]]]]
282-
[home @recent-docs])]
282+
[home @recent-docs])
283+
[:div]]
283284
[dialog.v/root]
284285
[notification/main]]))

0 commit comments

Comments
 (0)