From 3518e3ae4865d97a96d9d818957c8eb7733e446f Mon Sep 17 00:00:00 2001 From: exhq Date: Sun, 23 Jun 2024 18:16:44 +0330 Subject: [PATCH] meow --- src/App.css | 80 ++++++++++++++++++++++++++++++++++++---- src/App.jsx | 39 ++++++++++++++++---- src/components/api.jsx | 40 ++++++++++++++++++++ src/components/comps.jsx | 6 +++ src/components/utils.js | 22 ++++++++++- 5 files changed, 171 insertions(+), 16 deletions(-) create mode 100644 src/components/api.jsx create mode 100644 src/components/comps.jsx diff --git a/src/App.css b/src/App.css index d075b6c..b509da4 100644 --- a/src/App.css +++ b/src/App.css @@ -2,6 +2,7 @@ background-color: #121212; font-family: 'Courier New', Courier, monospace; overflow-x: hidden; + color: pink; } .header { @@ -10,13 +11,62 @@ align-items: center; justify-content: center; } + +.cardchild h1 { + text-align: center; +} + +.cardchild img { + max-width: 4em; + margin: 1em; +} + +.cardchild { + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + /* browsers agreeing on stuff challenge (impossible) */ + cursor: default; + background-color: #272525; + border-radius: 5%; + width: 20em; + padding: 0.5em 2em 2em 2em; + transform: translateY(-0em); + transition: background-color 1s, transform .5s, box-shadow .5s, -webkit-box-shadow .5s, -moz-box-shadow 0.5s; +} + +.cardchild:hover { + box-shadow: 0 0 234px -3px rgba(250, 236, 236, 0.75); + -webkit-box-shadow: 0 0 234px -3px rgba(250, 236, 236, 0.75); + -moz-box-shadow: 0 0 234px -3px rgba(250, 236, 236, 0.75); + background-color: #5e5a5a; + animation: big 500ms infinite; + transform: translateY(-0.3em); + transition: background-color 1s, transform .5s, box-shadow .5s, -webkit-box-shadow .5s, -moz-box-shadow 0.5s; +} + +.parent { + width: 100%; + height: 100%; + display: flex; + justify-content: space-evenly; +} + .header h1 { font-size: 2.5em; - color:blanchedalmond; + color: blanchedalmond; display: inline-table; } -.header h1:not(:active){ +.cardchild h2 { + display: inline-table; + vertical-align: text-bottom; +} + +.header h1:not(:active) { animation: slide-right 1.5s; } @@ -29,7 +79,7 @@ margin-right: 1em; vertical-align: middle; max-width: 10em; - animation: slide-left 1.5s ; + animation: slide-left 1.5s; } @keyframes slide-left { @@ -53,9 +103,23 @@ } @keyframes shake { - 0% { transform: translate(0, 0) rotate(0deg); } - 25% { transform: translate(5px, 5px) rotate(5deg); } - 50% { transform: translate(0, 0) rotate(0eg); } - 75% { transform: translate(-5px, 5px) rotate(-5deg); } - 100% { transform: translate(0, 0) rotate(0deg); } + 0% { + transform: translate(0, 0) rotate(0deg); + } + + 25% { + transform: translate(5px, 5px) rotate(5deg); + } + + 50% { + transform: translate(0, 0) rotate(0eg); + } + + 75% { + transform: translate(-5px, 5px) rotate(-5deg); + } + + 100% { + transform: translate(0, 0) rotate(0deg); + } } \ No newline at end of file diff --git a/src/App.jsx b/src/App.jsx index 32f0189..f29e9e2 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -1,19 +1,44 @@ import { createSignal } from 'solid-js' import './App.css' import HoverComponent from './components/name' +import AdvancedBr from './components/comps' +import Review from './components/api' function App() { - const [count, setCount] = createSignal(0) return ( <> -
- Vite logo - + Vite logo +
- + + +

AdvancedBr my beloved

+ + + +
+
+

link tree

+ LMAO IMAGINE BEING BLIND + + +
+ +
+

hi :3

+ silly goober who does silly stuff
self proclaimed programmer and progamer
shitposts for fun
+
+ +
+

reviews

+ +
+
+ ) } diff --git a/src/components/api.jsx b/src/components/api.jsx new file mode 100644 index 0000000..a36021d --- /dev/null +++ b/src/components/api.jsx @@ -0,0 +1,40 @@ +import { createSignal, createEffect } from 'solid-js'; + +const Review = () => { + // State to store the fetched data + const [data, setData] = createSignal([]); + const [name, setName] = createSignal([]); + let colontree = {} + + + createEffect(() => { + + fetch('https://api.review.exhq.dev/getreviews/') + .then(res => res.json()) + .then(jsonData => { + setData(jsonData); + }) + .catch(error => { + console.error('Error fetching data:', error); + }); + + +https://adu.shiggy.fun/v1/ + + for (let i = 0; i < data().length; i++) { + + fetch(`https://discordlookup.mesalytic.moe/v1/user/${data()[i].discordID}`) + .then(res => res.json()).then(console.log) + } + }); + + return ( +
+ {data().reverse().map(i => ( +
  • {i.discordID}
  • + ))} +
    + ); +}; + +export default Review; \ No newline at end of file diff --git a/src/components/comps.jsx b/src/components/comps.jsx new file mode 100644 index 0000000..4202ee2 --- /dev/null +++ b/src/components/comps.jsx @@ -0,0 +1,6 @@ +// warning: this IS horrible code. its a joke. DO NOT try this at home because +// your local senior programmer CAN and WILL hunt you down +// you have been warned. +export default function AdvancedBr({ count }) { + return new Array(count).fill(null).map(_=>(
    )) +} \ No newline at end of file diff --git a/src/components/utils.js b/src/components/utils.js index f8c3202..aa70b07 100644 --- a/src/components/utils.js +++ b/src/components/utils.js @@ -9,4 +9,24 @@ export function removethething() { } } } -} \ No newline at end of file +} + +export async function getLatestItems(apiUrl) { + try { + const response = await fetch(apiUrl); + if (!response.ok) { + throw new Error(`API call failed with status ${response.status}`); + } + const data = await response.json(); + // Check if data is an array + if (!Array.isArray(data)) { + throw new Error('API response is not an array'); + } + // Slice the last 5 items + const lastFive = data.slice(-5); + // Print or use the lastFive array as needed + return lastFive; + } catch (error) { + console.error('Error fetching data:', error); + } +}