daydream

A small matrix web client written in rust
git clone git://archive.git.mtrnord.blog/daydream-mx/daydream.git
Log | Files | Refs | README | LICENSE

commit 44bacb1408cce341cdff7cda4185829bc22e5cfc
parent 5e2bef5f4e79bcb020acc9b57f14f603279d605d
Author: Marcel <mtrnord1@gmail.com>
Date:   Wed, 17 Jun 2020 23:30:44 +0200

Further UI optimizes

Took 8 minutes

Diffstat:
Msrc/app/components/event_list.rs | 4++--
Msrc/app/views/main_view.rs | 4++--
Mstatic/custom-css.scss | 20+++++++++++++++++++-
3 files changed, 23 insertions(+), 5 deletions(-)

diff --git a/src/app/components/event_list.rs b/src/app/components/event_list.rs @@ -139,8 +139,8 @@ impl Component for EventList { fn view(&self) -> Html { return html! { - <div class="container uk-flex uk-flex-column uk-width-5-6 uk-padding uk-padding-remove-bottom" style="height: 100%"> - <div class="room-title"><h1>{ self.props.current_room.as_ref().unwrap().display_name() }</h1></div> + <div class="event-list container uk-flex uk-flex-column uk-width-5-6"> + <div class="room-title"><div><h1>{ self.props.current_room.as_ref().unwrap().display_name() }</h1></div></div> <div class="scrollable" style="height: 100%"> { if self.state.events.contains_key(&self.props.current_room.as_ref().unwrap().room_id) { diff --git a/src/app/views/main_view.rs b/src/app/views/main_view.rs @@ -71,8 +71,8 @@ impl Component for MainView { html! { <div class="uk-flex auto-scrollable-container" style="height: 100%"> <RoomList change_room_callback=self.link.callback(Msg::ChangeRoom)/> - <div class="container uk-flex uk-flex-column uk-width-5-6 uk-padding uk-padding-remove-bottom" style="height: 100%"> - <div class="room-title"><h1>{ self.state.current_room.as_ref().unwrap().display_name() }</h1></div> + <div class="event-list container uk-flex uk-flex-column uk-width-5-6"> + <div class="room-title"><div><h1>{ self.state.current_room.as_ref().unwrap().display_name() }</h1></div></div> <h4> { tr!( diff --git a/static/custom-css.scss b/static/custom-css.scss @@ -346,5 +346,23 @@ body { .room-title { margin-bottom: 1.5rem; - box-shadow: 0 1px 10px -10px rgba(0, 0, 0, 0.2), 0 4px 5px -5px rgba(0, 0, 0, 0.12), 0 2px 4px -4px rgba(0, 0, 0, 0.14); + width: 100%; + overflow: hidden; + padding-bottom: 10px; +} + +.room-title > div { + width: 100%; + //height: 100px; + + box-shadow: 0 1px 10px rgba(0, 0, 0, 0.2), 0 4px 5px rgba(0, 0, 0, 0.12), 0 2px 4px rgba(0, 0, 0, 0.14); + -moz-box-shadow: 0 1px 10px rgba(0, 0, 0, 0.2), 0 4px 5px rgba(0, 0, 0, 0.12), 0 2px 4px rgba(0, 0, 0, 0.14); + -webkit-box-shadow: 0 1px 10px rgba(0, 0, 0, 0.2), 0 4px 5px rgba(0, 0, 0, 0.12), 0 2px 4px rgba(0, 0, 0, 0.14); +} + +.event-list { + padding: 40px; + padding-bottom: 0 !important; + padding-right: 0 !important; + height: 100%; }