Skip to content
This repository was archived by the owner on Mar 19, 2020. It is now read-only.

Commit cb1fddb

Browse files
author
Yuma Soga
committed
#35 Update front desgin.
1 parent aa11ff7 commit cb1fddb

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+1994
-862
lines changed

Gemfile

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,22 +27,30 @@ gem 'travis'
2727

2828
gem 'haml-rails'
2929

30-
gem "kramdown", "~> 1.1.0"
30+
# gem 'kramdown', '~> 1.1.0'
3131

32-
gem "font-awesome-rails"
32+
gem 'font-awesome-rails'
3333

3434
gem 'bcrypt', '3.1.11'
3535

3636
gem 'omniauth-slack'
3737

3838
gem 'bootsnap'
3939

40-
gem "pg"
40+
gem 'pg'
41+
42+
gem 'bootstrap', '~> 4.1.1'
43+
44+
gem 'simple_form'
45+
46+
gem 'redcarpet'
47+
48+
gem 'slack-notifier'
49+
50+
gem 'toastr-rails'
4151

4252
group :development, :test do
43-
# Use sqlite3 as the database for Active Record
4453
gem 'sqlite3'
45-
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
4654
gem 'byebug'
4755

4856
gem 'rspec-rails'
@@ -52,9 +60,9 @@ group :development, :test do
5260
end
5361

5462
group :test do
55-
gem "simplecov"
56-
gem "codeclimate-test-reporter", "~> 1.0.0"
57-
gem "timecop"
63+
gem 'simplecov'
64+
gem 'codeclimate-test-reporter', '~> 1.0.0'
65+
gem 'timecop'
5866
end
5967

6068
group :development do

Gemfile.lock

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,18 @@ GEM
4444
tzinfo (~> 1.1)
4545
addressable (2.4.0)
4646
arel (9.0.0)
47+
autoprefixer-rails (8.6.4)
48+
execjs
4749
backports (3.11.3)
4850
bcrypt (3.1.11)
4951
binding_of_caller (0.8.0)
5052
debug_inspector (>= 0.0.1)
5153
bootsnap (1.3.0)
5254
msgpack (~> 1.0)
55+
bootstrap (4.1.1)
56+
autoprefixer-rails (>= 6.0.3)
57+
popper_js (>= 1.12.9, < 2)
58+
sass (>= 3.5.2)
5359
builder (3.2.3)
5460
byebug (10.0.2)
5561
codeclimate-test-reporter (1.0.8)
@@ -125,7 +131,6 @@ GEM
125131
thor (>= 0.14, < 2.0)
126132
json (1.8.6)
127133
jwt (1.5.6)
128-
kramdown (1.1.0)
129134
launchy (2.4.3)
130135
addressable (~> 2.3)
131136
listen (3.1.5)
@@ -172,6 +177,7 @@ GEM
172177
omniauth-slack (2.3.0)
173178
omniauth-oauth2 (~> 1.3.1)
174179
pg (1.0.0)
180+
popper_js (1.12.9)
175181
pusher-client (0.6.2)
176182
json
177183
websocket (~> 1.0)
@@ -211,6 +217,7 @@ GEM
211217
rb-inotify (0.9.10)
212218
ffi (>= 0.5.0, < 2)
213219
rdoc (4.3.0)
220+
redcarpet (3.4.0)
214221
rest-client (2.0.2)
215222
http-cookie (>= 1.0.2, < 2.0)
216223
mime-types (>= 1.16, < 4.0)
@@ -250,11 +257,15 @@ GEM
250257
json (~> 1.7, >= 1.7.7)
251258
rdoc (~> 4.0)
252259
sexp_processor (4.11.0)
260+
simple_form (4.0.1)
261+
actionpack (>= 5.0)
262+
activemodel (>= 5.0)
253263
simplecov (0.13.0)
254264
docile (~> 1.1.0)
255265
json (>= 1.8, < 3)
256266
simplecov-html (~> 0.10.0)
257267
simplecov-html (0.10.2)
268+
slack-notifier (2.3.2)
258269
spring (2.0.2)
259270
activesupport (>= 4.2)
260271
sprockets (3.7.2)
@@ -270,6 +281,8 @@ GEM
270281
thread_safe (0.3.6)
271282
tilt (2.0.8)
272283
timecop (0.9.1)
284+
toastr-rails (1.0.3)
285+
railties (>= 3.1.0)
273286
travis (1.8.8)
274287
backports
275288
faraday (~> 0.9)
@@ -307,6 +320,7 @@ PLATFORMS
307320
DEPENDENCIES
308321
bcrypt (= 3.1.11)
309322
bootsnap
323+
bootstrap (~> 4.1.1)
310324
byebug
311325
codeclimate-test-reporter (~> 1.0.0)
312326
coffee-rails (~> 4.2.1)
@@ -316,20 +330,23 @@ DEPENDENCIES
316330
haml-rails
317331
jbuilder (~> 2.0)
318332
jquery-rails
319-
kramdown (~> 1.1.0)
320333
listen
321334
omniauth-slack
322335
pg
323336
rails (= 5.2.0)
324337
rails-controller-testing
338+
redcarpet
325339
rest-client
326340
rspec-rails
327341
sass-rails (~> 5.0.5)
328342
sdoc (~> 0.4.0)
343+
simple_form
329344
simplecov
345+
slack-notifier
330346
spring
331347
sqlite3
332348
timecop
349+
toastr-rails
333350
travis
334351
turbolinks
335352
uglifier (>= 1.3.0)
Loading
Loading

