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_PERMITTED_LOGIN_DOMAIN=gmail.com,mycompany.com
RV_GOOGLE_API_CLIENT_ID=xxxxxxxxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.apps.googleusercontent.com
RV_GOOGLE_API_SECRET=xxxxxxxxxxxxxxxxxxxxxxxx
RV_S3_ASSESS_KEY_ID=xxxxxxxxxxxxxxxxxxxxxxxx
......
......@@ -23,7 +23,7 @@ gem 'therubyracer', platforms: :ruby
# gem 'turbolinks'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
# gem 'jbuilder'
gem 'jbuilder'
gem 'i18n_generators'
......@@ -97,6 +97,8 @@ group :development, :test do
gem 'dotenv-rails'
gem 'rubocop'
gem 'quiet_assets'
end
group :test do
......@@ -161,3 +163,9 @@ gem 'rails_12factor', group: :production
# for IP restriction
gem 'rack-contrib', require: 'rack/contrib'
gem 'meta-tags'
# Growl-like Notification
# https://github.com/RobinBrouwer/gritter
gem 'gritter', '1.1.0'
GIT
remote: git://github.com/amatsuda/kaminari.git
revision: b206d89922378dcf6f1f7a6247ce1d5f6f1534ad
revision: 8247c79943cf98ce521b79403dd829317d19fa7f
specs:
kaminari (1.0.0.alpha)
actionpack (>= 3.0.0)
......@@ -17,38 +17,38 @@ GIT
GIT
remote: git://github.com/rails/sass-rails.git
revision: 80e15690b66131edc1b8ccb4ab7dbbd5bf567042
revision: 404cd9ba2bf2618fe14b1ba2f27c861ba48980f2
specs:
sass-rails (5.0.0.beta1)
railties (>= 4.0.0, < 5.0)
sass (~> 3.2, >= 3.2.2)
sprockets (~> 2.12)
sprockets (~> 2.8, < 3.0)
sprockets-rails (>= 2.0, < 4.0)
GEM
remote: https://rubygems.org/
specs:
actionmailer (4.1.7)
actionpack (= 4.1.7)
actionview (= 4.1.7)
actionmailer (4.1.8)
actionpack (= 4.1.8)
actionview (= 4.1.8)
mail (~> 2.5, >= 2.5.4)
actionpack (4.1.7)
actionview (= 4.1.7)
activesupport (= 4.1.7)
actionpack (4.1.8)
actionview (= 4.1.8)
activesupport (= 4.1.8)
rack (~> 1.5.2)
rack-test (~> 0.6.2)
actionview (4.1.7)
activesupport (= 4.1.7)
actionview (4.1.8)
activesupport (= 4.1.8)
builder (~> 3.1)
erubis (~> 2.7.0)
activemodel (4.1.7)
activesupport (= 4.1.7)
activemodel (4.1.8)
activesupport (= 4.1.8)
builder (~> 3.1)
activerecord (4.1.7)
activemodel (= 4.1.7)
activesupport (= 4.1.7)
activerecord (4.1.8)
activemodel (= 4.1.8)
activesupport (= 4.1.8)
arel (~> 5.0.0)
activesupport (4.1.7)
activesupport (4.1.8)
i18n (~> 0.6, >= 0.6.9)
json (~> 1.7, >= 1.7.7)
minitest (~> 5.1)
......@@ -67,7 +67,7 @@ GEM
aws-sdk (1.39.0)
json (~> 1.4)
nokogiri (>= 1.4.4)
backports (3.6.3)
backports (3.6.4)
bcrypt (3.1.9)
better_errors (2.0.0)
coderay (>= 1.0.0)
......@@ -175,7 +175,8 @@ GEM
github-markdown (0.6.7)
gmail_xoauth (0.4.1)
oauth (>= 0.3.6)
guard (2.8.1)
gritter (1.1.0)
guard (2.8.2)
formatador (>= 0.2.4)
listen (~> 2.7)
lumberjack (~> 1.0)
......@@ -206,6 +207,9 @@ GEM
i18n_generators (1.2.1)
mechanize
rails (>= 3.0.0)
jbuilder (2.2.5)
activesupport (>= 3.0.0, < 5)
multi_json (~> 1.2)
jquery-rails (3.1.2)
railties (>= 3.0, < 5.0)
thor (>= 0.14, < 2.0)
......@@ -216,7 +220,7 @@ GEM
launchy (2.4.3)
addressable (~> 2.3)
libv8 (3.16.14.7)
listen (2.7.11)
listen (2.8.1)
celluloid (>= 0.15.2)
rb-fsevent (>= 0.9.3)
rb-inotify (>= 0.9)
......@@ -232,14 +236,16 @@ GEM
nokogiri (~> 1.4)
ntlm-http (~> 0.1, >= 0.1.1)
webrobots (>= 0.0.9, < 0.2)
meta-tags (2.0.0)
actionpack (>= 3.0.0)
method_source (0.8.2)
mime-types (2.4.3)
mini_portile (0.6.1)
minitest (5.4.2)
minitest (5.4.3)
multi_json (1.10.1)
multi_xml (0.5.5)
multipart-post (2.0.0)
mysql2 (0.3.16)
mysql2 (0.3.17)
net-http-digest_auth (1.4)
net-http-persistent (2.9.4)
net-http-pipeline (1.0.1)
......@@ -247,8 +253,8 @@ GEM
net-ssh (>= 2.6.5)
net-ssh (2.9.1)
netrc (0.8.0)
newrelic_rpm (3.9.6.257)
nokogiri (1.6.4)
newrelic_rpm (3.9.7.266)
nokogiri (1.6.4.1)
mini_portile (~> 0.6.0)
ntlm-http (0.1.1)
oauth (0.4.7)
......@@ -273,7 +279,7 @@ GEM
paper_trail (3.0.6)
activerecord (>= 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)
slop (~> 3.4, >= 3.4.5)
poltergeist (1.5.1)
......@@ -294,6 +300,8 @@ GEM
pusher-client (0.6.0)
json
websocket (~> 1.0)
quiet_assets (1.0.3)
railties (>= 3.1, < 5.0)
rack (1.5.2)
rack-contrib (1.2.0)
rack (>= 0.9.1)
......@@ -301,24 +309,24 @@ GEM
rack (>= 1.1.3)
rack-test (0.6.2)
rack (>= 1.0)
rails (4.1.7)
actionmailer (= 4.1.7)
actionpack (= 4.1.7)
actionview (= 4.1.7)
activemodel (= 4.1.7)
activerecord (= 4.1.7)
activesupport (= 4.1.7)
rails (4.1.8)
actionmailer (= 4.1.8)
actionpack (= 4.1.8)
actionview (= 4.1.8)
activemodel (= 4.1.8)
activerecord (= 4.1.8)
activesupport (= 4.1.8)
bundler (>= 1.3.0, < 2.0)
railties (= 4.1.7)
railties (= 4.1.8)
sprockets-rails (~> 2.0)
rails_12factor (0.0.3)
rails_serve_static_assets
rails_stdout_logging
rails_serve_static_assets (0.0.2)
rails_stdout_logging (0.0.3)
railties (4.1.7)
actionpack (= 4.1.7)
activesupport (= 4.1.7)
railties (4.1.8)
actionpack (= 4.1.8)
activesupport (= 4.1.8)
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
rainbow (2.0.0)
......@@ -331,7 +339,7 @@ GEM
json (~> 1.4)
ref (1.0.5)
request_store (1.1.0)
responders (1.1.1)
responders (1.1.2)
railties (>= 3.2, < 4.2)
rest-client (1.7.2)
mime-types (>= 1.16, < 3.0)
......@@ -357,14 +365,14 @@ GEM
rspec-mocks (~> 3.1.0)
rspec-support (~> 3.1.0)
rspec-support (3.1.2)
rubocop (0.27.0)
rubocop (0.27.1)
astrolabe (~> 1.3)
parser (>= 2.2.0.pre.6, < 3.0)
parser (>= 2.2.0.pre.7, < 3.0)
powerpack (~> 0.0.6)
rainbow (>= 1.99.1, < 3.0)
ruby-progressbar (~> 1.4)
ruby-progressbar (1.7.0)
sass (3.4.7)
sass (3.4.8)
sdoc (0.4.1)
json (~> 1.7, >= 1.7.7)
rdoc (~> 4.0)
......@@ -383,7 +391,7 @@ GEM
multi_json (~> 1.0)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
sprockets-rails (2.2.0)
sprockets-rails (2.2.1)
actionpack (>= 3.0)
activesupport (>= 3.0)
sprockets (>= 2.8, < 4.0)
......@@ -443,7 +451,7 @@ GEM
rack (>= 1.0)
webrobots (0.1.1)
websocket (1.2.1)
websocket-driver (0.3.5)
websocket-driver (0.4.0)
xpath (2.0.0)
nokogiri (~> 1.3)
......@@ -475,16 +483,19 @@ DEPENDENCIES
factory_girl_rails
faraday
github-markdown
gritter (= 1.1.0)
guard-rspec
guard-rubocop
guard-teaspoon
hipchat
i18n_generators
jbuilder
jquery-rails
jwt (= 0.1.11)
kaminari!
launchy
mail
meta-tags
mysql2
newrelic_rpm
nokogiri
......@@ -493,6 +504,7 @@ DEPENDENCIES
poltergeist
premailer
pry-rails
quiet_assets
rack-contrib
rack-mini-profiler
rails (~> 4.1)
......
$ ->
# 上部の検索フォームのアニメーション
$('#app-search-form input')
.on 'focus', ->
$(this).parents('#app-search-form').animate({width: '400px'})
.on 'blur', ->
$(this).parents('#app-search-form').animate({width: '200px'})
# # 上部の検索フォームのアニメーション
# $('#app-search-form input')
# .on 'focus', ->
# $(this).parents('#app-search-form').animate({width: '400px'})
# .on 'blur', ->
# $(this).parents('#app-search-form').animate({width: '200px'})
# コードハイライト
# TODO
......
......@@ -14,6 +14,7 @@
// require jquery
//= require jquery_ujs
// require turbolinks
//= require gritter
//= require ./lib/jquery.ui.widget
//= require_tree ./lib
//= require_tree ./modules
......
......@@ -41,5 +41,5 @@ $.extend
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 @@
* 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.
*
*= require normalize
*= require gritter
*= require_tree ./lib
*= require_tree ./modules
*= require_tree .
*= 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=Quicksand:300,400,700);
$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;
color: #fff;
}
......@@ -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 {
#{$prefix}transition: all $transition_value $move_type
}
......
$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;
color: #fff;
}
......@@ -17,6 +17,7 @@ $main-color: #75b3c8;
#{$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=Quicksand:300,400,700);
.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 {
.row {
margin-top: 20px;
// margin-top: 20px;
.col-xs-9 {
.field {
margin-bottom: 10px;
.input-group-addon {
background-color: #fff;
border-top: 1px solid $main-color;
border-left: 1px solid $main-color;
border-bottom: 1px solid $main-color;
color: $main-color;
border-top: 1px solid $theme-color-main;
border-left: 1px solid $theme-color-main;
border-bottom: 1px solid $theme-color-main;
color: $theme-color-main;
label {
margin-bottom: 0;
font-weight: 300;
}
}
.form-control {
border: 1px solid $main-color;
border: 1px solid $theme-color-main;
padding: 10px!important;
height: 50px;
}
.select2-choices {
box-shadow: 0 0 0 #fff;
border: 1px solid $main-color;
border: 1px solid $theme-color-main;
background-image: none;
padding: 5px;
}
......@@ -33,7 +33,7 @@
}
.btn-toolbar {
> .btn-group > .btn {
color: $main-color;
color: $theme-color-main;
background-color: #fff;
box-shadow: 0 0 0 #fff;
}
......@@ -59,24 +59,24 @@
padding-top: 0;
}
}
#save_button {
margin-bottom: 10px;
}
// #save_button {
// margin-bottom: 10px;
// }
table {
width: 100%;
}
// table {
// width: 100%;
// }
td {
width: 50%;
}
// td {
// width: 50%;
// }
}
input,
textarea {
border: 1px solid $main-color;
border: 1px solid $theme-color-main;
&:focus {
border: 1px solid $main-color;
border: 1px solid $theme-color-main;
background-color: #f8f8f8;
box-shadow: 0 0 0 #fff!important;
@include transition;
......
@import 'values';
@import 'modules/settings';
.mod-tag-tree {
.mod-tag-tree-filter {
margin-bottom: 20px;
width: 400px!important;
&:focus {
border: 1px solid $main-color;
border: 1px solid $theme-color-main;
box-shadow: 0 0 0 #fff!important;
background-color: #f8f8f8;
@include transition;
......@@ -21,19 +21,19 @@
}
}
.stock-wrapper {
margin-top: 15px;
.odometer {
position: relative;
bottom: 2px;
}
h1 {
color: #fff;
small {
color: #f8f8f8;
}
}
.list-group {
box-shadow: 0 0 0 #fff;
}
}
// .stock-wrapper {
// margin-top: 15px;
// .odometer {
// position: relative;
// bottom: 2px;
// }
// h1 {
// color: #fff;
// small {
// color: #f8f8f8;
// }
// }
// .list-group {
// 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);
$main-color: #75b3c8;
$theme-color-main: #75b3c8;
.background-image {
width: 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
def redirect_unless_signed_in
return if user_signed_in?
flash[:alert] = 'You need Login!'
gflash alert: 'You need Login!'
session[:login_redirect_to] = request.url
redirect_to root_path
end
......
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- If you delete this meta tag, Half Life 3 will never be released. -->
<meta name="viewport" content="width=device-width" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Rendezvous</title>
<style type="text/css">
/* -------------------------------------
GLOBAL
------------------------------------- */
* {
margin:0;
padding:0;
}
* { font-family: "Helvetica Neue", "Helvetica", Helvetica, Arial, sans-serif; }
img {
max-width: 100%;
}
.collapse {
margin:0;
padding:0;
}
body {
-webkit-font-smoothing:antialiased;
-webkit-text-size-adjust:none;
width: 100%!important;
height: 100%;
}
/* -------------------------------------
ELEMENTS
------------------------------------- */
a { color: #2BA6CB;}
.btn {
text-decoration:none;
color: #FFF;
background-color: #666;
padding:10px 16px;
font-weight:bold;
margin-right:10px;
text-align:center;
cursor:pointer;
display: inline-block;
}
p.callout {
padding:15px;
background-color:#ECF8FF;
margin-bottom: 15px;
}
.callout a {
font-weight:bold;
color: #2BA6CB;
}
table.social {
/* padding:15px; */
background-color: #ebebeb;
}
.social .soc-btn {
padding: 3px 7px;
font-size:12px;
margin-bottom:10px;
text-decoration:none;
color: #FFF;font-weight:bold;
display:block;
text-align:center;
}
a.fb { background-color: #3B5998!important; }
a.tw { background-color: #1daced!important; }
a.gp { background-color: #DB4A39!important; }
a.ms { background-color: #000!important; }
.sidebar .soc-btn {
display:block;
width:100%;
}
/* -------------------------------------
HEADER
------------------------------------- */
table.head-wrap { width: 100%;}
.header.container table td.logo { padding: 15px; }
.header.container table td.label { padding: 15px; padding-left:0px;}
/* -------------------------------------
BODY
------------------------------------- */
table.body-wrap { width: 100%;}
/* -------------------------------------
FOOTER
------------------------------------- */
table.footer-wrap { width: 100%; clear:both!important;
}
.footer-wrap .container td.content p { border-top: 1px solid rgb(215,215,215); padding-top:15px;}
.footer-wrap .container td.content p {
font-size:10px;
font-weight: bold;
}
/* -------------------------------------
TYPOGRAPHY
------------------------------------- */
h1,h2,h3,h4,h5,h6 {
font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif; line-height: 1.1; margin-bottom:15px; color:#000;
}
h1 small, h2 small, h3 small, h4 small, h5 small, h6 small { font-size: 60%; color: #6f6f6f; line-height: 0; text-transform: none; }
h1 { font-weight:200; font-size: 44px;}
h2 { font-weight:200; font-size: 37px;}
h3 { font-weight:500; font-size: 27px;}
h4 { font-weight:500; font-size: 23px;}
h5 { font-weight:900; font-size: 17px;}
h6 { font-weight:900; font-size: 14px; text-transform: uppercase; color:#444;}
.collapse { margin:0!important;}
p, ul {
margin-bottom: 10px;
font-weight: normal;
font-size:14px;
line-height:1.6;
}
p.lead { font-size:17px; }
p.last { margin-bottom:0px;}
ul li {
margin-left:5px;
list-style-position: inside;
}
/* -------------------------------------
SIDEBAR
------------------------------------- */
ul.sidebar {
background:#ebebeb;
display:block;
list-style-type: none;
}
ul.sidebar li { display: block; margin:0;}
ul.sidebar li a {
text-decoration:none;
color: #666;
padding:10px 16px;
/* font-weight:bold; */
margin-right:10px;
/* text-align:center; */
cursor:pointer;
border-bottom: 1px solid #777777;
border-top: 1px solid #FFFFFF;
display:block;
margin:0;
}
ul.sidebar li a.last { border-bottom-width:0px;}
ul.sidebar li a h1,ul.sidebar li a h2,ul.sidebar li a h3,ul.sidebar li a h4,ul.sidebar li a h5,ul.sidebar li a h6,ul.sidebar li a p { margin-bottom:0!important;}
/* ---------------------------------------------------
RESPONSIVENESS
Nuke it from orbit. It's the only way to be sure.
------------------------------------------------------ */
/* Set a max-width, and make it display as block so it will automatically stretch to that width, but will also shrink down on a phone or something */
.container {
display:block!important;
max-width:600px!important;
margin:0 auto!important; /* makes it centered */
clear:both!important;
}
/* This should also be a block element, so that it will fill 100% of the .container */
.content {
padding:15px;
max-width:600px;
margin:0 auto;
display:block;
}
/* Let's make sure tables in the content area are 100% wide */
.content table { width: 100%; }
/* Odds and ends */
.column {
width: 300px;
float:left;
}
.column tr td { padding: 15px; }
.column-wrap {
padding:0!important;
margin:0 auto;
max-width:600px!important;
}
.column table { width:100%;}
.social .column {
width: 280px;
min-width: 279px;
float:left;
}
/* Be sure to place a .clear element after each set of columns, just to be safe */
.clear { display: block; clear: both; }
/* -------------------------------------------
PHONE
For clients that support media queries.
Nothing fancy.
-------------------------------------------- */
@media only screen and (max-width: 600px) {
a[class="btn"] { display:block!important; margin-bottom:10px!important; background-image:none!important; margin-right:0!important;}
div[class="column"] { width: auto!important; float:none!important;}
table.social div[class="column"] {
width:auto!important;
}
}
/* custom */
.github a {
color: #4183C4; }
.github a.absent {
color: #cc0000; }
.github a.anchor {
display: block;
padding-left: 30px;
margin-left: -30px;
cursor: pointer;
position: absolute;
top: 0;
left: 0;
bottom: 0; }
.github h1, .github h2, .github h3, .github h4, .github h5, .github h6 {
margin: 20px 0 10px;
padding: 0;
font-weight: bold;
-webkit-font-smoothing: antialiased;
cursor: text;
position: relative; }
.github h1:hover a.anchor, .github h2:hover a.anchor, .github h3:hover a.anchor, .github h4:hover a.anchor, .github h5:hover a.anchor, .github h6:hover a.anchor {
background: url("../../images/modules/styleguide/para.png") no-repeat 10px center;
text-decoration: none; }
.github h1 tt, .github h1 code {
font-size: inherit; }
.github h2 tt, .github h2 code {
font-size: inherit; }
.github h3 tt, .github h3 code {
font-size: inherit; }
.github h4 tt, .github h4 code {
font-size: inherit; }
.github h5 tt, .github h5 code {
font-size: inherit; }
.github h6 tt, .github h6 code {
font-size: inherit; }
.github h1 {
font-size: 28px;
color: black; }
.github h2 {
font-size: 24px;
border-bottom: 1px solid #cccccc;
color: black; }
.github h3 {
font-size: 18px; }
.github h4 {
font-size: 16px; }
.github h5 {
font-size: 14px; }
.github h6 {
color: #777777;
font-size: 14px; }
.github p, .github blockquote, .github ul, .github ol, .github dl, .github li, .github table, .github pre {
margin: 15px 0; }
.github hr {
background: transparent url("../../images/modules/pulls/dirty-shade.png") repeat-x 0 0;
border: 0 none;
color: #cccccc;
height: 4px;
padding: 0; }
.github body > h2:first-child {
margin-top: 0;
padding-top: 0; }
.github body > h1:first-child {
margin-top: 0;
padding-top: 0; }
.github body > h1:first-child + h2 {
margin-top: 0;
padding-top: 0; }
.github body > h3:first-child, .github body > h4:first-child, .github body > h5:first-child, .github body > h6:first-child {
margin-top: 0;
padding-top: 0; }
.github a:first-child h1, .github a:first-child h2, .github a:first-child h3, .github a:first-child h4, .github a:first-child h5, .github a:first-child h6 {
margin-top: 0;
padding-top: 0; }
.github h1 p, .github h2 p, .github h3 p, .github h4 p, .github h5 p, .github h6 p {
margin-top: 0; }
.github li p.first {
display: inline-block; }
.github ul, .github ol {
padding-left: 30px; }
.github ul :first-child, .github ol :first-child {
margin-top: 0; }
.github ul :last-child, .github ol :last-child {
margin-bottom: 0; }
.github dl {
padding: 0; }
.github dl dt {
font-size: 14px;
font-weight: bold;
font-style: italic;
padding: 0;
margin: 15px 0 5px; }
.github dl dt:first-child {
padding: 0; }
.github dl dt > :first-child {
margin-top: 0; }
.github dl dt > :last-child {
margin-bottom: 0; }
.github dl dd {
margin: 0 0 15px;
padding: 0 15px; }
.github dl dd > :first-child {
margin-top: 0; }
.github dl dd > :last-child {
margin-bottom: 0; }
.github blockquote {
border-left: 4px solid #dddddd;
padding: 0 15px;
color: #777777; }
.github blockquote > :first-child {
margin-top: 0; }
.github blockquote > :last-child {
margin-bottom: 0; }
.github table {
padding: 0; }
.github table tr {
border-top: 1px solid #cccccc;
background-color: white;
margin: 0;
padding: 0; }
.github table tr:nth-child(2n) {
background-color: #f8f8f8; }
.github table tr th {
font-weight: bold;
border: 1px solid #cccccc;
text-align: left;
margin: 0;
padding: 6px 13px; }
.github table tr td {
border: 1px solid #cccccc;
text-align: left;
margin: 0;
padding: 6px 13px; }
.github table tr th :first-child, .github table tr td :first-child {
margin-top: 0; }
.github table tr th :last-child, .github table tr td :last-child {
margin-bottom: 0; }
.github img {
max-width: 100%; }
.github span.frame {
display: block;
overflow: hidden; }
.github span.frame > span {
border: 1px solid #dddddd;
display: block;
float: left;
overflow: hidden;
margin: 13px 0 0;
padding: 7px;
width: auto; }
.github span.frame span img {
display: block;
float: left; }
.github span.frame span span {
clear: both;
color: #333333;
display: block;
padding: 5px 0 0; }
.github span.align-center {
display: block;
overflow: hidden;
clear: both; }
.github span.align-center > span {
display: block;
overflow: hidden;
margin: 13px auto 0;
text-align: center; }
.github span.align-center span img {
margin: 0 auto;
text-align: center; }
.github span.align-right {
display: block;
overflow: hidden;
clear: both; }
.github span.align-right > span {
display: block;
overflow: hidden;
margin: 13px 0 0;
text-align: right; }
.github span.align-right span img {
margin: 0;
text-align: right; }
.github span.float-left {
display: block;
margin-right: 13px;
overflow: hidden;
float: left; }
.github span.float-left span {
margin: 13px 0 0; }
.github span.float-right {
display: block;
margin-left: 13px;
overflow: hidden;
float: right; }
.github span.float-right > span {
display: block;
overflow: hidden;
margin: 13px auto 0;
text-align: right; }
.github code, .github tt {
margin: 0 2px;
padding: 0 5px;
white-space: nowrap;
border: 1px solid #eaeaea;
background-color: #f8f8f8;
border-radius: 3px; }
.github pre code {
margin: 0;
padding: 0;
white-space: pre;
border: none;
background: transparent; }
.github .highlight pre {
background-color: #f8f8f8;
border: 1px solid #cccccc;
font-size: 13px;
line-height: 19px;
overflow: auto;
padding: 6px 10px;
border-radius: 3px; }
.github pre {
background-color: #f8f8f8;
border: 1px solid #cccccc;
font-size: 13px;
line-height: 19px;
overflow: auto;
padding: 6px 10px;
border-radius: 3px; }
.github pre code, .github pre tt {
background-color: transparent;
border: none; }
</style>
</head>
<body bgcolor="#f0f0f0">
<!-- HEADER -->
<table class="head-wrap" bgcolor="#E4F3FF">
<tr>
<td></td>
<td class="header container" >
<div class="content">
<table>
<tr>
<td><h6 class="collapse">Rendezvous</h6> - <a href="__POST_URL__" target="_blank">__HTML_TITLE__</a></td>
</tr>
</table>
</div>
</td>
<td></td>
</tr>
</table><!-- /HEADER -->
<!-- BODY -->
<table class="body-wrap">
<tr>
<td></td>
<td class="container" bgcolor="#FFFFFF">
<div class="content">
<table>
<tr>
<td>
<div class="github">
__HTML_BODY__
</div>
<p class="callout">
コメントは<a href="__POST_URL__" target="_blank">こちら</a>から
</p><!-- /Callout Panel -->
</td>
</tr>
</table>
</div><!-- /content -->
</td>
<td></td>
</tr>
</table><!-- /BODY -->
<!-- FOOTER -->
<table class="footer-wrap">
<tr>
<td></td>
<td class="container">
<!-- content -->
<div class="content">
<table>
<tr>
<td align="center">
<p>
<a href="__RV_URL__">Rendezvous</a>
</p>
</td>
</tr>
</table>
</div><!-- /content -->
</td>
<td></td>
</tr>
</table><!-- /FOOTER -->
</body>
</html>
......@@ -36,14 +36,14 @@ module RV::Mailer
end
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
html_body = template
.sub('__POST_URL__', Settings.rendezvous.app_host + post.decorate.show_path)
.sub('__HTML_TITLE__', MarkdownRenderer.new(post.title).render)
.sub('__HTML_BODY__', MarkdownRenderer.new(post.body).render)
.sub('__RV_URL__', Settings.rendezvous.app_host + '/')
.gsub('__POST_URL__', Settings.rendezvous.app_host + post.decorate.show_path)
.gsub('__HTML_TITLE__', MarkdownRenderer.new(post.title).render)
.gsub('__HTML_BODY__', MarkdownRenderer.new(post.body).render)
.gsub('__RV_URL__', Settings.rendezvous.app_host + '/')
premailer = Premailer.new(html_body, with_html_string: true, adapter: :nokogiri)
premailer.to_inline_css
......
......@@ -8,6 +8,8 @@ class PostsController < ApplicationController
# GET /posts/1
# GET /posts/1.json
def show
set_meta_tags title: @post.title
current_user.visit_post!(@post)
@post.tags.each do |tag|
......@@ -18,6 +20,8 @@ class PostsController < ApplicationController
# GET /posts/new
def new
set_meta_tags title: '新しい投稿'
@post = Post.new(title: '新しい投稿')
render layout: 'edit'
end
......@@ -32,18 +36,23 @@ class PostsController < ApplicationController
@post = set_post
# 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
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
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
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
# GET /posts/1/edit
def edit
set_meta_tags title: @post.title
render layout: 'edit'
end
......@@ -55,7 +64,8 @@ class PostsController < ApplicationController
respond_to do |format|
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 }
else
format.html { render action: 'new' }
......@@ -71,7 +81,8 @@ class PostsController < ApplicationController
respond_to do |format|
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 }
else
format.html { render action: 'edit' }
......@@ -85,7 +96,8 @@ class PostsController < ApplicationController
def destroy
@post.destroy
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 }
end
end
......@@ -96,10 +108,12 @@ class PostsController < ApplicationController
@comment = @post.comments.build(comment_params.merge(author: current_user))
respond_to do |format|
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 }
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 }
end
end
......
......@@ -19,7 +19,8 @@ class TagsController < ApplicationController
respond_to do |format|
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 }
else
format.html { render action: 'new' }
......@@ -31,7 +32,8 @@ class TagsController < ApplicationController
def update
respond_to do |format|
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 }
else
format.html { render action: 'edit' }
......@@ -43,7 +45,8 @@ class TagsController < ApplicationController
def destroy
@tag.destroy
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 }
end
end
......@@ -57,7 +60,7 @@ class TagsController < ApplicationController
@tag.move_all_posts_to!(@merge_to_tag)
@tag.delete
flash[:notice] = "「#{@tag.name}」は「#{@merge_to_tag.name}」にmergeされました"
gflash success: "「#{@tag.name}」は「#{@merge_to_tag.name}」にmergeされました"
render json: { status: 'OK' }
end
......@@ -68,7 +71,7 @@ class TagsController < ApplicationController
@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' }
end
......
......@@ -4,9 +4,10 @@ class Users::OmniauthCallbacksController < Devise::OmniauthCallbacksController
def google_oauth2
email = request.env['omniauth.auth'].info['email']
# reject if email is not zigexn nor ventura.
if email !~ /@zigexn\.co\.jp$/ && email !~ /@zigexn\.vn$/
redirect_to root_path, flash: { alert: 'Your email address is not permitted.' }
# reject if email is not permited.
unless Settings.permited_login_domain.split(/,/).include?(email.split(/@/)[1])
gflash error: 'Your email address is not permitted.'
redirect_to root_path
return
end
......@@ -14,7 +15,8 @@ class Users::OmniauthCallbacksController < Devise::OmniauthCallbacksController
@user = User.find_for_google_oauth2(request.env['omniauth.auth'], current_user)
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
else
session['devise.google_data'] = request.env['omniauth.auth']
......
......@@ -7,7 +7,8 @@ class UsersController < ApplicationController
def update
respond_to do |format|
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 }
else
format.html { render action: 'edit' }
......
......@@ -46,4 +46,8 @@ class PostDecorator < Draper::Decorator
''
end
end
def thumbnail_url
return Regexp.last_match[1] if model.body =~ /!\[.+?\]\((.+?)\)/
end
end
class PostsDecorator < Draper::CollectionDecorator
def related_tags
tags = map(&:tags).flatten.uniq
tags = map(&:tags).flatten.uniq.take(10)
TagDecorator.decorate_collection(tags)
end
......
......@@ -26,6 +26,15 @@ class TagDecorator < Draper::Decorator
h.event_tag_path(name: model.name)
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で表示する
def tree_view_node
html = ''
......
......@@ -12,4 +12,9 @@
class Footprint < ActiveRecord::Base
belongs_to :user
belongs_to :post
######################################################################
# Named scope
######################################################################
scope :today, -> { where(arel_table[:created_at].gt 1.days.ago) }
end
......@@ -18,6 +18,9 @@ require 'date'
class Post < ActiveRecord::Base
include HipchatIntegration if Settings.respond_to?(:hipchat)
# for versioning
has_paper_trail
######################################################################
# Associations
######################################################################
......@@ -77,11 +80,28 @@ class Post < ActiveRecord::Base
where_list
end)
# 最新のPostを取得
scope :recent, (lambda do |limit = 10|
order(updated_at: :desc).limit(limit)
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
######################################################################
......
......@@ -12,15 +12,21 @@
#
class Tag < ActiveRecord::Base
has_many :post_tags
has_many :posts, through: :post_tags
# for tree structure
has_ancestry
# for versioning
has_paper_trail
######################################################################
# Associations
######################################################################
has_many :post_tags
has_many :posts, through: :post_tags
######################################################################
# Named scope
######################################################################
default_scope { order(updated_at: :desc) }
scope :posts_exist, lambda {
......@@ -30,13 +36,48 @@ class Tag < ActiveRecord::Base
.having('posts_count > 0')
}
scope :recently_created, (lambda do |limit = 10|
order(created_at: :desc).limit(limit)
end)
######################################################################
# Class method
######################################################################
class << self
# 最近投稿されたTagを取得
def recent(limit = 10)
Post.recent(20).map(&:tags).flatten.compact.uniq.take(limit)
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
######################################################################
# Instance method
######################################################################
def recent_posts(limit = 30)
posts.recent(limit)
end
......
......@@ -54,6 +54,10 @@ class User < ActiveRecord::Base
where('name LIKE ? OR nickname LIKE ?', "%#{query}%", "%#{query}%")
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
######################################################################
......@@ -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
end
user.update(
google_auth_token: access_token.credentials['token'],
google_refresh_token: access_token.credentials['refresh_token'],
google_token_expires_at: Time.at(access_token.credentials['expires_at'])
)
user.google_auth_token = access_token.credentials['token'] if access_token.credentials['token']
user.google_refresh_token = access_token.credentials['refresh_token'] if access_token.credentials['refresh_token']
user.google_token_expires_at = Time.at(access_token.credentials['expires_at']) if access_token.credentials['expires_at']
user.save!
user
end
......
/! view:flow/show
.row.flow-wrapper
.row
.col-xs-3
.numbers-wrapper
div
span.large = Post.today.count
span = "/ #{Post.count}"
label.numbers Today's Stocks
.col-xs-3
.numbers-wrapper
div
span.large = User.post_today.count
span = "/ #{User.count}"
label.numbers Today's Writers
.col-xs-3
.numbers-wrapper
.col-xs-4
label.numbers Stocks
p = Post.count
.col-xs-4
label.numbers Users
p = User.count
.col-xs-4
label.numbers Tags
p = Tag.count
.col-xs-8 role="navigation"
.panel
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
h1
= image_tag 'flow.png'
| Flow
small - 最近投稿された記事
h2.panel-title
i.fa.fa-rss
| &nbsp;Flow
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)
.col-xs-4
/ .panel.panel-default
/ .panel-heading
/ h2.panel-title この1週間で閲覧の多かった投稿(調整中)
/ .panel-body.list-group
/ - Post.limit(5).each do |_post|
/ = render partial: 'posts/small_item', locals: { post: _post }
.col-xs-12.col-md-4
.panel.panel-default
.panel-heading
h3.panel-title
i.fa.fa-history
| &nbsp;この1週間で閲覧の多かった投稿
.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
h2.panel-title 最近投稿されたタグ
h3.panel-title
i.fa.fa-tags
| &nbsp;最近投稿されたタグ
.panel-body.list-group
- Tag.recent(10).each_with_index do |tag, i|
a.list-group-item data-tag-id=tag.id href=search_path(q: "##{tag.name}")
= tag.name
span.badge.badge-transparent = tag.posts_count
span.badge = tag.posts_count
doctype html
= render partial: 'partials/rendezvous'
html lang="ja"
= render partial: 'partials/rendezvous'
head
title Rendezvous
= display_meta_tags site: 'Rendezvous', reverse: true
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-theme.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.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.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'
script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"
= render partial: 'partials/google_analytics'
= stylesheet_link_tag "application", media: "all"
= render_style
= csrf_meta_tags
body class="rails-#{params[:controller]}-#{params[:action]}"
body class="rails-#{params[:controller]}-#{params[:action]}"
= gflash
.body-padding
= render partial: 'partials/header_notifications'
- if params[:controller] != 'welcome'
= render partial: 'partials/app_header'
.container.container-main#yield
.container-fluid.container-main#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.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/fullcalendar/1.6.4/fullcalendar.min.js"
javascript:
......
doctype html
= render partial: 'partials/rendezvous'
html lang="ja"
/ = render partial: 'partials/rendezvous'
head
title Rendezvous
= display_meta_tags site: 'Rendezvous', reverse: true
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-theme.min.css" rel="stylesheet" /
......@@ -16,6 +16,7 @@ html lang="ja"
= render_style
= csrf_meta_tags
body class="rails-#{params[:controller]}-#{params[:action]}"
= gflash
.container-fluid.container-main#yield
= yield
......@@ -27,6 +28,5 @@ html lang="ja"
javascript:
window.RV = window.RV || {};
window.RV.AllTags = JSON.parse('#{raw Tag.all.pluck(:name).to_json}');
hr/
= javascript_include_tag "application"
= yield :footer_js
<!DOCTYPE html>
<html lang="ja">
<head>
<title>Rendezvous</title>
<%= display_meta_tags :site => 'Rendezvous', reverse: true %>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body class="rails-<%= params[:controller] %>-<%= params[:action] %>">
......
nav.navbar.navbar-fixed-top.navbar-original role="navigation"
.container
nav.navbar.navbar-default.navbar-fixed-top role="navigation"
.container-fluid
.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
.collapse.navbar-collapse
.collapse.navbar-collapse#bs-example-navbar-collapse-1
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] /
span.input-group-btn
button.btn data-disable-with="Searching..." type="submit"
= image_tag 'search.png', class: 'search'
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"
= image_tag "stock.png", class: 'nav-icon stock'
| Stock
li.flow class=('active' if current_page?(flow_path))
a href=flow_path title="Frow"
= image_tag "flow.png", class: 'nav-icon'
| Flow
li.template class=('active' if current_page?(templates_path))
i.fa.fa-stack-overflow
| &nbsp;Stock
li
a href=templates_path title="Templates"
= image_tag "template.png", class: 'nav-icon'
| Templates
i.fa.fa-copy
| &nbsp;Templates
ul.nav.navbar-nav.navbar-right
li
a#notifications data-container="body" data-toggle="popover" data-placement="bottom"
span.glyphicon.glyphicon-flag
| &nbsp;
- if current_user.notifications.unread.any?
span.badge = current_user.notifications.unread.recent.count
- unless params[:action] == 'new' && params[:controller] == 'posts'
li.new-post-btn
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
a.dropdown-toggle data-toggle="dropdown"
= current_user.name
| &nbsp;
span.badge = current_user.decorate.draft_count
b.caret
ul.dropdown-menu
......@@ -55,7 +60,7 @@ nav.navbar.navbar-fixed-top.navbar-original role="navigation"
a href=watching_path Watchings
li.divider
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"
- 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 @@
#error_explanation
h2
= pluralize(@post.errors.count, "error")
| prohibited this post from being saved:
| &nbsp;prohibited this post from being saved:
ul
- @post.errors.full_messages.each do |msg|
li= msg
......@@ -19,19 +19,16 @@
.field
.input-group
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
p.actions
= f.submit class: 'btn btn-lg js-disable-confirm-unload', id: 'save_button'
p.actions
p = f.submit class: 'btn btn-default js-disable-confirm-unload', id: 'save_button'
p
= f.check_box :is_draft
= f.label :is_draft, "&nbsp;下書き保存".html_safe
p.actions
= f.date_select :specified_date
p = f.date_select :specified_date
.row
.col-xs-6.editor-panel
.panel.panel-default
.panel-heading
......@@ -74,7 +71,7 @@
| 0%
.col-xs-6.preview-panel
.panel.preview-wrapper
.panel.panel-default.preview-wrapper
.panel-heading
span Preview
......@@ -112,7 +109,7 @@ input#fileupload data-url="/apis/file_receiver" multiple="" name="files[]" style
$.mod_form_resizer({
$editor: $('.mod-form-resizer-editor'),
$preview: $('.mod-form-resizer-preview'),
height_offset: 250
height_offset: 210
})
// Display upload dialog.
......
/ locals:
/ post {Post}
a.list-group-item.post-list.mod-hover-hidden data-post-id=post.id href=post_path(post)
.container-fluid
.row
.col-xs-9
h4.text-link #{post.title}
.col-xs-3
span.label.label-danger.label-date = post.display_specified_date if post.specified_date
small.pull-right ##{post.id}
.row
/ a.list-group-item.post-list.mod-hover-hidden data-post-id=post.id href=post_path(post)
.row
.col-xs-8
small.text-success.posted-name
| #{post.author.name} posted&nbsp;
abbr.js-time-ago data-time-ago-at=post.updated_at
|.&nbsp;&nbsp;
- post.tags.each do |tag|
span.label.label-tag #{tag.name}
h4
a href=post_path(post) = post.title
p.small
span.label.label-default.label-date = post.display_specified_date if post.specified_date
| &nbsp;
- post.tags.map(&:decorate).each do |tag|
a.label.label-default.label-tag href=tag.show_path = tag.structured_name
| &nbsp;
.col-xs-4
small.pull-right
p.small.text-success.posted-name
span
| #{post.author.name} posted&nbsp;
abbr.js-time-ago data-time-ago-at=post.updated_at
| &nbsp;&nbsp;
p
.small
span.glyphicon.glyphicon-time title="読了時間"
| &nbsp;#{post.read_time}&nbsp;&nbsp;
......@@ -29,7 +32,17 @@ a.list-group-item.post-list.mod-hover-hidden data-post-id=post.id href=post_path
span.glyphicon.glyphicon-eye-open title="閲覧者数"
| &nbsp;#{post.visited_user_count}&nbsp;&nbsp;
.row
.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
small.text-shadow
= truncate post.body, length: 240
p.small.text-shadow
= truncate post.body, length: 200
.row.post-show-wrapper
.col-xs-9
.panel
/! view:post/show
.row
.col-xs-12.col-md-8
.panel.panel-main
.panel-heading
h3.panel-title
a href=post_path(@post) = @post.title
h2.panel-title = @post.title
.panel-body.viewer.github.mod-image-style
= MarkdownRenderer.new(@post.body).render
.col-xs-3
.btn-group.post-edit-btn
a.btn href=edit_post_path(@post)
.col-xs-12.col-md-4
.margin-wrapper
.btn-group
a.btn.btn-default href=edit_post_path(@post)
| 編集&nbsp;
span.glyphicon.glyphicon-pencil
button.btn.btn-default.dropdown-toggle data-toggle="dropdown" type="button"
......@@ -32,23 +35,35 @@
.btn-group
- 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'
= 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
= 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 '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'
.well.detail-wrapper style="margin-top:20px"
.panel.panel-default
.panel-heading
h3.panel-title
i.fa.fa-info
| &nbsp; 情報
.panel-body
dl
dt 作成
dt 最終編集
dd
a href=(search_path(q: "@#{@post.author.nickname}"))
| @#{@post.author.name}
= @post.author.name
dt 作成者
dd (調整中)
dt 編集履歴
dd (調整中)
dt タグ
dd
- @post.tags.each do |tag|
- @post.tags.map(&:decorate).each do |tag|
span.label.label-tag
a href=tag.decorate.show_path
| #{tag.name}
a href=tag.show_path
| #{tag.structured_name}
| &nbsp;
dt 指定日
......@@ -71,30 +86,32 @@
dd
= @post.comments.count
.row
.col-md-12
.panel.comment-wrapper
.col-xs-12
.panel.panel-comment.panel-default
.panel-heading
h3.panel-title
= image_tag 'comment_w.png'
| Comments
i.fa.fa-comments
| &nbsp;Comments
.panel-body
ul.media-list
- @post.comments.each do |comment|
li.media
a.pull-left href="#"
img.media-object src=comment.author.decorate.image_url /
a.media-left href="#"
img.media-object src=comment.author.decorate.image_url height="25px" width="25px"
.media-body
h4.media-heading= comment.author.name
= MarkdownRenderer.new(comment.body).render
= form_tag(comment_post_path, method: :post, data: { 'form-id' => "comment_#{@post.id}" }) do
li.media
a.pull-left href="#"
img.media-object src=current_user.image_url /
a.media-left href="#"
img.media-object src=current_user.image_url height="25px" width="25px"
.media-body
h4.media-heading= current_user.name
= text_area :comment, :body, class: 'form-control', placeholder: 'コメントする...'
= submit_tag "Comment", class: 'btn comment-btn', data: { 'disable-with' => '...' }
= text_area :comment, :body, id: 'comments_anchor', class: 'form-control', placeholder: 'コメントする...'
= submit_tag "Comment", class: 'btn btn-comment', data: { 'disable-with' => '...' }
javascript:
$("form[data-form-id='comment_#{@post.id}']").on('ajax:success', function(event, data, xhr) {
......
/! view:search/show
.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
span "#{params[:q]}"
span.small - 検索結果
span.small #{@count}
ul.list-group.panel-body
- @posts.each do |post|
li.list-group-item
= 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)
.col-xs-4
.col-xs-12.col-md-4
.panel.panel-default
.panel-heading
h2.panel-title "#{params[:q]}"に関連するタグ
h3.panel-title
i.fa.fa-tags
| &nbsp;"#{params[:q]}"に関連する他のタグ
.panel-body.list-group
- @posts.related_tags.each do |_tag|
a.list-group-item href=search_path(q: "##{_tag.name}") = _tag.name
- @posts.related_tags.each do |tag|
a.list-group-item href=search_path(q: "##{tag.name}") = tag.name
.panel.panel-default
.panel-heading
h2.panel-title "#{params[:q]}"に関連するユーザー
h3.panel-title
i.fa.fa-users
| &nbsp;"#{params[:q]}"に貢献しているユーザー
.panel-body.list-group
- @posts.related_authors.each do |_author|
a.list-group-item href=search_path(q: "@#{_author.nickname}") = _author.name
- @posts.related_authors.each do |author|
a.list-group-item href=search_path(q: "@#{author.nickname}") = author.name
/! view:stock/show
.row
.col-md-12
.panel.stock-wrapper
.col-xs-12.col-md-8 role="navigation"
.panel.panel-main
.panel-heading
h1
| &nbsp;Stocks
small - 保存・蓄積された記事
.panel-body
#sidebar role="navigation"
#tab-tree.tab-pane
- cache('tag-tree', :expires_in => 1.hour) do
.list-group
h2.panel-title
i.fa.fa-stack-overflow
| &nbsp;Stock
span.small &nbsp;- 保存・蓄積された記事
.panel-body.list-group
#tab-tree
= 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 @@
.col-xs-4
span.pull-right.label.label-danger = post.display_specified_date if post.specified_date
.btn-group.mod-hover-hidden
a.btn.btn-info.mod-hover-hidden-item href=fork_post_path(post)
.row
.col-xs-12
.mod-hover-hidden
a.btn.btn-default href=fork_post_path(post)
| このテンプレートを利用する
a.btn.btn-default.mod-hover-hidden-item href=edit_post_path(post)
| このテンプレートを編集する
| &nbsp;
a.btn.btn-default href=edit_post_path(post)
| 編集する
/! view:templates/show
.row
h1
| Templates
small - テンプレートから作成
.panel.template-wrapper
.panel-heading
span.glyphicon.glyphicon-info-sign
| テンプレートの使い方
.row
.col-xs-12
.panel.panel-default
.panel-heading テンプレートの使い方
.panel-body
ul
li 「template」 というタグをつけた投稿はこのページに現れます
li コピーすることで同じフォーマットの文章が簡単に書けます
li 「このテンプレートを利用する」ことで同じフォーマットの文章が簡単に書けます
.list-group
.panel.panel-main
.panel-heading
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 }
- template_tag.posts.decorate.each do |post|
= render partial: 'post', locals: { post: post }
- else
| テンプレートが存在しません
......@@ -14,20 +14,20 @@
.form-group
= f.label :name, '名前', class: 'col-sm-2 control-label'
.col-sm-10
.col-sm-6
= f.text_field :name, class: 'form-control', readonly: true
.form-group
= f.label :email, 'メールアドレス', class: 'col-sm-2 control-label'
.col-sm-10
.col-sm-6
= f.text_field :email, class: 'form-control', readonly: true
.form-group
= f.label :nickname, 'ニックネーム', class: 'col-sm-2 control-label'
.col-sm-10
.col-sm-6
= f.text_field :nickname, class: 'form-control'
.form-group
.col-sm-offset-2.col-sm-10
.col-sm-offset-2.col-sm-6
button.btn.btn-success type="submit" 保存
h1 編集
= render 'form'
.row
.col-xs-12
.panel.panel-main
.panel-heading 編集
.panel-body
= render 'form'
/! view:flow/show
.row
h1
| Watchings
small - ウォッチ中の項目
.row
.col-xs-12
.panel.panel-main
.panel-heading
h3.panel-title
span.glyphicon.glyphicon-eye-open
| &nbsp;Watchings
span.small - ウォッチ中の項目
.col-xs-8 role="navigation"
.list-group
- @posts.each do |_post|
= render partial: 'posts/large_item', locals: { post: _post }
ul.list-group.panel-body
- @posts.each do |post|
li.list-group-item
= render partial: 'posts/large_item', locals: { post: post }
= paginate(@posts)
......@@ -5,4 +5,6 @@ Rails.application.config.assets.version = '1.0'
# Precompile additional assets.
# 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
provider :google_oauth2, Settings.google_api.client_id, Settings.google_api.secret,
name: 'google_oauth2',
scope: 'https://mail.google.com/, userinfo.email, userinfo.profile',
access_type: 'offline',
prompt: 'select_account consent',
image_aspect_ratio: 'square',
image_size: 50
access_type: 'online',
# prompt: 'select_account consent',
approval_prompt: 'auto'
# image_aspect_ratio: 'square',
# image_size: 50
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
......@@ -4,6 +4,8 @@ defaults: &defaults
# For amil body
app_host: <%= ENV['RV_RENDEZVOUS_APP_HOST'] %>
permited_login_domain: <%= ENV['RV_PERMITTED_LOGIN_DOMAIN'] %>
# For login
google_api:
client_id: <%= ENV['RV_GOOGLE_API_CLIENT_ID'] %>
......
......@@ -13,117 +13,117 @@
ActiveRecord::Schema.define(version: 20140719145016) do
create_table 'comments', force: true do |t|
t.integer 'author_id'
t.integer 'post_id'
t.text 'body'
t.datetime 'created_at'
t.datetime 'updated_at'
create_table "comments", force: true do |t|
t.integer "author_id"
t.integer "post_id"
t.text "body"
t.datetime "created_at"
t.datetime "updated_at"
end
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", ["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
create_table 'footprints', force: true do |t|
t.integer 'user_id', null: false
t.integer 'post_id', null: false
t.datetime 'created_at'
t.datetime 'updated_at'
create_table "footprints", force: true do |t|
t.integer "user_id", null: false
t.integer "post_id", null: false
t.datetime "created_at"
t.datetime "updated_at"
end
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
create_table 'notifications', force: true do |t|
t.integer 'user_id'
t.datetime 'read_at'
t.boolean 'is_read', default: false, null: false
t.string 'detail_path'
t.text 'body'
t.datetime 'created_at'
t.datetime 'updated_at'
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
create_table "notifications", force: true do |t|
t.integer "user_id"
t.datetime "read_at"
t.boolean "is_read", default: false, null: false
t.string "detail_path"
t.text "body"
t.datetime "created_at"
t.datetime "updated_at"
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|
t.integer 'post_id', null: false
t.integer 'tag_id', null: false
t.datetime 'created_at'
t.datetime 'updated_at'
create_table "post_tags", force: true do |t|
t.integer "post_id", null: false
t.integer "tag_id", null: false
t.datetime "created_at"
t.datetime "updated_at"
end
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
create_table 'posts', force: true do |t|
t.string 'title'
t.text 'body'
t.integer 'author_id'
t.datetime 'created_at'
t.datetime 'updated_at'
t.boolean 'is_draft', default: false
t.date 'specified_date'
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
create_table "posts", force: true do |t|
t.string "title"
t.text "body"
t.integer "author_id"
t.datetime "created_at"
t.datetime "updated_at"
t.boolean "is_draft", default: false
t.date "specified_date"
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|
t.string 'name'
t.datetime 'created_at'
t.datetime 'updated_at'
t.string 'ancestry'
t.text 'body'
t.integer 'posts_count', default: 0, null: false
create_table "tags", force: true do |t|
t.string "name"
t.datetime "created_at"
t.datetime "updated_at"
t.string "ancestry"
t.text "body"
t.integer "posts_count", default: 0, null: false
end
add_index 'tags', ['ancestry'], name: 'index_tags_on_ancestry', using: :btree
create_table 'users', force: true do |t|
t.string 'name'
t.string 'image_url'
t.datetime 'created_at'
t.datetime 'updated_at'
t.string 'email', default: '', null: false
t.string 'encrypted_password', default: '', null: false
t.string 'reset_password_token'
t.datetime 'reset_password_sent_at'
t.datetime 'remember_created_at'
t.integer 'sign_in_count', default: 0, null: false
t.datetime 'current_sign_in_at'
t.datetime 'last_sign_in_at'
t.string 'current_sign_in_ip'
t.string 'last_sign_in_ip'
t.string 'google_auth_token'
t.string 'google_refresh_token'
t.datetime 'google_token_expires_at'
t.string 'nickname', default: '', null: false
add_index "tags", ["ancestry"], name: "index_tags_on_ancestry", using: :btree
create_table "users", force: true do |t|
t.string "name"
t.string "image_url"
t.datetime "created_at"
t.datetime "updated_at"
t.string "email", default: "", null: false
t.string "encrypted_password", default: "", null: false
t.string "reset_password_token"
t.datetime "reset_password_sent_at"
t.datetime "remember_created_at"
t.integer "sign_in_count", default: 0, null: false
t.datetime "current_sign_in_at"
t.datetime "last_sign_in_at"
t.string "current_sign_in_ip"
t.string "last_sign_in_ip"
t.string "google_auth_token"
t.string "google_refresh_token"
t.datetime "google_token_expires_at"
t.string "nickname", default: "", null: false
end
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', ['reset_password_token'], name: 'index_users_on_reset_password_token', unique: true, using: :btree
create_table 'versions', force: true do |t|
t.string 'item_type', null: false
t.integer 'item_id', null: false
t.string 'event', null: false
t.string 'whodunnit'
t.text 'object'
t.datetime 'created_at'
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", ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true, using: :btree
create_table "versions", force: true do |t|
t.string "item_type", null: false
t.integer "item_id", null: false
t.string "event", null: false
t.string "whodunnit"
t.text "object"
t.datetime "created_at"
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|
t.integer 'watcher_id', null: false
t.string 'watchable_type', null: false
t.integer 'watchable_id', null: false
t.datetime 'created_at'
t.datetime 'updated_at'
create_table "watches", force: true do |t|
t.integer "watcher_id", null: false
t.string "watchable_type", null: false
t.integer "watchable_id", null: false
t.datetime "created_at"
t.datetime "updated_at"
end
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", ["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
end
......@@ -20,7 +20,7 @@ describe 'Request via js', js: true 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"))
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
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