Skip to content
Browse files

change ui

  • Loading branch information...
1 parent 3a8bbd2 commit af3e1f706a903c60ebf346fd8f988f618266d149 @halida committed Jan 5, 2012
Showing with 45 additions and 28 deletions.
  1. +1 −0 Gemfile
  2. +0 −7 views/_nav.haml
  3. +0 −1 views/_stamp.haml
  4. +1 −1 views/article.haml
  5. +1 −3 views/color.sass
  6. +5 −5 views/index.haml
  7. +3 −5 views/list.haml
  8. +34 −6 views/main.sass
View
1 Gemfile
@@ -14,3 +14,4 @@ gem 'execjs'
gem 'therubyracer'
gem 'thin'
+
View
7 views/_nav.haml
@@ -12,13 +12,6 @@
%li
=link_to "feed", "/feed"
- #color_panel
- .color.c1 1
- .color.c2 2
- .color.c3 3
- .color.c4 4
- .color.c5 5
-
%select#color-select
%option 1
%option 2
View
1 views/_stamp.haml
@@ -2,4 +2,3 @@
%p 建立时间: #{article.created.strftime "%Y/%m/%d %H:%M:%S"}
- if article.updated != article.created
%p 更新时间: #{article.updated.strftime "%Y/%m/%d %H:%M:%S"}
- %hr
View
2 views/article.haml
@@ -1,6 +1,6 @@
.article
= partial :_title_side
- %h1= @article.show_title
+ %h1.article-title= @article.show_title
=@article.get_content
= partial :_stamp, :locals => {:article => @article}
View
4 views/color.sass
@@ -34,10 +34,8 @@ a
.c5
background: $c_5
-hr
- border: 1px solid $c_5
.time-stamp
- color: $c_3
+ color: $c_5
#return-top
color: $c_1
View
10 views/index.haml
@@ -1,19 +1,19 @@
-@articles.each do |article|
- %h1#article-title
+ %h1.article-title
=link_to article.show_title, "/article/#{article.title}", true
- .article
- =article.get_content
-
+ .article=article.get_content
= partial :_stamp, :locals => {:article => article}
+ %hr
- if @articles.length > 0
#activity-more.more
- <img src="/ajax-loader.gif" id="more-display" />
+ %a{onclick: "more()"} < Click Me to see More >
:javascript
var more = function(){
+ $('#activity-more').html('<img src="/ajax-loader.gif" id="more-display" />')
$.get(window.location + (/\?/.test(window.location) ? "&" : "?") + "from=#{@articles[-1].id}&_pjax=true", function(data){
$('#activity-more').replaceWith(data);
});
View
8 views/list.haml
@@ -1,7 +1,5 @@
-@articles.each do |article|
-
- %h1
+ .article-list
+ #{article.created.strftime "%Y/%m/%d %H:%M:%S"}
+ %span.sep
=link_to article.show_title, "/article/#{article.title}", true
-
- = partial :_stamp, :locals => {:article => article}
-
View
40 views/main.sass
@@ -12,9 +12,9 @@ body
// Base font
=font-default
- font: 16px Arial, Helvetica, sans-serif
+ font: 14px Arial, Helvetica, sans-serif
=font-header
- font: 40px Arial, Helvetica, sans-serif
+ font: 30px Arial, Helvetica, sans-serif
=font-footer
font: 10px Arial, Helvetica, sans-serif
@@ -34,11 +34,25 @@ body
//format
h1
+font-header
- /* margin: 15px 0px 0px 0px
+ padding-top: 5px
p
- line-height: 22px
- margin: 10px 0px
+ line-height: 20px
+ margin-bottom: 5px
+
+ul
+ list-style-type: square
+ol
+ list-style-type: decimal
+ul, ol
+ padding-left: 5px
+ margin-left: 10px
+li
+ padding-bottom: 4px
+
+hr
+ margin: 30px auto 80px
+ width: 150px
//layouts
$grid : 70px
@@ -79,7 +93,18 @@ body
img
+single-box-shadow
+border-radius(5px)
-
+
+.article-title
+ text-align: center
+ padding: 10px
+
+.article-list
+ clear: both
+ padding: 10px
+ .sep
+ width: 40px
+ display: inline-block
+
nav
top: 0px
width: 700px
@@ -105,6 +130,9 @@ nav
.more
text-align: center
+ padding: 20px
+ cursor: pointer
+
+sticky-footer(72px, "#layout", "#layout_footer", "footer")
footer

0 comments on commit af3e1f7

Please sign in to comment.
Something went wrong with that request. Please try again.