Merge branch 'rss_feature'
This commit is contained in:
commit
bb38212029
|
@ -0,0 +1,10 @@
|
|||
@app.controller 'AboutController', ($scope)->
|
||||
$scope.type = null
|
||||
|
||||
$scope.click = (v)->
|
||||
if $scope.type == v
|
||||
$scope.type = null
|
||||
return
|
||||
$scope.type = v
|
||||
$scope.weixin_click = ->
|
||||
$scope.weixin = !$scope.weixin
|
|
@ -33,9 +33,8 @@
|
|||
.recent-content {
|
||||
padding-bottom: 3rem;
|
||||
li {
|
||||
list-style: none;
|
||||
list-style: disc;
|
||||
}
|
||||
margin-left: 0rem;
|
||||
padding-left: 0rem;
|
||||
}
|
||||
|
||||
|
@ -65,3 +64,10 @@
|
|||
float: right;
|
||||
margin-top: -2rem;
|
||||
}
|
||||
|
||||
.subscribe-ul {
|
||||
list-style-type: none;
|
||||
li {
|
||||
margin-left: 0;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
# encoding : utf-8
|
||||
class BlogsController < ApplicationController
|
||||
def index
|
||||
@newest = Post.desc(:created_at).to_a.first
|
||||
@recent = Post.desc(:created_at).to_a[1..2]
|
||||
@newest = Post.desc(:created_at).first
|
||||
@recent = Post.desc(:created_at).to_a[1..5]
|
||||
end
|
||||
|
||||
def rss
|
||||
|
|
|
@ -18,11 +18,29 @@
|
|||
- @recent.each do |re|
|
||||
li = link_to "#{re.title}",blog_path(re)
|
||||
|
||||
.large-3.columns.large-offset-1.self-introduce
|
||||
.large-3.columns.large-offset-1.self-introduce ng-controller='AboutController'
|
||||
h4 WELCOME
|
||||
p 我是李亚飞, WinDy 是我的网名.
|
||||
|
||||
h4 ABOUTME
|
||||
p 关于我
|
||||
p 中国 * 深圳
|
||||
p 邮件订阅, 微信扫一扫
|
||||
p 技术, 创业, 生活
|
||||
p 中国 - 深圳 - 南山
|
||||
p = link_to '关于我', about_path
|
||||
h4 SUBSCRIBE
|
||||
ul.subscribe-ul
|
||||
li
|
||||
= link_to '邮件订阅 ', '', "ng-click"=>"click('email')"
|
||||
p
|
||||
.email-subscribe ng-show="type == 'email'"
|
||||
= text_field_tag 'email', nil, placeholder: 'your@email.com'
|
||||
li
|
||||
= link_to '微信扫一扫', '', "ng-click"=>"click('weixin')"
|
||||
p
|
||||
.weixin-subscribe ng-show="type == 'weixin'"
|
||||
= render partial: "qrcode", locals: { str: root_url }
|
||||
li
|
||||
= link_to 'RSS订阅', '', "ng-click"=>"click('rss')"
|
||||
p
|
||||
.rss-subscribe ng-show="type == 'rss'"
|
||||
= link_to rss_blogs_path do
|
||||
- image_tag('rss.png')
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
.row
|
||||
.small-12.large-8.columns
|
||||
.small-12.large-8.columns.self-introduce
|
||||
h2.blog-title ABOUT ME
|
||||
p 我的名字是李亚飞( YaFei Lee ), 网名为 WinDy, 由于是我第一个网名, 所以一直使用至今.
|
||||
p 我是 85 后成员, 目前生活在深圳, 计划长期在这里发展.
|
||||
|
@ -8,7 +8,6 @@
|
|||
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 不同, 这里不讲技术性内容, 主要面向生活感悟, 个人思考等, 欢迎关注.
|
||||
|
@ -17,7 +16,6 @@
|
|||
p 我对微信是重度使用者, 几乎不使用微博, 微信账号可以在我个别博客里发现, Enjoying!
|
||||
|
||||
h4 更多链接
|
||||
hr
|
||||
ul
|
||||
li
|
||||
a href="https://github.com/windy" target="_blank" Github
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
- if ENV['GOOGLE']
|
||||
javascript:
|
||||
var _gaq = _gaq || [];
|
||||
_gaq.push(['_setAccount', '#{ENV['GOOGLE']}']);
|
||||
_gaq.push(['_trackPageview']);
|
||||
|
||||
(function() {
|
||||
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
||||
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
||||
})();
|
|
@ -35,16 +35,3 @@ html
|
|||
.admin-main-field ng-app="app"
|
||||
= yield
|
||||
= render "layouts/footer"
|
||||
|
||||
|
||||
|
||||
javascript:
|
||||
var _gaq = _gaq || [];
|
||||
_gaq.push(['_setAccount', 'UA-32883596-1']);
|
||||
_gaq.push(['_trackPageview']);
|
||||
|
||||
(function() {
|
||||
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
||||
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
||||
})();
|
||||
|
|
|
@ -7,7 +7,6 @@ html
|
|||
= stylesheet_link_tag "application"
|
||||
= javascript_include_tag "vendor/modernizr"
|
||||
= javascript_include_tag "application"
|
||||
= yield :js
|
||||
= csrf_meta_tags
|
||||
body
|
||||
.off-canvas-wrap
|
||||
|
@ -56,15 +55,4 @@ html
|
|||
= render "layouts/footer"
|
||||
a.exit-off-canvas
|
||||
|
||||
|
||||
|
||||
javascript:
|
||||
var _gaq = _gaq || [];
|
||||
_gaq.push(['_setAccount', 'UA-32883596-1']);
|
||||
_gaq.push(['_trackPageview']);
|
||||
|
||||
(function() {
|
||||
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
||||
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
||||
})();
|
||||
= render 'layouts/google_analytics'
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
# Add application configuration variables here, as shown below.
|
||||
|
||||
# 后台登录的用户名与密码, 不填的话无法管理后台
|
||||
ADMIN_USER: 'admin'
|
||||
ADMIN_PASSWORD: 'admin'
|
||||
|
||||
# google analytics, 如果不需要可以留空
|
||||
GOOGLE: 'UA-32883596-1'
|
Loading…
Reference in New Issue