From 6d5175cb455c1d2e35ecd9f09ed1a29802268577 Mon Sep 17 00:00:00 2001 From: Alexis Werefox Date: Mon, 19 Apr 2021 04:14:21 +0000 Subject: [PATCH] I finished the testimonials page oh my god --- Dockerfile | 3 +- .../{pages => }/components/identity-button.js | 2 +- src/info/components/mutant-standard.js | 24 +++ src/info/components/testimonial-card.js | 33 +++++ src/info/components/werefox-card.js | 52 +++++++ src/info/pages/api/hello.js | 2 +- src/info/pages/hrt/index.js | 43 ++++++ src/info/pages/index.js | 71 +++++---- src/info/pages/testimonials/index.js | 138 ++++++++++++++++++ src/info/tailwind.config.js | 12 ++ start.sh | 5 +- 11 files changed, 348 insertions(+), 37 deletions(-) rename src/info/{pages => }/components/identity-button.js (88%) create mode 100644 src/info/components/mutant-standard.js create mode 100644 src/info/components/testimonial-card.js create mode 100644 src/info/components/werefox-card.js create mode 100644 src/info/pages/hrt/index.js create mode 100644 src/info/pages/testimonials/index.js diff --git a/Dockerfile b/Dockerfile index 55b58c4..524d96c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,6 +4,7 @@ RUN apk update && \ apk add --no-cache bash RUN npm install --save next && \ - npm install -D tailwindcss@latest postcss@latest autoprefixer@latest + npm install -D tailwindcss@latest postcss@latest autoprefixer@latest && \ + npm install --save axios WORKDIR /usr/src/app diff --git a/src/info/pages/components/identity-button.js b/src/info/components/identity-button.js similarity index 88% rename from src/info/pages/components/identity-button.js rename to src/info/components/identity-button.js index e77f9f4..7c7865d 100644 --- a/src/info/pages/components/identity-button.js +++ b/src/info/components/identity-button.js @@ -14,7 +14,7 @@ export default function IdentityButton({ {images.map((source) => ( + + + ); +} diff --git a/src/info/components/testimonial-card.js b/src/info/components/testimonial-card.js new file mode 100644 index 0000000..297d53c --- /dev/null +++ b/src/info/components/testimonial-card.js @@ -0,0 +1,33 @@ +import Image from "next/image"; +import Link from "next/link"; + +export default function TestimonialCard({ src, alt, url, innerText, user }) { + const finalsrc = Boolean(src) ? src : "/images/werefox_logo.png"; + + return ( +
+ + +
+ {" "} + {alt}{" "} +
+
+ {" "} +
+

+ {innerText} +
+ {"- "} + + {`@${user}`} + +

+
+
+ ); +} diff --git a/src/info/components/werefox-card.js b/src/info/components/werefox-card.js new file mode 100644 index 0000000..ac35473 --- /dev/null +++ b/src/info/components/werefox-card.js @@ -0,0 +1,52 @@ +import Image from "next/image"; +import Link from "next/link"; + +export default function WerefoxCard({ + isTitle, + isCardButton, + extraClasses, + imageObj, + innerText, + url, + children, +}) { + const images = Array(imageObj).flat(); + if (isTitle) { + return ( +
+ {children} +
+ ); + } else if (isCardButton) { + return ( +
+ + + {images.map((source) => ( + + {" "} + {source.alt}{" "} + + ))}{" "} + {innerText} + + +
+ ); + } + return ( +
+ {children} +
+ ); +} diff --git a/src/info/pages/api/hello.js b/src/info/pages/api/hello.js index 9987aff..30bc52b 100644 --- a/src/info/pages/api/hello.js +++ b/src/info/pages/api/hello.js @@ -1,5 +1,5 @@ // Next.js API route support: https://nextjs.org/docs/api-routes/introduction export default (req, res) => { - res.status(200).json({ name: 'John Doe' }) + res.status(200).json({ name: 'Alexis Werefox' }) } diff --git a/src/info/pages/hrt/index.js b/src/info/pages/hrt/index.js new file mode 100644 index 0000000..7c6ddc4 --- /dev/null +++ b/src/info/pages/hrt/index.js @@ -0,0 +1,43 @@ +import Head from "next/head"; +import WCard from "../../components/werefox-card"; +import MS from "../../components/mutant-standard"; + +export default function HRT() { + return ( +
+ + Alexis Werefox HRT Tracker + + +
+ + +

+ Oh no I haven't actually finished this page but I started on
+ December 11th, 2020 +

+
+ + +
+
+ ); +} diff --git a/src/info/pages/index.js b/src/info/pages/index.js index 77bac2f..7abf5db 100644 --- a/src/info/pages/index.js +++ b/src/info/pages/index.js @@ -1,7 +1,9 @@ import Head from "next/head"; import Link from "next/link"; import Image from "next/image"; -import IDButton from "./components/identity-button"; +import IDButton from "../components/identity-button"; +import WCard from "../components/werefox-card"; +import MS from "../components/mutant-standard"; export default function Home() { return ( @@ -11,12 +13,12 @@ export default function Home() {
-
+

{" "} Pixel Alexis! -

-
+ +
-
-
-

- Somewhere between a hot date and a hot mess. Just a witchy foxxo - programmer trying to make it in the world tbh. + + + +

+ Somewhere between a hot date and a hot mess. +
+ Just a witchy foxxo programmer trying to make it in the world tbh.

-
-
- -
+ + +
); diff --git a/src/info/pages/testimonials/index.js b/src/info/pages/testimonials/index.js new file mode 100644 index 0000000..7f702ba --- /dev/null +++ b/src/info/pages/testimonials/index.js @@ -0,0 +1,138 @@ +import Head from "next/head"; +import WCard from "../../components/werefox-card"; +import TCard from "../../components/testimonial-card"; +import MS from "../../components/mutant-standard"; +import axios from "axios"; + +// Async functions to grab user avatars server-side + +export const getIcon = async ({ json, name }) => + await axios.get(json).then( + ({ data }) => [name, data["icon"]["url"]], + (error) => { + console.log(error) + return [name, null]; + } + ); + +export const getStaticProps = async () => { + const promises = Object.entries(USERS).map(([name, { json }]) => + getIcon({ name, json }) + ); + const iconUrls = await Promise.all(promises); + return { + props: { + iconUrls: iconUrls.reduce( + (acc, [name, url]) => ({ ...acc, [name]: url }), + {} + ), + }, + }; +}; + +// This is where you put the testimonial users' info + +const USERS = { + colabunny: { + json: "https://yiff.life/@colabunny.json", + url: "https://yiff.life/@colabunny", + content: '"please stay your jokes are funny and smart"', + }, + ElfLord: { + url: "https://freedom.horse/@ElfLord", + json: "https://freedom.horse/@ElfLord.json", + content: `"Someday I'm gonna visit you in Texas, and when I get there, I'm going to realize you don't live in Texas at all, and I'm in the wrong state"`, + }, + Decimal: { + url: "https://plush.city/@Decimal", + json: "https://plush.city/@Decimal.json", + content: `"I will appreciate the heck out of you any day"` + }, + skelly: { + url: "https://redroo.ml/@skelly", + json: "https://redroo.ml/@skelly.json", + content: `"this an an official invitation for any one of you to put 'fuck you i dont give testimonials' as a testimonial by me on your profile"` + }, + Drako_Fenris: { + url: "https://yiff.life/@Drako_Fenris", + json: "https://yiff.life/@Drako_Fenris.json", + content: `"[Alexis' future wife] lives in the ether yet to be revealed. she awaits the day her big tiddie goth gf rides in on her unicorn and rescues her."` + }, + "00dani": { + url: "https://vulpine.club/@00dani", + json: "https://vulpine.club/@00dani.json", + content: `"*falls in love with you* haha whoopsies 😳"` + }, + Gumby: { + url: "https://puppy.cafe/@Gumby", + json: "https://puppy.cafe/@Gumby.json", + content: `"im love alexis a lot 💚 🐀"` + }, + AshBunny: { + url: "https://vulpine.club/@AshBunny", + json: "https://vulpine.club/@AshBunny.json", + content: `"heck. I don't think I can take all of this support."` + }, + heatherhorns: { + url: "https://plush.city/@heatherhorns", + json: "https://plush.city/@heatherhorns.json", + content: `";~; + + gpsd gosh"` + }, + lindsays: { + url: "https://hackers.town/@lindsays", + json: "https://hackers.town/@lindsays.json", + content: `"She's an amazing, sweet, beautiful dork, and a spectacular best friend."` + }, +}; + +export default function Testimonials({ iconUrls }) { + return ( +
+ + Werefox Testimonials + + +
+ + +

+ Sometimes, people say some nice things about me. Here are some + examples! +

+
+ {Object.keys(USERS).map((user) => ( + + ))} + + +
+
+ ); +} diff --git a/src/info/tailwind.config.js b/src/info/tailwind.config.js index f9d96dc..22852bf 100644 --- a/src/info/tailwind.config.js +++ b/src/info/tailwind.config.js @@ -24,6 +24,18 @@ module.exports = { darker: "#121212", }, }, + flex: { + 5: "5 5 0%", + }, + keyframes: { + wiggle: { + "0%, 100%": { transform: "rotate(-2deg)" }, + "50%": { transform: "rotate(2deg)" }, + }, + }, + animation: { + wiggle: "wiggle 5s ease-in-out infinite", + }, }, }, variants: { diff --git a/start.sh b/start.sh index 6bb01e3..a2e6950 100755 --- a/start.sh +++ b/start.sh @@ -16,9 +16,10 @@ if [ ! -d "./src/info" ]; then sudo chown -R $USER:$USER ./src fi -if [ $MODE == "dev" ] || [ $MODE == "build" ] || [ $MODE == "prod" ]; then +if [ $MODE == "dev" ] || [ $MODE == "build" ] || [ $MODE == "start" ]; then sudo MODE=$MODE docker-compose up --build --force-recreate --remove-orphans -d + sudo docker-compose logs -f else - echo "Please use 'dev', 'build', or 'prod' as an argument." + echo "Please use 'dev', 'build', or 'start' as an argument." exit 1 fi \ No newline at end of file