Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add some preliminary styling and themestr css #148

Merged
merged 6 commits into from
Nov 5, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions app/assets/stylesheets/application.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

@import "bootstrap";
@import "font-awesome";
@import "theme";

// .solar-nav {float: right}

Expand Down Expand Up @@ -83,3 +84,16 @@ ul {
.icon {
margin: 5px;
}

.card {
margin-bottom: 20px;
}

.card img {
width: 100%;
padding: 0px;
}

.card-body {
padding: 15px;
}
7 changes: 7 additions & 0 deletions app/assets/stylesheets/theme.scss

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion app/views/shared/_login_with_google_button.html.erb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div class="w3-panel">
<script src="https://apis.google.com/js/platform.js" async defer></script>
<%= link_to "Login with Google", "/auth/google_oauth2", class: "w3-btn w3-blue-grey w3-block" %>
<%= link_to "Login with Google", "/auth/google_oauth2", class: "btn btn-primary" %>
</div>

<div class="w3-panel w3-pale-blue w3-block w3-center">
Expand Down
26 changes: 14 additions & 12 deletions app/views/shared/_users_gardens_index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,28 @@
<h5>You have no gardens</h5>
<% else %>
<% @gardens.each do |garden| %>
<section class='garden' id='garden-<%= garden.id %>'>
<h3><%= link_to garden.name, garden_path(garden.id) %></h3>
<section class='garden card' style="width: 25rem;" id='garden-<%= garden.id %>'>
<div class='garden-image'>
<a href="<%=garden_path(garden.id)%>">
<img alt="Image-<%= garden.id %>" src="/assets/default-garden-5bbbceb5c8def07b7a99e836154844af647a4598ec1250edaf878c68467caad9.png">

</a>
</div>
<ul>
<li>Description: <%= garden.description %></li>
<li>Latitude: <%= garden.latitude %></li>
<li>Longitude: <%= garden.longitude %></li>
<li>Private? <%= garden.is_private %></li>
</ul>
<%= render :partial => "shared/edit_delete_icons", locals: {
garden: garden } %>

<div class="card-body"></div>
<h3 class="card-title"><%= link_to garden.name, garden_path(garden.id) %></h3>
<ul>
<li class="card-text">Description: <%= garden.description %></li>
<li class="card-text">Latitude: <%= garden.latitude %></li>
<li class="card-text">Longitude: <%= garden.longitude %></li>
<li class="card-text">Private? <%= garden.is_private %></li>
</ul>
<%= render :partial => "shared/edit_delete_icons", locals: {
garden: garden } %>
</div>
</section>
<% end %>
<% end %>

<%= button_to 'Add New Garden', new_garden_path, method: :get %>
<%= button_to 'Add New Garden', new_garden_path, method: :get, :class => "btn btn-primary" %>
</article>
</center>
21 changes: 6 additions & 15 deletions app/views/welcome/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
We want to live in balance with the diversity of our environment. It all starts with healthy soil, and that's what we will help you learn how to cultivate. It starts with one person.<br><br>

That person, is you.
<% if current_user.nil? %>
<%= render 'shared/login_with_google_button' %>
<% end %>
</p>
</div>

Expand All @@ -26,26 +29,12 @@
</div>
<% end %>

<!-- Clickable buttons -->
<div class="w3-container w3-content w3-center">
<div class="w3-row w3-padding-32" >

<!-- Visit the Learn More page button -->
<div class="w3-panel">
<% if current_user.nil? %>
<%= link_to "Be The Change. Learn More", "/learn_more", class: "w3-btn w3-light-green w3-block" %>
<% end %>
</div>

<!-- Visit the Privacy Policy page button -->
<div class="w3-panel">
<%= link_to "Visit our Privacy Policy Page", "/privacy", class: "w3-btn w3-light-green w3-block" %>
<%= link_to "Be The Change. Learn More", "/learn_more", class: "btn btn-info" %>
</div>

<!-- Login with Google button -->
<% if current_user.nil? %>
<%= render 'shared/login_with_google_button' %>
<% end %>
</div>
</div>
</div>
Expand All @@ -67,3 +56,5 @@ function carousel() {
setTimeout(carousel, 6000);
}
</script>

<%= link_to "Visit our Privacy Policy Page", "/privacy", class: "w3-btn w3-light-green w3-block" %>
12 changes: 0 additions & 12 deletions spec/features/welcome/index_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -99,17 +99,5 @@

expect(page).to_not have_content("Login with Google")
end
it "expects to not see Be The Change. Learn More if logged in" do
@user = User.new({id: 2,
attributes: {
email: '[email protected]' },
relationships: {
gardens: {
data: [ {id: '3', type: 'garden'}, {id: '4', type: 'garden'}] }}})
allow_any_instance_of(ApplicationController).to receive(:current_user).and_return(@user)
visit root_path

expect(page).to_not have_content("Be The Change. Learn More")
end
end
end

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading