Skip to content

Commit

Permalink
fixed toggle and select stylings
Browse files Browse the repository at this point in the history
  • Loading branch information
bmarieay committed Mar 1, 2022
1 parent 1809ecd commit 5ef09cf
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions views/campgrounds/index.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
<li class="page-item next-btn align-self-center"><a class="page-link page-next" href="">Next</a></li>
</ul>
</nav>
<% } else {%>
<h1>Showing campgrounds at <%= result.filter %> </h1>
<% } else if(result.filter && result.results.length) {%>
<h1 class="pb-3">Showing campgrounds at <%= result.filter %> </h1>
<% } %>

<form action="/campgrounds">
<form action="/campgrounds" class="pb-4">
<select class="form-select theme-target" name="q" aria-label="Default select example" onchange="this.form.submit()">
<option selected>Select a state</option>
<option value="AL">Alabama</option>
Expand Down Expand Up @@ -75,7 +75,7 @@
</form>

<div class="gutter">
<a href="/campgrounds/new" class="accent">Add Campground</a>
<a href="/campgrounds/new" class="accent">Add a Campground</a>
</div>
<% if(result.results.length) {%>
<!-- show each campground -->
Expand Down Expand Up @@ -108,7 +108,7 @@
</div>
<% } %>
<% } else {%>
<h1 class="pt-4">No result found in "<%= result.query %>" </h1>
<h1 class="pt-4">Sorry, no campgrounds to show in <%= result.query %></h1>
<% } %>
<script>
const mapToken = '<%- process.env.MAPBOX_TOKEN %>';
Expand Down
2 changes: 1 addition & 1 deletion views/campgrounds/show.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
<li class="list-group-item theme-target">$<%= campground.price %>/night</li>
</ul>

<% if(currentUser && campground.author.equals(currentUser._id)){ %>
<% if(currentUser && campground.author && campground.author.equals(currentUser._id)){ %>
<div class="card-body">
<a href="/campgrounds/<%= campground._id%>/edit" class="btn btn-info card-link">Edit</a>
<form class="d-inline card-link" action="/campgrounds/<%= campground._id%>?_method=DELETE" method="POST" >
Expand Down
2 changes: 1 addition & 1 deletion views/layouts/boilerplate.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<%- include('../partials/navbar') %>
<main class="container my-5">
<!-- <button id="theme" type="button" class="btn btn-dark pb-0" aria-label="Toggle dark or light mode">Dark Mode <img class="ms-1 pb-1" src="/imgs/moon (1).svg" alt=""></button> -->
<div class="form-check form-switch pb-4" id="theme">
<div class="form-check form-switch mb-4" id="theme">
<input class="form-check-input me-2" type="checkbox" role="switch" id="flexSwitchCheckChecked">
<label id="theme-label" class="form-check-label pt-1" for="flexSwitchCheckChecked">Dark Mode</label>
</div>
Expand Down

0 comments on commit 5ef09cf

Please sign in to comment.