Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ module.exports = withBundleAnalyzer({
NEXTAUTH_URL: process.env.NEXTAUTH_URL,
},
compiler: {
removeConsole:
process.env.NODE_ENV === 'prod' ? { exclude: ['error'] } : false,
removeConsole: process.env.NODE_ENV === 'prod',
},
eslint: {
ignoreDuringBuilds: true,
Expand Down
Binary file modified public/keepsimple_/assets/longevity/diet/tooltip-bg.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 11 additions & 1 deletion src/api/tools.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
export const getTools = async (locale: string) => {
const url = `${process.env.NEXT_PUBLIC_STRAPI}/api/tool-setting?populate[tools_list][populate]=*&populate[Seo]=*&locale=${locale}`;
const fields = [
'idForDev',
'link',
'title',
'description',
'poweredBy',
'isInDevelopment',
]
.map((f, i) => `populate[tools_list][fields][${i}]=${f}`)
.join('&');
const url = `${process.env.NEXT_PUBLIC_STRAPI}/api/tool-setting?${fields}&populate[Seo]=*&locale=${locale}`;
return await fetch(url)
.then(resp => resp.json())
.then(json => json?.data?.attributes || null);
Expand Down
2 changes: 1 addition & 1 deletion src/assets/icons/tools/tool-icons/bob.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/assets/icons/tools/tool-icons/claude-bob.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
30 changes: 1 addition & 29 deletions src/assets/icons/tools/tool-icons/friendly-tom.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
72 changes: 1 addition & 71 deletions src/assets/icons/tools/tool-icons/github.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 1 addition & 23 deletions src/assets/icons/tools/tool-icons/mosaic.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
28 changes: 1 addition & 27 deletions src/assets/icons/tools/tool-icons/tom.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 1 addition & 6 deletions src/assets/icons/tools/tool-icons/vibesuite.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ const WhyDoThisTooltip: FC<WhyDoThisTooltipProps> = ({
<div className={styles.whyDoThisTooltip} data-cy="why-do-this-content">
<div>
<Image
src={'/keepsimple_/assets/longevity/habits/what-is-this-bg.webp'}
src={'/keepsimple_/assets/longevity/habits/what-is-this-bg.png'}
alt="Background"
width={700}
height={300}
Expand Down
25 changes: 19 additions & 6 deletions src/components/tools/ToolHero/ToolHero.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,25 @@ const ToolHero: FC<ToolHeroProps> = ({
styles.lightBackground,
isTransitioning && styles.lightBackgroundAnimated,
)}
style={{ backgroundImage: `url('${backgroundImage}')` }}
/>
<div
className={cn(styles.backgroundLayer, styles.darkBackground)}
style={{ backgroundImage: `url('${darkBackgroundImage}')` }}
/>
>
<Image
src={backgroundImage}
alt="tools background"
fill
priority
sizes="100vw"
style={{ objectFit: 'cover', objectPosition: 'center' }}
/>
</div>
<div className={cn(styles.backgroundLayer, styles.darkBackground)}>
<Image
src={darkBackgroundImage}
alt="tools background dark"
fill
sizes="100vw"
style={{ objectFit: 'cover', objectPosition: 'center' }}
/>
</div>
<div className={styles.content}>
<div className={styles.logoRow}>
<span className={styles.diamond} />
Expand Down
6 changes: 6 additions & 0 deletions src/layouts/ToolsLayout/ToolsLayout.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,12 @@
}
}

@media (min-width: 1921px) {
.contentInner {
gap: 26px;
}
}

@media (max-width: 768px) {
.layout {
margin-top: 54px;
Expand Down
27 changes: 11 additions & 16 deletions src/layouts/ToolsLayout/ToolsLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,22 +38,6 @@ const ToolsLayout: FC<ToolsLayoutProps> = ({
easterThemeIndexRef.current = easterThemeIndex;
}, [easterThemeIndex]);

useEffect(() => {
const easterImages = [
'/keepsimple_/assets/tools/hero/green.png',
'/keepsimple_/assets/tools/logo/green.svg',
'/keepsimple_/assets/tools/hero/white.png',
'/keepsimple_/assets/tools/logo/white.svg',
'/keepsimple_/assets/tools/hero/black.png',
'/keepsimple_/assets/tools/logo/black.svg',
];

easterImages.forEach(src => {
const img = new Image();
img.src = src;
});
}, []);

useEffect(() => {
const handleSequence = (event: KeyboardEvent) => {
const target = event.target as HTMLElement | null;
Expand Down Expand Up @@ -87,6 +71,17 @@ const ToolsLayout: FC<ToolsLayoutProps> = ({
) {
typedBufferRef.current = '';
easterActivatedRef.current = true;
[
'/keepsimple_/assets/tools/hero/green.png',
'/keepsimple_/assets/tools/logo/green.svg',
'/keepsimple_/assets/tools/hero/white.png',
'/keepsimple_/assets/tools/logo/white.svg',
'/keepsimple_/assets/tools/hero/black.png',
'/keepsimple_/assets/tools/logo/black.svg',
].forEach(src => {
const img = new Image();
img.src = src;
});
easterThemeIndexRef.current = 1;
setEasterThemeIndex(1);
setTransitionKey(prev => prev + 1);
Expand Down
2 changes: 1 addition & 1 deletion src/pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ function AppContent({ Component, pageProps: { session, ...pageProps } }: TApp) {
'/keepsimple_/assets/longevity/diet/diet-results-icons/metabolic-gold.png',
'/keepsimple_/assets/longevity/habits/tooltip-bg.png',
'/keepsimple_/assets/longevity/habits/tooltip-headline-bg.png',
'/keepsimple_/assets/longevity/habits/what-is-this-bg.webp',
'/keepsimple_/assets/longevity/habits/what-is-this-bg.png',
];

imagesToPreload.forEach(src => {
Expand Down
2 changes: 1 addition & 1 deletion src/pages/tools/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,6 @@ export const getStaticProps: GetStaticProps = async ({
locale,
tools: tools,
},
revalidate: 10,
revalidate: 3600,
};
};
Loading