app/assets/javascripts/application.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@
1010
// Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
1111
// about supported directives.
1212
//
13-
//= require jquery
14-
//= require jquery_ujs
13+
//= require rails-ujs
1514
//= require turbolinks
16-
//= require_tree .
15+
//= require jquery3
16+
//= require toastr
17+
//= require popper
18+
//= require bootstrap
19+
//= require_tree .

app/assets/javascripts/creative.js

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
(function($) {
2+
"use strict"; // Start of use strict
3+
4+
// Smooth scrolling using jQuery easing
5+
$('a.js-scroll-trigger[href*="#"]:not([href="#"])').click(function() {
6+
if (location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '') && location.hostname == this.hostname) {
7+
var target = $(this.hash);
8+
target = target.length ? target : $('[name=' + this.hash.slice(1) + ']');
9+
if (target.length) {
10+
$('html, body').animate({
11+
scrollTop: (target.offset().top - 57)
12+
}, 1000, "easeInOutExpo");
13+
return false;
14+
}
15+
}
16+
});
17+
18+
// Closes responsive menu when a scroll trigger link is clicked
19+
$('.js-scroll-trigger').click(function() {
20+
$('.navbar-collapse').collapse('hide');
21+
});
22+
23+
// Activate scrollspy to add active class to navbar items on scroll
24+
$('body').scrollspy({
25+
target: '#mainNav',
26+
offset: 57
27+
});
28+
29+
// Collapse Navbar
30+
var navbarCollapse = function() {
31+
if ($("#mainNav").offset().top > 100) {
32+
$("#mainNav").addClass("navbar-shrink");
33+
} else {
34+
$("#mainNav").removeClass("navbar-shrink");
35+
}
36+
};
37+
// Collapse now if page is not at top
38+
navbarCollapse();
39+
// Collapse the navbar when page is scrolled
40+
$(window).scroll(navbarCollapse);
41+
42+
// Scroll reveal calls
43+
window.sr = ScrollReveal();
44+
sr.reveal('.sr-icons', {
45+
duration: 600,
46+
scale: 0.3,
47+
distance: '0px'
48+
}, 200);
49+
sr.reveal('.sr-button', {
50+
duration: 1000,
51+
delay: 200
52+
});
53+
sr.reveal('.sr-contact', {
54+
duration: 600,
55+
scale: 0.3,
56+
distance: '0px'
57+
}, 300);
58+
59+
// Magnific popup calls
60+
$('.popup-gallery').magnificPopup({
61+
delegate: 'a',
62+
type: 'image',
63+
tLoading: 'Loading image #%curr%...',
64+
mainClass: 'mfp-img-mobile',
65+
gallery: {
66+
enabled: true,
67+
navigateByImgClick: true,
68+
preload: [0, 1]
69+
},
70+
image: {
71+
tError: '<a href="%url%">The image #%curr%</a> could not be loaded.'
72+
}
73+
});
74+
75+
})(jQuery); // End of use strict
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
$(document).on 'turbolinks:load', ->
2+
if $.trim($('#info > .notice').html())!=''
3+
toastr.success $('#info > .notice').text()
4+
console.log 'Show Notice:' + $('#info > .notice').text()
5+
else if $.trim($('#info > .alert').html())!=''
6+
toastr.error $('#info > .alert').text()
7+
console.log 'Show Alert:' + $('#info > .alert').text()
8+
else
9+
console.log 'No Words'
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
$ ->
2+
$('[data-toggle="tooltip"]').tooltip()

app/assets/stylesheets/application.css renamed to app/assets/stylesheets/application.scss

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,22 @@
1010
* defined in the other CSS/SCSS files in this directory. It is generally better to create a new
1111
* file per style scope.
1212
*
13-
*= require_tree .
14-
*= require_self
15-
*= require font-awesome
1613
*/
17-
body {
18-
background-color: floralwhite;
19-
}
14+
15+
16+
@import "font-awesome";
17+
18+
@import "toastr";
19+
20+
@import "bootstrap-creative/creative";
21+
@import "pages";
22+
@import "posts";
23+
@import "bootstrap";
24+
25+
//
26+
// body {
27+
// background-color: floralwhite;
28+
// }
2029
::-webkit-scrollbar{
2130
width: 12px;
2231
}
@@ -29,14 +38,3 @@ body {
2938
border-radius: 1rem;
3039
box-shadow: none;
3140
}
32-
.clearfix:after {
33-
visibility: hidden;
34-
display: block;
35-
content: " ";
36-
clear: both;
37-
height: 0;
38-
}
39-
40-
.mdl-layout__drawer-button {
41-
color: black;
42-
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#about {
2+
p {
3+
font-size: 1rem;
4+
}
5+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
.shake_text_line {
2+
display: inline-block;
3+
animation: shake_line .3s infinite;
4+
}
5+
6+
@keyframes shake_line {
7+
0% {transform: translate(0px, 0px) rotateZ(0deg)}
8+
25% {transform: translate(2px, 2px) rotateZ(1deg)}
9+
50% {transform: translate(0px, 2px) rotateZ(0deg)}
10+
75% {transform: translate(2px, 0px) rotateZ(-1deg)}
11+
100% {transform: translate(0px, 0px) rotateZ(0deg)}
12+
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
2+
// Bootstrap overrides for this template
3+
.text-primary {
4+
color: $primary !important;
5+
}
6+
7+
.btn {
8+
font-weight: 700 !important;
9+
text-transform: uppercase !important;
10+
border: none !important;
11+
border-radius: 300px !important;
12+
@include sans-serif-font;
13+
}
14+
15+
.btn-xl {
16+
padding: 1rem 2rem !important;
17+
}
18+
19+
.btn-primary {
20+
background-color: $primary !important;
21+
border-color: $primary !important;
22+
&:hover,
23+
&:focus,
24+
&:active {
25+
color: $white;
26+
background-color: darken($primary, 5%) !important;
27+
}
28+
&:active,
29+
&:focus {
30+
box-shadow: 0 0 0 0.2rem rgba(240, 95, 64,.5) !important;
31+
}
32+
}

0 commit comments

Comments
 (0)