mirror of
https://github.com/heyarne/airsonic-ui.git
synced 2026-05-07 02:33:39 +02:00
Set up different sidebar sections and improve styling of bottom bar
This commit is contained in:
parent
e926fb41d3
commit
9858cece51
6 changed files with 34 additions and 9 deletions
|
|
@ -8,7 +8,7 @@
|
||||||
"build:html": "sed 's/\"\\/app\\//\".\\/app\\//g' src/html/index.html > public/index.html",
|
"build:html": "sed 's/\"\\/app\\//\".\\/app\\//g' src/html/index.html > public/index.html",
|
||||||
"build:sass": "node-sass --output-style compressed src/sass/app.sass public/app/style.css",
|
"build:sass": "node-sass --output-style compressed src/sass/app.sass public/app/style.css",
|
||||||
"build": "rm -r public/*; run-p build:*; ",
|
"build": "rm -r public/*; run-p build:*; ",
|
||||||
"deploy": "npm run build && gh-pages -d public",
|
"deploy": "npm run build && gh-pages -d public -m \"Deploying $(git rev-parse --short HEAD)\"",
|
||||||
"dev:cljs": "shadow-cljs watch app test",
|
"dev:cljs": "shadow-cljs watch app test",
|
||||||
"dev:html": "sed 's/\"\\.\\/app\\//\"\\/app\\//g' src/html/index.html > public/index.html",
|
"dev:html": "sed 's/\"\\.\\/app\\//\"\\/app\\//g' src/html/index.html > public/index.html",
|
||||||
"dev:sass": "npm run build:sass; node-sass -w src/sass/app.sass public/app/style.css",
|
"dev:sass": "npm run build:sass; node-sass -w src/sass/app.sass public/app/style.css",
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,8 @@
|
||||||
|
|
||||||
(defmethod route-data ::main
|
(defmethod route-data ::main
|
||||||
[route-id params query]
|
[route-id params query]
|
||||||
[:api-request "getAlbumList2" :albumList2 {:type "recent"}])
|
[:api-request "getAlbumList2" :albumList2 {:type "recent"
|
||||||
|
:size 18}])
|
||||||
|
|
||||||
(defmethod route-data ::artist-view
|
(defmethod route-data ::artist-view
|
||||||
[route-id params query]
|
[route-id params query]
|
||||||
|
|
|
||||||
|
|
@ -30,11 +30,21 @@
|
||||||
|
|
||||||
(defn sidebar [user]
|
(defn sidebar [user]
|
||||||
[:aside.menu.section
|
[:aside.menu.section
|
||||||
[:p.menu-label user]
|
[:p.menu-label "Music"]
|
||||||
|
[:ul.menu-list
|
||||||
|
[:li [:a "By artist"]]
|
||||||
|
[:li [:a "Top rated"]]
|
||||||
|
[:li [:a "Most played"]]]
|
||||||
|
[:p.menu-label "Playlists"]
|
||||||
|
[:p.menu-label "Shares"]
|
||||||
|
[:p.menu-label "Podcasts"]
|
||||||
|
[:p.menu-label "User area"]
|
||||||
[:ul.menu-list
|
[:ul.menu-list
|
||||||
[:li [:a "Settings"]]
|
[:li [:a "Settings"]]
|
||||||
;; FIXME: Create proper logout event
|
;; FIXME: Create proper logout event
|
||||||
[:li [:a {:on-click #(dispatch [::events/initialize-db]) :href "#"} "Logout"]]]])
|
[:li [:a
|
||||||
|
{:on-click #(dispatch [::events/initialize-db]) :href "#"}
|
||||||
|
(str "Logout (" (:name user) ")")]]]])
|
||||||
|
|
||||||
;; putting everything together
|
;; putting everything together
|
||||||
|
|
||||||
|
|
@ -42,9 +52,9 @@
|
||||||
(let [user @(subscribe [::subs/user])
|
(let [user @(subscribe [::subs/user])
|
||||||
content @(subscribe [::subs/current-content])]
|
content @(subscribe [::subs/current-content])]
|
||||||
[:div
|
[:div
|
||||||
[:div.columns
|
[:main.columns
|
||||||
[:div.column.is-2.sidebar
|
[:div.column.is-2.sidebar
|
||||||
[sidebar]]
|
[sidebar user]]
|
||||||
[:div.column
|
[:div.column
|
||||||
[:section.section
|
[:section.section
|
||||||
[breadcrumbs content]
|
[breadcrumbs content]
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@
|
||||||
(defn listing [albums]
|
(defn listing [albums]
|
||||||
;; always show 5 in a row
|
;; always show 5 in a row
|
||||||
[:div
|
[:div
|
||||||
(for [albums (partition-all 5 albums)]
|
(for [albums (partition-all 6 albums)]
|
||||||
[:div.columns
|
[:div.columns
|
||||||
(for [[idx album] (map-indexed vector albums)]
|
(for [[idx album] (map-indexed vector albums)]
|
||||||
[:div.column {:key idx} [preview album]])])])
|
[:div.column.is-2 {:key idx} [preview album]])])])
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@
|
||||||
[:div.navbar-menu.is-active
|
[:div.navbar-menu.is-active
|
||||||
(if currently-playing
|
(if currently-playing
|
||||||
;; show song info
|
;; show song info
|
||||||
[:section.level
|
[:section.level.audio-interaction
|
||||||
[:div.level-left>article.media
|
[:div.level-left>article.media
|
||||||
[:div.media-left [cover (:item currently-playing) 48]]
|
[:div.media-left [cover (:item currently-playing) 48]]
|
||||||
[:div.media-content [current-song-info currently-playing]]]
|
[:div.media-content [current-song-info currently-playing]]]
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,9 @@
|
||||||
@import "../../node_modules/bulma/bulma"
|
@import "../../node_modules/bulma/bulma"
|
||||||
|
|
||||||
|
// area holding content & side navi
|
||||||
|
#app main
|
||||||
|
margin-bottom: 0
|
||||||
|
|
||||||
// navi on the left side
|
// navi on the left side
|
||||||
.sidebar
|
.sidebar
|
||||||
background: $dark
|
background: $dark
|
||||||
|
|
@ -14,6 +18,16 @@
|
||||||
.navbar-menu
|
.navbar-menu
|
||||||
align-items: center
|
align-items: center
|
||||||
|
|
||||||
|
.audio-interaction
|
||||||
|
flex-grow: 1
|
||||||
|
|
||||||
|
.level-left
|
||||||
|
flex-grow: 1
|
||||||
|
flex-shrink: 0
|
||||||
|
.level-right
|
||||||
|
flex-grow: 0
|
||||||
|
flex-shrink: 1
|
||||||
|
|
||||||
.progress.is-tiny
|
.progress.is-tiny
|
||||||
height: 0.25rem
|
height: 0.25rem
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue