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

Commit

Permalink
Merge pull request #141 from MyDry/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
MasatoshiOsugi authored Oct 26, 2018
2 parents 5f371af + 508e4ed commit 9a94fdf
Show file tree
Hide file tree
Showing 10 changed files with 101 additions and 58 deletions.
3 changes: 3 additions & 0 deletions app/assets/stylesheets/home.scss
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,9 @@ html {
.padding{
min-width: 750px;
}
.pad .header{
min-width: 800px;
}
}

.smart-phone{
Expand Down
19 changes: 18 additions & 1 deletion app/assets/stylesheets/mandalarts.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,28 @@
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/

.mandalart{
width: 1200px;
height: 1200px;
margin-left: 100px;
.row{
float: left;
width: 400px;
height: 400px;
}
}

input[type=core] {
width: 100px;
height: 100px;
margin: 2px;
border: 3px solid #999;
text-align: center;
word-wrap: break-word;
}

input[type=sub] {
width: 100px;
height: 100px;
margin: 2px;
}
}
4 changes: 4 additions & 0 deletions app/assets/stylesheets/users.scss
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,7 @@
text-transform: uppercase;
}
}
.login_pad{
margin: 50px auto;
width: 500px;
}
8 changes: 4 additions & 4 deletions app/helpers/mandalarts_helper.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module MandalartsHelper
def show_sub_elem(subNum)
content_tag(:div, id: subNum, class: 'col-xl-3', style: 'visibility: hidden;') do
default_attributes = {type: 'sub', class: 'col-xl-3'}
content_tag(:div, id: subNum, style: 'visibility: hidden;') do
default_attributes = {type: 'sub'}
core_attributes = default_attributes.merge({ style: 'visibility: hidden; border: 1px dotted #999;'})
(1..9).each do |n|
attributes = (n == 5) ? core_attributes : default_attributes
Expand All @@ -11,8 +11,8 @@ def show_sub_elem(subNum)
end

def show_core_elem
content_tag(:div, id: 'core', class: 'col-xl-3') do
get_attributes = lambda{|n| { id: "5-#{n}", type: 'core', class: 'col-xl-3'}}
content_tag(:div, id: 'core') do
get_attributes = lambda{|n| { id: "5-#{n}", type: 'core'}}
(1..9).each do |n|
attributes = get_attributes.call(n)
attributes.merge!(onchange: "animeTest1(#{n}, this.value)") unless n == 5
Expand Down
2 changes: 1 addition & 1 deletion app/views/layouts/_header.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<% if logged_in? %>
<div><%= link_to current_user.name, user_path(id: current_user) %></div>
<div><%= link_to 'ニーズ', topics_path %></div>
<!--<div><a href="/mandalarts/index">ツール</a></div>-->
<div><a href="/mandalarts/index">ツール</a></div>
<% if current_user.admin? %><div><%= link_to 'ユーザーリスト', users_path %></div><% end %>
<div><%= show_notice_link %></div>
<div><%= link_to 'アンケート', 'https://goo.gl/forms/QrNsbvBYoYa6WB7N2', style: "color: #ff9190;"%></div>
Expand Down
65 changes: 34 additions & 31 deletions app/views/mandalarts/index.html.erb
Original file line number Diff line number Diff line change
@@ -1,35 +1,38 @@
<h1>Mandalarts#index</h1>
<h1>Mandalarts</h1>
<hr>
<p>
<div class="row">
<!-- 1 -->
<%= show_sub_elem(1) %>

