Skip to content

Commit

Permalink
fix: design review
Browse files Browse the repository at this point in the history
  • Loading branch information
codemaster115 committed Sep 25, 2023
1 parent c0242e3 commit 45f26d8
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
11 changes: 6 additions & 5 deletions src/quo2/components/code/common/style.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
:hljs-string (colors/custom-color-by-theme :turquoise 50 60)
:hljs-literal (colors/custom-color-by-theme :turquoise 50 60)
:hljs-number (colors/custom-color-by-theme :turquoise 50 60)
:hljs-symbol (colors/custom-color-by-theme :orange 50 60)
:hljs-builtin-name (colors/custom-color-by-theme :pink 50 60)
:hljs-symbol (colors/custom-color-by-theme :orange 50 50)
:hljs-builtin-name (colors/custom-color-by-theme :pink 50 50)
:line-number colors/neutral-40
nil))

Expand Down Expand Up @@ -82,9 +82,10 @@
(defn line-number
[width preview?]
(if preview?
{:width width
:align-items :center
:justify-content :center}
{:width width
:padding-vertical 3
:padding-left 8
:padding-right 4}
{:margin-right 20 ; 8+12 margin
:width width}))

Expand Down
2 changes: 1 addition & 1 deletion src/quo2/components/code/common/view.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
number-rows-to-show (if preview?
0
(min (count rows) max-lines))
line-number-width (calc-line-number-width font-scale number-rows-to-show)
line-number-width (if preview? 20 (calc-line-number-width font-scale number-rows-to-show))
truncated? (< number-rows-to-show total-rows)
rows-to-show-coll (if truncated?
(as-> rows $
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,7 @@
"for(let ind")

(def clojure-example
"(for [x [0 1 2 3 4 5]
:let [y (* x 3)]
:when (even? y)]
y)")
"(for [{:keys [url title description thumbnail hostname]} previews]")

(def examples
{:clojure {:language :clojure
Expand Down

0 comments on commit 45f26d8

Please sign in to comment.