Skip to content

Commit

Permalink
Add login and log-out functionallity.
Browse files Browse the repository at this point in the history
Adding a landing page that is a login page to the Hotails website.
In order for a user to be able to access the site,
he must be a user and enter his details on this page.
After sucsessful log-in the application recognize the user with all of his details.
  • Loading branch information
tamirmatok authored and OfirMatasas committed Apr 21, 2022
1 parent f06b8e6 commit f12de6e
Show file tree
Hide file tree
Showing 4 changed files with 36,749 additions and 1 deletion.
1 change: 0 additions & 1 deletion Hotails/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
from main import views
from django.contrib.auth import views as auth_views


urlpatterns = [

path('admin/', admin.site.urls),
Expand Down
8 changes: 8 additions & 0 deletions main/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,3 +87,11 @@ def test_unlogged_user_access_to_homepage(self, client):
response = client.get("/homepage/")
assert response.status_code == 302
assert response['Location'] == '/login/?next=/homepage/'


class TestAboutView:
def test_redirected_to_about_section(self, client):
response = client.get('/about')
assert response.status_code == 301
response = client.get(response.url)
assert response.status_code == 200
341 changes: 341 additions & 0 deletions static/css/Home.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,341 @@
.u-section-1 {
background-image: none;
min-height: 1232px;
}

.u-section-1 .u-layout-wrap-1 {
margin-top: 0;
margin-bottom: 0;
}

.u-section-1 .u-layout-cell-1 {
min-height: 683px;
background-image: none;
}

.u-section-1 .u-container-layout-1 {
padding: 30px;
}

.u-section-1 .u-text-1 {
font-weight: 700;
line-height: 1.4;
font-size: 3.75rem;
margin: 97px 0 0;
}

.u-section-1 .u-text-2 {
font-size: 6rem;
text-transform: uppercase;
font-weight: 100;
margin: -17px 0 0;
}

.u-section-1 .u-text-3 {
font-size: 1.125rem;
letter-spacing: 0px;
margin: 20px 0 0;
}

.u-section-1 .u-icon-1 {
height: 64px;
width: 64px;
margin: 30px auto 0;
}

.u-section-1 .u-image-1 {
min-height: 683px;
background-image: url("../images/Hotails-logo.jpg");
background-position: 50% 50%;
}

.u-section-1 .u-container-layout-2 {
padding: 30px 0 0 30px;
}

.u-section-1 .u-layout-wrap-2 {
margin-top: 60px;
margin-bottom: 60px;
}

.u-section-1 .u-layout-cell-3 {
min-height: 400px;
background-image: none;
}

.u-section-1 .u-container-layout-3 {
padding: 30px;
}

.u-section-1 .u-image-2 {
width: 280px;
height: 369px;
margin: 0 auto;
}

.u-section-1 .u-layout-cell-4 {
min-height: 429px;
background-image: none;
}

.u-section-1 .u-container-layout-4 {
padding: 30px 0;
}

.u-section-1 .u-text-4 {
margin: 0 0 0 30px;
}

.u-section-1 .u-text-5 {
margin: 20px 30px 0;
}

@media (max-width: 1199px) {
.u-section-1 {
min-height: 493px;
}

.u-section-1 .u-layout-cell-1 {
min-height: 563px;
}

.u-section-1 .u-text-1 {
font-size: 3rem;
}

.u-section-1 .u-text-2 {
font-size: 8.125rem;
}

.u-section-1 .u-text-3 {
width: auto;
margin-left: 31px;
margin-right: 31px;
}

.u-section-1 .u-image-1 {
min-height: 563px;
}

.u-section-1 .u-layout-wrap-2 {
position: relative;
}

.u-section-1 .u-layout-cell-3 {
min-height: 330px;
}

.u-section-1 .u-layout-cell-4 {
min-height: 354px;
}

.u-section-1 .u-text-4 {
margin-left: 0;
}

.u-section-1 .u-text-5 {
margin-left: 0;
margin-right: 0;
}
}

@media (max-width: 991px) {
.u-section-1 {
min-height: 284px;
}

.u-section-1 .u-layout-cell-1 {
min-height: 100px;
}

.u-section-1 .u-container-layout-1 {
padding-left: 35px;
padding-right: 35px;
}

.u-section-1 .u-text-1 {
font-size: 1.5rem;
}

.u-section-1 .u-text-2 {
font-size: 6rem;
width: auto;
margin-top: 0;
margin-left: auto;
margin-right: auto;
}

.u-section-1 .u-text-3 {
margin-top: 3px;
margin-left: 0;
margin-right: 0;
}

.u-section-1 .u-image-1 {
min-height: 431px;
}

.u-section-1 .u-layout-cell-3 {
min-height: 253px;
}

.u-section-1 .u-layout-cell-4 {
min-height: 100px;
}
}

@media (max-width: 767px) {
.u-section-1 {
min-height: 1107px;
}

.u-section-1 .u-container-layout-1 {
padding: 50px 50px 50px 30px;
}

.u-section-1 .u-text-1 {
font-size: 3rem;
}

.u-section-1 .u-text-2 {
font-size: 7.5rem;
}

.u-section-1 .u-image-1 {
min-height: 647px;
}

.u-section-1 .u-container-layout-2 {
padding-left: 10px;
}

.u-section-1 .u-layout-cell-3 {
min-height: 380px;
}

.u-section-1 .u-container-layout-3 {
padding-left: 10px;
padding-right: 10px;
}
}

@media (max-width: 575px) {
.u-section-1 {
min-height: 585px;
}

.u-section-1 .u-container-layout-1 {
padding-top: 30px;
padding-bottom: 30px;
}

.u-section-1 .u-text-2 {
font-size: 6rem;
}

.u-section-1 .u-image-1 {
min-height: 407px;
}

.u-section-1 .u-layout-cell-3 {
min-height: 239px;
}
} .u-section-2 {
min-height: 655px;
}

.u-section-2 .u-layout-wrap-1 {
margin-top: 0;
margin-bottom: 0;
}

.u-section-2 .u-layout-cell-1 {
min-height: 655px;
}

.u-section-2 .u-container-layout-1 {
padding: 30px 0;
}

.u-section-2 .u-text-1 {
margin: 0 -1px 0 34px;
}

.u-section-2 .u-text-2 {
margin: 20px -1px 0 34px;
}

.u-section-2 .u-image-1 {
min-height: 655px;
background-image: url("../images/Dog-Head-Wall.jpg");
background-position: 50% 50%;
}

.u-section-2 .u-container-layout-2 {
padding: 30px 60px;
}

@media (max-width: 1199px) {
.u-section-2 {
min-height: 318px;
}

.u-section-2 .u-layout-cell-1 {
min-height: 540px;
}

.u-section-2 .u-text-1 {
margin-right: 0;
margin-left: 0;
}

.u-section-2 .u-text-2 {
margin-right: 0;
margin-left: 0;
}

.u-section-2 .u-image-1 {
min-height: 540px;
}
}

@media (max-width: 991px) {
.u-section-2 {
min-height: 66px;
}

.u-section-2 .u-layout-cell-1 {
min-height: 100px;
}

.u-section-2 .u-image-1 {
min-height: 414px;
}

.u-section-2 .u-container-layout-2 {
padding-left: 30px;
padding-right: 30px;
}
}

@media (max-width: 767px) {
.u-section-2 .u-container-layout-1 {
padding-left: 50px;
padding-right: 50px;
}

.u-section-2 .u-image-1 {
min-height: 621px;
}

.u-section-2 .u-container-layout-2 {
padding-left: 10px;
padding-right: 10px;
}
}

@media (max-width: 575px) {
.u-section-2 .u-image-1 {
min-height: 391px;
}
}
Loading

0 comments on commit f12de6e

Please sign in to comment.