) => {
+ const {t} = useTranslation();
+
+ return
+ -- {open === "top" || open === "both" ? t("blog.scambox.chatbox.resume") : t("blog.scambox.chatbox.begin")} --
+ {children}
+ -- {open === "bottom" || open === "both" ? t("blog.scambox.chatbox.interrupt") : t("blog.scambox.chatbox.end")} --
+
+}
+
+export default Chatbox
\ No newline at end of file
diff --git a/src/components/scambox/Chatmsg.tsx b/src/components/scambox/Chatmsg.tsx
new file mode 100644
index 0000000..b367502
--- /dev/null
+++ b/src/components/scambox/Chatmsg.tsx
@@ -0,0 +1,27 @@
+import React from "react";
+import { useTranslation } from "react-i18next";
+
+import * as styles from "./Chatbox.module.scss"
+
+type ChatmsgProps = {
+ name?: string,
+ timestamp?: string,
+ color?: string,
+ dir: string
+}
+
+const Chatmsg = (props: React.PropsWithChildren) => {
+ const {t} = useTranslation();
+
+ return
+ {props.name &&
{props.name} {t("blog.scambox.chatbox.says")}}
+
+
+ {props.children}
+
+ {props.timestamp &&
{props.timestamp}}
+
+
+}
+
+export default Chatmsg
\ No newline at end of file
diff --git a/src/components/scambox/Chatnotice.tsx b/src/components/scambox/Chatnotice.tsx
new file mode 100644
index 0000000..901b692
--- /dev/null
+++ b/src/components/scambox/Chatnotice.tsx
@@ -0,0 +1,11 @@
+import React from "react";
+
+import * as styles from "./Chatbox.module.scss"
+
+const Chatnotice = (props: React.PropsWithChildren<{}>) => {
+ return
+ {props.children}
+
+}
+
+export default Chatnotice
\ No newline at end of file
diff --git a/src/layouts/default.scss b/src/layouts/default.scss
index 173ba09..f5d86cd 100644
--- a/src/layouts/default.scss
+++ b/src/layouts/default.scss
@@ -4,6 +4,11 @@
* {
box-sizing: border-box;
+
+ @media (prefers-reduced-motion: reduce) {
+ animation: none !important;
+ transition: none !important;
+ }
}
body,
diff --git a/src/pages/index.tsx b/src/pages/index.tsx
index 7658b59..efb8c2a 100644
--- a/src/pages/index.tsx
+++ b/src/pages/index.tsx
@@ -20,6 +20,7 @@ import {
Phone,
} from "lucide-react";
import { useTranslation } from "react-i18next";
+import { useMediaQuery } from "@react-hook/media-query";
//import * as particleConfig from "./index.particles.json";
export const query = graphql`
@@ -62,9 +63,11 @@ export const query = graphql`
const IndexPage = (props) => {
const { t } = useTranslation();
+ const reduceMotion = useMediaQuery("(prefers-reduced-motion: reduce)")
React.useEffect(() => {
if (typeof window === "undefined") return;
+ if (reduceMotion) return;
anime({
targets: [
@@ -95,7 +98,7 @@ const IndexPage = (props) => {
/*if (typeof window !== "undefined")
// eslint-disable-next-line no-undef
window.setTimeout(loadTsParticles, 1000);*/
- }, []);
+ }, [reduceMotion]);
let meta = props.data.site.siteMetadata;
diff --git a/src/templates/blogPost.module.scss b/src/templates/blogPost.module.scss
index b664c8b..268b791 100644
--- a/src/templates/blogPost.module.scss
+++ b/src/templates/blogPost.module.scss
@@ -2,6 +2,8 @@
.postSection {
flex-grow: 1;
+ max-width: 1000px;
+ margin: 0 auto;
> article {
img {
diff --git a/src/templates/blogPost.tsx b/src/templates/blogPost.tsx
index 11003cd..9f06dd0 100644
--- a/src/templates/blogPost.tsx
+++ b/src/templates/blogPost.tsx
@@ -22,7 +22,7 @@ const BlogPost = ({ data }) => {