Skip to content
This repository has been archived by the owner on Jan 25, 2022. It is now read-only.

SEO: 全般的な検索エンジン最適化 #65

Merged
merged 6 commits into from
Jan 10, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -140,3 +140,6 @@ gem 'mini_magick'

# タグ追加時の選択フォーム
gem 'chosen-rails'

# HTMLのmetaタグを簡単設定
gem 'meta-tags', require: 'meta_tags'
3 changes: 3 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,8 @@ GEM
nokogiri (~> 1.4)
ntlm-http (~> 0.1, >= 0.1.1)
webrobots (~> 0.0, >= 0.0.9)
meta-tags (1.5.0)
actionpack
mime-types (1.25.1)
mini_magick (3.6.0)
subexec (~> 0.2.1)
Expand Down Expand Up @@ -421,6 +423,7 @@ DEPENDENCIES
jquery-ui-rails
kaminari
masonry-rails
meta-tags
mini_magick
mysql2
newrelic_rpm
Expand Down
69 changes: 0 additions & 69 deletions app/assets/javascripts/guest/application.js.coffee

This file was deleted.

7 changes: 7 additions & 0 deletions app/assets/stylesheets/clips.css.scss
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,11 @@ $info_box_width: $clip_width - $image_box_width - $margin;
width: $clip_width;
}

#clip > h2 {
margin: 20px 0;
text-align: center;
}

#clip .profile {
margin-bottom: 20px;
height: 64px;
Expand Down Expand Up @@ -134,6 +139,7 @@ $info_box_width: $clip_width - $image_box_width - $margin;
#clip .image_box {
margin: 0;
text-align: center;
background-color: #fff;
border: 1px solid #ccc;

img {
Expand Down Expand Up @@ -196,6 +202,7 @@ h2.title {
margin-bottom: $margin;
width: $info_box_width - $padding * 2;
padding: $padding;
background-color: #fff;
border: 1px solid #ccc;

.count {
Expand Down
112 changes: 0 additions & 112 deletions app/assets/stylesheets/guest/application.css.scss.erb

This file was deleted.

48 changes: 0 additions & 48 deletions app/assets/stylesheets/guest/index.css.scss.erb

This file was deleted.

55 changes: 55 additions & 0 deletions app/assets/stylesheets/home.css.scss
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,58 @@
}
}
}

// introduction
#introduction {
color: #333;
margin: 30px auto 40px;
padding-bottom: 40px;
width: $contents_width;;
text-align: center;
border-bottom: 1px solid #ccc;
}

#introduction h1 {
margin: 0.5em 5px;
font-size: xx-large;
font-family: $font_gothic;

.s1 {
font-weight: bold;
}

.s2 {
font-weight: normal;
}
}

#introduction p {
line-height: 250%;
font-family: $font_gothic;
color: #666;

i {
margin: 0 0.5em;
@include opacity(0.75);
}

.btn-reclip {
color: #000;
@include icon(paper-clip);
@include btn-reclip;
}

.btn-like {
@include icon(heart-empty);
@include btn-like;
}

.tip {
color: #333;
margin: 0 3px;
padding: 3px 6px;
background-color: #eee;
border: 1px dotted #aaa;
@include border-radius(4px);
}
}
9 changes: 9 additions & 0 deletions app/assets/stylesheets/likes.css.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// Place all the styles related to the home controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/

// like
#like > h2 {
margin: 20px 0;
text-align: center;
}
6 changes: 6 additions & 0 deletions app/assets/stylesheets/matomes.css.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ $infomation_width: 760px;
$contribute_width: $header_width - $infomation_width;
$cover_size: 100px;

// matome
#matome > h2 {
margin: 20px 0;
text-align: center;
}

// breadcrumb
#matome div.breadcrumb {
margin: 0;
Expand Down
4 changes: 4 additions & 0 deletions app/assets/stylesheets/scaffolds.css.scss
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ div {
html,
body {
font-family: sans-serif !important;
background-color: #f5f5ef;
}

table {
background-color: #fff;
}

Expand Down
11 changes: 0 additions & 11 deletions app/controllers/home_controller.rb
Original file line number Diff line number Diff line change
@@ -1,19 +1,8 @@
class HomeController < ApplicationController
before_filter :guest, unless: :user_signed_in?

def index
@clips = Clip.paginate(page: params[:page]).includes([ { image: :likes, comments: :user }, :user, :likes, :tags ])
@hot_tags = Tag.hot(50).shuffle
@new_matomes = Matome.limit(5).all
render action: 'next_page' unless first_page?
end

def guest
@clips = Clip.includes([ { image: :likes, comments: :user }, :user, :likes, :tags ]).reorder('view_count DESC, created_at DESC').paginate(page: params[:page])
if first_page?
render action: 'guest', layout: 'application_for_guest'
else
render action: 'next_page'
end
end
end
Loading