Skip to content

Commit f5256aa

Browse files
authored
Merge pull request #49 from helpfulengineering/front-end-homepage
Front end homepage
2 parents f168343 + 6444947 commit f5256aa

File tree

6 files changed

+967
-88
lines changed

6 files changed

+967
-88
lines changed

packages/front-end/components/AppHeader.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
>
5454
<NuxtLink to="/contact">Contact</NuxtLink>
5555
</li>
56-
<li
56+
<!-- <li
5757
class="nav-link text-white uppercase [item.current ? 'bg-gray-900 text-white' : 'text-gray-300 hover:bg-gray-700 hover:text-white', 'block rounded-md px-3 py-2 text-base font-medium']"
5858
>
5959
<NuxtLink to="/login">Sign IN</NuxtLink>
@@ -62,7 +62,7 @@
6262
class="btn-register text-white uppercase [item.current ? 'bg-gray-900 text-white' : 'text-gray-300', 'block rounded-md px-3 py-2 text-base font-medium']"
6363
>
6464
<NuxtLink to="/register">Register</NuxtLink>
65-
</li>
65+
</li> -->
6666
</div>
6767
</ul>
6868
</Disclosure>

packages/front-end/components/RelatedItems.vue

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<div class="related-product-wrap">
55
<NuxtLink
66
:to="`/products/${related_product.id}`"
7-
class="center m-6"
7+
class="related-okh center mt-6"
88
v-for="related_product in related_products"
99
:key="related_product.id"
1010
:product="related_product"
@@ -66,9 +66,14 @@ const related_products = [
6666
margin-bottom: 40px;
6767
6868
.name {
69+
color: #2A3952;
6970
font-size: 16px;
7071
}
7172
73+
.related-okh {
74+
margin: 20px 5px;
75+
}
76+
7277
.title {
7378
color: #2a3952;
7479
font-size: 24px;

packages/front-end/pages/login.vue

Lines changed: 85 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,91 @@
11
<template>
2-
<section>
3-
<h1 class="login text-2xl font-bold tracking-tight text-red-900">Sign In</h1>
4-
</section>
5-
</template>
2+
<section class="login">
3+
<div class="container form">
4+
<h1 class="title text-2xl font-bold tracking-tight">Sign In</h1>
5+
<div class=" mb-3">
6+
<label for="uname" class="pr-2 font-semibold">Username :</label>
7+
<input
8+
v-model="user.username"
9+
type="text"
10+
name="uname"
11+
id="uname"
12+
class="input block w-full rounded-md border-0 py-1.5 pl-7 pr-20 text-gray-900 ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm/6"
13+
placeholder="Enter Username"
14+
required
15+
/>
16+
</div>
617

18+
<div class=" mb-3">
19+
<label for="psw" class="pr-2 font-semibold">Password :</label>
20+
<input
21+
v-model="user.password"
22+
type="password"
23+
class="input block w-full rounded-md border-0 py-1.5 pl-7 pr-20 text-gray-900 ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm/6"
24+
placeholder="Enter Password"
25+
name="psw"
26+
required
27+
/>
28+
</div>
729

30+
<div class="link">Forgot password?</div>
831

32+
<button
33+
@click.prevent="login"
34+
class="btn-login block rounded-md px-5 py-2 my-4 text-base font-medium"
35+
>
36+
Login
37+
</button>
938

10-
<style>
11-
.login {
12-
margin: 150px;
39+
<div class="link">Don't have an account? <NuxtLink to="/register">Create an account</NuxtLink></div>
40+
</div>
41+
</section>
42+
</template>
43+
44+
<script lang="ts" setup>
45+
const user = ref({
46+
username: "",
47+
password: "",
48+
});
49+
50+
const login = async () => {
51+
// TODO send user Data to the login endpoint and redirect if successful
52+
};
53+
</script>
54+
55+
<style>
56+
.login {
57+
margin: 150px;
58+
place-self: center;
59+
60+
.btn-login {
61+
background-color: #2a3952;
62+
border-radius: 6px;
63+
color: white;
64+
font-size: 14px;
65+
font-weight: 700;
66+
width: 100%;
67+
}
68+
69+
.container {
70+
background-color: white;
71+
border-radius: 6px;
72+
padding: 30px 20px;
73+
width: 450px;
74+
75+
label {
76+
width: 120px;
77+
}
78+
79+
.link {
80+
cursor: pointer;
81+
font-size: 14px;
82+
}
83+
}
84+
85+
.title {
86+
color: #2a3952;
87+
margin-bottom: 20px;
88+
text-transform: uppercase;
1389
}
14-
</style>
90+
}
91+
</style>

0 commit comments

Comments
 (0)