Merge branch 'new_design'

This commit is contained in:
yafeilee 2014-03-30 12:33:06 +08:00
commit 4da020f996
20 changed files with 263 additions and 32 deletions

View File

@ -11,6 +11,7 @@ gem 'coffee-rails', '~> 4.0.1'
gem 'uglifier', '>= 1.3.0'
gem 'jquery-rails'
gem 'foundation-rails', '~> 5.2.1'
gem 'foundation-icons-sass-rails'
gem "mongoid"
gem "mongoid-pagination"

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

View File

@ -2,13 +2,6 @@
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/
h3 {
font-size: 40px;
margin-bottom: 10px;
padding-bottom: 5px;
border-bottom: 1px solid #CCC;
}
#post_content {
width: 800px;
height: 390px;

View File

@ -4,5 +4,5 @@
//= require_tree .
.inner-wrap {
height: 100%;
min-height: 100%;
}

View File

@ -0,0 +1,40 @@
.archives-field {
padding-top: 0.5rem;
margin-top: 1rem;
padding-bottom: 0.5rem;
i {
margin-right: 0.5rem;
}
span {
margin-right: 1rem;
}
.blog-title {
color: #111111;
font-size: 1.2rem;
font-weight: 500;
border: none;
}
li {
list-style: none;
color: #666666;
border-bottom: 1px dashed #CCCCCC;
margin-bottom: 1rem;
}
.load-more {
width: 100%;
text-align: center;
button {
background-color: transparent;
color: #333333;
border: 1px solid #DDDDDD;
&:focus {
outline-style: none;
}
}
}
}

View File

@ -0,0 +1,43 @@
.comment-field {
background-color: #333333;
padding-top: 3rem;
padding-bottom: 1rem;
textarea {
min-height: 7rem;
}
input[type='text'], textarea {
border: 1px solid #333333;
background-color: #F7F7F7;
box-shadow: none;
&:focus {
box-shadow: none;
background-color: white;
}
}
.has-tip {
color: #008cba;
}
.next {
float: right;
}
}
.comment-diag {
color: #EBEBEB;
border-top: 1px solid #5E5E5E;
padding-top: 1rem;
.name {
}
.created-at {
color: #b3b3b3;
}
.comment-content {
padding-bottom: 1rem;
border-bottom: 1px dashed #8a8a8a;
}
}

View File

@ -1189,3 +1189,17 @@
// $include-html-visibility-classes: $include-html-classes;
@import 'foundation';
@import 'foundation-icons';
#like-button {
color: #eaa296;
background-color: transparent;
border: 1px solid #e79385;
border-radius: 10rem;
&:hover {
background-color: #FCFF9E;
}
&:focus {
outline-style: none;
}
}

View File

@ -1,3 +1,14 @@
.middle-text {
text-align: center;
a {
color: #F7F7F7;
}
}
.off-canvas-list {
i {
margin-right: 0.5rem;
display: inline-block;
width: 1rem;
}
}

View File

@ -0,0 +1,9 @@
class ArchivesController < ApplicationController
def index
@posts = Post.all
end
def archive_params
params.permit(:type)
end
end

View File

@ -1,5 +1,4 @@
class HomeController < ApplicationController
def index
redirect_to "http://who.yafeilee.me"
end
end

View File

@ -0,0 +1,19 @@
.row
.small-12.large-8.columns
ul.archives-field
- 3.times do
li
a.blog-title href="#" 科学是什么
p.tags-field
i.fi-calendar
span 2014-2-12
i.fi-list
span 技术
i.fi-pricetag-multiple
span 生活, 感悟
i.fi-torsos
span 1010
i.fi-heart
span 10
.load-more
button.small Load More

View File

@ -0,0 +1,18 @@
.row
.small-12.large-12.columns
= text_area_tag(:content, nil, placeholder: '发表你的看法')
.row
.small-12.large-6.columns
= text_field_tag(:name, nil, placeholder: '你的名字')
= text_field_tag(:email, nil, placeholder: '你的邮箱')
button 发表
.comment-diag
p.name
| WinDy •
span.created-at 2014-2-12 13:00
p.comment-content 写的好!!
p.name
| WinDy •
span.created-at 2014-2-12 13:00
p.comment-content 写的好!!

View File

