Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Notification Update #42

Merged
merged 4 commits into from
Oct 17, 2023
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
2 changes: 2 additions & 0 deletions apps/next/public/images/party-popper-svgrepo-com.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/next/public/images/party-popper.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/next/public/images/party-popper2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions apps/next/public/static/locales/en/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
"created_word": "Word created successfully."
},
"announcement": {
"description": "We have <span className='font-semibold'>amazing news,</span> just for you! Learn from our blog!",
"button": "See More"
"description": "We're launching soon on",
"button": "get notified"
},
"feedback": {
"title": "Feedback",
Expand Down
4 changes: 2 additions & 2 deletions apps/next/public/static/locales/tr/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
"signin_success": "Giriş başarılı, anasayfaya yönlendiriliyorsunuz."
},
"announcement": {
"description": "Size özel <span className='font-semibold'>harika haberlerimiz</span> var! Blogumuzdan öğrenin!",
"button": "Daha Fazla Gör"
"description": "Yakında başlıyoruz",
"button": "haberdar ol"
},
"navbar": {
"home": "Ana Sayfa",
Expand Down
32 changes: 16 additions & 16 deletions apps/next/src/components/Layout/MainLayout/Banner/index.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { useState } from "react";
import { PartyPopper } from "lucide-react";
import { useTranslation } from "next-i18next";

import ProductHunt from "./product.hunt";
import PartyPopper from "/public/images/party-popper.svg";
import { Button } from "@wordigo/ui";
import { useTranslation } from "next-i18next";
import Image from "next/image";
import { useState } from "react";

const Banner = () => {
const { t } = useTranslation();
Expand All @@ -14,19 +15,18 @@ const Banner = () => {

return (
isBannerOpen && (
<section className="w-full border-b py-3">
<div className="max-w-[90rem] max-lg:w-full px-20 max-md:px-4 flex items-center mx-auto justify-between">
<div className="flex items-center">
<div className="w-10 h-10 p-2.5 border rounded-[0.5rem] mr-4">
<PartyPopper className="w-5 h-5 animate-pulse" />
</div>
<p className="text-sm" dangerouslySetInnerHTML={{ __html: t("announcement.description") }}></p>
</div>
<section className="w-full border-b py-3 bg-[#FF6154] text-white">
<div className="max-w-[90rem] max-lg:w-full px-20 max-md:px-4 flex items-center mx-auto justify-center">
<div className="flex items-center">
<Button variant="default">{t("announcement.button")}</Button>
{/* <Button variant="ghost" onClick={closeBanner}>
<X className="w-4 h-4" />
</Button> */}
<p className="text-sm font-semibold">
{t("announcement.description")}
</p>
<Button className="px-1.5 h-5 rounded-sm font-bold bg-white text-[#FF6154] mx-2">
Product Hunt
</Button>
<p className="text-sm font-semibold mr-2">
{t("announcement.button")}
</p>
</div>
</div>
</section>
Expand Down
27 changes: 27 additions & 0 deletions apps/next/src/components/Layout/MainLayout/Banner/product.hunt.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import { useTheme } from "next-themes";
import React from "react";

export default function ProductHunt({ height, width }: any) {
const { theme, systemTheme } = useTheme();

const themes =
theme === "system" ? systemTheme : theme === "dark" ? "ligth" : "dark";

return (
<a
href="https://www.producthunt.com/products/devsozluk/reviews?utm_source=badge-product_review&utm_medium=badge&utm_souce=badge-devsozluk"
target="_blank"
>
<img
src={
"https://api.producthunt.com/widgets/embed-image/v1/product_review.svg?product_id=549647&theme=" +
themes
}
alt="DevS&#0246;zl&#0252;k - Open&#0032;source&#0032;social&#0032;platform&#0032;for&#0032;developers&#0046; | Product Hunt"
className="width: 250px; height: 54px;"
width={width}
height={height}
/>
</a>
);
}
3 changes: 1 addition & 2 deletions apps/next/src/components/Layout/MainLayout/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { type PropsWithChildren } from "react";

import Banner from "./Banner";
import HomeHeader from "./Header";
import { type PropsWithChildren } from "react";

const MainLayout: React.FC<PropsWithChildren> = ({ children }) => {
return (
Expand Down
Loading