Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add sass #8

Merged
merged 27 commits into from
Aug 23, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
0c799d9
Use async blocks instead of closures
therustmonk Aug 11, 2019
205edee
Add build script to ui
therustmonk Aug 11, 2019
07efd96
Replace less with sass embedded compiler
therustmonk Aug 11, 2019
41b2e97
Use Compact format for SASS
therustmonk Aug 11, 2019
86f0a4c
Add block rule
therustmonk Aug 12, 2019
cbbd51a
Remove current widgets system
therustmonk Aug 12, 2019
7ff30d6
Add Grid layout to the protocol
therustmonk Aug 12, 2019
e3a886c
Implement Scene widget
therustmonk Aug 12, 2019
7dfd51e
Add Layout widget implementation with classes
therustmonk Aug 12, 2019
6524f58
Add DSL for containers
therustmonk Aug 12, 2019
3e01ec0
Add view_flex method to layout
therustmonk Aug 12, 2019
c082e53
Add a minimal grid
therustmonk Aug 14, 2019
1add4fb
Add baseline example
therustmonk Aug 14, 2019
8bce60f
Add app widget (empty)
therustmonk Aug 15, 2019
df49273
Add List and Icon
therustmonk Aug 15, 2019
c2221a1
Render ListItem
therustmonk Aug 15, 2019
d1a4d48
Add application layout
therustmonk Aug 17, 2019
660ef66
Add navigation bar to App layout
therustmonk Aug 17, 2019
4401c45
Move NavigationDrawer to a separate module
therustmonk Aug 17, 2019
3543464
Add styles for AppBar
therustmonk Aug 17, 2019
5752d1f
Add Vuetify as a submodule
therustmonk Aug 17, 2019
daecfc7
Use vuetify styles for navigation drawer
therustmonk Aug 18, 2019
eb5c6f7
Add Material Icon font
therustmonk Aug 18, 2019
c4dec49
Move AppBar to a separate module
therustmonk Aug 18, 2019
8619680
Add footer block to App
therustmonk Aug 18, 2019
4a2912f
Move Footer to a separate widget module
therustmonk Aug 18, 2019
6c37203
Activate styles for Footer
therustmonk Aug 18, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add navigation bar to App layout
  • Loading branch information
therustmonk committed Aug 17, 2019
commit 660ef662d4021a4e321e334f908e87da576ed240
2 changes: 1 addition & 1 deletion ui/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![recursion_limit = "128"]
#![recursion_limit = "256"]

mod live;
mod utils;
Expand Down
23 changes: 18 additions & 5 deletions ui/src/widgets/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,20 +30,33 @@ impl Widget for Model {
}

fn main_view(&self) -> View<Self> {
let mut drawer_style = String::new();
drawer_style.push_str("height: 100vh;");
drawer_style.push_str("top: 0px;");
drawer_style.push_str("max-height: calc(100% - 36px);");
drawer_style.push_str("transform: translateX(0%);");
drawer_style.push_str("width: 256px;");
let mut app_bar_style = String::new();
app_bar_style.push_str("margin-top: 0px;");
app_bar_style.push_str("transform: translateY(0px);");
app_bar_style.push_str("left: 256px;");
app_bar_style.push_str("right: 0px;");
html! {
<div class="f-application">
<div class="f-application--wrap">
<div class="f-navigation-drawer">
<div class="f-navigation-drawer_border" />
<div class="f-navigation-drawer_content">
<div class="f-navigation-drawer f-navigation-drawer--fixed" style=drawer_style>
<div class="f-navigation-drawer__content">
<widgets::List: list=self.app.navigation_drawer.clone() />
</div>
<div class="f-navigation-drawer__border" />
</div>
<div class="app-bar">
<div class="f-app-bar f-toolbar" style=app_bar_style>
</div>
<div class="content">
<div class="f-content">
<widgets::Container: container=self.app.content.clone() />
</div>
<div class="f-footer">
</div>
</div>
</div>
}
Expand Down
48 changes: 27 additions & 21 deletions ui/styles/styles.sass
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,15 @@ $background_color: #FFF
$text_color: #000
$small_padding: 30px

body
box-sizing: border-box
overflow-y: scroll

*
box-sizing: inherit
padding: 0
margin: 0

// MIXINS

// Standard block that has no special properties
Expand All @@ -41,26 +50,6 @@ body
a
cursor: pointer

// Master block
.container
width: 100%
margin-right: auto
margin-left: auto
padding: 0

// Alignment and justification
.layout
display: flex
flex-wrap: wrap
flex: 1 1 auto
margin-right: -$grid-gutter / 2
margin-left: -$grid-gutter / 2

// Support breakpoints
.flex
// TODO: breakpoints...


.f-application
display: flex

Expand All @@ -69,8 +58,8 @@ a
min-height: 100vh
max-width: 100%
display: flex
flex: 1 1 auto
flex-direction: column
flex: 1 1 auto
backface-visibility: hidden

.f-navigation-drawer
Expand All @@ -82,6 +71,11 @@ a
overflow: hidden
pointer-events: auto

.f-navigation-drawer--fixed
position: fixed
z-index: 6
background: wheat

.f-navigation-drawer__border
position: absolute
right: 0
Expand All @@ -93,3 +87,15 @@ a
height: 100%
overflow-y: auto
overflow-x: hidden

.f-app-bar
background: yellow

.f-toolbar
max-width: 100%
flex: 1 1 auto

.f-content
display: flex
flex: 1 0 auto
max-width: 100%