Admonition continue

pull/645/head
Tienson Qin 2020-06-01 17:29:59 +08:00
parent fa6b9fa9de
commit f065ee9875
2 changed files with 23 additions and 31 deletions

View File

@ -247,7 +247,7 @@
(->elem
:a
(cond->
{:href href}
{:href href}
title
(assoc :title title))
(map-inline config label))
@ -260,8 +260,8 @@
(->elem
:a
(cond->
{:href href
:target "_blank"}
{:href href
:target "_blank"}
title
(assoc :title title))
(map-inline config label))))))
@ -383,15 +383,15 @@
[:span ""])]
[:a.flex.flex-row.items-center.justify-center
(cond->
{:draggable true
:on-drag (fn [event]
)
:on-drag-over (fn [event]
)
:on-drop (fn [event]
)
:style {:width 14
:height 24}}
{:draggable true
:on-drag (fn [event]
)
:on-drag-over (fn [event]
)
:on-drop (fn [event]
)
:style {:width 14
:height 24}}
(not dummy?)
(assoc :href (str "/page/" uuid)
:on-click (fn [e]
@ -685,14 +685,10 @@
"caution" svg/caution
"warning" svg/warning
nil)]
[:div.admonitionblock {:class type}
[:table
[:tbody
[:tr
[:td.icon (icon)]
[:td.content
[:div.paragraph
content]]]]]]))
[:div.flex.flex-row.admonitionblock.my-4.align-items {:class type}
[:div.pr-4.admonition-icon
{:title (string/upper-case type)} (icon)]
[:div.ml-4.text-lg content]]))
(defn block
[config item]

View File

@ -67,29 +67,25 @@
(rum/defc note
[]
[:svg.h-8.w-8.svg-shadow
[:svg.h-8.w-8.svg-shadow.note
{:view-box "0 0 512 512"
:fill "currentColor"
:color "#19407c"}
:fill "currentColor"}
[:path
{:d
"M256 8C119.043 8 8 119.083 8 256c0 136.997 111.043 248 248 248s248-111.003 248-248C504 119.083 392.957 8 256 8zm0 110c23.196 0 42 18.804 42 42s-18.804 42-42 42-42-18.804-42-42 18.804-42 42-42zm56 254c0 6.627-5.373 12-12 12h-88c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h12v-64h-12c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h64c6.627 0 12 5.373 12 12v100h12c6.627 0 12 5.373 12 12v24z"}]])
;; #111
;; text-shadow 1px 1px 2px rgba(155,155,0,.8)
(rum/defc tip
[]
[:svg.h-8.w-8.tip-shadow
[:svg.h-8.w-8.tip-shadow.tip
{:view-box "0 0 352 512"
:fill "currentColor"
:color "#111"}
:fill "currentColor"}
[:path
{:d
"M96.06 454.35c.01 6.29 1.87 12.45 5.36 17.69l17.09 25.69a31.99 31.99 0 0 0 26.64 14.28h61.71a31.99 31.99 0 0 0 26.64-14.28l17.09-25.69a31.989 31.989 0 0 0 5.36-17.69l.04-38.35H96.01l.05 38.35zM0 176c0 44.37 16.45 84.85 43.56 115.78 16.52 18.85 42.36 58.23 52.21 91.45.04.26.07.52.11.78h160.24c.04-.26.07-.51.11-.78 9.85-33.22 35.69-72.6 52.21-91.45C335.55 260.85 352 220.37 352 176 352 78.61 272.91-.3 175.45 0 73.44.31 0 82.97 0 176zm176-80c-44.11 0-80 35.89-80 80 0 8.84-7.16 16-16 16s-16-7.16-16-16c0-61.76 50.24-112 112-112 8.84 0 16 7.16 16 16s-7.16 16-16 16z"}]])
(rum/defc important
[]
[:svg.h-8.w-8.svg-shadow
[:svg.h-8.w-8.svg-shadow.important
{:view-box "0 0 512 512"
:fill "currentColor"
:color "#bf0000"}
@ -99,7 +95,7 @@
(rum/defc caution
[]
[:svg.h-8.w-8.svg-shadow
[:svg.h-8.w-8.svg-shadow.caution
{:view-box "0 0 384 512"
:fill "currentColor"
:color "#bf3400"}
@ -109,7 +105,7 @@
(rum/defc warning
[]
[:svg.h-8.w-8.svg-shadow
[:svg.h-8.w-8.svg-shadow.warning
{:view-box "0 0 576 512"
:fill "currentColor"
:color "#bf6900"}