Commit c516d60b by tady (Masato TADA)

Merge pull request #148 from tadyjp/1108

1108
parents 0bf532c9 4f1a13ab
Pipeline #64 failed with stages
in 0 seconds
RV_RENDEZVOUS_APP_HOST=http://localhost:3000 RV_RENDEZVOUS_APP_HOST=http://localhost:3000
RV_PERMITTED_LOGIN_DOMAIN=gmail.com,mycompany.com
RV_GOOGLE_API_CLIENT_ID=xxxxxxxxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.apps.googleusercontent.com RV_GOOGLE_API_CLIENT_ID=xxxxxxxxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.apps.googleusercontent.com
RV_GOOGLE_API_SECRET=xxxxxxxxxxxxxxxxxxxxxxxx RV_GOOGLE_API_SECRET=xxxxxxxxxxxxxxxxxxxxxxxx
RV_S3_ASSESS_KEY_ID=xxxxxxxxxxxxxxxxxxxxxxxx RV_S3_ASSESS_KEY_ID=xxxxxxxxxxxxxxxxxxxxxxxx
......
...@@ -23,7 +23,7 @@ gem 'therubyracer', platforms: :ruby ...@@ -23,7 +23,7 @@ gem 'therubyracer', platforms: :ruby
# gem 'turbolinks' # gem 'turbolinks'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder # Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
# gem 'jbuilder' gem 'jbuilder'
gem 'i18n_generators' gem 'i18n_generators'
...@@ -97,6 +97,8 @@ group :development, :test do ...@@ -97,6 +97,8 @@ group :development, :test do
gem 'dotenv-rails' gem 'dotenv-rails'
gem 'rubocop' gem 'rubocop'
gem 'quiet_assets'
end end
group :test do group :test do
...@@ -161,3 +163,9 @@ gem 'rails_12factor', group: :production ...@@ -161,3 +163,9 @@ gem 'rails_12factor', group: :production
# for IP restriction # for IP restriction
gem 'rack-contrib', require: 'rack/contrib' gem 'rack-contrib', require: 'rack/contrib'
gem 'meta-tags'
# Growl-like Notification
# https://github.com/RobinBrouwer/gritter
gem 'gritter', '1.1.0'
GIT GIT
remote: git://github.com/amatsuda/kaminari.git remote: git://github.com/amatsuda/kaminari.git
revision: b206d89922378dcf6f1f7a6247ce1d5f6f1534ad revision: 8247c79943cf98ce521b79403dd829317d19fa7f
specs: specs:
kaminari (1.0.0.alpha) kaminari (1.0.0.alpha)
actionpack (>= 3.0.0) actionpack (>= 3.0.0)
...@@ -17,38 +17,38 @@ GIT ...@@ -17,38 +17,38 @@ GIT
GIT GIT
remote: git://github.com/rails/sass-rails.git remote: git://github.com/rails/sass-rails.git
revision: 80e15690b66131edc1b8ccb4ab7dbbd5bf567042 revision: 404cd9ba2bf2618fe14b1ba2f27c861ba48980f2
specs: specs:
sass-rails (5.0.0.beta1) sass-rails (5.0.0.beta1)
railties (>= 4.0.0, < 5.0) railties (>= 4.0.0, < 5.0)
sass (~> 3.2, >= 3.2.2) sass (~> 3.2, >= 3.2.2)
sprockets (~> 2.12) sprockets (~> 2.8, < 3.0)
sprockets-rails (>= 2.0, < 4.0) sprockets-rails (>= 2.0, < 4.0)
GEM GEM
remote: https://rubygems.org/ remote: https://rubygems.org/
specs: specs:
actionmailer (4.1.7) actionmailer (4.1.8)
actionpack (= 4.1.7) actionpack (= 4.1.8)
actionview (= 4.1.7) actionview (= 4.1.8)
mail (~> 2.5, >= 2.5.4) mail (~> 2.5, >= 2.5.4)
actionpack (4.1.7) actionpack (4.1.8)
actionview (= 4.1.7) actionview (= 4.1.8)
activesupport (= 4.1.7) activesupport (= 4.1.8)
rack (~> 1.5.2) rack (~> 1.5.2)
rack-test (~> 0.6.2) rack-test (~> 0.6.2)
actionview (4.1.7) actionview (4.1.8)
activesupport (= 4.1.7) activesupport (= 4.1.8)
builder (~> 3.1) builder (~> 3.1)
erubis (~> 2.7.0) erubis (~> 2.7.0)
activemodel (4.1.7) activemodel (4.1.8)
activesupport (= 4.1.7) activesupport (= 4.1.8)
builder (~> 3.1) builder (~> 3.1)
activerecord (4.1.7) activerecord (4.1.8)
activemodel (= 4.1.7) activemodel (= 4.1.8)
activesupport (= 4.1.7) activesupport (= 4.1.8)
arel (~> 5.0.0) arel (~> 5.0.0)
activesupport (4.1.7) activesupport (4.1.8)
i18n (~> 0.6, >= 0.6.9) i18n (~> 0.6, >= 0.6.9)
json (~> 1.7, >= 1.7.7) json (~> 1.7, >= 1.7.7)
minitest (~> 5.1) minitest (~> 5.1)
...@@ -67,7 +67,7 @@ GEM ...@@ -67,7 +67,7 @@ GEM
aws-sdk (1.39.0) aws-sdk (1.39.0)
json (~> 1.4) json (~> 1.4)
nokogiri (>= 1.4.4) nokogiri (>= 1.4.4)
backports (3.6.3) backports (3.6.4)
bcrypt (3.1.9) bcrypt (3.1.9)
better_errors (2.0.0) better_errors (2.0.0)
coderay (>= 1.0.0) coderay (>= 1.0.0)
...@@ -175,7 +175,8 @@ GEM ...@@ -175,7 +175,8 @@ GEM
github-markdown (0.6.7) github-markdown (0.6.7)
gmail_xoauth (0.4.1) gmail_xoauth (0.4.1)
oauth (>= 0.3.6) oauth (>= 0.3.6)
guard (2.8.1) gritter (1.1.0)
guard (2.8.2)
formatador (>= 0.2.4) formatador (>= 0.2.4)
listen (~> 2.7) listen (~> 2.7)
lumberjack (~> 1.0) lumberjack (~> 1.0)
...@@ -206,6 +207,9 @@ GEM ...@@ -206,6 +207,9 @@ GEM
i18n_generators (1.2.1) i18n_generators (1.2.1)
mechanize mechanize
rails (>= 3.0.0) rails (>= 3.0.0)
jbuilder (2.2.5)
activesupport (>= 3.0.0, < 5)
multi_json (~> 1.2)
jquery-rails (3.1.2) jquery-rails (3.1.2)
railties (>= 3.0, < 5.0) railties (>= 3.0, < 5.0)
thor (>= 0.14, < 2.0) thor (>= 0.14, < 2.0)
...@@ -216,7 +220,7 @@ GEM ...@@ -216,7 +220,7 @@ GEM
launchy (2.4.3) launchy (2.4.3)
addressable (~> 2.3) addressable (~> 2.3)
libv8 (3.16.14.7) libv8 (3.16.14.7)
listen (2.7.11) listen (2.8.1)
celluloid (>= 0.15.2) celluloid (>= 0.15.2)
rb-fsevent (>= 0.9.3) rb-fsevent (>= 0.9.3)
rb-inotify (>= 0.9) rb-inotify (>= 0.9)
...@@ -232,14 +236,16 @@ GEM ...@@ -232,14 +236,16 @@ GEM
nokogiri (~> 1.4) nokogiri (~> 1.4)
ntlm-http (~> 0.1, >= 0.1.1) ntlm-http (~> 0.1, >= 0.1.1)
webrobots (>= 0.0.9, < 0.2) webrobots (>= 0.0.9, < 0.2)
meta-tags (2.0.0)
actionpack (>= 3.0.0)
method_source (0.8.2) method_source (0.8.2)
mime-types (2.4.3) mime-types (2.4.3)
mini_portile (0.6.1) mini_portile (0.6.1)
minitest (5.4.2) minitest (5.4.3)
multi_json (1.10.1) multi_json (1.10.1)
multi_xml (0.5.5) multi_xml (0.5.5)
multipart-post (2.0.0) multipart-post (2.0.0)
mysql2 (0.3.16) mysql2 (0.3.17)
net-http-digest_auth (1.4) net-http-digest_auth (1.4)
net-http-persistent (2.9.4) net-http-persistent (2.9.4)
net-http-pipeline (1.0.1) net-http-pipeline (1.0.1)
...@@ -247,8 +253,8 @@ GEM ...@@ -247,8 +253,8 @@ GEM
net-ssh (>= 2.6.5) net-ssh (>= 2.6.5)
net-ssh (2.9.1) net-ssh (2.9.1)
netrc (0.8.0) netrc (0.8.0)
newrelic_rpm (3.9.6.257) newrelic_rpm (3.9.7.266)
nokogiri (1.6.4) nokogiri (1.6.4.1)
mini_portile (~> 0.6.0) mini_portile (~> 0.6.0)
ntlm-http (0.1.1) ntlm-http (0.1.1)
oauth (0.4.7) oauth (0.4.7)
...@@ -273,7 +279,7 @@ GEM ...@@ -273,7 +279,7 @@ GEM
paper_trail (3.0.6) paper_trail (3.0.6)
activerecord (>= 3.0, < 5.0) activerecord (>= 3.0, < 5.0)
activesupport (>= 3.0, < 5.0) activesupport (>= 3.0, < 5.0)
parser (2.2.0.pre.7) parser (2.2.0.pre.8)
ast (>= 1.1, < 3.0) ast (>= 1.1, < 3.0)
slop (~> 3.4, >= 3.4.5) slop (~> 3.4, >= 3.4.5)
poltergeist (1.5.1) poltergeist (1.5.1)
...@@ -294,6 +300,8 @@ GEM ...@@ -294,6 +300,8 @@ GEM
pusher-client (0.6.0) pusher-client (0.6.0)
json json
websocket (~> 1.0) websocket (~> 1.0)
quiet_assets (1.0.3)
railties (>= 3.1, < 5.0)
rack (1.5.2) rack (1.5.2)
rack-contrib (1.2.0) rack-contrib (1.2.0)
rack (>= 0.9.1) rack (>= 0.9.1)
...@@ -301,24 +309,24 @@ GEM ...@@ -301,24 +309,24 @@ GEM
rack (>= 1.1.3) rack (>= 1.1.3)
rack-test (0.6.2) rack-test (0.6.2)
rack (>= 1.0) rack (>= 1.0)
rails (4.1.7) rails (4.1.8)
actionmailer (= 4.1.7) actionmailer (= 4.1.8)
actionpack (= 4.1.7) actionpack (= 4.1.8)
actionview (= 4.1.7) actionview (= 4.1.8)
activemodel (= 4.1.7) activemodel (= 4.1.8)
activerecord (= 4.1.7) activerecord (= 4.1.8)
activesupport (= 4.1.7) activesupport (= 4.1.8)
bundler (>= 1.3.0, < 2.0) bundler (>= 1.3.0, < 2.0)
railties (= 4.1.7) railties (= 4.1.8)
sprockets-rails (~> 2.0) sprockets-rails (~> 2.0)
rails_12factor (0.0.3) rails_12factor (0.0.3)
rails_serve_static_assets rails_serve_static_assets
rails_stdout_logging rails_stdout_logging
rails_serve_static_assets (0.0.2) rails_serve_static_assets (0.0.2)
rails_stdout_logging (0.0.3) rails_stdout_logging (0.0.3)
railties (4.1.7) railties (4.1.8)
actionpack (= 4.1.7) actionpack (= 4.1.8)
activesupport (= 4.1.7) activesupport (= 4.1.8)
rake (>= 0.8.7) rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0) thor (>= 0.18.1, < 2.0)
rainbow (2.0.0) rainbow (2.0.0)
...@@ -331,7 +339,7 @@ GEM ...@@ -331,7 +339,7 @@ GEM
json (~> 1.4) json (~> 1.4)
ref (1.0.5) ref (1.0.5)
request_store (1.1.0) request_store (1.1.0)
responders (1.1.1) responders (1.1.2)
railties (>= 3.2, < 4.2) railties (>= 3.2, < 4.2)
rest-client (1.7.2) rest-client (1.7.2)
mime-types (>= 1.16, < 3.0) mime-types (>= 1.16, < 3.0)
...@@ -357,14 +365,14 @@ GEM ...@@ -357,14 +365,14 @@ GEM
rspec-mocks (~> 3.1.0) rspec-mocks (~> 3.1.0)
rspec-support (~> 3.1.0) rspec-support (~> 3.1.0)
rspec-support (3.1.2) rspec-support (3.1.2)
rubocop (0.27.0) rubocop (0.27.1)
astrolabe (~> 1.3) astrolabe (~> 1.3)
parser (>= 2.2.0.pre.6, < 3.0) parser (>= 2.2.0.pre.7, < 3.0)
powerpack (~> 0.0.6) powerpack (~> 0.0.6)
rainbow (>= 1.99.1, < 3.0) rainbow (>= 1.99.1, < 3.0)
ruby-progressbar (~> 1.4) ruby-progressbar (~> 1.4)
ruby-progressbar (1.7.0) ruby-progressbar (1.7.0)
sass (3.4.7) sass (3.4.8)
sdoc (0.4.1) sdoc (0.4.1)
json (~> 1.7, >= 1.7.7) json (~> 1.7, >= 1.7.7)
rdoc (~> 4.0) rdoc (~> 4.0)
...@@ -383,7 +391,7 @@ GEM ...@@ -383,7 +391,7 @@ GEM
multi_json (~> 1.0) multi_json (~> 1.0)
rack (~> 1.0) rack (~> 1.0)
tilt (~> 1.1, != 1.3.0) tilt (~> 1.1, != 1.3.0)
sprockets-rails (2.2.0) sprockets-rails (2.2.1)
actionpack (>= 3.0) actionpack (>= 3.0)
activesupport (>= 3.0) activesupport (>= 3.0)
sprockets (>= 2.8, < 4.0) sprockets (>= 2.8, < 4.0)
...@@ -443,7 +451,7 @@ GEM ...@@ -443,7 +451,7 @@ GEM
rack (>= 1.0) rack (>= 1.0)
webrobots (0.1.1) webrobots (0.1.1)
websocket (1.2.1) websocket (1.2.1)
websocket-driver (0.3.5) websocket-driver (0.4.0)
xpath (2.0.0) xpath (2.0.0)
nokogiri (~> 1.3) nokogiri (~> 1.3)
...@@ -475,16 +483,19 @@ DEPENDENCIES ...@@ -475,16 +483,19 @@ DEPENDENCIES
factory_girl_rails factory_girl_rails
faraday faraday
github-markdown github-markdown
gritter (= 1.1.0)
guard-rspec guard-rspec
guard-rubocop guard-rubocop
guard-teaspoon guard-teaspoon
hipchat hipchat
i18n_generators i18n_generators
jbuilder
jquery-rails jquery-rails
jwt (= 0.1.11) jwt (= 0.1.11)
kaminari! kaminari!
launchy launchy
mail mail
meta-tags
mysql2 mysql2
newrelic_rpm newrelic_rpm
nokogiri nokogiri
...@@ -493,6 +504,7 @@ DEPENDENCIES ...@@ -493,6 +504,7 @@ DEPENDENCIES
poltergeist poltergeist
premailer premailer
pry-rails pry-rails
quiet_assets
rack-contrib rack-contrib
rack-mini-profiler rack-mini-profiler
rails (~> 4.1) rails (~> 4.1)
......
$ -> $ ->
# 上部の検索フォームのアニメーション # # 上部の検索フォームのアニメーション
$('#app-search-form input') # $('#app-search-form input')
.on 'focus', -> # .on 'focus', ->
$(this).parents('#app-search-form').animate({width: '400px'}) # $(this).parents('#app-search-form').animate({width: '400px'})
.on 'blur', -> # .on 'blur', ->
$(this).parents('#app-search-form').animate({width: '200px'}) # $(this).parents('#app-search-form').animate({width: '200px'})
# コードハイライト # コードハイライト
# TODO # TODO
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
// require jquery // require jquery
//= require jquery_ujs //= require jquery_ujs
// require turbolinks // require turbolinks
//= require gritter
//= require ./lib/jquery.ui.widget //= require ./lib/jquery.ui.widget
//= require_tree ./lib //= require_tree ./lib
//= require_tree ./modules //= require_tree ./modules
......
...@@ -41,5 +41,5 @@ $.extend ...@@ -41,5 +41,5 @@ $.extend
console.log([editor_scrollTop, preview_scrollHeight, editor_height, editor_scrollHeight, preview_scrollTop]) console.log([editor_scrollTop, preview_scrollHeight, editor_height, editor_scrollHeight, preview_scrollTop])
settings.$editor.on 'scroll', _.throttle(adjustPreviewScroll, 1000 / 30) settings.$editor.on 'scroll', _.throttle(adjustPreviewScroll, 1000 / 60)
// 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/
.navbar-default .navbar-brand {
background-color: #428bca;
color: #fff;
}
.navbar-default .navbar-brand,
.label a {
// color: white;
}
#app-search-form {
width: 200px;
}
.container-main{
min-height: 400px;
}
...@@ -8,25 +8,10 @@ ...@@ -8,25 +8,10 @@
* You're free to add application-wide styles to this file and they'll appear at the top of the * You're free to add application-wide styles to this file and they'll appear at the top of the
* compiled file, but it's generally better to create a new file per style scope. * compiled file, but it's generally better to create a new file per style scope.
* *
*= require normalize *= require gritter
*= require_tree ./lib *= require_tree ./lib
*= require_tree ./modules *= require_tree ./modules
*= require_tree . *= require_tree .
*= require_self *= require_self
*/ */
.text-shadow {
color: #999999;
}
a .text-link {
color: #1e0fbe;
}
a:visited .text-link {
color: #609;
}
.popover {
max-width: 400px;
}
@import 'values';
@import url(https://fonts.googleapis.com/css?family=Flamenco:300,400);
@import url(https://fonts.googleapis.com/css?family=Quicksand:300,400,700);
p, h1, h2, h3, h4, h5, h6, span {
// font-family: 'メイリオ', 'meiryo', hiragino kaku go;
// letter-spacing: 2pt;
// line-height: 150%;
// margin: 0;
// padding: 0;
}
.badge.badge-transparent {
background-color: transparent;
color: $main-color;
// font-family: 'Quicksand';
letter-spacing: 0;
border: 1.5px solid $main-color;
padding: 4px 6px;
}
.body-padding {
padding-top: 70px;
}
@import 'values';
.panel {
border: 1px solid $main-color;
.panel-heading {
background-color: $main-color;
color: #fff;
}
.panel-body {
.list-group-item {
&:hover {
@include transition;
}
}
}
}
.flow-wrapper {
margin-top: 40px;
h1 {
img {
height: 18px;
margin-right: 10px;
position: relative;
bottom: 2px;
}
font-size: 20px;
small {
color: #f6f6f6;
}
}
h4 {
color: #333!important;
}
.posted-name {
color: $main-color;
font-size: 12px;
}
.numbers-wrapper {
height: 150px;
.col-xs-4 {
text-align: center;
label {
border-bottom: 5px solid #ec0160;
font-weight: 300;
}
p {
font-size: 54px;
font-weight: 300;
font-family: 'Quicksand';
color: #ec0160;
}
}
}
}
.label-date {
background-color: #aaa;
padding-top: 3px;
font-family: 'Quicksand';
}
.label-tag {
// background-color: #e67e22;
padding-top: 4px;
// font-weight: 300;
background-color: transparent;
color: #75b3c8;
border: 1.5px solid #75b3c8;
padding: 4px 6px;
@include border_radius(20px);
}
.post-show-wrapper {
margin-top: 40px;
}
.post-edit-btn,
.watch-btn,
.btn-watched {
@include border_radius;
color: $main-color;
border: 1px solid $main-color;
&:hover {
@include transition;
background-color: #eee;
}
a {
color: $main-color;
}
.dropdown-toggle {
background-color: $main-color;
@include border_radius(0px);
color: #fff;
background-image: none!important;
border: 1px solid transparent;
.caret {
font-size: 20px;
}
}
}
.watch-btn {
height: 36px;
}
.btn-watched {
background-color: $main-color;
color: #fff;
border: 2px solid $main-color;
}
.detail-wrapper {
dt {
padding: 2px 0;
}
dd {
margin-bottom: 10px;
}
// .label-tag {
// background-color: #e67e22;
// padding-top: 4px;
// // font-weight: 100;
// }
}
.comment-wrapper {
.panel-title {
img {
height: 25px;
margin-right: 10px;
position: relative;
bottom: 2px;
}
}
textarea {
border: 1px solid #f6f6f6;
margin: 10px 0;
padding: 10px 15px;
line-height: 1.428571429;
vertical-align: middle;
border: 1px solid #dce4ec;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
-o-border-radius: 4px;
border-radius: 4px;
-webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,0.075);
box-shadow: inset 0 1px 1px rgba(0,0,0,0.075);
-webkit-transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s;
transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s;
&:focus {
border: 1px solid $main-color;
box-shadow: 0px 0px 0px $main-color;
background-color: #f8f8f8;
}
}
.comment-btn {
background-color: transparent;
color: $main-color;
border: 1px solid $main-color;
&:hover {
color: #fff;
background-color: $main-color;
@include transition;
}
&:focus {
background-color: #f8f8f8;
@include transition;
box-shadow: 0px 0px 0px $main-color;
}
}
}
.panel-default {
.panel-heading {
background-color: $main-color;
color: #fff;
background-image: none;
}
}
.btn {
background-color: transparent;
background-image: none;
color: $main-color;
border: 1px solid $main-color;
&:hover {
color: #fff;
background-color: $main-color;
@include transition;
border: 1px solid $main-color;
}
&:focus {
background-color: #f8f8f8;
@include transition;
box-shadow: 0px 0px 0px $main-color;
}
}
.fc-event-inner {
padding: 5px;
span {
width: 85px;
}
&:HOVER {
background-color: #f8f8f8;
@include transition;
}
}
/* GLOBAL STYLES
-------------------------------------------------- */
/* Padding below the footer and lighter body text */
.login {
padding-bottom: 40px;
color: #5a5a5a;
/* CUSTOMIZE THE NAVBAR
-------------------------------------------------- */
/* Special class on .container surrounding .navbar, used for positioning it into place. */
.navbar-wrapper {
position: absolute;
top: 0;
left: 0;
right: 0;
z-index: 20;
}
/* Flip around the padding for proper display in narrow viewports */
.navbar-wrapper .container {
padding-left: 0;
padding-right: 0;
}
.navbar-wrapper .navbar {
padding-left: 15px;
padding-right: 15px;
}
/* CUSTOMIZE THE CAROUSEL
-------------------------------------------------- */
/* Carousel base class */
.carousel {
height: 500px;
margin-bottom: 60px;
}
/* Since positioning the image, we need to help out the caption */
.carousel-caption {
z-index: 10;
}
/* Declare heights because of positioning of img element */
.carousel .item {
height: 500px;
background-color: #777;
}
.carousel-inner > .item > img {
position: absolute;
top: 0;
left: 0;
min-width: 100%;
height: 500px;
}
/* MARKETING CONTENT
-------------------------------------------------- */
/* Pad the edges of the mobile views a bit */
.marketing {
padding-left: 15px;
padding-right: 15px;
}
/* Center align the text within the three columns below the carousel */
.marketing .col-lg-4 {
text-align: center;
margin-bottom: 20px;
}
.marketing h2 {
font-weight: normal;
}
.marketing .col-lg-4 p {
margin-left: 10px;
margin-right: 10px;
}
/* Featurettes
------------------------- */
.featurette-divider {
margin: 80px 0; /* Space out the Bootstrap <hr> more */
}
/* Thin out the marketing headings */
.featurette-heading {
font-weight: 300;
line-height: 1;
letter-spacing: -1px;
}
/* RESPONSIVE CSS
-------------------------------------------------- */
@media (min-width: 768px) {
/* Remove the edge padding needed for mobile */
.marketing {
padding-left: 0;
padding-right: 0;
}
/* Navbar positioning foo */
.navbar-wrapper {
margin-top: 20px;
}
.navbar-wrapper .container {
padding-left: 15px;
padding-right: 15px;
}
.navbar-wrapper .navbar {
padding-left: 0;
padding-right: 0;
}
/* The navbar becomes detached from the top, so we round the corners */
.navbar-wrapper .navbar {
border-radius: 4px;
}
/* Bump up size of carousel content */
.carousel-caption p {
margin-bottom: 20px;
font-size: 21px;
line-height: 1.4;
}
.featurette-heading {
font-size: 50px;
}
}
@media (min-width: 992px) {
.featurette-heading {
margin-top: 120px;
}
}
}
@import url(https://fonts.googleapis.com/css?family=Flamenco:300,400); @import url(https://fonts.googleapis.com/css?family=Flamenco:300,400);
@import url(https://fonts.googleapis.com/css?family=Quicksand:300,400,700); @import url(https://fonts.googleapis.com/css?family=Quicksand:300,400,700);
$set_prefix: -webkit-, -moz-, -ms-, -o-, ''; $set_prefix: -webkit-, -moz-, -ms-, -o-, '';
$main-color: #75b3c8;
@mixin background_color($bg_value: $main-color) { $bg-base-color: #f0f0f0;
$bg-main-color: #f0f0f0;
$theme-color-dark: #3C5866;
$theme-color-light: #F6FCFF;
$theme-color-middle-light: #E4F3FF;
$theme-color-main: #86C6E5;
// $theme-color4: #f0f0f0;
// $theme-color5: #669CAE;
$theme-text-color: #ffffff;
$theme-key-color: #ec0160;
// $theme-font-base: Verdana, "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
$theme-font-base: 13px/1.4 Helvetica, arial, freesans, clean, sans-serif, "Segoe UI Emoji", "Segoe UI Symbol";
$text-deco-font: 'Quicksand', sans-serif;
@mixin background_color($bg_value: $theme-color-main) {
background-color: $bg_value; background-color: $bg_value;
color: #fff; color: #fff;
} }
...@@ -14,7 +30,7 @@ $main-color: #75b3c8; ...@@ -14,7 +30,7 @@ $main-color: #75b3c8;
} }
} }
@mixin transition($transition_value: 0.3s, $move_type: ease-in-out) { @mixin transition($transition_value: 0.1s, $move_type: ease-in-out) {
@each $prefix in $set_prefix { @each $prefix in $set_prefix {
#{$prefix}transition: all $transition_value $move_type #{$prefix}transition: all $transition_value $move_type
} }
......
$set_prefix: -webkit-, -moz-, -ms-, -o-, ''; $set_prefix: -webkit-, -moz-, -ms-, -o-, '';
$main-color: #75b3c8; $theme-color-main: #75b3c8;
@mixin background_color($bg_value: $main-color) { @mixin background_color($bg_value: $theme-color-main) {
background-color: $bg_value; background-color: $bg_value;
color: #fff; color: #fff;
} }
...@@ -17,6 +17,7 @@ $main-color: #75b3c8; ...@@ -17,6 +17,7 @@ $main-color: #75b3c8;
#{$prefix}transition: all $transition_value $move_type #{$prefix}transition: all $transition_value $move_type
} }
} }
@import url(https://fonts.googleapis.com/css?family=Flamenco:300,400); @import url(https://fonts.googleapis.com/css?family=Flamenco:300,400);
@import url(https://fonts.googleapis.com/css?family=Quicksand:300,400,700); @import url(https://fonts.googleapis.com/css?family=Quicksand:300,400,700);
.btn-original { .btn-original {
......
@import 'modules/settings';
.btn-default {
text-shadow: none;
background: $theme-color-main;
color: $theme-color-light;
border: none;
// @include border_radius;
// color: $theme-color-main;
// border: 1px solid $theme-color-main;
// &:hover {
// @include transition;
// background-color: #eee;
// }
// a {
// color: $theme-color-main;
// }
// .dropdown-toggle {
// background-color: $theme-color-main;
// @include border_radius(0px);
// color: #fff;
// background-image: none!important;
// border: 1px solid transparent;
// .caret {
// font-size: 20px;
// }
// }
}
@import 'modules/settings';
body {
background-color: $bg-base-color;
font-family: $theme-font-base;
color: $theme-color-dark;
}
.margin-wrapper {
margin-bottom: 20px;
}
@import 'modules/settings';
dt {
padding: 2px 0;
}
dd {
margin-bottom: 10px;
}
@import 'modules/settings';
// .panel {
// border: 1px solid $theme-color-main;
// .panel-heading {
// background-color: $theme-color-main;
// color: #fff;
// }
// .panel-body {
// .list-group-item {
// &:hover {
// @include transition;
// }
// }
// }
// }
// .flow-wrapper {
// margin-top: 40px;
// h1 {
// img {
// height: 18px;
// margin-right: 10px;
// position: relative;
// bottom: 2px;
// }
// font-size: 20px;
// small {
// color: #f6f6f6;
// }
// }
// h4 {
// color: #333!important;
// }
// .posted-name {
// color: $theme-color-main;
// font-size: 12px;
// }
// .numbers-wrapper {
// height: 150px;
// text-align: center;
// font-family: 'Quicksand';
// .large {
// font-size: 3em;
// font-weight: 300;
// color: #ec0160;
// }
// label {
// border-top: 5px solid #ec0160;
// font-weight: 500;
// }
// }
// }
.numbers-wrapper {
height: 120px;
text-align: center;
font-family: $text-deco-font;
color: $theme-color-dark;
.large {
font-size: 3em;
font-weight: 300;
color: $theme-key-color;
}
label {
border-top: 5px solid $theme-key-color;
font-weight: 500;
}
}
// .label-date {
// background-color: #aaa;
// padding-top: 3px;
// font-family: 'Quicksand';
// }
// .label-tag {
// // background-color: #e67e22;
// padding-top: 4px;
// // font-weight: 300;
// background-color: transparent;
// color: #75b3c8;
// border: 1.5px solid #75b3c8;
// padding: 4px 6px;
// @include border_radius(20px);
// }
// .post-show-wrapper {
// margin-top: 40px;
// }
// .watch-btn {
// height: 36px;
// }
// .btn-watched {
// background-color: $theme-color-main;
// color: #fff;
// border: 2px solid $theme-color-main;
// }
.panel-comment {
.media-body {
width: 100%;
}
textarea {
// border: 1px solid #f6f6f6;
// margin: 10px 0;
// padding: 10px 15px;
// line-height: 1.428571429;
// vertical-align: middle;
border: 1px solid #dce4ec;
// -webkit-border-radius: 4px;
// -moz-border-radius: 4px;
// -o-border-radius: 4px;
// border-radius: 4px;
// -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,0.075);
// box-shadow: inset 0 1px 1px rgba(0,0,0,0.075);
// -webkit-transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s;
// transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s;
&:focus {
border: 1px solid $theme-color-main;
box-shadow: 0px 0px 0px $theme-color-main;
background-color: #f8f8f8;
}
}
.media {
border-bottom: 1px dashed #ccc;
&:last-child {
border-bottom: none;
}
}
.btn-comment {
background-color: transparent;
color: $theme-color-main;
border: 1px solid $theme-color-main;
&:hover, &:focus {
color: #fff;
background-color: $theme-color-main;
@include transition;
}
}
}
// .panel-default {
// .panel-heading {
// background-color: $theme-color-main;
// color: #fff;
// background-image: none;
// }
// }
// .btn {
// background-color: transparent;
// background-image: none;
// color: $theme-color-main;
// border: 1px solid $theme-color-main;
// &:hover {
// color: #fff;
// background-color: $theme-color-main;
// @include transition;
// border: 1px solid $theme-color-main;
// }
// &:focus {
// background-color: #f8f8f8;
// @include transition;
// box-shadow: 0px 0px 0px $theme-color-main;
// }
// }
// .fc-event-inner {
// padding: 5px;
// span {
// width: 85px;
// }
// &:HOVER {
// background-color: #f8f8f8;
// @include transition;
// }
// }
.large-item-image.img-thumbnail {
width: 100%;
height: 120px;
object-fit: cover;
}
@import 'modules/settings';
.label-default {
background-color: transparent;
color: $theme-color-dark;
border: 1px solid $theme-color-dark;
}
@import 'modules/settings';
html, body {
height: 100%;
}
body {
padding-top: 80px;
&.rails-posts-new,
&.rails-posts-edit,
&.rails-posts-fork {
padding-top: 20px;
}
}
// /* GLOBAL STYLES
// -------------------------------------------------- */
// /* Padding below the footer and lighter body text */
// .login {
// padding-bottom: 40px;
// color: #5a5a5a;
// /* CUSTOMIZE THE NAVBAR
// -------------------------------------------------- */
// /* Special class on .container surrounding .navbar, used for positioning it into place. */
// .navbar-wrapper {
// position: absolute;
// top: 0;
// left: 0;
// right: 0;
// z-index: 20;
// }
// /* Flip around the padding for proper display in narrow viewports */
// .navbar-wrapper .container {
// padding-left: 0;
// padding-right: 0;
// }
// .navbar-wrapper .navbar {
// padding-left: 15px;
// padding-right: 15px;
// }
// /* CUSTOMIZE THE CAROUSEL
// -------------------------------------------------- */
// /* Carousel base class */
// .carousel {
// height: 500px;
// margin-bottom: 60px;
// }
// /* Since positioning the image, we need to help out the caption */
// .carousel-caption {
// z-index: 10;
// }
// /* Declare heights because of positioning of img element */
// .carousel .item {
// height: 500px;
// background-color: #777;
// }
// .carousel-inner > .item > img {
// position: absolute;
// top: 0;
// left: 0;
// min-width: 100%;
// height: 500px;
// }
// /* MARKETING CONTENT
// -------------------------------------------------- */
// /* Pad the edges of the mobile views a bit */
// .marketing {
// padding-left: 15px;
// padding-right: 15px;
// }
// /* Center align the text within the three columns below the carousel */
// .marketing .col-lg-4 {
// text-align: center;
// margin-bottom: 20px;
// }
// .marketing h2 {
// font-weight: normal;
// }
// .marketing .col-lg-4 p {
// margin-left: 10px;
// margin-right: 10px;
// }
// /* Featurettes
// ------------------------- */
// .featurette-divider {
// margin: 80px 0; /* Space out the Bootstrap <hr> more */
// }
// /* Thin out the marketing headings */
// .featurette-heading {
// font-weight: 300;
// line-height: 1;
// letter-spacing: -1px;
// }
// /* RESPONSIVE CSS
// -------------------------------------------------- */
// @media (min-width: 768px) {
// /* Remove the edge padding needed for mobile */
// .marketing {
// padding-left: 0;
// padding-right: 0;
// }
// /* Navbar positioning foo */
// .navbar-wrapper {
// margin-top: 20px;
// }
// .navbar-wrapper .container {
// padding-left: 15px;
// padding-right: 15px;
// }
// .navbar-wrapper .navbar {
// padding-left: 0;
// padding-right: 0;
// }
// /* The navbar becomes detached from the top, so we round the corners */
// .navbar-wrapper .navbar {
// border-radius: 4px;
// }
// /* Bump up size of carousel content */
// .carousel-caption p {
// margin-bottom: 20px;
// font-size: 21px;
// line-height: 1.4;
// }
// .featurette-heading {
// font-size: 50px;
// }
// }
// @media (min-width: 992px) {
// .featurette-heading {
// margin-top: 120px;
// }
// }
// }
@import 'modules/settings';
.navbar.navbar-default {
background-color: $theme-color-middle-light;
background-image: none;
font-size: 1.2em;
font-weight: 500;
.navbar-brand {
background: none;
}
a {
font-family: $text-deco-font;
color: $theme-color-dark;
// &:visited {
// color: $theme-color-light;
// }
}
.badge {
background-color: transparent;
color: $theme-color-dark;
border: 1px solid $theme-color-dark;
}
.navbar-toggle {
border-color: $theme-color-dark;
}
.navbar-toggle:hover, .navbar-toggle:focus {
background-color: $theme-color-middle-light;
}
.navbar-toggle .icon-bar {
background-color: $theme-color-dark;
}
.navbar-nav li {
a {
color: $theme-color-dark;
&.btn {
text-shadow: none;
background: $theme-color-main;
color: $theme-color-light;
border: none;
}
}
.dropdown-menu {
a {
color: $theme-color-dark;
font-family: $theme-font-base;
}
.badge {
color: $theme-color-dark;
border-color: $theme-color-dark;
}
}
}
}
.nav {
li {
a {
&:hover, &:focus {
@include transition;
}
}
}
}
// .nav-icon {
// position: relative;
// padding-left: 25px!important;
// text-indent: 5px;
// &:before {
// position: absolute;
// left: 6px;
// background-size: 20px 20px;
// display: inline-block;
// height: 20px;
// width: 20px;
// content:" ";
// }
// &.flow:before {
// background-image: image-url('flow.png');
// }
// &.stock:before {
// background-image: image-url('stock.png');
// }
// &.template:before {
// background-image: image-url('template.png');
// }
// }
@import 'modules/settings';
.panel-default {
.panel-heading {
background-image: none;
background-color: $theme-color-main;
color: $theme-color-light;
}
.label {
background-color: transparent;
color: $theme-color-dark;
border: 1px solid $theme-color-dark;
}
.badge {
background-color: transparent;
color: $theme-color-main;
letter-spacing: 0;
border: 1px solid $theme-color-main;
padding: 4px 6px;
}
}
.panel-main {
.panel-heading {
background-color: $theme-color-dark;
color: $theme-color-light;
.small {
color: $theme-color-main;
}
}
}
@import 'values'; @import 'modules/settings';
#post-form { #post-form {
.row { .row {
margin-top: 20px; // margin-top: 20px;
.col-xs-9 { .col-xs-9 {
.field { .field {
margin-bottom: 10px; margin-bottom: 10px;
.input-group-addon { .input-group-addon {
background-color: #fff; background-color: #fff;
border-top: 1px solid $main-color; border-top: 1px solid $theme-color-main;
border-left: 1px solid $main-color; border-left: 1px solid $theme-color-main;
border-bottom: 1px solid $main-color; border-bottom: 1px solid $theme-color-main;
color: $main-color; color: $theme-color-main;
label { label {
margin-bottom: 0; margin-bottom: 0;
font-weight: 300; font-weight: 300;
} }
} }
.form-control { .form-control {
border: 1px solid $main-color; border: 1px solid $theme-color-main;
padding: 10px!important; padding: 10px!important;
height: 50px; height: 50px;
} }
.select2-choices { .select2-choices {
box-shadow: 0 0 0 #fff; box-shadow: 0 0 0 #fff;
border: 1px solid $main-color; border: 1px solid $theme-color-main;
background-image: none; background-image: none;
padding: 5px; padding: 5px;
} }
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
} }
.btn-toolbar { .btn-toolbar {
> .btn-group > .btn { > .btn-group > .btn {
color: $main-color; color: $theme-color-main;
background-color: #fff; background-color: #fff;
box-shadow: 0 0 0 #fff; box-shadow: 0 0 0 #fff;
} }
...@@ -59,24 +59,24 @@ ...@@ -59,24 +59,24 @@
padding-top: 0; padding-top: 0;
} }
} }
#save_button { // #save_button {
margin-bottom: 10px; // margin-bottom: 10px;
} // }
table { // table {
width: 100%; // width: 100%;
} // }
td { // td {
width: 50%; // width: 50%;
} // }
} }
input, input,
textarea { textarea {
border: 1px solid $main-color; border: 1px solid $theme-color-main;
&:focus { &:focus {
border: 1px solid $main-color; border: 1px solid $theme-color-main;
background-color: #f8f8f8; background-color: #f8f8f8;
box-shadow: 0 0 0 #fff!important; box-shadow: 0 0 0 #fff!important;
@include transition; @include transition;
......
@import 'values'; @import 'modules/settings';
.mod-tag-tree { .mod-tag-tree {
.mod-tag-tree-filter { .mod-tag-tree-filter {
margin-bottom: 20px; margin-bottom: 20px;
width: 400px!important; width: 400px!important;
&:focus { &:focus {
border: 1px solid $main-color; border: 1px solid $theme-color-main;
box-shadow: 0 0 0 #fff!important; box-shadow: 0 0 0 #fff!important;
background-color: #f8f8f8; background-color: #f8f8f8;
@include transition; @include transition;
...@@ -21,19 +21,19 @@ ...@@ -21,19 +21,19 @@
} }
} }
.stock-wrapper { // .stock-wrapper {
margin-top: 15px; // margin-top: 15px;
.odometer { // .odometer {
position: relative; // position: relative;
bottom: 2px; // bottom: 2px;
} // }
h1 { // h1 {
color: #fff; // color: #fff;
small { // small {
color: #f8f8f8; // color: #f8f8f8;
} // }
} // }
.list-group { // .list-group {
box-shadow: 0 0 0 #fff; // box-shadow: 0 0 0 #fff;
} // }
} // }
// Place all the styles related to the templates controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/
// /*************************************************************************
// * app_header
// *************************************************************************/
// @import 'modules/settings';
// @import url(https://fonts.googleapis.com/css?family=Flamenco:300,400);
// @import url(https://fonts.googleapis.com/css?family=Quicksand:300,400,700);
// $theme-color-main: #75b3c8;
// .template-wrapper {
// margin-top: 15px;
// }
// .navbar-original {
// background-color: $theme-color-main!important;
// background-image: none!important;
// li:hover {
// cursor: pointer;
// // a {
// // color: $theme-color-main;
// // }
// }
// li.new-post-btn:hover {
// background-color: $theme-color-main;
// a {
// color: #fff;
// }
// }
// a {
// color: #fff;
// font-family: 'Quciksand', 'meiryo', 'メイリオ','sans-serif';
// letter-spacing: .1em;
// font-weight: 300;
// @include transition;
// }
// .input-group {
// input {
// border: 1px solid transparent;
// box-shadow: none;
// }
// button {
// background-color: #fff;
// border: 1px solid #fff;
// .search {
// width: 20px;
// &:hover {
// opacity: .7;
// @include transition;
// }
// }
// }
// }
// .nav-icon {
// width: 20px;
// margin-right: 5px;
// }
// li.stock img {
// width: 25px;
// position: relative;
// bottom: 2px;
// }
// li.flow {
// a {
// position: relative;
// top: 2px;
// }
// img {
// position: relative;
// bottom: 2px;
// }
// }
// .navbar-right {
// .new-post-btn {
// .btn {
// position: relative;
// background-color: #fafafa;
// color: $theme-color-main;
// vertical-align: middle;
// &:hover {
// background-color: #ddd;
// @include transition;
// }
// }
// .write {
// width: 17px;
// vertical-align: middle;
// position: relative;
// bottom: 1px;
// }
// }
// }
// .badge {
// background-color: transparent;
// color: #fff;
// letter-spacing: 0;
// border: 1px solid #fff;
// padding: 4px 4px;
// margin-left: 5px;
// min-width: 20px;
// min-height: 20px;
// }
// .dropdown-menu {
// background-color: $theme-color-main;
// a {
// color: #fff;
// }
// }
// }
@import 'modules/settings';
a {
// color: $theme-color-main;
// &:visited {
// color: $theme-color-dark;
// }
}
.text-shadow {
color: #999999;
}
@import 'modules/settings';
.popover {
max-width: 400px;
}
// .navbar-default .navbar-brand {
// background-color: #428bca;
// color: #fff;
// }
// .navbar-default .navbar-brand,
// .label a {
// // color: white;
// }
// /* #app-search-form {
// width: 200px;
// }
// */
// .container-main{
// min-height: 400px;
// }
// .body-padding {
// padding-top: 70px;
// }
@import url(https://fonts.googleapis.com/css?family=Quicksand:300,400,700); @import url(https://fonts.googleapis.com/css?family=Quicksand:300,400,700);
$main-color: #75b3c8;
$theme-color-main: #75b3c8;
.background-image { .background-image {
width: 100%; width: 100%;
height: 100%; height: 100%;
......
/*! normalize.css v2.1.3 | MIT License | git.io/normalize */
/* ==========================================================================
HTML5 display definitions
========================================================================== */
/**
* Correct `block` display not defined in IE 8/9.
*/
article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
main,
nav,
section,
summary {
display: block;
}
/**
* Correct `inline-block` display not defined in IE 8/9.
*/
audio,
canvas,
video {
display: inline-block;
}
/**
* Prevent modern browsers from displaying `audio` without controls.
* Remove excess height in iOS 5 devices.
*/
audio:not([controls]) {
display: none;
height: 0;
}
/**
* Address `[hidden]` styling not present in IE 8/9.
* Hide the `template` element in IE, Safari, and Firefox < 22.
*/
[hidden],
template {
display: none;
}
/* ==========================================================================
Base
========================================================================== */
/**
* 1. Set default font family to sans-serif.
* 2. Prevent iOS text size adjust after orientation change, without disabling
* user zoom.
*/
html {
font-family: sans-serif; /* 1 */
-ms-text-size-adjust: 100%; /* 2 */
-webkit-text-size-adjust: 100%; /* 2 */
}
/**
* Remove default margin.
*/
body {
margin: 0;
}
/* ==========================================================================
Links
========================================================================== */
/**
* Remove the gray background color from active links in IE 10.
*/
a {
background: transparent;
}
/**
* Address `outline` inconsistency between Chrome and other browsers.
*/
a:focus {
outline: thin dotted;
}
/**
* Improve readability when focused and also mouse hovered in all browsers.
*/
a:active,
a:hover {
outline: 0;
}
/* ==========================================================================
Typography
========================================================================== */
/**
* Address variable `h1` font-size and margin within `section` and `article`
* contexts in Firefox 4+, Safari 5, and Chrome.
*/
h1 {
font-size: 2em;
margin: 0.67em 0;
}
/**
* Address styling not present in IE 8/9, Safari 5, and Chrome.
*/
abbr[title] {
border-bottom: 1px dotted;
}
/**
* Address style set to `bolder` in Firefox 4+, Safari 5, and Chrome.
*/
b,
strong {
font-weight: bold;
}
/**
* Address styling not present in Safari 5 and Chrome.
*/
dfn {
font-style: italic;
}
/**
* Address differences between Firefox and other browsers.
*/
hr {
-moz-box-sizing: content-box;
box-sizing: content-box;
height: 0;
}
/**
* Address styling not present in IE 8/9.
*/
mark {
background: #ff0;
color: #000;
}
/**
* Correct font family set oddly in Safari 5 and Chrome.
*/
code,
kbd,
pre,
samp {
font-family: monospace, serif;
font-size: 1em;
}
/**
* Improve readability of pre-formatted text in all browsers.
*/
pre {
white-space: pre-wrap;
}
/**
* Set consistent quote types.
*/
q {
quotes: "\201C" "\201D" "\2018" "\2019";
}
/**
* Address inconsistent and variable font size in all browsers.
*/
small {
font-size: 80%;
}
/**
* Prevent `sub` and `sup` affecting `line-height` in all browsers.
*/
sub,
sup {
font-size: 75%;
line-height: 0;
position: relative;
vertical-align: baseline;
}
sup {
top: -0.5em;
}
sub {
bottom: -0.25em;
}
/* ==========================================================================
Embedded content
========================================================================== */
/**
* Remove border when inside `a` element in IE 8/9.
*/
img {
border: 0;
}
/**
* Correct overflow displayed oddly in IE 9.
*/
svg:not(:root) {
overflow: hidden;
}
/* ==========================================================================
Figures
========================================================================== */
/**
* Address margin not present in IE 8/9 and Safari 5.
*/
figure {
margin: 0;
}
/* ==========================================================================
Forms
========================================================================== */
/**
* Define consistent border, margin, and padding.
*/
fieldset {
border: 1px solid #c0c0c0;
margin: 0 2px;
padding: 0.35em 0.625em 0.75em;
}
/**
* 1. Correct `color` not being inherited in IE 8/9.
* 2. Remove padding so people aren't caught out if they zero out fieldsets.
*/
legend {
border: 0; /* 1 */
padding: 0; /* 2 */
}
/**
* 1. Correct font family not being inherited in all browsers.
* 2. Correct font size not being inherited in all browsers.
* 3. Address margins set differently in Firefox 4+, Safari 5, and Chrome.
*/
button,
input,
select,
textarea {
font-family: inherit; /* 1 */
font-size: 100%; /* 2 */
margin: 0; /* 3 */
}
/**
* Address Firefox 4+ setting `line-height` on `input` using `!important` in
* the UA stylesheet.
*/
button,
input {
line-height: normal;
}
/**
* Address inconsistent `text-transform` inheritance for `button` and `select`.
* All other form control elements do not inherit `text-transform` values.
* Correct `button` style inheritance in Chrome, Safari 5+, and IE 8+.
* Correct `select` style inheritance in Firefox 4+ and Opera.
*/
button,
select {
text-transform: none;
}
/**
* 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`
* and `video` controls.
* 2. Correct inability to style clickable `input` types in iOS.
* 3. Improve usability and consistency of cursor style between image-type
* `input` and others.
*/
button,
html input[type="button"], /* 1 */
input[type="reset"],
input[type="submit"] {
-webkit-appearance: button; /* 2 */
cursor: pointer; /* 3 */
}
/**
* Re-set default cursor for disabled elements.
*/
button[disabled],
html input[disabled] {
cursor: default;
}
/**
* 1. Address box sizing set to `content-box` in IE 8/9/10.
* 2. Remove excess padding in IE 8/9/10.
*/
input[type="checkbox"],
input[type="radio"] {
box-sizing: border-box; /* 1 */
padding: 0; /* 2 */
}
/**
* 1. Address `appearance` set to `searchfield` in Safari 5 and Chrome.
* 2. Address `box-sizing` set to `border-box` in Safari 5 and Chrome
* (include `-moz` to future-proof).
*/
input[type="search"] {
-webkit-appearance: textfield; /* 1 */
-moz-box-sizing: content-box;
-webkit-box-sizing: content-box; /* 2 */
box-sizing: content-box;
}
/**
* Remove inner padding and search cancel button in Safari 5 and Chrome
* on OS X.
*/
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-decoration {
-webkit-appearance: none;
}
/**
* Remove inner padding and border in Firefox 4+.
*/
button::-moz-focus-inner,
input::-moz-focus-inner {
border: 0;
padding: 0;
}
/**
* 1. Remove default vertical scrollbar in IE 8/9.
* 2. Improve readability and alignment in all browsers.
*/
textarea {
overflow: auto; /* 1 */
vertical-align: top; /* 2 */
}
/* ==========================================================================
Tables
========================================================================== */
/**
* Remove most spacing between table cells.
*/
table {
border-collapse: collapse;
border-spacing: 0;
}
@import 'values';
.template-wrapper {
margin-top: 15px;
}
// Place all the styles related to the templates controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/
/*************************************************************************
* app_header
*************************************************************************/
@import 'values';
@import url(https://fonts.googleapis.com/css?family=Flamenco:300,400);
@import url(https://fonts.googleapis.com/css?family=Quicksand:300,400,700);
$main-color: #75b3c8;
.navbar-original {
background-color: $main-color!important;
background-image: none!important;
li:hover {
cursor: pointer;
a {
color: $main-color;
}
}
li.new-post-btn:hover {
background-color: $main-color;
a {
color: #fff;
}
}
a {
color: #fff;
font-family: 'Quciksand', 'meiryo', 'メイリオ','sans-serif';
letter-spacing: .1em;
font-weight: 300;
@include transition;
}
.input-group {
input {
border: 1px solid transparent;
box-shadow: none;
}
button {
background-color: #fff;
border: 1px solid #fff;
.search {
width: 20px;
&:hover {
opacity: .7;
@include transition;
}
}
}
}
.nav-icon {
width: 20px;
margin-right: 5px;
}
li.stock img {
width: 25px;
position: relative;
bottom: 2px;
}
li.flow {
a {
position: relative;
top: 2px;
}
img {
position: relative;
bottom: 2px;
}
}
.navbar-right {
.new-post-btn {
.btn {
position: relative;
background-color: #fafafa;
color: $main-color;
vertical-align: middle;
&:hover {
background-color: #ddd;
@include transition;
}
}
.write {
width: 17px;
vertical-align: middle;
position: relative;
bottom: 1px;
}
}
}
.badge {
background-color: transparent;
color: #fff;
letter-spacing: 0;
border: 1px solid #fff;
padding: 4px 4px;
margin-left: 5px;
min-width: 20px;
min-height: 20px;
}
}
...@@ -10,7 +10,7 @@ class ApplicationController < ActionController::Base ...@@ -10,7 +10,7 @@ class ApplicationController < ActionController::Base
def redirect_unless_signed_in def redirect_unless_signed_in
return if user_signed_in? return if user_signed_in?
flash[:alert] = 'You need Login!' gflash alert: 'You need Login!'
session[:login_redirect_to] = request.url session[:login_redirect_to] = request.url
redirect_to root_path redirect_to root_path
end end
......
...@@ -36,14 +36,14 @@ module RV::Mailer ...@@ -36,14 +36,14 @@ module RV::Mailer
end end
def generate_html_mail(post) def generate_html_mail(post)
path = File.expand_path(File.dirname(__FILE__) + '/mail-template.html') path = File.expand_path(File.dirname(__FILE__) + '/mail-template2.html')
template = File.open(path).read template = File.open(path).read
html_body = template html_body = template
.sub('__POST_URL__', Settings.rendezvous.app_host + post.decorate.show_path) .gsub('__POST_URL__', Settings.rendezvous.app_host + post.decorate.show_path)
.sub('__HTML_TITLE__', MarkdownRenderer.new(post.title).render) .gsub('__HTML_TITLE__', MarkdownRenderer.new(post.title).render)
.sub('__HTML_BODY__', MarkdownRenderer.new(post.body).render) .gsub('__HTML_BODY__', MarkdownRenderer.new(post.body).render)
.sub('__RV_URL__', Settings.rendezvous.app_host + '/') .gsub('__RV_URL__', Settings.rendezvous.app_host + '/')
premailer = Premailer.new(html_body, with_html_string: true, adapter: :nokogiri) premailer = Premailer.new(html_body, with_html_string: true, adapter: :nokogiri)
premailer.to_inline_css premailer.to_inline_css
......
...@@ -8,6 +8,8 @@ class PostsController < ApplicationController ...@@ -8,6 +8,8 @@ class PostsController < ApplicationController
# GET /posts/1 # GET /posts/1
# GET /posts/1.json # GET /posts/1.json
def show def show
set_meta_tags title: @post.title
current_user.visit_post!(@post) current_user.visit_post!(@post)
@post.tags.each do |tag| @post.tags.each do |tag|
...@@ -18,6 +20,8 @@ class PostsController < ApplicationController ...@@ -18,6 +20,8 @@ class PostsController < ApplicationController
# GET /posts/new # GET /posts/new
def new def new
set_meta_tags title: '新しい投稿'
@post = Post.new(title: '新しい投稿') @post = Post.new(title: '新しい投稿')
render layout: 'edit' render layout: 'edit'
end end
...@@ -32,18 +36,23 @@ class PostsController < ApplicationController ...@@ -32,18 +36,23 @@ class PostsController < ApplicationController
@post = set_post @post = set_post
# refresh google oauth token if expired # refresh google oauth token if expired
current_user.google_oauth_token_refresh! if current_user.google_oauth_token_expired? # current_user.google_oauth_token_refresh! if current_user.google_oauth_token_expired?
compose_mail(@post, user: current_user, to: mail_params[:to]).deliver compose_mail(@post, user: current_user, to: mail_params[:to]).deliver
redirect_to root_path(id: @post.id), flash: { success: 'Mail has sent!' } gflash success: 'Mail has been sent!'
redirect_to root_path(id: @post.id)
rescue ActionGmailer::DeliveryError rescue ActionGmailer::DeliveryError
redirect_to root_path(id: @post.id), flash: { notice: 'Gmail authentication expired.' } gflash error: 'Gmail authentication expired.'
redirect_to root_path(id: @post.id)
rescue ArgumentError => err rescue ArgumentError => err
redirect_to root_path(id: @post.id), flash: { alert: 'Mail format is invalid: ' + err.to_s } gflash error: "Mail format is invalid: #{err}"
redirect_to root_path(id: @post.id)
end end
# GET /posts/1/edit # GET /posts/1/edit
def edit def edit
set_meta_tags title: @post.title
render layout: 'edit' render layout: 'edit'
end end
...@@ -55,7 +64,8 @@ class PostsController < ApplicationController ...@@ -55,7 +64,8 @@ class PostsController < ApplicationController
respond_to do |format| respond_to do |format|
if @post.save if @post.save
format.html { redirect_to post_path(id: @post.id), flash: { notice: 'Post was successfully created.' } } gflash success: 'Post was successfully created.'
format.html { redirect_to post_path(id: @post.id) }
format.json { render action: 'show', status: :created, location: @post } format.json { render action: 'show', status: :created, location: @post }
else else
format.html { render action: 'new' } format.html { render action: 'new' }
...@@ -71,7 +81,8 @@ class PostsController < ApplicationController ...@@ -71,7 +81,8 @@ class PostsController < ApplicationController
respond_to do |format| respond_to do |format|
if @post.update(post_params) if @post.update(post_params)
format.html { redirect_to post_path(id: @post.id), flash: { notice: 'Post was successfully updated.' } } gflash success: 'Post was successfully updated.'
format.html { redirect_to post_path(id: @post.id) }
format.json { head :no_content } format.json { head :no_content }
else else
format.html { render action: 'edit' } format.html { render action: 'edit' }
...@@ -85,7 +96,8 @@ class PostsController < ApplicationController ...@@ -85,7 +96,8 @@ class PostsController < ApplicationController
def destroy def destroy
@post.destroy @post.destroy
respond_to do |format| respond_to do |format|
format.html { redirect_to flow_url, flash: { success: 'Post successfully deleted.' } } gflash success: 'Post was successfully deleted.'
format.html { redirect_to flow_url }
format.json { head :no_content } format.json { head :no_content }
end end
end end
...@@ -96,10 +108,12 @@ class PostsController < ApplicationController ...@@ -96,10 +108,12 @@ class PostsController < ApplicationController
@comment = @post.comments.build(comment_params.merge(author: current_user)) @comment = @post.comments.build(comment_params.merge(author: current_user))
respond_to do |format| respond_to do |format|
if @comment.save if @comment.save
format.html { redirect_to post_path(id: @post.id) } gflash success: 'Comment was successfully created.'
format.html { redirect_to post_path(id: @post.id, anchor: 'comments_anchor') }
format.json { render json: { status: 'ok', comment: @comment }, status: :created } format.json { render json: { status: 'ok', comment: @comment }, status: :created }
else else
format.html { redirect_to post_path(id: @post.id), flash: { alert: 'Comment is not saved.' } } gflash error: 'Comment is not saved.'
format.html { redirect_to post_path(id: @post.id) }
format.json { render json: @comment.errors, status: :unprocessable_entity } format.json { render json: @comment.errors, status: :unprocessable_entity }
end end
end end
......
...@@ -19,7 +19,8 @@ class TagsController < ApplicationController ...@@ -19,7 +19,8 @@ class TagsController < ApplicationController
respond_to do |format| respond_to do |format|
if @tag.save if @tag.save
format.html { redirect_to @tag.show_path, flash: { notice: 'Tag was successfully created.' } } gflash success: 'Tag was successfully created.'
format.html { redirect_to @tag.show_path }
format.json { render action: 'show', status: :created, location: @tag } format.json { render action: 'show', status: :created, location: @tag }
else else
format.html { render action: 'new' } format.html { render action: 'new' }
...@@ -31,7 +32,8 @@ class TagsController < ApplicationController ...@@ -31,7 +32,8 @@ class TagsController < ApplicationController
def update def update
respond_to do |format| respond_to do |format|
if @tag.update(tag_params) if @tag.update(tag_params)
format.html { redirect_to @tag.show_path, flash: { notice: 'Tag was successfully updated.' } } gflash success: 'Tag was successfully updated.'
format.html { redirect_to @tag.show_path }
format.json { head :no_content } format.json { head :no_content }
else else
format.html { render action: 'edit' } format.html { render action: 'edit' }
...@@ -43,7 +45,8 @@ class TagsController < ApplicationController ...@@ -43,7 +45,8 @@ class TagsController < ApplicationController
def destroy def destroy
@tag.destroy @tag.destroy
respond_to do |format| respond_to do |format|
format.html { redirect_to flow_url, flash: { success: 'Tag successfully deleted.' } } gflash success: 'Tag successfully deleted.'
format.html { redirect_to flow_url }
format.json { head :no_content } format.json { head :no_content }
end end
end end
...@@ -57,7 +60,7 @@ class TagsController < ApplicationController ...@@ -57,7 +60,7 @@ class TagsController < ApplicationController
@tag.move_all_posts_to!(@merge_to_tag) @tag.move_all_posts_to!(@merge_to_tag)
@tag.delete @tag.delete
flash[:notice] = "「#{@tag.name}」は「#{@merge_to_tag.name}」にmergeされました" gflash success: "「#{@tag.name}」は「#{@merge_to_tag.name}」にmergeされました"
render json: { status: 'OK' } render json: { status: 'OK' }
end end
...@@ -68,7 +71,7 @@ class TagsController < ApplicationController ...@@ -68,7 +71,7 @@ class TagsController < ApplicationController
@tag.parent_tag = @move_to_tag @tag.parent_tag = @move_to_tag
flash[:notice] = "「#{@tag.name}」は「#{@move_to_tag.name}」の下に移動しました" gflash success: "「#{@tag.name}」は「#{@move_to_tag.name}」の下に移動しました"
render json: { status: 'OK' } render json: { status: 'OK' }
end end
......
...@@ -4,9 +4,10 @@ class Users::OmniauthCallbacksController < Devise::OmniauthCallbacksController ...@@ -4,9 +4,10 @@ class Users::OmniauthCallbacksController < Devise::OmniauthCallbacksController
def google_oauth2 def google_oauth2
email = request.env['omniauth.auth'].info['email'] email = request.env['omniauth.auth'].info['email']
# reject if email is not zigexn nor ventura. # reject if email is not permited.
if email !~ /@zigexn\.co\.jp$/ && email !~ /@zigexn\.vn$/ unless Settings.permited_login_domain.split(/,/).include?(email.split(/@/)[1])
redirect_to root_path, flash: { alert: 'Your email address is not permitted.' } gflash error: 'Your email address is not permitted.'
redirect_to root_path
return return
end end
...@@ -14,7 +15,8 @@ class Users::OmniauthCallbacksController < Devise::OmniauthCallbacksController ...@@ -14,7 +15,8 @@ class Users::OmniauthCallbacksController < Devise::OmniauthCallbacksController
@user = User.find_for_google_oauth2(request.env['omniauth.auth'], current_user) @user = User.find_for_google_oauth2(request.env['omniauth.auth'], current_user)
if @user.persisted? if @user.persisted?
flash[:notice] = I18n.t 'devise.omniauth_callbacks.success', kind: 'Google' gflash success: "You've successfully authenticated"
# flash[:notice] = I18n.t 'devise.omniauth_callbacks.success', kind: 'Google'
sign_in_and_redirect @user, event: :authentication sign_in_and_redirect @user, event: :authentication
else else
session['devise.google_data'] = request.env['omniauth.auth'] session['devise.google_data'] = request.env['omniauth.auth']
......
...@@ -7,7 +7,8 @@ class UsersController < ApplicationController ...@@ -7,7 +7,8 @@ class UsersController < ApplicationController
def update def update
respond_to do |format| respond_to do |format|
if @user.update(user_params) if @user.update(user_params)
format.html { redirect_to edit_user_path, flash: { notice: 'Post was successfully updated.' } } gflash success: 'Post was successfully updated.'
format.html { redirect_to edit_user_path }
format.json { head :no_content } format.json { head :no_content }
else else
format.html { render action: 'edit' } format.html { render action: 'edit' }
......
...@@ -46,4 +46,8 @@ class PostDecorator < Draper::Decorator ...@@ -46,4 +46,8 @@ class PostDecorator < Draper::Decorator
'' ''
end end
end end
def thumbnail_url
return Regexp.last_match[1] if model.body =~ /!\[.+?\]\((.+?)\)/
end
end end
class PostsDecorator < Draper::CollectionDecorator class PostsDecorator < Draper::CollectionDecorator
def related_tags def related_tags
tags = map(&:tags).flatten.uniq tags = map(&:tags).flatten.uniq.take(10)
TagDecorator.decorate_collection(tags) TagDecorator.decorate_collection(tags)
end end
......
...@@ -26,6 +26,15 @@ class TagDecorator < Draper::Decorator ...@@ -26,6 +26,15 @@ class TagDecorator < Draper::Decorator
h.event_tag_path(name: model.name) h.event_tag_path(name: model.name)
end end
# TODO: module
def created_date
model.created_at.strftime('%Y-%m-%d')
end
def structured_name
[model.ancestors.map(&:name), model.name].flatten.join('/')
end
# tagをtree viewで表示する # tagをtree viewで表示する
def tree_view_node def tree_view_node
html = '' html = ''
......
...@@ -12,4 +12,9 @@ ...@@ -12,4 +12,9 @@
class Footprint < ActiveRecord::Base class Footprint < ActiveRecord::Base
belongs_to :user belongs_to :user
belongs_to :post belongs_to :post
######################################################################
# Named scope
######################################################################
scope :today, -> { where(arel_table[:created_at].gt 1.days.ago) }
end end
...@@ -18,6 +18,9 @@ require 'date' ...@@ -18,6 +18,9 @@ require 'date'
class Post < ActiveRecord::Base class Post < ActiveRecord::Base
include HipchatIntegration if Settings.respond_to?(:hipchat) include HipchatIntegration if Settings.respond_to?(:hipchat)
# for versioning
has_paper_trail
###################################################################### ######################################################################
# Associations # Associations
###################################################################### ######################################################################
...@@ -77,11 +80,28 @@ class Post < ActiveRecord::Base ...@@ -77,11 +80,28 @@ class Post < ActiveRecord::Base
where_list where_list
end) end)
# 最新のPostを取得
scope :recent, (lambda do |limit = 10| scope :recent, (lambda do |limit = 10|
order(updated_at: :desc).limit(limit) order(updated_at: :desc).limit(limit)
end) end)
scope :today, -> { where(arel_table[:updated_at].gt 1.day.ago) }
scope :this_month, -> { where(arel_table[:updated_at].gt 1.month.ago) }
scope :last_month, -> { where(arel_table[:updated_at].gt 2.month.ago).where(arel_table[:updated_at].lt 1.month.ago) }
######################################################################
# Class method
######################################################################
def self.most_pv_in_this_week(limit)
posts_with_footprints = where(arel_table[:created_at].gt 1.week.ago)
.select('posts.id, count(footprints.id) AS footprints_count')
.joins(:footprints)
.group('posts.id')
.order('footprints_count DESC')
.limit(limit)
posts = find(posts_with_footprints.map(&:id))
posts.to_a.zip posts_with_footprints.map(&:footprints_count)
end
###################################################################### ######################################################################
# Instance method # Instance method
###################################################################### ######################################################################
......
...@@ -12,15 +12,21 @@ ...@@ -12,15 +12,21 @@
# #
class Tag < ActiveRecord::Base class Tag < ActiveRecord::Base
has_many :post_tags
has_many :posts, through: :post_tags
# for tree structure # for tree structure
has_ancestry has_ancestry
# for versioning # for versioning
has_paper_trail has_paper_trail
######################################################################
# Associations
######################################################################
has_many :post_tags
has_many :posts, through: :post_tags
######################################################################
# Named scope
######################################################################
default_scope { order(updated_at: :desc) } default_scope { order(updated_at: :desc) }
scope :posts_exist, lambda { scope :posts_exist, lambda {
...@@ -30,13 +36,48 @@ class Tag < ActiveRecord::Base ...@@ -30,13 +36,48 @@ class Tag < ActiveRecord::Base
.having('posts_count > 0') .having('posts_count > 0')
} }
scope :recently_created, (lambda do |limit = 10|
order(created_at: :desc).limit(limit)
end)
######################################################################
# Class method
######################################################################
class << self class << self
# 最近投稿されたTagを取得 # 最近投稿されたTagを取得
def recent(limit = 10) def recent(limit = 10)
Post.recent(20).map(&:tags).flatten.compact.uniq.take(limit) Post.recent(20).map(&:tags).flatten.compact.uniq.take(limit)
end end
# TODO: cache
def monthly_popular(limit = 10)
tags_this_month = Hash.new { |h, k| h[k] = 0 } # { <tag.id> => <count> }
tags_last_month = Hash.new { |h, k| h[k] = 0 } # { <tag.id> => <count> }
Post.this_month.each do |post|
post.tags.each { |tag| tags_this_month[tag.id] += 1 }
end
Post.last_month.each do |post|
post.tags.each { |tag| tags_last_month[tag.id] += 1 }
end
tags_this_month_with_score = {}
tags_this_month.each do |tag_id, this_month_count|
next if this_month_count <= 3
tags_this_month_with_score[tag_id] = this_month_count.to_f / (tags_last_month[tag_id] + 1)
end
sorted = tags_this_month_with_score.sort_by { |_k, v| -v }.take(limit).to_h
Tag.find(sorted.keys).to_a.zip(sorted.values).to_h
end
end end
######################################################################
# Instance method
######################################################################
def recent_posts(limit = 30) def recent_posts(limit = 30)
posts.recent(limit) posts.recent(limit)
end end
......
...@@ -54,6 +54,10 @@ class User < ActiveRecord::Base ...@@ -54,6 +54,10 @@ class User < ActiveRecord::Base
where('name LIKE ? OR nickname LIKE ?', "%#{query}%", "%#{query}%") where('name LIKE ? OR nickname LIKE ?', "%#{query}%", "%#{query}%")
end) end)
scope :post_today, -> { joins(:posts).where('posts.updated_at > ?', 1.day.ago) }
scope :now_viewing, -> { select(:id).joins(:footprints).where('footprints.updated_at > ?', 10.minutes.ago).uniq }
###################################################################### ######################################################################
# Validations # Validations
###################################################################### ######################################################################
...@@ -73,11 +77,10 @@ class User < ActiveRecord::Base ...@@ -73,11 +77,10 @@ class User < ActiveRecord::Base
u.nickname = (('a'..'z').to_a + ('A'..'Z').to_a + (0..9).to_a).shuffle[0..4].join u.nickname = (('a'..'z').to_a + ('A'..'Z').to_a + (0..9).to_a).shuffle[0..4].join
end end
user.update( user.google_auth_token = access_token.credentials['token'] if access_token.credentials['token']
google_auth_token: access_token.credentials['token'], user.google_refresh_token = access_token.credentials['refresh_token'] if access_token.credentials['refresh_token']
google_refresh_token: access_token.credentials['refresh_token'], user.google_token_expires_at = Time.at(access_token.credentials['expires_at']) if access_token.credentials['expires_at']
google_token_expires_at: Time.at(access_token.credentials['expires_at']) user.save!
)
user user
end end
......
/! view:flow/show /! view:flow/show
.row.flow-wrapper
.numbers-wrapper .row
.col-xs-4 .col-xs-3
label.numbers Stocks .numbers-wrapper
p = Post.count div
.col-xs-4 span.large = Post.today.count
label.numbers Users span = "/ #{Post.count}"
p = User.count label.numbers Today's Stocks
.col-xs-4 .col-xs-3
label.numbers Tags .numbers-wrapper
p = Tag.count div
.col-xs-8 role="navigation" span.large = User.post_today.count
.panel span = "/ #{User.count}"
label.numbers Today's Writers
.col-xs-3
.numbers-wrapper
div
span.large = Footprint.today.count
span = "/ #{Footprint.count}"
label.numbers Today's PVs
.col-xs-3
.numbers-wrapper
div
span.large = User.now_viewing.count
label.numbers Now Viewing
.col-xs-12.col-md-8 role="navigation"
.panel.panel-main
.panel-heading .panel-heading
h1 h2.panel-title
= image_tag 'flow.png' i.fa.fa-rss
| Flow | &nbsp;Flow
small - 最近投稿された記事 span.small &nbsp;- 最近投稿された記事
ul.list-group.panel-body
- @posts.each do |post|
li.list-group-item
= render partial: 'posts/large_item', locals: { post: post }
.panel-body.list-group
- @posts.each do |_post|
= render partial: 'posts/large_item', locals: { post: _post }
= paginate(@posts) = paginate(@posts)
.col-xs-4 .col-xs-12.col-md-4
/ .panel.panel-default .panel.panel-default
/ .panel-heading .panel-heading
/ h2.panel-title この1週間で閲覧の多かった投稿(調整中) h3.panel-title
/ .panel-body.list-group i.fa.fa-history
/ - Post.limit(5).each do |_post| | &nbsp;この1週間で閲覧の多かった投稿
/ = render partial: 'posts/small_item', locals: { post: _post } .panel-body.list-group
- Post.most_pv_in_this_week(5).each do |(post, footprints_count)|
a.list-group-item.post-list href=post_path(post)
span.badge.pull-right = "#{footprints_count} PV"
= post.title
.panel.panel-default
.panel-heading
h3.panel-title
i.fa.fa-smile-o
| &nbsp;最近あなたが投稿した記事
.panel-body.list-group
- current_user.posts.recent(10).each do |post|
= render partial: 'posts/small_item', locals: { post: post.decorate }
a.list-group-item href=search_path(q: "@#{current_user.nickname}")
i.fa.fa-plus-square
| もっと見る
.panel .panel.panel-default
.panel-heading .panel-heading
h2.panel-title 最近投稿されたタグ h3.panel-title
i.fa.fa-tags
| &nbsp;最近投稿されたタグ
.panel-body.list-group .panel-body.list-group
- Tag.recent(10).each_with_index do |tag, i| - Tag.recent(10).each_with_index do |tag, i|
a.list-group-item data-tag-id=tag.id href=search_path(q: "##{tag.name}") a.list-group-item data-tag-id=tag.id href=search_path(q: "##{tag.name}")
= tag.name = tag.name
span.badge.badge-transparent = tag.posts_count span.badge = tag.posts_count
doctype html doctype html
= render partial: 'partials/rendezvous'
html lang="ja" html lang="ja"
= render partial: 'partials/rendezvous'
head head
title Rendezvous = display_meta_tags site: 'Rendezvous', reverse: true
meta content="width=device-width, initial-scale=1.0" name="viewport" / meta content="width=device-width, initial-scale=1.0" name="viewport" /
link href="//netdna.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet" / link href="//netdna.bootstrapcdn.com/bootstrap/3.3.0/css/bootstrap.min.css" rel="stylesheet" /
link href="//netdna.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap-theme.min.css" rel="stylesheet" / link href="//netdna.bootstrapcdn.com/bootstrap/3.3.0/css/bootstrap-theme.min.css" rel="stylesheet" /
link href="//cdnjs.cloudflare.com/ajax/libs/fullcalendar/1.6.4/fullcalendar.css" rel="stylesheet" / link href="//cdnjs.cloudflare.com/ajax/libs/fullcalendar/1.6.4/fullcalendar.css" rel="stylesheet" /
link href="//cdnjs.cloudflare.com/ajax/libs/fullcalendar/1.6.4/fullcalendar.print.css" rel="stylesheet" / link href="//cdnjs.cloudflare.com/ajax/libs/fullcalendar/1.6.4/fullcalendar.print.css" rel="stylesheet" /
link href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet" link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet"
= favicon_link_tag 'favicon.ico' = favicon_link_tag 'favicon.ico'
script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js" script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"
= render partial: 'partials/google_analytics' = render partial: 'partials/google_analytics'
= stylesheet_link_tag "application", media: "all" = stylesheet_link_tag "application", media: "all"
= render_style = render_style
= csrf_meta_tags = csrf_meta_tags
body class="rails-#{params[:controller]}-#{params[:action]}"
body class="rails-#{params[:controller]}-#{params[:action]}"
= gflash
.body-padding .body-padding
= render partial: 'partials/header_notifications'
- if params[:controller] != 'welcome' - if params[:controller] != 'welcome'
= render partial: 'partials/app_header' = render partial: 'partials/app_header'
.container.container-main#yield .container-fluid.container-main#yield
= yield = yield
script src="//cdnjs.cloudflare.com/ajax/libs/underscore.js/1.6.0/underscore-min.js" script src="//cdnjs.cloudflare.com/ajax/libs/underscore.js/1.6.0/underscore-min.js"
script src="//cdnjs.cloudflare.com/ajax/libs/underscore.string/2.3.3/underscore.string.min.js" script src="//cdnjs.cloudflare.com/ajax/libs/underscore.string/2.3.3/underscore.string.min.js"
script src="//netdna.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js" script src="//netdna.bootstrapcdn.com/bootstrap/3.3.0/js/bootstrap.min.js"
script src="//cdnjs.cloudflare.com/ajax/libs/moment.js/2.5.1/moment.min.js" script src="//cdnjs.cloudflare.com/ajax/libs/moment.js/2.5.1/moment.min.js"
script src="//cdnjs.cloudflare.com/ajax/libs/fullcalendar/1.6.4/fullcalendar.min.js" script src="//cdnjs.cloudflare.com/ajax/libs/fullcalendar/1.6.4/fullcalendar.min.js"
javascript: javascript:
......
doctype html doctype html
= render partial: 'partials/rendezvous'
html lang="ja" html lang="ja"
/ = render partial: 'partials/rendezvous'
head head
title Rendezvous = display_meta_tags site: 'Rendezvous', reverse: true
meta content="width=device-width, initial-scale=1.0" name="viewport" / meta content="width=device-width, initial-scale=1.0" name="viewport" /
link href="//netdna.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet" / link href="//netdna.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet" /
link href="//netdna.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap-theme.min.css" rel="stylesheet" / link href="//netdna.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap-theme.min.css" rel="stylesheet" /
...@@ -16,6 +16,7 @@ html lang="ja" ...@@ -16,6 +16,7 @@ html lang="ja"
= render_style = render_style
= csrf_meta_tags = csrf_meta_tags
body class="rails-#{params[:controller]}-#{params[:action]}" body class="rails-#{params[:controller]}-#{params[:action]}"
= gflash
.container-fluid.container-main#yield .container-fluid.container-main#yield
= yield = yield
...@@ -27,6 +28,5 @@ html lang="ja" ...@@ -27,6 +28,5 @@ html lang="ja"
javascript: javascript:
window.RV = window.RV || {}; window.RV = window.RV || {};
window.RV.AllTags = JSON.parse('#{raw Tag.all.pluck(:name).to_json}'); window.RV.AllTags = JSON.parse('#{raw Tag.all.pluck(:name).to_json}');
hr/
= javascript_include_tag "application" = javascript_include_tag "application"
= yield :footer_js = yield :footer_js
<!DOCTYPE html> <!DOCTYPE html>
<html lang="ja"> <html lang="ja">
<head> <head>
<title>Rendezvous</title> <%= display_meta_tags :site => 'Rendezvous', reverse: true %>
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
</head> </head>
<body class="rails-<%= params[:controller] %>-<%= params[:action] %>"> <body class="rails-<%= params[:controller] %>-<%= params[:action] %>">
......
nav.navbar.navbar-fixed-top.navbar-original role="navigation" nav.navbar.navbar-default.navbar-fixed-top role="navigation"
.container .container-fluid
.navbar-header .navbar-header
button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1"
span.sr-only Toggle navigation
span.icon-bar
span.icon-bar
span.icon-bar
a.navbar-brand href=root_path Rendezvous a.navbar-brand href=root_path Rendezvous
.collapse.navbar-collapse .collapse.navbar-collapse#bs-example-navbar-collapse-1
form#app-search-form.navbar-form.navbar-left action=search_path role="search" form#app-search-form.navbar-form.navbar-left action=search_path role="search"
.input-group .form-group
input.form-control name="q" placeholder="Search" type="text" value=params[:q] / input.form-control name="q" placeholder="Search" type="text" value=params[:q] /
span.input-group-btn
button.btn data-disable-with="Searching..." type="submit"
= image_tag 'search.png', class: 'search'
ul.nav.navbar-nav ul.nav.navbar-nav
li.stock class=('active' if current_page?(stock_path)) li
a href=flow_path title="Flow"
i.fa.fa-rss
| &nbsp;Flow
li
a href=stock_path title="Stock" a href=stock_path title="Stock"
= image_tag "stock.png", class: 'nav-icon stock' i.fa.fa-stack-overflow
| Stock | &nbsp;Stock
li.flow class=('active' if current_page?(flow_path)) li
a href=flow_path title="Frow"
= image_tag "flow.png", class: 'nav-icon'
| Flow
li.template class=('active' if current_page?(templates_path))
a href=templates_path title="Templates" a href=templates_path title="Templates"
= image_tag "template.png", class: 'nav-icon' i.fa.fa-copy
| Templates | &nbsp;Templates
ul.nav.navbar-nav.navbar-right ul.nav.navbar-nav.navbar-right
li li
a#notifications data-container="body" data-toggle="popover" data-placement="bottom" a#notifications data-container="body" data-toggle="popover" data-placement="bottom"
span.glyphicon.glyphicon-flag span.glyphicon.glyphicon-flag
| &nbsp;
- if current_user.notifications.unread.any? - if current_user.notifications.unread.any?
span.badge = current_user.notifications.unread.recent.count span.badge = current_user.notifications.unread.recent.count
- unless params[:action] == 'new' && params[:controller] == 'posts' - unless params[:action] == 'new' && params[:controller] == 'posts'
li.new-post-btn li.new-post-btn
form form
a.btn.navbar-btn href=new_post_path a.btn.btn-default.navbar-btn href=new_post_path
| 投稿する | 投稿する
= image_tag 'write.png', class: "write" / = image_tag 'write.png', class: "write"
li.dropdown li.dropdown
a.dropdown-toggle data-toggle="dropdown" a.dropdown-toggle data-toggle="dropdown"
= current_user.name = current_user.name
| &nbsp;
span.badge = current_user.decorate.draft_count span.badge = current_user.decorate.draft_count
b.caret b.caret
ul.dropdown-menu ul.dropdown-menu
...@@ -55,7 +60,7 @@ nav.navbar.navbar-fixed-top.navbar-original role="navigation" ...@@ -55,7 +60,7 @@ nav.navbar.navbar-fixed-top.navbar-original role="navigation"
a href=watching_path Watchings a href=watching_path Watchings
li.divider li.divider
li li
a href=destroy_user_session_path data-method="delete" rel="nofollow" SignOut a href=destroy_user_session_path data-method="delete" rel="nofollow" Log Out
script#notification-content type="text/template" script#notification-content type="text/template"
- if current_user.notifications.unread.recent.any? - if current_user.notifications.unread.recent.any?
......
- if flash[:success]
.alert.alert-success.fade.in
button.close aria-hidden="true" data-dismiss="alert" type="button" &times;
strong Success
= flash[:success]
- if flash[:notice]
.alert.alert-warning.fade.in
button.close aria-hidden="true" data-dismiss="alert" type="button" &times;
strong Notice
= flash[:notice]
- if flash[:alert]
.alert.alert-danger.fade.in
button.close aria-hidden="true" data-dismiss="alert" type="button" &times;
strong Alert
= flash[:alert]
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
#error_explanation #error_explanation
h2 h2
= pluralize(@post.errors.count, "error") = pluralize(@post.errors.count, "error")
| prohibited this post from being saved: | &nbsp;prohibited this post from being saved:
ul ul
- @post.errors.full_messages.each do |msg| - @post.errors.full_messages.each do |msg|
li= msg li= msg
...@@ -19,19 +19,16 @@ ...@@ -19,19 +19,16 @@
.field .field
.input-group .input-group
span.input-group-addon= f.label :tags span.input-group-addon= f.label :tags
= hidden_field :post, :tags, class: 'mod-mdEditor-tags', style: 'width:300px', value: @post.tags.map{ |_tag| _tag.name }.join(',') = hidden_field :post, :tags, class: 'mod-mdEditor-tags', style: 'width:90%', value: @post.tags.map{ |_tag| _tag.name }.join(',')
.col-xs-3 .col-xs-3
p.actions p = f.submit class: 'btn btn-default js-disable-confirm-unload', id: 'save_button'
= f.submit class: 'btn btn-lg js-disable-confirm-unload', id: 'save_button' p
p.actions
= f.check_box :is_draft = f.check_box :is_draft
= f.label :is_draft, "&nbsp;下書き保存".html_safe = f.label :is_draft, "&nbsp;下書き保存".html_safe
p.actions p = f.date_select :specified_date
= f.date_select :specified_date
.row .row
.col-xs-6.editor-panel .col-xs-6.editor-panel
.panel.panel-default .panel.panel-default
.panel-heading .panel-heading
...@@ -74,7 +71,7 @@ ...@@ -74,7 +71,7 @@
| 0% | 0%
.col-xs-6.preview-panel .col-xs-6.preview-panel
.panel.preview-wrapper .panel.panel-default.preview-wrapper
.panel-heading .panel-heading
span Preview span Preview
...@@ -112,7 +109,7 @@ input#fileupload data-url="/apis/file_receiver" multiple="" name="files[]" style ...@@ -112,7 +109,7 @@ input#fileupload data-url="/apis/file_receiver" multiple="" name="files[]" style
$.mod_form_resizer({ $.mod_form_resizer({
$editor: $('.mod-form-resizer-editor'), $editor: $('.mod-form-resizer-editor'),
$preview: $('.mod-form-resizer-preview'), $preview: $('.mod-form-resizer-preview'),
height_offset: 250 height_offset: 210
}) })
// Display upload dialog. // Display upload dialog.
......
/ locals: / locals:
/ post {Post} / post {Post}
a.list-group-item.post-list.mod-hover-hidden data-post-id=post.id href=post_path(post) / a.list-group-item.post-list.mod-hover-hidden data-post-id=post.id href=post_path(post)
.container-fluid .row
.row .col-xs-8
.col-xs-9 h4
h4.text-link #{post.title} a href=post_path(post) = post.title
.col-xs-3
span.label.label-danger.label-date = post.display_specified_date if post.specified_date p.small
small.pull-right ##{post.id} span.label.label-default.label-date = post.display_specified_date if post.specified_date
.row | &nbsp;
.col-xs-8 - post.tags.map(&:decorate).each do |tag|
small.text-success.posted-name a.label.label-default.label-tag href=tag.show_path = tag.structured_name
| #{post.author.name} posted&nbsp; | &nbsp;
abbr.js-time-ago data-time-ago-at=post.updated_at
|.&nbsp;&nbsp; .col-xs-4
- post.tags.each do |tag| p.small.text-success.posted-name
span.label.label-tag #{tag.name} span
| &nbsp; | #{post.author.name} posted&nbsp;
.col-xs-4 abbr.js-time-ago data-time-ago-at=post.updated_at
small.pull-right | &nbsp;&nbsp;
span.glyphicon.glyphicon-time title="読了時間"
| &nbsp;#{post.read_time}&nbsp;&nbsp; p
.small
span.glyphicon.glyphicon-comment title="コメント" span.glyphicon.glyphicon-time title="読了時間"
| &nbsp;#{post.comments.count}&nbsp;&nbsp; | &nbsp;#{post.read_time}&nbsp;&nbsp;
span.glyphicon.glyphicon-eye-open title="閲覧者数" span.glyphicon.glyphicon-comment title="コメント"
| &nbsp;#{post.visited_user_count}&nbsp;&nbsp; | &nbsp;#{post.comments.count}&nbsp;&nbsp;
.row span.glyphicon.glyphicon-eye-open title="閲覧者数"
.col-xs-12 | &nbsp;#{post.visited_user_count}&nbsp;&nbsp;
small.text-shadow
= truncate post.body, length: 240
.row
- if post.thumbnail_url
.col-xs-8
p.small.text-shadow
= truncate post.body, length: 200
.col-xs-4
p
image.img-thumbnail.large-item-image src=asset_path(post.thumbnail_url)
- else
.col-xs-12
p.small.text-shadow
= truncate post.body, length: 200
.row.post-show-wrapper /! view:post/show
.col-xs-9
.panel .row
.col-xs-12.col-md-8
.panel.panel-main
.panel-heading .panel-heading
h3.panel-title h2.panel-title = @post.title
a href=post_path(@post) = @post.title
.panel-body.viewer.github.mod-image-style .panel-body.viewer.github.mod-image-style
= MarkdownRenderer.new(@post.body).render = MarkdownRenderer.new(@post.body).render
.col-xs-3 .col-xs-12.col-md-4
.btn-group.post-edit-btn
a.btn href=edit_post_path(@post) .margin-wrapper
| 編集&nbsp; .btn-group
span.glyphicon.glyphicon-pencil a.btn.btn-default href=edit_post_path(@post)
button.btn.btn-default.dropdown-toggle data-toggle="dropdown" type="button" | 編集&nbsp;
span.caret span.glyphicon.glyphicon-pencil
span.sr-only Toggle Dropdown button.btn.btn-default.dropdown-toggle data-toggle="dropdown" type="button"
ul.dropdown-menu role="menu" span.caret
li span.sr-only Toggle Dropdown
a href=slideshow_post_path(@post) target="_blank" Slideshow ul.dropdown-menu role="menu"
li li
a.small href="https://github.com/gnab/remark" target="_blank" What is Slideshow? a href=slideshow_post_path(@post) target="_blank" Slideshow
li.divider li
li a.small href="https://github.com/gnab/remark" target="_blank" What is Slideshow?
a href=fork_post_path(@post) Fork li.divider
li li
a data-target="#myModal" data-toggle="modal" href="#" Mail to... a href=fork_post_path(@post) Fork
li.divider li
li= link_to 'Delete', post_path(@post), method: :delete, data: { confirm: 'Are you sure?' } a data-target="#myModal" data-toggle="modal" href="#" Mail to...
li.divider
| &nbsp; li= link_to 'Delete', post_path(@post), method: :delete, data: { confirm: 'Are you sure?' }
.btn-group | &nbsp;
- if current_user.watching?(post: @post)
= link_to 'Watching <span class="glyphicon glyphicon-eye-open"></span>'.html_safe, watch_post_path, :remote => true, :'data-type' => :html, :class => 'btn ajax_link btn-watched' .btn-group
- else - if current_user.watching?(post: @post)
= link_to 'Watch <span class="glyphicon glyphicon-eye-open"></span>'.html_safe, watch_post_path, :remote => true, :'data-type' => :html, :class => 'btn ajax_link watch-btn' = link_to 'Watching <span class="glyphicon glyphicon-eye-open"></span>'.html_safe, watch_post_path, :remote => true, :'data-type' => :html, :class => 'btn btn-default ajax_link btn-watched'
- else
.well.detail-wrapper style="margin-top:20px" = link_to 'Watch <span class="glyphicon glyphicon-eye-open"></span>'.html_safe, watch_post_path, :remote => true, :'data-type' => :html, :class => 'btn btn-default ajax_link watch-btn'
dl
dt 作成者
dd .panel.panel-default
a href=(search_path(q: "@#{@post.author.nickname}")) .panel-heading
| @#{@post.author.name} h3.panel-title
i.fa.fa-info
dt タグ | &nbsp; 情報
dd .panel-body
- @post.tags.each do |tag| dl
span.label.label-tag dt 最終編集者
a href=tag.decorate.show_path dd
| #{tag.name} a href=(search_path(q: "@#{@post.author.nickname}"))
| &nbsp; = @post.author.name
dt 指定日 dt 作成者
dd dd (調整中)
a href=(search_path(q: "date:#{@post.display_date}")) = @post.display_date
dt 編集履歴
dt 作成日 dd (調整中)
dd
= @post.created_date dt タグ
dd
dt 最終更新日 - @post.tags.map(&:decorate).each do |tag|
dd span.label.label-tag
= @post.updated_date a href=tag.show_path
| #{tag.structured_name}
dt 閲覧者数 | &nbsp;
dd
= @post.visited_user_count dt 指定日
dd
dt コメント数 a href=(search_path(q: "date:#{@post.display_date}")) = @post.display_date
dd
= @post.comments.count dt 作成日
dd
= @post.created_date
dt 最終更新日
dd
= @post.updated_date
dt 閲覧者数
dd
= @post.visited_user_count
dt コメント数
dd
= @post.comments.count
.row .row
.col-md-12 .col-xs-12
.panel.comment-wrapper .panel.panel-comment.panel-default
.panel-heading .panel-heading
h3.panel-title h3.panel-title
= image_tag 'comment_w.png' i.fa.fa-comments
| Comments | &nbsp;Comments
.panel-body .panel-body
ul.media-list ul.media-list
- @post.comments.each do |comment| - @post.comments.each do |comment|
li.media li.media
a.pull-left href="#" a.media-left href="#"
img.media-object src=comment.author.decorate.image_url / img.media-object src=comment.author.decorate.image_url height="25px" width="25px"
.media-body .media-body
h4.media-heading= comment.author.name h4.media-heading= comment.author.name
= MarkdownRenderer.new(comment.body).render = MarkdownRenderer.new(comment.body).render
= form_tag(comment_post_path, method: :post, data: { 'form-id' => "comment_#{@post.id}" }) do = form_tag(comment_post_path, method: :post, data: { 'form-id' => "comment_#{@post.id}" }) do
li.media li.media
a.pull-left href="#" a.media-left href="#"
img.media-object src=current_user.image_url / img.media-object src=current_user.image_url height="25px" width="25px"
.media-body .media-body
h4.media-heading= current_user.name h4.media-heading= current_user.name
= text_area :comment, :body, class: 'form-control', placeholder: 'コメントする...' = text_area :comment, :body, id: 'comments_anchor', class: 'form-control', placeholder: 'コメントする...'
= submit_tag "Comment", class: 'btn comment-btn', data: { 'disable-with' => '...' } = submit_tag "Comment", class: 'btn btn-comment', data: { 'disable-with' => '...' }
javascript: javascript:
$("form[data-form-id='comment_#{@post.id}']").on('ajax:success', function(event, data, xhr) { $("form[data-form-id='comment_#{@post.id}']").on('ajax:success', function(event, data, xhr) {
......
/! view:search/show /! view:search/show
.row .row
.col-xs-12.col-md-8 role="navigation"
.panel.panel-main
.panel-heading
h2.panel-title
i.fa.fa-search
| &nbsp; "#{params[:q]}"
span.small - 検索結果#{@count}
h1 ul.list-group.panel-body
span "#{params[:q]}" - @posts.each do |post|
span.small - 検索結果 li.list-group-item
span.small #{@count} = render partial: 'posts/large_item', locals: { post: post }
.col-xs-8 role="navigation"
.list-group
- @posts.each do |_post|
= render partial: 'posts/large_item', locals: { post: _post }
= paginate(@posts) = paginate(@posts)
.col-xs-4 .col-xs-12.col-md-4
.panel.panel-default .panel.panel-default
.panel-heading .panel-heading
h2.panel-title "#{params[:q]}"に関連するタグ h3.panel-title
i.fa.fa-tags
| &nbsp;"#{params[:q]}"に関連する他のタグ
.panel-body.list-group .panel-body.list-group
- @posts.related_tags.each do |_tag| - @posts.related_tags.each do |tag|
a.list-group-item href=search_path(q: "##{_tag.name}") = _tag.name a.list-group-item href=search_path(q: "##{tag.name}") = tag.name
.panel.panel-default .panel.panel-default
.panel-heading .panel-heading
h2.panel-title "#{params[:q]}"に関連するユーザー h3.panel-title
i.fa.fa-users
| &nbsp;"#{params[:q]}"に貢献しているユーザー
.panel-body.list-group .panel-body.list-group
- @posts.related_authors.each do |_author| - @posts.related_authors.each do |author|
a.list-group-item href=search_path(q: "@#{_author.nickname}") = _author.name a.list-group-item href=search_path(q: "@#{author.nickname}") = author.name
/! view:stock/show /! view:stock/show
.row .row
.col-md-12
.panel.stock-wrapper .col-xs-12.col-md-8 role="navigation"
.panel.panel-main
.panel-heading .panel-heading
h1 h2.panel-title
| &nbsp;Stocks i.fa.fa-stack-overflow
small - 保存・蓄積された記事 | &nbsp;Stock
.panel-body span.small &nbsp;- 保存・蓄積された記事
#sidebar role="navigation"
#tab-tree.tab-pane .panel-body.list-group
- cache('tag-tree', :expires_in => 1.hour) do #tab-tree
.list-group = Tag.posts_exist.decorate.tree_view
= Tag.posts_exist.decorate.tree_view
.col-xs-12.col-md-4
.panel
.panel-heading
h3.panel-title
i.fa.fa-star
| &nbsp;今月のホットタグ
.panel-body.list-group
- Tag.monthly_popular(10).each do |tag, score|
a.list-group-item href=search_path(q: "##{tag.name}")
= tag.name
span.badge #{score.round(2)} pt.
.panel
.panel-heading
h3.panel-title
i.fa.fa-tags
| &nbsp;最近作成されたタグ
.panel-body.list-group
- Tag.recently_created(10).each do |tag|
a.list-group-item href=search_path(q: "##{tag.name}")
= tag.name
span.label.pull-right = tag.decorate.created_date
...@@ -20,8 +20,11 @@ ...@@ -20,8 +20,11 @@
.col-xs-4 .col-xs-4
span.pull-right.label.label-danger = post.display_specified_date if post.specified_date span.pull-right.label.label-danger = post.display_specified_date if post.specified_date
.btn-group.mod-hover-hidden .row
a.btn.btn-info.mod-hover-hidden-item href=fork_post_path(post) .col-xs-12
| このテンプレートを利用する .mod-hover-hidden
a.btn.btn-default.mod-hover-hidden-item href=edit_post_path(post) a.btn.btn-default href=fork_post_path(post)
| このテンプレートを編集する | このテンプレートを利用する
| &nbsp;
a.btn.btn-default href=edit_post_path(post)
| 編集する
/! view:templates/show /! view:templates/show
.row
h1 .row
| Templates .col-xs-12
small - テンプレートから作成 .panel.panel-default
.panel-heading テンプレートの使い方
.panel-body
ul
li 「template」 というタグをつけた投稿はこのページに現れます
li 「このテンプレートを利用する」ことで同じフォーマットの文章が簡単に書けます
.panel.template-wrapper .panel.panel-main
.panel-heading .panel-heading
span.glyphicon.glyphicon-info-sign h3.panel-title
| テンプレートの使い方 i.fa.fa-copy
| &nbsp;テンプレート
.panel-body.list-group
- if template_tag = Tag.find_by(name: 'template')
- template_tag.posts.decorate.each do |post|
= render partial: 'post', locals: { post: post }
- else
| テンプレートが存在しません
.panel-body
ul
li 「template」 というタグをつけた投稿はこのページに現れます
li コピーすることで同じフォーマットの文章が簡単に書けます
.list-group
- if template_tag = Tag.find_by(name: 'template')
- template_tag.posts.decorate.each do |_post|
= render partial: 'post', locals: { post: _post }
- else
| テンプレートが存在しません
...@@ -14,20 +14,20 @@ ...@@ -14,20 +14,20 @@
.form-group .form-group
= f.label :name, '名前', class: 'col-sm-2 control-label' = f.label :name, '名前', class: 'col-sm-2 control-label'
.col-sm-10 .col-sm-6
= f.text_field :name, class: 'form-control', readonly: true = f.text_field :name, class: 'form-control', readonly: true
.form-group .form-group
= f.label :email, 'メールアドレス', class: 'col-sm-2 control-label' = f.label :email, 'メールアドレス', class: 'col-sm-2 control-label'
.col-sm-10 .col-sm-6
= f.text_field :email, class: 'form-control', readonly: true = f.text_field :email, class: 'form-control', readonly: true
.form-group .form-group
= f.label :nickname, 'ニックネーム', class: 'col-sm-2 control-label' = f.label :nickname, 'ニックネーム', class: 'col-sm-2 control-label'
.col-sm-10 .col-sm-6
= f.text_field :nickname, class: 'form-control' = f.text_field :nickname, class: 'form-control'
.form-group .form-group
.col-sm-offset-2.col-sm-10 .col-sm-offset-2.col-sm-6
button.btn.btn-success type="submit" 保存 button.btn.btn-success type="submit" 保存
h1 編集 .row
= render 'form' .col-xs-12
.panel.panel-main
.panel-heading 編集
.panel-body
= render 'form'
/! view:flow/show /! view:flow/show
.row .row
.col-xs-12
.panel.panel-main
.panel-heading
h3.panel-title
span.glyphicon.glyphicon-eye-open
| &nbsp;Watchings
span.small - ウォッチ中の項目
h1 ul.list-group.panel-body
| Watchings - @posts.each do |post|
small - ウォッチ中の項目 li.list-group-item
= render partial: 'posts/large_item', locals: { post: post }
= paginate(@posts)
.col-xs-8 role="navigation"
.list-group
- @posts.each do |_post|
= render partial: 'posts/large_item', locals: { post: _post }
= paginate(@posts)
...@@ -5,4 +5,6 @@ Rails.application.config.assets.version = '1.0' ...@@ -5,4 +5,6 @@ Rails.application.config.assets.version = '1.0'
# Precompile additional assets. # Precompile additional assets.
# application.js, application.css, and all non-JS/CSS in app/assets folder are already added. # application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
# Rails.application.config.assets.precompile += %w( search.js ) Rails.application.config.assets.precompile += %w(
ie-spacer.gif gritter.png gritter-close.png success.png error.png notice.png progress.gif warning.png
)
if defined?(Gritter)
Gritter.rails_flash_fallback = true
end
...@@ -3,9 +3,10 @@ Rails.application.config.middleware.use OmniAuth::Builder do ...@@ -3,9 +3,10 @@ Rails.application.config.middleware.use OmniAuth::Builder do
provider :google_oauth2, Settings.google_api.client_id, Settings.google_api.secret, provider :google_oauth2, Settings.google_api.client_id, Settings.google_api.secret,
name: 'google_oauth2', name: 'google_oauth2',
scope: 'https://mail.google.com/, userinfo.email, userinfo.profile', scope: 'https://mail.google.com/, userinfo.email, userinfo.profile',
access_type: 'offline', access_type: 'online',
prompt: 'select_account consent', # prompt: 'select_account consent',
image_aspect_ratio: 'square', approval_prompt: 'auto'
image_size: 50 # image_aspect_ratio: 'square',
# image_size: 50
end end
en:
gflash:
#
# These are the translations for the different titles.
#
titles:
notice: "Notice"
success: "Success"
warning: "Warning"
error: "Error"
progress: "Progress"
#
# Add default gflash messages:
# defaults:
# success: "This is a notification"
# error: "Something went wrong"
# create:
# success: "Successfully created!"
# error: "Something went wrong. Please take a look at the form to see what went wrong."
#
# Add gflash messages for controller actions:
# products:
# create:
# notice: "This is a notification"
# error: "Something went wrong"
#
# Inside controller:
# gflash :notice, :error
#
\ No newline at end of file
...@@ -6,27 +6,27 @@ Rails.application.routes.draw do ...@@ -6,27 +6,27 @@ Rails.application.routes.draw do
post 'apis/file_receiver' post 'apis/file_receiver'
get 'apis/user_mention' get 'apis/user_mention'
get 'tags/:name/events' => 'tags#events', as: 'event_tag' get 'tags/:name/events' => 'tags#events', as: 'event_tag'
root 'welcome#top', as: 'root' root 'welcome#top', as: 'root'
get 'stock' => 'stock#show', as: 'stock' get 'stock' => 'stock#show', as: 'stock'
get 'flow' => 'flow#show', as: 'flow' get 'flow' => 'flow#show', as: 'flow'
get 'search' => 'search#show', as: 'search' get 'search' => 'search#show', as: 'search'
get 'templates' => 'templates#show', as: 'templates' get 'templates' => 'templates#show', as: 'templates'
get 'watchings' => 'watchings#show', as: 'watching' get 'watchings' => 'watchings#show', as: 'watching'
get 'posts/:id/fork' => 'posts#fork', as: 'fork_post' get 'posts/:id/fork' => 'posts#fork', as: 'fork_post'
post 'posts/:id/mail' => 'posts#mail', as: 'mail_post' post 'posts/:id/mail' => 'posts#mail', as: 'mail_post'
post 'posts/:id/comment' => 'posts#comment', as: 'comment_post' post 'posts/:id/comment' => 'posts#comment', as: 'comment_post'
get 'posts/:id/slideshow' => 'posts#slideshow', as: 'slideshow_post' get 'posts/:id/slideshow' => 'posts#slideshow', as: 'slideshow_post'
get 'posts/:id/watch' => 'posts#watch', as: 'watch_post' get 'posts/:id/watch' => 'posts#watch', as: 'watch_post'
resources :posts, except: [:index] resources :posts, except: [:index]
get 'notification_bridge/:id' => 'notifications#bridge', as: 'notification_bridge' get 'notification_bridge/:id' => 'notifications#bridge', as: 'notification_bridge'
post 'tags/:name/merge_to/:merge_to_name' => 'tags#merge_to', as: 'merge_to_tag' post 'tags/:name/merge_to/:merge_to_name' => 'tags#merge_to', as: 'merge_to_tag'
post 'tags/:name/move_to/:move_to_name' => 'tags#move_to', as: 'move_to_tag' post 'tags/:name/move_to/:move_to_name' => 'tags#move_to', as: 'move_to_tag'
resources :tags, param: :name, except: [:index] resources :tags, param: :name, except: [:index]
devise_for :users, devise_for :users,
......
...@@ -4,6 +4,8 @@ defaults: &defaults ...@@ -4,6 +4,8 @@ defaults: &defaults
# For amil body # For amil body
app_host: <%= ENV['RV_RENDEZVOUS_APP_HOST'] %> app_host: <%= ENV['RV_RENDEZVOUS_APP_HOST'] %>
permited_login_domain: <%= ENV['RV_PERMITTED_LOGIN_DOMAIN'] %>
# For login # For login
google_api: google_api:
client_id: <%= ENV['RV_GOOGLE_API_CLIENT_ID'] %> client_id: <%= ENV['RV_GOOGLE_API_CLIENT_ID'] %>
......
...@@ -13,117 +13,117 @@ ...@@ -13,117 +13,117 @@
ActiveRecord::Schema.define(version: 20140719145016) do ActiveRecord::Schema.define(version: 20140719145016) do
create_table 'comments', force: true do |t| create_table "comments", force: true do |t|
t.integer 'author_id' t.integer "author_id"
t.integer 'post_id' t.integer "post_id"
t.text 'body' t.text "body"
t.datetime 'created_at' t.datetime "created_at"
t.datetime 'updated_at' t.datetime "updated_at"
end end
add_index 'comments', ['author_id', 'updated_at'], name: 'index_comments_on_author_id_and_updated_at', using: :btree add_index "comments", ["author_id", "updated_at"], name: "index_comments_on_author_id_and_updated_at", using: :btree
add_index 'comments', ['post_id', 'updated_at'], name: 'index_comments_on_post_id_and_updated_at', using: :btree add_index "comments", ["post_id", "updated_at"], name: "index_comments_on_post_id_and_updated_at", using: :btree
create_table 'footprints', force: true do |t| create_table "footprints", force: true do |t|
t.integer 'user_id', null: false t.integer "user_id", null: false
t.integer 'post_id', null: false t.integer "post_id", null: false
t.datetime 'created_at' t.datetime "created_at"
t.datetime 'updated_at' t.datetime "updated_at"
end end
add_index 'footprints', ['post_id'], name: 'index_footprints_on_post_id', using: :btree add_index "footprints", ["post_id"], name: "index_footprints_on_post_id", using: :btree
add_index 'footprints', ['user_id', 'post_id'], name: 'index_footprints_on_user_id_and_post_id', using: :btree add_index "footprints", ["user_id", "post_id"], name: "index_footprints_on_user_id_and_post_id", using: :btree
create_table 'notifications', force: true do |t| create_table "notifications", force: true do |t|
t.integer 'user_id' t.integer "user_id"
t.datetime 'read_at' t.datetime "read_at"
t.boolean 'is_read', default: false, null: false t.boolean "is_read", default: false, null: false
t.string 'detail_path' t.string "detail_path"
t.text 'body' t.text "body"
t.datetime 'created_at' t.datetime "created_at"
t.datetime 'updated_at' t.datetime "updated_at"
end end
add_index 'notifications', ['user_id', 'is_read', 'read_at'], name: 'index_notifications_on_user_id_and_is_read_and_read_at', using: :btree add_index "notifications", ["user_id", "is_read", "read_at"], name: "index_notifications_on_user_id_and_is_read_and_read_at", using: :btree
create_table 'post_tags', force: true do |t| create_table "post_tags", force: true do |t|
t.integer 'post_id', null: false t.integer "post_id", null: false
t.integer 'tag_id', null: false t.integer "tag_id", null: false
t.datetime 'created_at' t.datetime "created_at"
t.datetime 'updated_at' t.datetime "updated_at"
end end
add_index 'post_tags', ['post_id'], name: 'index_post_tags_on_post_id', using: :btree add_index "post_tags", ["post_id"], name: "index_post_tags_on_post_id", using: :btree
add_index 'post_tags', ['tag_id'], name: 'index_post_tags_on_tag_id', using: :btree add_index "post_tags", ["tag_id"], name: "index_post_tags_on_tag_id", using: :btree
create_table 'posts', force: true do |t| create_table "posts", force: true do |t|
t.string 'title' t.string "title"
t.text 'body' t.text "body"
t.integer 'author_id' t.integer "author_id"
t.datetime 'created_at' t.datetime "created_at"
t.datetime 'updated_at' t.datetime "updated_at"
t.boolean 'is_draft', default: false t.boolean "is_draft", default: false
t.date 'specified_date' t.date "specified_date"
end end
add_index 'posts', ['is_draft'], name: 'index_posts_on_is_draft', using: :btree add_index "posts", ["is_draft"], name: "index_posts_on_is_draft", using: :btree
create_table 'tags', force: true do |t| create_table "tags", force: true do |t|
t.string 'name' t.string "name"
t.datetime 'created_at' t.datetime "created_at"
t.datetime 'updated_at' t.datetime "updated_at"
t.string 'ancestry' t.string "ancestry"
t.text 'body' t.text "body"
t.integer 'posts_count', default: 0, null: false t.integer "posts_count", default: 0, null: false
end end
add_index 'tags', ['ancestry'], name: 'index_tags_on_ancestry', using: :btree add_index "tags", ["ancestry"], name: "index_tags_on_ancestry", using: :btree
create_table 'users', force: true do |t| create_table "users", force: true do |t|
t.string 'name' t.string "name"
t.string 'image_url' t.string "image_url"
t.datetime 'created_at' t.datetime "created_at"
t.datetime 'updated_at' t.datetime "updated_at"
t.string 'email', default: '', null: false t.string "email", default: "", null: false
t.string 'encrypted_password', default: '', null: false t.string "encrypted_password", default: "", null: false
t.string 'reset_password_token' t.string "reset_password_token"
t.datetime 'reset_password_sent_at' t.datetime "reset_password_sent_at"
t.datetime 'remember_created_at' t.datetime "remember_created_at"
t.integer 'sign_in_count', default: 0, null: false t.integer "sign_in_count", default: 0, null: false
t.datetime 'current_sign_in_at' t.datetime "current_sign_in_at"
t.datetime 'last_sign_in_at' t.datetime "last_sign_in_at"
t.string 'current_sign_in_ip' t.string "current_sign_in_ip"
t.string 'last_sign_in_ip' t.string "last_sign_in_ip"
t.string 'google_auth_token' t.string "google_auth_token"
t.string 'google_refresh_token' t.string "google_refresh_token"
t.datetime 'google_token_expires_at' t.datetime "google_token_expires_at"
t.string 'nickname', default: '', null: false t.string "nickname", default: "", null: false
end end
add_index 'users', ['email'], name: 'index_users_on_email', unique: true, using: :btree add_index "users", ["email"], name: "index_users_on_email", unique: true, using: :btree
add_index 'users', ['nickname'], name: 'index_users_on_nickname', using: :btree add_index "users", ["nickname"], name: "index_users_on_nickname", using: :btree
add_index 'users', ['reset_password_token'], name: 'index_users_on_reset_password_token', unique: true, using: :btree add_index "users", ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true, using: :btree
create_table 'versions', force: true do |t| create_table "versions", force: true do |t|
t.string 'item_type', null: false t.string "item_type", null: false
t.integer 'item_id', null: false t.integer "item_id", null: false
t.string 'event', null: false t.string "event", null: false
t.string 'whodunnit' t.string "whodunnit"
t.text 'object' t.text "object"
t.datetime 'created_at' t.datetime "created_at"
end end
add_index 'versions', ['item_type', 'item_id'], name: 'index_versions_on_item_type_and_item_id', using: :btree add_index "versions", ["item_type", "item_id"], name: "index_versions_on_item_type_and_item_id", using: :btree
create_table 'watches', force: true do |t| create_table "watches", force: true do |t|
t.integer 'watcher_id', null: false t.integer "watcher_id", null: false
t.string 'watchable_type', null: false t.string "watchable_type", null: false
t.integer 'watchable_id', null: false t.integer "watchable_id", null: false
t.datetime 'created_at' t.datetime "created_at"
t.datetime 'updated_at' t.datetime "updated_at"
end end
add_index 'watches', ['watchable_type', 'watchable_id'], name: 'index_watches_on_watchable_type_and_watchable_id', using: :btree add_index "watches", ["watchable_type", "watchable_id"], name: "index_watches_on_watchable_type_and_watchable_id", using: :btree
add_index 'watches', ['watcher_id', 'watchable_type', 'watchable_id'], name: 'index_watches_on_watcher_id_and_watchable_type_and_watchable_id', unique: true, using: :btree add_index "watches", ["watcher_id", "watchable_type", "watchable_id"], name: "index_watches_on_watcher_id_and_watchable_type_and_watchable_id", unique: true, using: :btree
end end
...@@ -20,7 +20,7 @@ describe 'Request via js', js: true do ...@@ -20,7 +20,7 @@ describe 'Request via js', js: true do
it 'show first post' do it 'show first post' do
page.save_screenshot(Rails.root.join('tmp', 'screenshots', "a-#{Time.now.strftime('%Y-%m-%d %H%M%S')}.png")) page.save_screenshot(Rails.root.join('tmp', 'screenshots', "a-#{Time.now.strftime('%Y-%m-%d %H%M%S')}.png"))
expect(page.find('.post-list:first-child h4').text).to include('java java') expect(page.find('.panel-main .list-group-item:first-child h4').text).to include('java java')
end end
after :each do after :each do
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment