Skip to content

Commit a74338f

Browse files
committed
feat: Displays Best position on mobile layout as well.
1 parent 4c2f900 commit a74338f

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

components/keywords/Keyword.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,8 @@ const Keyword = (props: KeywordProps) => {
136136
title={bestPosition && bestPosition.date
137137
? new Date(bestPosition.date).toLocaleDateString('en-US', { weekday: 'long', year: 'numeric', month: 'short', day: 'numeric' }) : ''
138138
}
139-
className={`keyword_best hidden bg-[#f8f9ff] w-fit min-w-[50px] h-12 p-2 text-base mt-[-20px] rounded right-5 lg:relative lg:block
140-
lg:bg-transparent lg:w-auto lg:h-auto lg:mt-0 lg:p-0 lg:text-sm lg:flex-1 lg:basis-16 lg:grow-0 lg:right-0 text-center font-semibold
139+
className={`keyword_best mr-1 bg-[#f8f9ff] float-right mt-8 w-14 rounded right-5 lg:relative lg:block
140+
lg:bg-transparent lg:w-auto lg:h-auto lg:mt-0 lg:mr-0 lg:p-0 lg:text-sm lg:flex-1 lg:basis-16 lg:grow-0 lg:right-0 text-center font-semibold
141141
${!tableColumns.includes('Best') ? 'lg:hidden' : ''}
142142
`}>
143143
{bestPosition ? bestPosition.position || '-' : (position || '-')}
@@ -152,7 +152,7 @@ const Keyword = (props: KeywordProps) => {
152152
)}
153153

154154
<div
155-
className={`keyword_best hidden bg-[#f8f9ff] w-fit min-w-[50px] h-12 p-2 text-base mt-[-20px] rounded right-5 lg:relative lg:block
155+
className={`hidden bg-[#f8f9ff] w-fit min-w-[50px] h-12 p-2 text-base mt-[-20px] rounded right-5 lg:relative lg:block
156156
lg:bg-transparent lg:w-auto lg:h-auto lg:mt-0 lg:p-0 lg:text-sm lg:flex-1 lg:basis-24 lg:grow-0 lg:right-0 text-center
157157
${!tableColumns.includes('Volume') ? 'lg:hidden' : ''}
158158
`}>

styles/globals.css

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,13 @@ body {
305305
background-color: #f9ded7;
306306
}
307307

308+
@media screen and (max-width: 760px){
309+
.keyword_best:before{
310+
content: "Best: ";
311+
}
312+
}
313+
314+
308315
/* Disable LastPass Icon for Secret Field */
309316
[autocomplete="off"] + div[data-lastpass-icon-root="true"], [autocomplete="off"] + div[data-lastpass-infield="true"] {
310317
display: none;

0 commit comments

Comments
 (0)