Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Pierniki committed Nov 13, 2023
2 parents 98c1bb7 + 588b231 commit 2298d0a
Show file tree
Hide file tree
Showing 11 changed files with 344 additions and 15 deletions.
7 changes: 7 additions & 0 deletions next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,13 @@ const config = withPlugins(
},
],
},
webpack: (config) => {
config.module.rules.push({
test: /\.svg$/i,
use: ["@svgr/webpack"],
})
return config
},
})
)

Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@
"@storybook/react": "^7.4.6",
"@storybook/test-runner": "^0.13.0",
"@storybook/testing-library": "^0.1.0",
"@svgr/webpack": "^8.1.0",
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^14.0.0",
"@total-typescript/ts-reset": "^0.5.0",
Expand Down
11 changes: 11 additions & 0 deletions public/icons/X.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions public/icons/facebook.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions public/icons/instagram.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions public/icons/youtube.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/app/[lang]/article/[slug]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ export default async function Web({ params: { slug, lang } }: ArticlePageProps)
</section>
)}
</article>
<div className="mb-5 border-t py-5">
<ShareOnSocial articleUrl={articleUrl} articleTitle={title} />
</div>
<NextIntlClientProvider locale={lang}>
<RecommendedArticles id={article.id} />
</NextIntlClientProvider>
Expand Down
19 changes: 11 additions & 8 deletions src/components/Footer/Footer.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
import { Facebook, Instagram, Twitter, Youtube } from "lucide-react"
import Image from "next/image"
import Link from "next/link"
import { NextIntlClientProvider } from "next-intl"
import { useLocale } from "@/i18n/i18n"
import FacebookIcon from "../../../public/icons/facebook.svg"
import InstagramIcon from "../../../public/icons/instagram.svg"
import XIcon from "../../../public/icons/X.svg"
import YoutubeIcon from "../../../public/icons/youtube.svg"
import { DynamicLangSelect } from "../LangSelect/DynamicLangSelect"
import { GetNavigationReturn } from "../Navigation/Navigation"

Expand Down Expand Up @@ -33,19 +36,19 @@ export async function Footer({ footer, logoUrl }: FooterProps) {
<p>{country}</p>
</div>
</div>
<nav className="flex flex-col gap-10 md:gap-7">
<div className="flex gap-4">
<nav className="flex flex-col justify-between gap-10 md:gap-7">
<div className="flex gap-5">
<a href={twitterLink ?? ""} aria-label="Twitter" target="_blank" rel="noreferrer">
<Twitter />
<XIcon />
</a>
<a href={facebookLink ?? ""} aria-label="Facebook" target="_blank" rel="noreferrer">
<Facebook />
<FacebookIcon />
</a>
<a href={instagramLink ?? ""} aria-label="Instagram" target="_blank" rel="noreferrer">
<Instagram />
<InstagramIcon />
</a>
<a href={youtubeLink ?? ""} aria-label="Youtube" target="_blank" rel="noreferrer">
<Youtube />
<YoutubeIcon />
</a>
</div>
<ul className="grid grid-cols-3 gap-x-10 gap-y-7 text-sm font-semibold md:gap-x-20">
Expand All @@ -62,7 +65,7 @@ export async function Footer({ footer, logoUrl }: FooterProps) {
})}
</ul>
</nav>
<div className="flex flex-col justify-between gap-10 lg:items-end lg:gap-3">
<div className="flex flex-col justify-between gap-10 md:max-w-[30%] lg:items-end lg:gap-3">
<div className="w-fit lg:w-auto">
<NextIntlClientProvider locale={locale}>
<DynamicLangSelect />
Expand Down
2 changes: 1 addition & 1 deletion src/components/StockDisplay/StockQuote.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export function StockQuote({ quote }: { quote: Quote }) {
return (
<div className="flex items-center justify-center gap-4 border-r-2 border-slate-100 px-10 text-sm">
<span className="whitespace-nowrap font-medium">{quote.name}</span>
<span className={cn("flex items-center gap-1", isNegative ? "text-red-800" : "text-green-800")}>
<span className={cn("flex items-center gap-1", isNegative ? "text-custom-red" : "text-custom-green")}>
{!isNegative && "+"}
{quote.change.toFixed(2)}%
{isNegative ? <MoveDown className="mt-0.5 h-3 w-3" /> : <MoveUp className="mt-0.5 h-3 w-3" />}
Expand Down
3 changes: 2 additions & 1 deletion tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ module.exports = {
300: "#808080",
},
dim: "#D9D9D9",
green: "#55FF0080",
green: "#37A600",
red: "#D90000",
},
},
fontFamily: {
Expand Down
Loading

0 comments on commit 2298d0a

Please sign in to comment.