<div class="mandalart">
<p>
<div class="row">
<!-- 1 -->
<%= show_sub_elem(1) %>
<!-- 2 -->
<%= show_sub_elem(2) %>
<%= show_sub_elem(4) %>
<!-- 3 -->
<%= show_sub_elem(3) %>
</div>
</p>
<p>
<div class="row">
<!-- 4 -->
<%= show_sub_elem(4) %>
<!-- 5 -->
<%= show_core_elem %>
<!-- 6 -->
<%= show_sub_elem(6) %>
</div>
</p>
<p>
<div class="row">
<!-- 7 -->
<%= show_sub_elem(7) %>
<!-- 8 -->
<%= show_sub_elem(8) %>
<!-- 9 -->
<%= show_sub_elem(9) %>
</div>
</p>
<%= show_sub_elem(7) %>
</div>
</p>
<p>
<div class="row">
<!-- 4 -->
<%= show_sub_elem(2) %>
<!-- 5 -->
<%= show_core_elem %>
<!-- 6 -->
<%= show_sub_elem(8) %>
</div>
</p>
<p>
<div class="row">
<!-- 7 -->
<%= show_sub_elem(3) %>
<!-- 8 -->
<%= show_sub_elem(6) %>
<!-- 9 -->
<%= show_sub_elem(9) %>
</div>
</p>
</div>
<script>
var directions = [
[-1, -1], [0, -1], [1, -1],
Expand All @@ -43,8 +46,8 @@
coreStringForm.defaultValue = value;
anime({
targets: coreStringForm,
translateX: 253 * directions[coreNum-1][0],
translateY: 84 * directions[coreNum-1][1],
translateX: 261 * directions[coreNum-1][0],
translateY: 208 * directions[coreNum-1][1],
easing:'easeOutCubic'
});
subElems.style.visibility = "";
Expand Down
24 changes: 13 additions & 11 deletions app/views/users/login.html.erb
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
<div class="main">
<div class="container">
<div class="form-group col-xs-4">
<%= form_for(@user, url: login_path) do |f| %>
<!--
<%= f.label :email, 'メールアドレス' %><br>
<%= f.email_field :email, class: 'form-control', placeholder: 'メールアドレスを入力' %><br>
-->
<%= f.label :name, 'ユーザー名' %><br>
<%= f.text_field :name, class: 'form-control', placeholder: 'ユーザー名を入力' %><br>
<%= f.label :password, 'パスワード' %>
<%= f.password_field :password , class: 'form-control', placeholder: 'パスワードを入力'%><br>
<div class="login_pad">
<%= form_for(@user, url: login_path) do |f| %>
<!--
<%= f.label :email, 'メールアドレス' %><br>
<%= f.email_field :email, class: 'form-control', placeholder: 'メールアドレスを入力' %><br>
-->
<!--<%= f.label :name, 'ユーザー名' %><br>-->
<%= f.text_field :name, class: 'form-control', placeholder: 'ユーザー名を入力' %><br>
<!--<%= f.label :password, 'パスワード' %>-->
<%= f.password_field :password , class: 'form-control', placeholder: 'パスワードを入力'%><br>

<%= f.submit 'ログイン', class: 'btn btn-default', style: "background-color: #00BABD; color: white;" %>
<% end %>
<%= f.submit 'ログイン', class: 'btn btn-default', style: "background-color: #00BABD; color: white;" %>
<% end %>
</div>
</div>
</div>
</div>
12 changes: 7 additions & 5 deletions app/views/users/login_smart_phone.html.erb
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
<div class="main">
<div class="mobile">
<div align="center">
<%= form_for(@user, url: login_path) do |f| %>
<!--
<div class="login_pad">
<%= form_for(@user, url: login_path) do |f| %>
<!--
<%= f.label :email, 'メールアドレス' %><br>
<%= f.email_field :email, class: 'form-control', placeholder: 'メールアドレスを入力' %><br>
-->
<%= f.label :name, 'ユーザー名' %><br>
<!--<%= f.label :name, 'ユーザー名' %><br>-->
<%= f.text_field :name, class: 'form-control', placeholder: 'ユーザー名を入力', style:"font-size: 50px" %><br>
<%= f.label :password, 'パスワード' %>
<!--<%= f.label :password, 'パスワード' %>-->
<%= f.password_field :password , class: 'form-control', placeholder: 'パスワードを入力', style:"font-size: 50px" %><br>
<%= f.submit 'ログイン', class: 'btn btn-default btn-lg', style: "background-color: #00BABD; color: white; width: 500px; height: 80px; font-size: 40px;" %>
<% end %>
<% end %>
</div>
</div>
</div>
</div>
10 changes: 8 additions & 2 deletions app/views/users/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@
<% if @user.topics.empty? %>
<div style="text-align: center; font-size: 30px;">
<br>あなたは まだニーズを投稿していません<br><br>
<% if @user == current_user %>
<%= link_to 'ニーズを投稿してみる', topics_path, class: 'btn btn-primary btn-lg', style: 'background-color: #00BABD;' %>
<% end %>
</div>
<% else %>
<%= render partial: 'topics/simple', collection: @user.topics, as: 'topic', layout: 'topics/list_frame' %>
Expand All @@ -25,8 +27,10 @@
<p>
<% if @user.ideas.empty? %>
<div style="text-align: center; font-size: 30px;">
<br>あなたは まだアイデアを投稿していません<br><br>
<br>まだアイデアを投稿していません<br><br>
<% if @user == current_user %>
<%= link_to 'アイデアを投稿してみる', topics_path, class: 'btn btn-primary btn-lg', style: 'background-color: #00BABD;' %>
<% end %>
</div>
<% else %>
<%= render partial: 'ideas/simple', collection: @user.ideas, as: 'idea', locals: { tab_name: 'pub'}, layout: 'ideas/list_frame' %>
Expand All @@ -37,8 +41,10 @@
<p>
<% if @user.likes.empty? %>
<div style="text-align: center; font-size: 30px;">
<br>あなたは まだ いいね! をしていません<br><br>
<br>まだ いいね! をしていません<br><br>
<% if @user == current_user %>
<%= link_to 'アイデアに いいね! してみる', topics_path, class: 'btn btn-primary btn-lg', style: 'background-color: #00BABD;' %>
<% end %>
</div>
<% else %>
<% @user.likes.each do |like| %>
Expand Down
12 changes: 9 additions & 3 deletions app/views/users/show_smart_phone.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@
<p>
<% if @user.topics.empty? %>
<div style="text-align: center; font-size: 30px;">
<br>あなたは まだニーズを投稿していません<br><br>
<br>まだニーズを投稿していません<br><br>
<% if @user == current_user %>
<%= link_to 'ニーズを投稿してみる', topics_path, class: 'btn btn-primary btn-lg', style: 'background-color: #00BABD;' %>
<% end %>
</div>
<% else %>
<%= render partial: 'topics/simple', collection: @user.topics, as: 'topic', layout: 'topics/list_frame' %>
Expand All @@ -25,8 +27,10 @@
<p>
<% if @user.ideas.empty? %>
<div style="text-align: center; font-size: 30px;">
<br>あなたは まだアイデアを投稿していません<br><br>
<br>まだアイデアを投稿していません<br><br>
<% if @user == current_user %>
<%= link_to 'アイデアを投稿してみる', topics_path, class: 'btn btn-primary btn-lg', style: 'background-color: #00BABD;' %>
<% end %>
</div>
<% else %>
<%= render partial: 'ideas/simple', collection: @user.ideas, as: 'idea', locals: { tab_name: 'pub'}, layout: 'ideas/list_frame' %>
Expand All @@ -37,8 +41,10 @@
<p>
<% if @user.likes.empty? %>
<div style="text-align: center; font-size: 30px;">
<br>あなたは まだ いいね! をしていません<br><br>
<br>まだ いいね! をしていません<br><br>
<% if @user == current_user %>
<%= link_to 'アイデアに いいね! してみる', topics_path, class: 'btn btn-primary btn-lg', style: 'background-color: #00BABD;' %>
<% end %>
</div>
<% else %>
<% @user.likes.each do |like| %>
Expand Down

0 comments on commit 9a94fdf

Please sign in to comment.