From 75b90c579a84102e4e299b3b7cc91c89b83cb51b Mon Sep 17 00:00:00 2001 From: exhq Date: Wed, 26 Jun 2024 14:55:12 +0330 Subject: [PATCH] tuaaaaa --- src/App.css | 111 ++++++++++++++++++++++++++++++++++++++- src/App.tsx | 52 ++++++++++++++---- src/components/music.tsx | 42 +++++++++++++++ src/components/utils.ts | 6 +++ 4 files changed, 199 insertions(+), 12 deletions(-) create mode 100644 src/components/music.tsx diff --git a/src/App.css b/src/App.css index 27a0ed2..c0e7f81 100644 --- a/src/App.css +++ b/src/App.css @@ -13,12 +13,90 @@ } +.musicartist { + font-weight: bolder; + margin-bottom: .5em; +} + +.musicbutton { + background-color: #272525; + color: pink; + font-family: Roboto, sans-serif; + font-weight: 500; + font-size: 14px; + padding: 10px 30px; + box-shadow: none; + border-radius: 5px; + transition: 639ms; + transform: translateY(0); + display: flex; + flex-direction: row; + align-items: center; + cursor: pointer; + border: none; +} + +.musicdiv { + background-color: rgba(0, 0, 0, 0.731); + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + display: flex; + justify-content: center; + align-items: center; + z-index: 1500; +} + +.music-close-button-div { + display: flex; + justify-content: end; +} + +.close-button { + margin: 1em; +} + +.musiclist { + display: flex; + justify-content: space-around; + font-size: larger; + flex-wrap: wrap; + height: 80%; + overflow-x: scroll; +} + +.innermusic { + width: 50%; + height: 50%; + border-radius: 2%; + background: rgb(100, 98, 98); + z-index: 1000; +} + +.musicbutton:hover { + border-radius: 5px; + transition: 639ms; + padding: 10px 30px; + transform: translateY(-1px); + border: none; + box-shadow: 0 0 534px -3px rgba(250, 236, 236, 0.4); + -webkit-box-shadow: 0 0 534px -3px rgba(250, 236, 236, 0.4); + -moz-box-shadow: 0 0 534px -3px rgba(250, 236, 236, 0.4); + 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; +} + + .actualreviewdiv { overflow-y: scroll; height: 18em; } -.cardchild:hover + .actualreviewdiv { +.cardchild:hover+.actualreviewdiv { transition: 1s; transform: rotateY(100); } @@ -46,6 +124,7 @@ .cardchild p { margin-bottom: -1.5em; } + .cardchild a { font-size: 1.5em; text-align: center; @@ -54,6 +133,7 @@ margin-bottom: 0%; animation: spawntop 1s; } + .cardchild span { font-size: 1.5em; } @@ -144,6 +224,34 @@ align-items: flex-start; } +.cssishard { + background-color: #121212; +} + +.singlemusic { + max-width: 15em; + margin: 1em; + border-radius: 3%; + background-color: #5e5a5a ; + display: flex; + align-items: flex-start; +} + +.singlemusic img { + max-width: 5em; +} + +.innermusic { + display: flex; + flex-direction: column; +} + +.reviewname { + margin-bottom: 0.1em; + font-weight: bolder; +} + + .reviewinfo { display: flex; flex-direction: column; @@ -239,6 +347,7 @@ opacity: 0%; transform: translateY(100em); } + 100% { opacity: 100%; transform: translateY(0); diff --git a/src/App.tsx b/src/App.tsx index 56cb046..b388a13 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,9 +1,11 @@ import './App.css' import HoverComponent from './components/name.tsx' import AdvancedBr from './components/comps.tsx' -import { createSignal } from 'solid-js'; +import { createSignal, onMount } from 'solid-js'; import Reviews from './components/api.tsx'; -export const [ishover, setishover]= createSignal(false) +import Music, { MusicEntry } from './components/music.tsx'; +export const [shouldpopup, setpopup] = createSignal(false) +export const [ishover, setishover] = createSignal(false) function App() { function remov() { for (let i = 0; i < document.styleSheets.length; i++) { @@ -17,9 +19,21 @@ function App() { } } } - + const [musicList, setMusicList] = createSignal([]); + const [isLoading, setIsLoading] = createSignal(true); const [isAnimating, setIsAnimating] = createSignal(false); const [animatedwoem, setanimatedwoem] = createSignal(false); + onMount(async () => { + try { + const response = await fetch("https://imtoolazytomakeaproperapi.exhq.dev/"); + const data = await response.json(); + setMusicList(data); + } catch (error) { + console.error("Error fetching music data:", error); + } finally { + setIsLoading(false); + } + }); let gitgay = { setIsAnimating(true) setTimeout(() => { @@ -28,7 +42,6 @@ function App() { gitgay.src = "/gaybackground.png" }} classList={{ 'gitgayimg': true, 'animate': isAnimating(), 'gaybackground': isAnimating() }} src="https://git.gay/assets/img/logo.png" alt="LMAO IMAGINE BEING BLIND" /> as HTMLImageElement return ( - <>
LMAO IMAGINE BEING BLIND @@ -67,19 +80,36 @@ function App() {
{setishover(true)}} - onmouseleave={() => {setishover(false)}} - style={{ - opacity: isAnimating() || animatedwoem() ? "0%" : "100%" - }} class='cardchild'> + onMouseEnter={() => { setishover(true) }} + onmouseleave={() => { setishover(false) }} + style={{ + opacity: isAnimating() || animatedwoem() ? "0%" : "100%" + }} class='cardchild'>
- +
- + { setpopup(!shouldpopup()) }} class="musicbutton" value="say gex" /> +
+ +
+
+
+ +
+
+ {isLoading() ? ( +

Loading...

+ ) : ( + musicList().map((link) => ) + )} +
+
+
+
) } diff --git a/src/components/music.tsx b/src/components/music.tsx new file mode 100644 index 0000000..f432c71 --- /dev/null +++ b/src/components/music.tsx @@ -0,0 +1,42 @@ +import { createSignal, onMount } from "solid-js"; + +export default function Music(props: { shouldpopup: () => boolean, children: any }) { + return
+ {props.children} +
+} + +export function MusicEntry({ spotifylink }: { spotifylink: string }) { + const [musicInfo, setMusicInfo] = createSignal({}) as any; + const [isLoading, setIsLoading] = createSignal(true); + onMount(async () => { + try { + const apiresponse = await fetch(`https://api.song.link/v1-alpha.1/links?url=spotify%253Atrack%253A${spotifylink}`) + const data = await apiresponse.json() + console.log(data) + setMusicInfo(data) + } catch (error) { + console.error("Error fetching music data from song.link:", error); + } finally { + setIsLoading(false); + } + }) + return ( + <>{isLoading() ? ( +

Loading...

+ ) : ( +
+ LMAO IMAGINE BEING BLIND +
+
{musicInfo().entitiesByUniqueId[`SPOTIFY_SONG::${spotifylink}`]?.artistName}
+
{musicInfo().entitiesByUniqueId[`SPOTIFY_SONG::${spotifylink}`]?.title}
+
+
+ )} + ) +} \ No newline at end of file diff --git a/src/components/utils.ts b/src/components/utils.ts index 1492251..ae815b2 100644 --- a/src/components/utils.ts +++ b/src/components/utils.ts @@ -11,6 +11,12 @@ export function removethething() { } } +// export interface song { +// entitiesByUniqueId: { + +// } +// } + export async function getLatestItems(apiUrl: string) { try { const response = await fetch(apiUrl);