i miss otachan

This commit is contained in:
amy 2024-10-25 19:23:34 +03:30
parent 21ffad6026
commit fa8f60dcdd
No known key found for this signature in database
7 changed files with 375 additions and 277 deletions

View file

@ -119,7 +119,7 @@
height: 18em; height: 18em;
} }
.cardchild:hover+.actualreviewdiv { .cardchild:hover + .actualreviewdiv {
transition: 1s; transition: 1s;
transform: rotateY(100); transform: rotateY(100);
} }
@ -132,7 +132,7 @@
} }
.cardchild h1 { .cardchild h1:not(:has(.listeningto)) {
font-size: 3em; font-size: 3em;
text-align: center; text-align: center;
} }
@ -151,7 +151,9 @@
color: pink; color: pink;
text-decoration: underline; text-decoration: underline;
margin-bottom: 0%; margin-bottom: 0%;
.fadein {
animation: spawntop 1s; animation: spawntop 1s;
}
} }
.cardchild span { .cardchild span {
@ -253,6 +255,7 @@
cursor: pointer; cursor: pointer;
min-width: 15em; min-width: 15em;
max-width: 15em; max-width: 15em;
word-wrap: anywhere;
margin: 1em; margin: 1em;
padding: 1em; padding: 1em;
border-radius: 3%; border-radius: 3%;
@ -371,7 +374,7 @@
@keyframes spawntop { @keyframes spawntop {
0% { 0% {
opacity: 0%; opacity: 0%;
transform: translateY(100em); transform: translateY(1em);
} }
100% { 100% {

View file

@ -121,7 +121,7 @@ function App() {
</div> </div>
</div> </div>
<AdvancedBr count={2} /> <AdvancedBr count={2} />
<div class='easteregg'> <div class='easteregg' style={{opacity: isAnimating() || animatedwoem() ? "0%" : "100%"}}>
<div class="musicbutton" onclick={() => { setpopup(!shouldpopup()) }}> <div class="musicbutton" onclick={() => { setpopup(!shouldpopup()) }}>
<p>typa shit ive been on</p><img style={{ <p>typa shit ive been on</p><img style={{
"margin-left": "0.3em", "margin-left": "0.3em",

View file

@ -1,5 +1,5 @@
import { createSignal, onMount } from "solid-js" import {createSignal, onMount} from "solid-js"
import { ishover } from "../App"; import {ishover} from "../App";
interface Review { interface Review {
reviewID: number; reviewID: number;
@ -44,8 +44,9 @@ export default function Reviews() {
<> <>
<a style={{ <a style={{
display: ishover() ? "inline" : "none" display: ishover() ? "inline" : "none"
}} href="https://discord.com/oauth2/authorize?client_id=1208380910525743134&response_type=token&redirect_uri=https%3A%2F%2Fexhq.dev%2Freview%2F&scope=identify"> }}
<p>add your reviews here</p> href="https://discord.com/oauth2/authorize?client_id=1208380910525743134&response_type=token&redirect_uri=https%3A%2F%2Fexhq.dev%2Freview%2F&scope=identify">
<p class="fadein">add your reviews here</p>
</a> </a>
<h1 class="reviewheadertext">Reviews</h1> <h1 class="reviewheadertext">Reviews</h1>
<div <div
@ -69,7 +70,7 @@ export default function Reviews() {
export const theImager = async (id: string): Promise<string> => (await fetch(`https://dc-lookup.mono.exhq.dev/v1/user/${id}`) export const theImager = async (id: string): Promise<string> => (await fetch(`https://dc-lookup.mono.exhq.dev/v1/user/${id}`)
.then(res => res.json()).then(data => data.avatar.link).catch(() => "https://http.cat/status/100")); .then(res => res.json()).then(data => data.avatar.link).catch(() => "https://http.cat/status/100"));
function SingleReview(props: NeoReview) { function SingleReview(props: NeoReview) {
const [imageSrc, setImageSrc] = createSignal(""); const [imageSrc, setImageSrc] = createSignal("");
onMount(async () => { onMount(async () => {
@ -82,7 +83,7 @@ export const theImager = async (id: string): Promise<string> => (await fetch(`ht
<img <img
src={imageSrc()} src={imageSrc()}
alt="User Avatar" alt="User Avatar"
style={{ "max-width": "3em", "border-radius": "30%" }} style={{"max-width": "3em", "border-radius": "30%"}}
/> />
<div class="reviewinfo"> <div class="reviewinfo">
<div class="reviewname"> <div class="reviewname">
@ -92,7 +93,8 @@ export const theImager = async (id: string): Promise<string> => (await fetch(`ht
</div> </div>
</div> </div>
); );
} }
export async function sendReview(review: string, token: string): Promise<boolean> { export async function sendReview(review: string, token: string): Promise<boolean> {
try { try {
const response = await fetch(`https://backendreview.mono.exhq.dev/sendreview?review=${review}`, { const response = await fetch(`https://backendreview.mono.exhq.dev/sendreview?review=${review}`, {

View file

@ -0,0 +1,6 @@
.listeningto {
font-size: smaller;
display: flex;
justify-content: center;
flex-direction: column;
}

View file

@ -0,0 +1,65 @@
import {createSignal, onMount, Show} from "solid-js";
import "./cumbrainz.css"
interface ListenPayload {
payload: {
count: number;
listens: Listen[];
playing_now: boolean;
user_id: string;
};
}
interface Listen {
playing_now: boolean;
track_metadata: TrackMetadata;
}
interface TrackMetadata {
additional_info: AdditionalInfo;
artist_name: string;
release_name: string;
track_name: string;
}
interface AdditionalInfo {
duration: number;
music_service_name: string;
origin_url: string;
submission_client: string;
submission_client_version: string;
}
export function Cumbrainz() {
const [musicInfo, setMusicInfo] = createSignal({} as ListenPayload);
const [isLoading, setIsLoading] = createSignal(true);
onMount(async () => {
try {
const the = await fetch("https://api.listenbrainz.org/1/user/exhq/playing-now")
const thejson = await the.json()
setMusicInfo(thejson)
} catch (error) {
console.error("Error fetching music data from song.link:", error);
} finally {
setIsLoading(false);
}
})
return <div class="listeningto">
<h2 >Listening to</h2>
<Show when={isLoading()} fallback={
<Show when={musicInfo().payload.listens.length > 0} fallback={<span>nothing</span>}>
<Thesong song={musicInfo()} />
</Show>
}>
<span>loading</span>
</Show>
</div>
}
function Thesong({song}: { song: ListenPayload }) {
return <a
href={song.payload.listens[0].track_metadata.additional_info.origin_url.replace(/\?.*/, m => `?v=${new URLSearchParams(m).get('v') ?? ''}`).replace(/(\?v=)$/, '')}>
<div> {song.payload.listens[0].track_metadata.artist_name} - {song.payload.listens[0].track_metadata.track_name} </div>
</a>
}

View file

@ -0,0 +1,11 @@
.middleparent {
display: flex;
flex-direction: column;
justify-content: space-evenly;
width: 100%;
height: 100%;
}
.middlechild {
text-align: center;
}

View file

@ -1,22 +1,33 @@
import { Cumbrainz } from "./cumbrainz"
import "./middlecard.css"
export interface InfoCardProps { export interface InfoCardProps {
bd: boolean bd: boolean
} }
export function InfoCard(props: InfoCardProps) { export function InfoCard(props: InfoCardProps) {
return props.bd ? <>
<h1>hi :3</h1> return <div class="middleparent">
<span>its my birthday <div class="middlechild">{
props.bd ?
<>
<span>
its my birthday
<br /> <br />
please buy me stuff please buy me stuff
</span> </span>
</> : </> : <>
<>
<h1>hi :3</h1>
<span>silly goober who does silly stuff <span>silly goober who does silly stuff
<br /> <br />
self proclaimed programmer and progamer self proclaimed programmer and progamer
<br /> <br />
shitposts for fun shitposts for fun
</span> </span>
</> </>}</div>
<div style={{"background-color": "gray", height: "1px"}}>
<br/>
</div>
<div class="middlechild">
<Cumbrainz></Cumbrainz>
</div>
</div>
} }