Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

add active tab arrow, clean up admin header

  • Loading branch information...
commit 52e0e6a79d332e7f5f8022faf4bc9d08e2498a5e 1 parent 8b7b0dc
seaofclouds authored
2  main.rb
View
@@ -135,6 +135,7 @@ def tags(post)
get "/admin/posts/new" do
auth!
+ @view = "create"
@post = Post.new
haml :"/admin/edit", :layout => :"./admin/layout"
end
@@ -147,6 +148,7 @@ def tags(post)
end
get "/posts/:id" do
+ @view = "show"
@post = Post[params[:id]]
haml :show
end
BIN  themes/default/public/admin/admin-menu-active-tab.png
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 themes/default/stylesheets/admin.sass
View
@@ -3,6 +3,7 @@
body
+reset
+ :line-height 1px
+nested-reset
+clear
@@ -31,25 +32,28 @@ body
:left 0
:background-color #151515
:border-bottom 1px solid #050505
- :text-transform uppercase
- :font-size 11px
- :padding 10px 10px 0 10px
:width 100%
+pie-clearfix
h1
:font-size 18px
- :margin-bottom 10px
+ :line-height 18px
:display block
:float left
- :padding-right 20px
+ :padding 10px
+ :margin-bottom -1px
.menu
:float right
- :padding-top 5px
- :padding-right 10px
+ :margin-bottom -1px
a
+ :text-transform uppercase
+ :font-size 11px
+ :line-height 18px
:display inline-block
- :padding-right 15px
- :line-height 16px
+ :padding 10px
+ &.active
+ :background-image url(/admin/admin-menu-active-tab.png)
+ :background-repeat no-repeat
+ :background-position center bottom
.notice
:width 570px
:padding 20px
@@ -115,12 +119,13 @@ body
:top 50%
:margin-top -200px
.content
+ :padding 10px 15px 15px 15px
:background-color #1a1a1a
h1
:font-size 31px
- :color #333
+ :line-height 36px
:padding-bottom 10px
- :padding 15px
+ :color #333
form
fieldset
+pie-clearfix
5 themes/default/views/admin/_header.haml
View
@@ -2,9 +2,8 @@
%h1
%a{:href =>"/", :title => Geido.name}= Geido.name
.menu
- %a.all{:href => '/admin/posts'} All Posts
- %a.newpost{:href => '/admin/posts/new'} New Post
+ %a.list{:href => '/admin/posts', :class=> @view == 'list' ? 'active' : ''} All Posts
+ %a.create{:href => '/admin/posts/new', :class=> @view == 'create' ? 'active' : ''} New Post
%a.logout{:href => '/logout'} Logout
-
- if @view == "show"
= admin_links(post)
Please sign in to comment.
Something went wrong with that request. Please try again.