Skip to content

Commit

Permalink
lab2023#21 Continues
Browse files Browse the repository at this point in the history
- Dock position was done
- Navbar position was done
- Content position was done
  • Loading branch information
tayfunoziserikan committed Aug 6, 2013
1 parent fe87883 commit d029c03
Show file tree
Hide file tree
Showing 6 changed files with 89 additions and 47 deletions.
5 changes: 4 additions & 1 deletion source/assets/javascripts/application.js.coffee
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#= require bootstrap
#= require_tree

$(document).ready ->
$(document).ready ->
$('[data-toggle="tooltip"]').tooltip()
$('.dropdown-toggle').dropdown()
2 changes: 1 addition & 1 deletion source/assets/stylesheets/_color-swatches.css.sass
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
$turquoise: #1abc9c
$green-sea: #16a085

$emerald: #2ecc71
$emerald: #2ecc71
$nephritis: #27ae60

$peter-river: #3498db
Expand Down
16 changes: 11 additions & 5 deletions source/assets/stylesheets/_variables.css.sass
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,32 @@

// Globals
$base-color: $turquoise
$base-dark-color: $midnight-blue

$body-bg-primary: $silver
$body-bg-secondary: $asbestos

$sidebar-width: 80px
$sidebar-bg: $midnight-blue
$wrapper-corner-width: 15px
$sidebar-width: 85px
$sidebar-bg: $base-dark-color


$dock-bg: $midnight-blue
$dock-bg: $sidebar-bg
$dock-active-icon-color: $base-color

$animation-duration: .4s

// Bootstrap Overrides
$brand-primary: $base-color

$navbar-bg: rgba(0,0,0,0)
$navbar-brand-color: $midnight-blue
$navbar-brand-hover-color: $wet-asphalt

$breadcrumb-bg: $clouds
$panel-heading-bg: $clouds

$link-color: $base-color
$dropdown-bg: $sidebar-bg
$dropdown-border: darken($dropdown-bg, 10) !default
$dropdown-divider-bg: $dropdown-border
$dropdown-link-color: $clouds !default
34 changes: 26 additions & 8 deletions source/assets/stylesheets/application.css.sass
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,37 @@
@import 'mixins'
@import 'bootstrap'


body.main
padding: 10px
padding: 5px
background-color: $body-bg-primary
//+background-image(linear-gradient(left, $body-bg-primary, $body-bg-secondary))
.navbar-brand
font-size: 1.6em

#content, #sidebar
z-index: 1030
#outer-wrapper
position: absolute
top: 70px
top: 60px
bottom: 0
left: 20px
right: 20px
border: 1px solid rgba(0,0,0, .2)
+border-top-left-radius($wrapper-corner-width)
+border-top-right-radius($wrapper-corner-width)
-webkit-box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.03)
-moz-box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.03)
box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.03)

#content, #sidebar
position: absolute
top: 0
bottom: 0
left: 0
right: 0

#sidebar
+border-top-left-radius(10px)
+border-top-left-radius($wrapper-corner-width)
background-color: $sidebar-bg
width: $sidebar-width

Expand All @@ -43,12 +56,17 @@ body.main
+animate-property(font-size, $animation-duration, ease-in-out)
+animate-property(color, $animation-duration, ease-in-out)
color: $dock-active-icon-color
&.active
&:after
display: none
// TODO content: "\f0da"

#content
+border-top-right-radius(10px)
+border-top-right-radius($wrapper-corner-width)
background-color: $body-bg
padding: 10px
left: $sidebar-width + 20
padding: 20px
left: $sidebar-width

#toolbar
position: relative
Expand Down
56 changes: 29 additions & 27 deletions source/layouts/layout.haml
Original file line number Diff line number Diff line change
Expand Up @@ -31,34 +31,36 @@
= partial 'partials/navbar'
/ Sidebar
#sidebar
#dock
.launcher.active
%i.icon-dashboard
%a{href: '#'} Dashboard
.launcher
%i.icon-user
%a{href: '#'} Users
.launcher
%i.icon-flag
%a{href: '#'} Reports
.launcher
%i.icon-camera-retro
%a{href: '#'} Photos
.launcher
%i.icon-bookmark
%a{href: '#'} Bookmarks
.launcher
%i.icon-cloud
%a{href: '#'} Backup
.launcher
%i.icon-bug
%a{href: '#'} Feedback
#outer-wrapper

/ Content
#content
= partial 'partials/breadcrumb'
= yield
#sidebar
#dock
.launcher.active
%i.icon-dashboard
%a{href: '#'} Dashboard
.launcher
%i.icon-user
%a{href: '#'} Users
.launcher
%i.icon-flag
%a{href: '#'} Reports
.launcher
%i.icon-camera-retro
%a{href: '#'} Photos
.launcher
%i.icon-bookmark
%a{href: '#'} Bookmarks
.launcher
%i.icon-cloud
%a{href: '#'} Backup
.launcher
%i.icon-bug
%a{href: '#'} Feedback

/ Content
#content
= partial 'partials/breadcrumb'
= yield


/ Javascripts
Expand Down
23 changes: 18 additions & 5 deletions source/partials/_navbar.haml
Original file line number Diff line number Diff line change
@@ -1,10 +1,23 @@
.navbar
%a.navbar-brand{:href => "#"}
%a.navbar-brand{:href => '#'}
%i.icon-beer
Hierapolis
%ul.nav.navbar-nav.pull-right
%li.active
.navbar-text
%li
%a Hello
%li
%a World
%li.dropdown.user
%a.dropdown-toggle{'data-toggle' => 'dropdown', :href => '#'}
%strong John DOE
=image_tag 'http://lorempixel.com/30/30/nature', class: 'img-circle'
%a{:href => "#"} Home
%b.caret
%ul.dropdown-menu
%li
%a{:href => '#'} Action
%li
%a{:href => '#'} Another action
%li
%a{:href => '#'} Something else here
%li.divider
%li
%a{:href => '#'} Separated link

0 comments on commit d029c03

Please sign in to comment.