Skip to content

Commit

Permalink
Merge pull request #40 from IliaZolas/ilia-styling-forms-booking
Browse files Browse the repository at this point in the history
applied styling to log in, signup, my bookings, booking engine
  • Loading branch information
Jonas-H-D authored Nov 27, 2020
2 parents 910e4d1 + 2f05416 commit e5ab4fb
Show file tree
Hide file tree
Showing 9 changed files with 187 additions and 37 deletions.
2 changes: 1 addition & 1 deletion app/assets/stylesheets/components/_login_form.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.form-login {
background: white;
padding: 10px 20px;
margin-top: 100px;
margin-top: 120px;
margin-bottom: 50px;
border-radius: 3px;
box-shadow: 1px 1px 2px rgba(0,0,0,0.1);
Expand Down
23 changes: 23 additions & 0 deletions app/assets/stylesheets/pages/_booking.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
.container-booking {
background-image: url(https://images.unsplash.com/photo-1604513843888-824303218a45?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=2850&q=80);
padding-top: 200px;
padding-bottom: 150px;
background-size: cover;
background-position: center;
}

.card-booking {
font-size: 40px;
padding: 80px;
background-color: rgba(255,255,255,0.9);
width: 80%;
margin: auto;
border-radius: 5px;
h1 {
font-size: 40px;
}
// h2 {
// font-size: 32px;
// }

}
2 changes: 2 additions & 0 deletions app/assets/stylesheets/pages/_index.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Import page-specific CSS files here.
@import "home";
@import "signform";
@import "booking";
@import "mybookings";
36 changes: 36 additions & 0 deletions app/assets/stylesheets/pages/_mybookings.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
.container-mybookings {
padding-top: 100px;
background-color: lightgrey;
// height: 90vh;
padding-left: 40px;
padding-right:40px;
padding-bottom: 20px;
}

.card-mybookings {
display: grid;
grid-template-columns: 1fr 1fr 1fr;
grid-gap: 30px;
}

.card-mybooking {
background-color: white;
padding: 25px;
border-radius: 5px;
box-shadow: 0 0 15px rgba(0,0,0,0.2);
}

.total-price {
background-color: $orange;
padding-top: 10px;
padding-bottom: 5px;
text-align: center;
color: white;
border-radius: 5px;
}

.header-mybookings {
font-size: 40px;
padding-top:20px;
padding-bottom:40px;
}
89 changes: 82 additions & 7 deletions app/assets/stylesheets/pages/_signform.scss
Original file line number Diff line number Diff line change
@@ -1,20 +1,95 @@
.container {
max-width: 100%;
margin-right: 0;
margin-left:0;
padding-right: 0;
padding-left:0;
}

.sign-container {
display: flex;
margin-bottom: 70px;
margin-left: 30px;
// margin-bottom: 70px;
// margin-left: 30px;
}

.recording-image {
display: inline-block;
vertical-align: middle;
margin-top: 75px;
margin-left: 60px;
display: flex;
justify-content: center;
align-items: center;
// vertical-align: middle;
// margin-top: 75px;
// margin-left: 60px;
width: 100%;
height: 100vh;
background-image: url(https://images.unsplash.com/photo-1605036482688-14e03c9425e1?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1500&q=80);
background-size: cover;
background-position: center;
}

.recording-image-signup {
display: flex;
justify-content: center;
align-items: center;
// vertical-align: middle;
// margin-top: 75px;
// margin-left: 60px;
width: 100%;
height: 100vh;
background-image: url(https://images.unsplash.com/photo-1604513843888-824303218a45?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=2850&q=80);
background-size: cover;
background-position: center;
}

.text-overlay-reg h3 {
color: white;
font-size: 66px;
width: 50%;
font-weight: bold;
text-align: left;
padding-left: 15%;
text-shadow: 0 0 25px rgba(0,0,0,0.8);

}

.mx-auto-signup {
margin-top: 25px;
}

.form-inputs {
font-size: 14px;
font-size: 16px;
}

.sign-form {
display: flex;
}

.form-signup-page {
width: 85%;
padding: 50px;
h2 {
font-size: 50px;
font-weight: bold;
text-align: center;
margin-bottom: 30px;
}
a {
font-size: 20px;
color: black;
}

}

// .signup-header h2 {
// font-size: 50px;
// }

.btn-primary {
font-size: 32px;
margin-top: 26px;
background-color: $orange;
border:0;
&:hover {
background-color: darken($orange,15%);
transition: 0.5s;
}
}
31 changes: 19 additions & 12 deletions app/views/bookings/booking_manager.html.erb
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
<h1>my bookings</h1>

<div class="list-bookings">
<ul>
<% @bookings.each do |booking| %>
<h2> <li>Studio : <%= booking.studio.title %></li></h2>
<h3><li>Check-in : <%= booking.checkin %></li></h3>
<h3><li>Check-out : <%= booking.checkout %></li></h3>
<h3><li>Studio Address : <%= booking.studio.address %></li></h3>
<h3><li>Daily Price : <%= booking.studio.price %>Chf</li></h3>
<h2><li>Total Price : <%= booking.total_price %>Chf</li></h2>
<% end %>
</ul>
<div class="container-mybookings">
<h1 class="header-mybookings">My Bookings</h1>
<div class="list-bookings">
<div class="card-mybookings">
<% @bookings.each do |booking| %>
<div class="card-mybooking">
<p><strong>Studio:</strong> <%= booking.studio.title %></p>
<p><strong>Check-in:</strong> <%= booking.checkin %></p>
<p><strong>Check-out:</strong> <%= booking.checkout %></p>
<p><strong>Studio Address:</strong> <%= booking.studio.address %></p>
<p><strong>Daily Price:</strong> <%= booking.studio.price %>Chf</p>
<div class="total-price">
<h2><strong>Total Price: <%= booking.total_price %>Chf</strong></h2>
</div>
</div>
<% end %>
</div>
</div>
</div>

19 changes: 12 additions & 7 deletions app/views/bookings/new.html.erb
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
<h1>new booking</h1>
<div class="container-booking">

<h2> <%= "Please enter your dates for #{@studio.title}" %></h2>
<div class="card-booking">
<h1>New booking</h1>

<%= simple_form_for [@studio, @booking] do |f| %>
<%= f.input :checkin %>
<%= f.input :checkout %>
<%= f.submit "BOOK", class: "btn btn-primary" %>
<% end %>
<h2> <%= "Please enter your dates for #{@studio.title}" %></h2>

<%= simple_form_for [@studio, @booking] do |f| %>
<%= f.input :checkin %>
<%= f.input :checkout %>
<%= f.submit "BOOK", class: "btn btn-primary" %>
<% end %>
</div>
</div>
11 changes: 6 additions & 5 deletions app/views/devise/registrations/new.html.erb
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<div class="container">
<div class="sign-container">
<div class="sign-form col-5 justify-content-center">
<div class="form-login">
<h2>Sign up</h2>
<div class="sign-form col-6 justify-content-center">
<div class="form-login form-signup-page">
<h2 class="signup-header">Sign up</h2>
<%= simple_form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f| %>
<%= f.error_notification %>
<div class="form-inputs">
Expand Down Expand Up @@ -36,8 +36,9 @@
<%= render "devise/shared/links" %>
</div>
</div>
<div class="recording-image align-middle">
<img class="mx-auto-signup" style="width: 710px;" src="https://images.unsplash.com/photo-1605036482688-14e03c9425e1?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1500&q=80" alt="Card image cap">
<div class="recording-image col-6 align-middle">
<div class="text-overlay-reg">
<h3>What are you waiting for?</h3>
</div>
</div>
</div>
11 changes: 6 additions & 5 deletions app/views/devise/sessions/new.html.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div class="container">
<div class="sign-container">
<div class="sign-form col-5 justify-content-center">
<div class="form-login">
<div class="sign-form col-6 justify-content-center">
<div class="form-login form-signup-page">
<h2>Log in</h2>

<%= simple_form_for(resource, as: resource_name, url: session_path(resource_name)) do |f| %>
Expand All @@ -26,8 +26,9 @@
<%= render "devise/shared/links" %>
</div>
</div>
<div class="recording-image align-middle">
<img class="mx-auto" style="width: 500px;" src="https://images.unsplash.com/photo-1604513843888-824303218a45?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=2850&q=80" alt="Card image cap">
<div class="recording-image-signup col-6 align-middle">
<div class="text-overlay-reg">
<h3>Just a couple steps till you can start recording</h3>
</div>
</div>
</div>
</div>

0 comments on commit e5ab4fb

Please sign in to comment.