Skip to content

Commit a1e3791

Browse files
committed
created a responsive UI
1 parent 901fa9d commit a1e3791

File tree

2 files changed

+81
-52
lines changed

2 files changed

+81
-52
lines changed

app/static/css/main.css

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,12 @@
2424
.font-bold{
2525
font-weight: 400;
2626
}
27+
28+
.features{
29+
min-height: 500px;
30+
}
31+
.description:hover{
32+
background-color: whitesmoke;
33+
transform: scale(1.1);
34+
transition: transform 0.6s;
35+
}

app/templates/dashboard.html

Lines changed: 72 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,93 +1,109 @@
11
{% extends "base.html" %}
22

33
{% block content %}
4-
<nav class="navbar navbar-expand-lg navbar-light sticky-sm-top p-4 bg-white ">
4+
<nav class="navbar navbar-expand-md navbar-light sticky-top p-4 bg-white ">
55
<a class="navbar-brand font-black display-1" href="#">Swift Team</a>
6-
<button class="navbar-toggler border-0 shadow-none" type="button" data-bs-toggle="collapse"
7-
data-bs-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
6+
<button class="navbar-toggler border-0 shadow-none" type="button" data-bs-toggle="offcanvas"
7+
data-bs-target="#mobile-nav" aria-controls="mobile-nav" aria-expanded="false" aria-label="Toggle navigation">
88
<span class="navbar-toggler-icon"></span>
99
</button>
10-
<div class="collapse navbar-collapse" id="navbarNav">
11-
<ul class="navbar-nav ms-auto pe-4">
10+
<ul class="navbar-nav ms-auto d-none d-md-flex pe-4">
11+
<li class="nav-item active">
12+
<a class="nav-link" href="#">About </a>
13+
</li>
14+
<li class="nav-item">
15+
<a class="nav-link" href="{{url_for('auth.signin')}}">Signin</a>
16+
</li>
17+
<li class="nav-item">
18+
<a class="nav-link" href="{{url_for('auth.signup')}}">Signup</a>
19+
</li>
20+
21+
</ul>
22+
<!-- Mobile nav -->
23+
<div class="offcanvas offcanvas-end m-0 navbar-collapse" id="mobile-nav">
24+
<div class="offcanvas-header w-100">
25+
<button type="button" class="btn-close text-reset shadow-none float-start" data-bs-dismiss="offcanvas" aria-label="Close"></button>
26+
</div>
27+
<ul class="navbar-nav pt-3 text-center">
1228
<li class="nav-item active">
13-
<a class="nav-link" href="#">About </a>
29+
<a class="nav-link" data-bs-dismiss="offcanvas" href="#">About </a>
1430
</li>
1531
<li class="nav-item">
16-
<a class="nav-link" href="{{url_for('auth.signin')}}">Signin</a>
32+
<a class="nav-link" data-bs-dismiss="offcanvas" href="{{url_for('auth.signin')}}">Signin</a>
1733
</li>
1834
<li class="nav-item">
19-
<a class="nav-link" href="{{url_for('auth.signup')}}">Signup</a>
35+
<a class="nav-link" data-bs-dismiss="offcanvas" href="{{url_for('auth.signup')}}">Signup</a>
2036
</li>
2137

2238
</ul>
2339
</div>
2440
</nav>
25-
<div class="container ">
41+
<div class="container overflow-hidden">
2642
{% with messages = get_flashed_messages(with_categories=true) %}
27-
{% if messages %}
28-
{% for message in messages%}
29-
<div class="p-2 col-4 offset-4 bg-{{message[0]}} bg-opacity-25 text-{{message[0]}}">
30-
{{ message[1] }}
31-
</div>
32-
{% endfor %}
33-
{% endif %}
34-
{% endwith %}
35-
<div class="container d-flex p-5 align-items-center">
36-
<div class="p-4">
43+
{% if messages %}
44+
{% for message in messages%}
45+
<div class="p-2 col-4 offset-4 bg-opacity-25 text-{{message[0]}}">
46+
{{ message[1] }}
47+
</div>
48+
{% endfor %}
49+
{% endif %}
50+
{% endwith %}
51+
<div class="container d-md-flex p-5 align-items-center">
52+
<div class="p-4 col-md-6">
3753
<p class="h1 font-black">Let's scale your business</p>
3854
<p class="text-dark text-muted h5">Hire professionals who will help your business make 10X your
3955
previous income.
4056
With over 5years experience in Marketing & Business strategy, we are your best client.
4157
</p>
4258
<button class="btn btn-primary px-5 py-2 ">Hire Us</button>
4359
</div>
44-
<div class="p-4 ">
45-
<img src="https://react-mui-landing-page.appseed-srv1.com/static/media/myteam.25705d76cc71ec380149.jpg"
60+
<div class="p-md-4 col-md-6 ">
61+
<img class="img-fluid" src="https://pixabay.com/get/ga8e522f66149ed5affad205d739544389eb7c8983b6e2782c308b330113d6a3aac7943762e3cf869618e15de19dd53f4bf994501d5ea93444291cc6c291bc32d47d7d041c3e0f9010667af1c38ee7b8b_1920.jpg"
4662
height="400" alt="">
4763
</div>
4864
</div>
4965

50-
<div class="container d-flex p-5 align-items-center">
51-
<div class="p-4 text-center bg-light m-1 col-4 h-100 rounded">
52-
<span class="material-icons h1 font-black p-5">
66+
<div class="container features d-md-flex p-5 align-items-center">
67+
<div class="p-4 description flex-fill shadow text-center m-2 col-md-4 h-100 rounded">
68+
<span class="material-icons h1 text-primary font-black p-5">
5369
engineering
5470
</span>
5571
<p class="h6 text-muted p-4">Through team work, we collaborate and deliver quality projects of high standards</p>
5672
</div>
57-
<div class="p-4 text-center bg-light m-1 col-4 h-100 rounded">
58-
<span class="material-icons h1 font-black p-5">
73+
<div class="p-4 description flex-fill shadow text-center m-2 col-md-4 h-100 rounded">
74+
<span class="material-icons h1 text-primary font-black p-5">
5975
all_inclusive
6076
</span>
6177
<p class="h6 text-muted p-4">Solving world problems through various web applications using efficient programs and
6278
tools</p>
6379
</div>
64-
<div class="p-4 text-center bg-light m-1 col-4 h-100 rounded">
65-
<span class="material-icons h1 font-black p-5">
80+
<div class="p-4 description flex-fill shadow text-center m-2 col-md-4 h-100 rounded">
81+
<span class="material-icons h1 text-primary font-black p-5">
6682
paid
6783
</span>
6884
<p class="h6 text-muted p-4">Flexible payment plan is applicable to all our services</p>
6985
</div>
7086
</div>
7187

72-
<div class="container d-flex p-5 align-items-center w-100">
73-
<div class="p-5 ">
74-
<img src="https://react-mui-landing-page.appseed-srv1.com/static/media/bestTeams.5ee3d8171c70441d1cc0.jpg"
88+
<div class="container d-md-flex p-5 align-items-center w-100">
89+
<div class="p-md-5 ">
90+
<img class="img-fluid" src="https://pixabay.com/get/gad6fe45237c9120ba3d1b58c775e891775af4bb7912877c78db41a15ad5e7415fb88c69452d55b082ea75ac1602251a6cef8b753db2afae097484f4f5739e7fb77ad7743cdcfa8d1dddeabf5129e4acb_1920.jpg"
7591
height="400" alt="">
7692
</div>
7793
<div class="p-4">
7894
<p class="h1 font-black">We build, We revive</p>
79-
<p class="text-dark text-muted h5">Your business needs to be in safe hands at all times. We ensure you
95+
<p class=" text-muted h5">Your business needs to be in safe hands at all times. We ensure you
8096
never run out of customers and not run at loss.
8197
We are trusted by over 500+ companies to deliver quality marketing campaigns using Digital marketing & Offline
8298
marketing channels.
8399
</p>
84-
<button class="btn btn-primary px-5 py-2 ">Contact Us</button>
100+
<a href="#contactUs" class="btn btn-primary px-5 py-2 ">Contact Us</a>
85101
</div>
86102
</div>
87103

88-
<div class="container d-flex p-5 align-items-center">
89-
<div class="p-4 shadow m-1 col-4 h-100 rounded">
90-
<p class="h6 text-muted p-4">
104+
<div class="container d-md-flex p-md-5 align-items-center">
105+
<div class="p-md-5 shadow m-1 flex-fill col-md-4 col-sm-12 h-100 rounded">
106+
<p class="h6 text-muted p-3">
91107
<span class="material-icons">
92108
format_quote
93109
</span>
@@ -97,8 +113,8 @@
97113
format_quote
98114
</span>
99115
</p>
100-
<div class="d-flex">
101-
<img height="50" class="align-self-center rounded-circle me-3"
116+
<div class="d-flex p-2">
117+
<img height="50" class="align-self-center rounded-circle me-3"
102118
src="https://sweta-myteam-website-fm.netlify.app/static/media/avatar-kady.78fc482c.jpg"
103119
alt="Generic placeholder image">
104120
<div>
@@ -107,8 +123,8 @@ <h6 class="mt-0"> Karl Brighton</h6>
107123
</div>
108124
</div>
109125
</div>
110-
<div class="p-4 shadow m-1 col-4 h-100 rounded">
111-
<p class="h6 text-muted p-4">
126+
<div class="p-md-5 flex-fill shadow m-1 col-md-4 col-sm-12 h-100 rounded">
127+
<p class="h6 text-muted p-3">
112128
<span class="material-icons">
113129
format_quote
114130
</span>
@@ -118,8 +134,8 @@ <h6 class="mt-0"> Karl Brighton</h6>
118134
format_quote
119135
</span>
120136
</p>
121-
<div class="d-flex">
122-
<img height="50" class="align-self-center rounded-circle me-3"
137+
<div class="d-flex p-2">
138+
<img height="50" class="align-self-center rounded-circle me-3"
123139
src="https://sweta-myteam-website-fm.netlify.app/static/media/avatar-aiysha.e119a0c1.jpg"
124140
alt="Generic placeholder image">
125141
<div>
@@ -128,8 +144,8 @@ <h6 class="mt-0">Krishna Bells</h6>
128144
</div>
129145
</div>
130146
</div>
131-
<div class="p-4 shadow m-1 col-4 h-100 rounded">
132-
<p class="h6 text-muted p-4"><span class="material-icons">
147+
<div class="p-md-5 flex-fill shadow m-1 col-md-4 col-sm-12 h-100 rounded">
148+
<p class="h6 text-muted p-3"><span class="material-icons">
133149
format_quote
134150
</span>
135151
Amazing. Our team helped us build an app that delivered a new experience for hiring
@@ -138,8 +154,8 @@ <h6 class="mt-0">Krishna Bells</h6>
138154
format_quote
139155
</span>
140156
</p>
141-
<div class="d-flex">
142-
<img height="50" class="align-self-center rounded-circle me-3"
157+
<div class="d-flex p-2">
158+
<img height="50" class="align-self-center rounded-circle me-3"
143159
src="https://sweta-myteam-website-fm.netlify.app/static/media/avatar-arthur.098c2e26.jpg"
144160
alt="Generic placeholder image">
145161
<div>
@@ -150,10 +166,11 @@ <h6 class="mt-0">Ben Spiff</h6>
150166
</div>
151167
</div>
152168

153-
<div class="container d-flex p-5 align-items-center justify-content-center w-100">
154-
155-
<form class="col-6" hx-post="{{url_for('main.dashboard')}}" method="post" novalidate>
156-
<p class="text-center font-black h2">Contact Us</p>
169+
<div class="container d-flex flex-sm-column p-md-5 mt-3 align-items-center justify-content-center w-100">
170+
171+
<form class="col-md-6 col-10" id="contactUs" hx-post="{{url_for('main.dashboard')}}" hx-target=".content" hx-swap="innerHTML" method="post"
172+
novalidate>
173+
<p class="text-center font-black p-3 h2">Contact Us</p>
157174
{{form.csrf_token}}
158175
<div class="form-input p-1">
159176
{{form.name.label}}
@@ -194,25 +211,28 @@ <h6 class="mt-0">Ben Spiff</h6>
194211

195212
<div class="p-2 col-md-12 text-center">
196213
<button class="btn py-2 px-5 rounded btn-primary h1" type="submit">Submit</button>
214+
197215
</div>
198216

199217
</form>
200218
</div>
201219

202220
</div>
203-
<footer>
221+
<footer class="bg-primary text-light p-3">
204222
<div class="container p-4">
205223
<h6 class="text-center">&copy;2022</h6>
206224
</div>
207225
</footer>
226+
208227
<script>
209228
window.addEventListener('scroll', (e) => {
210229
const nav = document.querySelector('.navbar');
211230
if (window.pageYOffset > 0) {
212-
nav.classList.add("shadow");
231+
nav.classList.add("shadow");
213232
} else {
214233
nav.classList.remove("shadow");
215234
}
216235
});
236+
217237
</script>
218238
{% endblock %}

0 commit comments

Comments
 (0)