links panel improved
This commit is contained in:
@@ -22,6 +22,7 @@ views = Article Views
|
|||||||
statistics = Statistics
|
statistics = Statistics
|
||||||
stats = statistics
|
stats = statistics
|
||||||
export = export
|
export = export
|
||||||
|
notehub = notehub
|
||||||
edit = edit
|
edit = edit
|
||||||
short-url = short url
|
short-url = short url
|
||||||
api-title = API
|
api-title = API
|
||||||
|
|||||||
@@ -87,18 +87,14 @@ a:visited {
|
|||||||
.landing-button:hover {
|
.landing-button:hover {
|
||||||
background: #0b2;
|
background: #0b2;
|
||||||
}
|
}
|
||||||
#panel {
|
#links {
|
||||||
.helvetica;
|
.helvetica;
|
||||||
position: fixed;
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
border-top: 1px dotted @foreground_halftone;
|
padding: 1em;
|
||||||
background: @background_halftone;
|
font-size: 0.8em;
|
||||||
padding: 0.2em;
|
|
||||||
bottom: 0px;
|
|
||||||
font-size: 0.7em;
|
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
#panel a {
|
#links a {
|
||||||
border: none;
|
border: none;
|
||||||
}
|
}
|
||||||
html, body {
|
html, body {
|
||||||
@@ -183,4 +179,4 @@ td {
|
|||||||
}
|
}
|
||||||
.middot {
|
.middot {
|
||||||
padding: 0.5em;
|
padding: 0.5em;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -105,14 +105,16 @@
|
|||||||
(let [note (api/get-note noteID)]
|
(let [note (api/get-note noteID)]
|
||||||
(layout (:title note)
|
(layout (:title note)
|
||||||
(md-node :article.bottom-space (:note note))
|
(md-node :article.bottom-space (:note note))
|
||||||
(let [links (map #(link-to
|
(let [urls {:short-url (api/url (storage/create-short-url noteID params))
|
||||||
(if (= :short-url %)
|
:notehub "/"}
|
||||||
(api/url (storage/create-short-url noteID params))
|
links (map #(link-to
|
||||||
|
(if (urls %)
|
||||||
|
(urls %)
|
||||||
(str (:longURL note) "/" (name %)))
|
(str (:longURL note) "/" (name %)))
|
||||||
(get-message %))
|
(get-message %))
|
||||||
[:stats :edit :export :short-url])
|
[:notehub :stats :edit :export :short-url])
|
||||||
links (interpose [:span.middot "·"] links)]
|
links (interpose [:span.middot "·"] links)]
|
||||||
[:div#panel (map identity links)]))))))
|
[:div#links links]))))))
|
||||||
|
|
||||||
(defpage "/:year/:month/:day/:title/export" {:keys [year month day title]}
|
(defpage "/:year/:month/:day/:title/export" {:keys [year month day title]}
|
||||||
(when-let [md-text (:note (api/get-note (api/build-key [year month day] title)))]
|
(when-let [md-text (:note (api/get-note (api/build-key [year month day] title)))]
|
||||||
|
|||||||
Reference in New Issue
Block a user