Skip to content
This repository was archived by the owner on Feb 27, 2024. It is now read-only.

Commit 5b566de

Browse files
committed
Updated Algolia styling
1 parent d93ccf5 commit 5b566de

File tree

6 files changed

+51
-42
lines changed

6 files changed

+51
-42
lines changed

components/molecules/AlgoliaSearch/AlgoliaSearch.module.css

Lines changed: 40 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -18,29 +18,24 @@
1818
@apply relative h-full;
1919

2020
& input {
21-
@apply w-full p-4 pr-8 border;
21+
@apply w-full p-10 pr-48 border border-tertiary-lighter rounded font-primary text-xs;
2222

23-
font-size: 15px;
24-
line-height: 1.15;
23+
line-height: 1;
2524

2625
&::-webkit-search-decoration,
2726
&::-webkit-search-cancel-button,
2827
&::-webkit-search-results-button,
2928
&::-webkit-search-results-decoration {
3029
-webkit-appearance: none;
3130
}
32-
33-
&:focus {
34-
@apply outline-none;
35-
}
3631
}
3732

3833
/* Buttons (Submit, Reset) */
3934
& button {
4035
@apply absolute cursor-pointer flex justify-center items-center right-4;
4136

42-
width: 30px;
43-
height: 30px;
37+
width: 28px;
38+
height: 28px;
4439
top: 50%;
4540
transform: translateY(-50%);
4641

@@ -58,7 +53,7 @@
5853

5954
/* Reset Button */
6055
&[type='reset'] {
61-
@apply right-8;
56+
@apply right-28;
6257

6358
& svg {
6459
width: 12px;
@@ -75,76 +70,88 @@
7570

7671
/* Drop Menu (Hits & History) */
7772
& .dropMenu {
78-
@apply absolute invisible opacity-0 transition-all duration-150;
73+
@apply absolute invisible opacity-0 transition-all duration-150 ease-in-out;
7974

8075
z-index: 999;
81-
top: 100%;
82-
width: 100%;
76+
bottom: -10px;
77+
width: 112%;
78+
margin-left: -6%;
8379
}
8480

8581
/* Show dropmenu on Focus */
8682
&:focus-within {
83+
& input {
84+
@apply shadow;
85+
}
86+
8787
& .dropMenu {
8888
@apply visible opacity-100;
89+
90+
bottom: -5px;
8991
}
9092
}
9193

9294
/* History and Hits Menu */
9395
& .history,
9496
& .hits {
95-
@apply absolute border shadow w-full;
97+
@apply absolute border border-tertiary-lighter shadow w-full rounded-larger;
9698

9799
background-color: #fff;
98100

99101
& ul {
100-
@apply py-4 px-4;
102+
@apply py-8;
101103

102104
& li {
103-
@apply border-t;
104-
105-
&:first-of-type {
106-
@apply border-none;
105+
&:not(.clear) {
106+
& button {
107+
&:hover,
108+
&:focus {
109+
@apply bg-primary;
110+
111+
color: #fff;
112+
113+
& span.time {
114+
color: #fff;
115+
}
116+
}
117+
}
107118
}
108119
}
109120
}
110121

111122
& button {
112-
@apply block w-full py-4 text-left;
123+
@apply block w-full py-12 px-20 text-left transition font-primary font-semibold text-xs;
113124

114-
line-height: 1;
115-
font-size: 0.85rem;
125+
line-height: 1.25;
116126

117127
& em {
118128
font-style: normal;
119129
}
120-
121-
&:hover,
122-
&:focus {
123-
@apply underline;
124-
}
125130
}
126131
}
127132

128133
/* History Menu */
129134
& .history {
130135
& button {
131-
@apply w-full flex justify-between items-center font-semibold;
136+
@apply w-full flex justify-between items-center;
132137

133138
& span.time {
134-
@apply overflow-ellipsis opacity-40 font-normal italic;
139+
@apply overflow-ellipsis text-right text-primary-light font-normal italic text-xxs flex-shrink-0 self-start;
135140

136-
font-size: 0.7rem;
137-
max-width: 30%;
141+
width: 30%;
138142
}
139143
}
140144

141145
& .clear {
142146
@apply mt-4 border-none;
143147

144148
& button {
145-
@apply font-normal;
149+
@apply py-8 font-normal text-xxs text-tertiary-lighter;
146150

147-
font-size: 0.775rem;
151+
&:hover,
152+
&:focus {
153+
@apply underline text-primary;
154+
}
148155
}
149156
}
150157
}

components/organisms/Footer/Footer.module.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
.footer {
2-
@apply py-8;
2+
@apply py-40 border-t border-tertiary-lightest;
33

44
& .footerMenu {
55
& > ul {
@@ -19,6 +19,6 @@
1919
}
2020

2121
& .copyright {
22-
@apply py-4 text-center text-sm;
22+
@apply py-4 text-center text-xs;
2323
}
2424
}

components/organisms/Header/Header.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export default function Header() {
1616
return (
1717
<header className={styles.header}>
1818
<div className="container flex items-center justify-end">
19-
<div className="relative pt-12 pb-16">
19+
<div className="relative pb-16">
2020
<AlgoliaSearch
2121
useHistory={true}
2222
usePlaceholder={true}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
.header {
2-
@apply sticky top-0 pb-8 transition-all z-50;
2+
@apply sticky top-0 py-20 transition-all z-50 border-b border-tertiary-lightest shadow;
33

4-
background-color: #fff;
4+
background-color: #f7f7f7;
55
}

pages/blog/[[...slug]].js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export default function BlogPost({post, archive, posts, pagination}) {
4949
if (archive) {
5050
return (
5151
<Layout seo={{...post?.seo}}>
52-
<div className="container">
52+
<div className="container py-20">
5353
<section>
5454
{!posts || !posts.length ? (
5555
<p>No posts found.</p>
@@ -77,7 +77,7 @@ export default function BlogPost({post, archive, posts, pagination}) {
7777

7878
return (
7979
<Layout seo={{...post?.seo}} hasJsonLd={true}>
80-
<article className="container">
80+
<article className="container py-40">
8181
<Blocks blocks={post?.blocks} />
8282
<div
8383
dangerouslySetInnerHTML={{

tailwind.config.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ module.exports = {
2727
body: ['1.125rem', '2rem'],
2828
sm: ['1rem', '1.75rem'],
2929
caption: ['0.875rem', '1.25rem'],
30-
xs: ['0.75rem', '1.25rem'],
30+
xs: ['0.85rem', '1.25rem'],
3131
xxs: ['0.625rem', '1rem'],
3232
h1: ['3rem', '3.75rem'],
3333
h2: ['2.25rem', '3.25rem'],
@@ -47,7 +47,9 @@ module.exports = {
4747
0: '0',
4848
4: '0.25rem',
4949
8: '0.5rem',
50+
10: '0.625rem',
5051
12: '0.75rem',
52+
14: '0.875rem',
5153
16: '1rem',
5254
20: '1.25rem',
5355
24: '1.5rem',
@@ -67,7 +69,7 @@ module.exports = {
6769
80: '5rem'
6870
},
6971
borderWidth: {
70-
DEFAULT: '0.125rem'
72+
DEFAULT: '1px'
7173
},
7274
borderRadius: {
7375
none: '0',

0 commit comments

Comments
 (0)