fix(publish): match app status icon styles and alignment

fixes https://github.com/logseq/db-test/issues/819
This commit is contained in:
Tienson Qin
2026-04-28 16:24:01 +08:00
parent e44bd79526
commit c2c5dbee0c
3 changed files with 50 additions and 12 deletions

View File

@@ -72,6 +72,10 @@ body {
letter-spacing: 0.01em;
}
.inline-flex {
display: inline-flex;
}
.publish-home {
display: flex;
align-items: center;
@@ -474,6 +478,7 @@ a:hover {
display: flex;
gap: 4px;
align-items: flex-start;
min-height: 26px;
}
.positioned-properties {
@@ -486,7 +491,10 @@ a:hover {
.positioned-properties.block-left, .positioned-properties.block-right {
display: flex;
align-items: center;
margin-top: 2px;
}
.block-content > .positioned-properties.block-left {
align-self: center;
}
.positioned-properties.block-right {
@@ -520,16 +528,40 @@ a:hover {
display: inline-flex;
align-items: center;
justify-content: center;
width: 1rem;
height: 1rem;
width: 18px;
height: 18px;
line-height: 1;
font-size: 1rem;
font-size: 18px;
color: currentColor;
}
.property-icon svg {
width: 1rem;
height: 1rem;
width: 18px;
height: 18px;
}
.positioned-properties .ls-icon-Backlog {
color: var(--rx-gray-05, #a8a29e);
}
.positioned-properties .ls-icon-Todo {
color: var(--rx-gray-10, #78716c);
}
.positioned-properties .ls-icon-InProgress50 {
color: var(--rx-yellow-08, #ca8a04);
}
.positioned-properties .ls-icon-InReview {
color: var(--rx-blue-09, #1d4ed8);
}
.positioned-properties .ls-icon-Done {
color: var(--rx-green-08, #16a34a);
}
.positioned-properties .ls-icon-Cancelled {
color: var(--rx-red-08, #dc2626);
}
.property-value-with-icon {

View File

@@ -151,7 +151,7 @@ const getTablerExtIcon = (id) => {
const renderTablerExtIcon = (el, id) => {
const iconFn = getTablerExtIcon(id);
if (!iconFn) return false;
const node = iconFn({ size: 14, stroke: 2 });
const node = iconFn({ size: 18 });
if (!node) return false;
el.textContent = "";
const domNode = reactNodeToDom(node);

View File

@@ -11,7 +11,7 @@
[logseq.publish.model :as publish-model]))
;; Timestamp in milliseconds used for cache busting static assets.
(defonce version 1767194868810)
(defonce version 1777363019629)
(def ref-regex
(js/RegExp. "\\[\\[([0-9a-fA-F-]{36})\\]\\]|\\(\\(([0-9a-fA-F-]{36})\\)\\)" "g"))
@@ -100,13 +100,19 @@
(defn- icon-span
[icon]
(when (and (map? icon) (string? (:id icon)) (not (string/blank? (:id icon))))
(let [icon-type (:type icon)
icon-id (:id icon)
class-name (str "property-icon"
(when (and (= :tabler-icon icon-type)
(not (string/blank? icon-id)))
(str " ls-icon-" icon-id)))]
[:span
(cond->
{:class "property-icon"
{:class class-name
:data-icon-id (:id icon)
:data-icon-type (name (:type icon))}
(:color icon)
(assoc :style (str "color: " (:color icon) ";")))]))
(assoc :style (str "color: " (:color icon) ";")))])))
(defn- with-icon
[icon nodes]
@@ -445,12 +451,12 @@
[:div.positioned-property
[:span.property-name (property-title k (:property-title-by-ident ctx))]
[:span.property-value
(into [:span] (positioned-value-nodes v k ctx entities))]])]
(into [:span.inline-flex] (positioned-value-nodes v k ctx entities))]])]
[:div {:class (str "positioned-properties " (name position))}
(for [[k v] (sorted-properties props ctx)]
[:span.positioned-property
(into [:span] (positioned-value-nodes v k ctx entities))])])))
(into [:span.inline-flex] (positioned-value-nodes v k ctx entities))])])))
(def ^:private youtube-regex #"^((?:https?:)?//)?((?:www|m).)?((?:youtube.com|youtu.be|y2u.be|youtube-nocookie.com))(/(?:[\w-]+\?v=|embed/|v/)?)([\w-]+)([\S^\?]+)?$")
(def ^:private vimeo-regex #"^((?:https?:)?//)?((?:www).)?((?:player.vimeo.com|vimeo.com))(/(?:video/)?)([\w-]+)(\S+)?$")