x
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<main class="centered-layout">
<form class="card flex flex-col gap" action="/lookbook/home/index" accept-charset="UTF-8" method="post"><input type="hidden" name="authenticity_token" value="DPjT3jIrE9dfThCGC_sYMH1isu5WzOLB3FliNGDdsC0ZVSaXqjaYEk31b9IkJbiBSmNM7wNdVr20-lSAaEs7yg" autocomplete="off" />
<div class="flex flex-col gap-half">
<h3 class="text-2xl font-semibold leading-none">Login</h3>
<p class="text-sm text-subtle">Enter your email below to login to your account.</p>
</div>
<div class="flex flex-col gap mb-2">
<div class="flex flex-col gap-half">
<label class="text-sm font-medium leading-none" for="email">Email</label>
<input placeholder="m@example.com" class="input" type="email" name="email" id="email" />
</div>
<div class="flex flex-col gap-half">
<label class="text-sm font-medium leading-none" for="password">Password</label>
<input class="input" type="password" name="password" id="password" />
</div>
</div>
<div class="flex items-center">
<input type="submit" name="commit" value="Sign in" class="btn btn--primary i-full" data-disable-with="Sign in" />
</div>
</form>
</main>
1
2
3
<main class="centered-layout">
<%= render "authentication" %>
</main>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
.sidebar-layout {
display: grid;
grid-template-areas: "header header" "sidebar main";
grid-template-columns: var(--sidebar-width, 0) 1fr;
grid-template-rows: auto 1fr;
block-size: 100dvh;
@media (width >= 48rem) {
--sidebar-border-width: var(--border);
--sidebar-padding: var(--size-2);
--sidebar-width: 220px;
}
@media (width >= 64rem) {
--sidebar-border-width: var(--border);
--sidebar-padding: var(--size-4);
--sidebar-width: 280px;
}
}
.header-layout {
display: grid;
grid-template-areas: "header" "main";
grid-template-rows: auto 1fr;
block-size: 100dvh;
}
.centered-layout {
display: grid;
place-items: center;
block-size: 100dvh;
}
.container {
inline-size: 100%;
margin-inline: auto;
max-inline-size: var(--container-width, 64rem);
}
#header {
align-items: center;
border-block-end-width: var(--border);
block-size: var(--size-16);
display: flex;
gap: var(--size-4);
grid-area: header;
padding-inline: var(--size-4);
@media (width >= 64rem) {
padding-inline: var(--size-6);
}
}
#sidebar {
border-inline-end-width: var(--sidebar-border-width, 0);
display: flex;
flex-direction: column;
grid-area: sidebar;
gap: var(--size-2);
overflow-x: hidden;
padding: var(--sidebar-padding, 0);
}
#main {
display: flex;
flex-direction: column;
gap: var(--size-4);
grid-area: main;
overflow: auto;
padding: var(--size-4);
@media (width >= 64rem) {
gap: var(--size-6); padding: var(--size-6);
}
}
Java Script is not required or multiple files are needed, check the notes.