Skip to content

Commit

Permalink
Add ProductHunt badge
Browse files Browse the repository at this point in the history
  • Loading branch information
T-Damer committed Nov 15, 2023
1 parent 4c125fe commit d433c83
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@ import BigWhaleLabs from 'components/MainPage/BigWhaleLabs'
import InfoBlock from 'components/MainPage/InfoBlock'
import MobileInfoBlock from 'components/MainPage/MobileInfoBlock'
import Navbar from 'components/Navbar'
import ProductHunt from 'components/ProductHunt'
import Root from 'components/Root'

const App = () => {
return (
<>
<ProductHunt />
<Navbar />
<Root>
<BigWhaleLabs />
Expand Down
4 changes: 4 additions & 0 deletions src/classnames/tailwind.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7231,6 +7231,7 @@ export type TMaxWidth =
| 'max-w-screen-2xl'
| 'max-w-screen-tiny'
| 'max-w-screen-se'
| 'max-w-screen-s'
| 'max-w-screen-tablet'

export type THeight =
Expand Down Expand Up @@ -7529,6 +7530,7 @@ export type TTranslate =
| 'translate-x-3/4'
| 'translate-x-full'
| '-translate-x-0.5'
| '-translate-x-3'
| '-translate-x-7'
| 'translate-y-0'
| 'translate-y-1'
Expand Down Expand Up @@ -7574,6 +7576,7 @@ export type TTranslate =
| 'translate-y-3/4'
| 'translate-y-full'
| '-translate-y-0.5'
| '-translate-y-3'
| '-translate-y-7'

export type TSkew =
Expand Down Expand Up @@ -8604,6 +8607,7 @@ export type TPseudoClassVariants =
| '2xl:'
| 'tiny:'
| 'se:'
| 's:'
| 'tablet:'

//////////// Utility Function generic type
Expand Down
51 changes: 51 additions & 0 deletions src/components/ProductHunt.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
import classnames, {
alignItems,
backgroundColor,
display,
flexDirection,
fontSize,
fontWeight,
gap,
height,
justifyContent,
textColor,
transitionProperty,
translate,
width,
} from 'classnames/tailwind'

const wrapper = classnames(
width('w-full'),
display('flex'),
backgroundColor('bg-primary-background'),
flexDirection('flex-row'),
alignItems('items-center'),
justifyContent('justify-center'),
height('h-14'),
fontSize('text-sm'),
fontWeight('font-bold'),
textColor('text-primary'),
gap('gap-2'),
translate('se:-translate-y-3'),
transitionProperty('transition-transform')
)
const badgeStyle = classnames(height('h-8'), width('w-36'))
const phString = display('hidden', 's:inline')

export default function () {
return (
<div className={wrapper}>
<div className={phString}>Check us out on Product Hunt:</div>
<a
href="https://www.producthunt.com/posts/ketl?utm_source=badge-featured&utm_medium=badge&utm_souce=badge-ketl"
target="_blank"
>
<img
alt="ketl | Product Hunt"
className={badgeStyle}
src="https://api.producthunt.com/widgets/embed-image/v1/featured.svg?post_id=425326&theme=neutral"
/>
</a>
</div>
)
}
4 changes: 3 additions & 1 deletion tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ module.exports = {
},
screens: {
tiny: '22.75rem',
se: '23.5rem',
se: '23.75rem',
s: '27.5rem',
tablet: '31.25rem',
md: '37.5rem',
sm: '42.1875rem',
Expand Down Expand Up @@ -132,6 +133,7 @@ module.exports = {
},
translate: {
'-0.5': '-0.25rem',
'-3': '-0.75rem',
'-7': '-1.75rem',
},
willChange: {
Expand Down

0 comments on commit d433c83

Please sign in to comment.