@ -1,11 +1,28 @@
.blog
h2
= link_to post.title, blog_path(post)
.content.wikistyle
= post.content_html.html_safe
.cc
= t(:announce_at)
= format_time(post.created_at)
| |
= t(:visited_count) + post.visited.to_s
.bottom
h2.blog-title hello
p.ptag
| 分类:
span 技术
p.ptag
| 标签:
span 生活, 感悟
.content
p 没错, 科学只是哲学的一个部分, 所以此书给我最大的收获是, 科学只是一种实用主义. 只是这种实用主义更纯粹些:
p
| 1. 任何公理都值得怀疑
| 2. 能够验证与重复
p 瞧, 第 2 点的感觉就是说, 太阳一直东方升起, 这就是科学, 因为我们一直在重复这个结论. 但是, 我们知道, 1000万年后, 我们可能就再也看不到太阳了, 所以这个结论还需要修正. 这就是科学的本质.
p 再举个历史的例子:
p
| 1. 地球是平的
| 2. 地球是圆的
| 3. 地球是椭圆的
p.ptag
| 发表于:
span 2014-2-14
p
button#like-button Like

View File

@ -1,2 +1,13 @@
.blogs
= render :partial=> "post", :locals=> { :post=> @post }
.row
.small-12.large-8.columns
= render partial: "post", :locals=> { :post=> @post }
.comment-field
.row
.small-12.large-8.columns
= render partial: 'comment', locals: { comments: @comments }
.row
.small-12.large-8.columns
a.prev href="#"
span.has-tip data-tooltip="" title="hello" Prev
a.next href="#"
span.has-tip data-tooltip="" title="hello" Next

View File

@ -0,0 +1,27 @@
.row
.small-12.large-8.columns
h2.blog-title ABOUT ME
p 我的名字是李亚飞( YaFei Lee ), 网名为 WinDy, 由于是我第一个网名, 所以一直使用至今.
p 我是 85 后成员, 目前生活在深圳, 计划长期在这里发展.
p 当年毕业于吉林大学计算机专业, 并在深信服工作约 5 年时间, 如今正在独立创业路中.
p 曾经对软件测试开发领域有浓厚兴趣, 如今对产品开发与公司运营兴趣较多. 平时多研究 Ruby on Rails, Web 开发等技术. 闲暇之余爱好中国象棋, 乒乓球, 读书.
p 最近正在读的书在这里: <a href='http://book.douban.com/people/41759170/collect'>豆瓣书单</a>
h4 近期动态
hr
p 目前在独立创业路中, 正在互联网金融大浪中淘金.
p WinDy's Blog 开博也有 2 年以上了, 由于个人原因, 博客完全自主采用 Ruby on Rails 完成, 在 2014 年 3 月进行了重构, 以移动设备优先进行了设计.
p 闲暇之余, 开通了微信公众账号, 与 WinDy's Blog 不同, 这里不讲技术性内容, 主要面向生活感悟, 个人思考等, 欢迎关注.
= image_tag 'weixin.jpg'
p 也可以搜索 <strong>技术达人李亚飞</strong> 来找到我.
p 我对微信是重度使用者, 几乎不使用微博, 微信账号可以在我个别博客里发现, Enjoying!
h4 更多链接
hr
ul
li
a href="https://github.com/windy" target="_blank" Github
li
a href="http://www.douban.com/people/41759170/" target="_blank" Douban
li
a href="http://www.linkedin.com/pub/yafei-lee/77/3b/505" target="_blank" LinkedIn

View File

@ -17,28 +17,44 @@ html
a.left-off-canvas-toggle.menu-icon href="#"
span
section.middle.tab-bar-section
h1.title.middle-text WinDy
.row.small-12.large-10.columns
h1.title.middle-text
= link_to 'WinDy', root_path
aslide.left-off-canvas-menu
ul.off-canvas-list
li
label Menu
li
a href="#" 技 术
= link_to root_path do
i.fi-home
| 首页
li
a href="#" 生 活
= link_to '/tech' do
i.fi-social-evernote
| 技术
li
a href="#" 创 业
= link_to '/life' do
i.fi-torsos-male-female
| 生活
li
= link_to '/creator' do
i.fi-lightbulb
| 创业
li
label Archive
li
a href="#" 时间线
= link_to archives_path do
i.fi-align-justify
| 时间线
li
label AboutMe
a href="#" 关于我
label About
= link_to about_path do
i.fi-torso
| 关于我
section.main-section
= yield
= render "layouts/footer"
a.exit-off-canvas
a.exit-off-canvas

View File

@ -6,6 +6,7 @@ WBlog::Application.routes.draw do
end
end
resources :archives
# photos
resources :photos, :only=>[:create]
@ -18,5 +19,5 @@ WBlog::Application.routes.draw do
end
get '/about' => 'home#index'
get '/admin' => 'admin/posts#new'
get '/:type' => 'blogs#index'
get '/:type' => 'archives#index'
end

View File

@ -0,0 +1,12 @@
require 'spec_helper'
describe ArchivesController do
describe "GET 'index'" do
it "returns http success" do
get 'index'
response.should be_success
end
end
end

View File

@ -5,7 +5,7 @@ describe HomeController do
describe "GET 'index'" do
it "returns http success" do
get 'index'
expect(response).to redirect_to("http://who.yafeilee.me")
expect(response).to be_success
end
end