bla
This commit is contained in:
parent
630c777022
commit
dee8d9cc6b
|
|
@ -34,7 +34,7 @@
|
|||
},
|
||||
"devDependencies": {
|
||||
"@angular/build": "^20.1.3",
|
||||
"@angular/cli": "^20.1.3",
|
||||
"@angular/cli": "^21.1.0",
|
||||
"@angular/compiler-cli": "^20.1.0",
|
||||
"@types/jasmine": "~5.1.0",
|
||||
"daisyui": "^5.1.22",
|
||||
|
|
|
|||
|
|
@ -1,33 +0,0 @@
|
|||
export type ColorApi = Color[]
|
||||
|
||||
export interface Color {
|
||||
id: number
|
||||
title: string
|
||||
userName: string
|
||||
numViews: number
|
||||
numVotes: number
|
||||
numComments: number
|
||||
numHearts: number
|
||||
rank: number
|
||||
dateCreated: string
|
||||
hex: string
|
||||
rgb: Rgb
|
||||
hsv: Hsv
|
||||
description: string
|
||||
url: string
|
||||
imageUrl: string
|
||||
badgeUrl: string
|
||||
apiUrl: string
|
||||
}
|
||||
|
||||
export interface Rgb {
|
||||
red: number
|
||||
green: number
|
||||
blue: number
|
||||
}
|
||||
|
||||
export interface Hsv {
|
||||
hue: number
|
||||
saturation: number
|
||||
value: number
|
||||
}
|
||||
|
|
@ -1,15 +1,3 @@
|
|||
<!-- <div class="card bg-base-100 w-96 shadow-sm">
|
||||
<div class="card-body">
|
||||
<h2 class="card-title">{{nasaPOTD()?.title}}</h2>
|
||||
<p>{{nasaPOTD()?.explanation}}</p>
|
||||
</div>
|
||||
<figure>
|
||||
<img
|
||||
src={{nasaPOTD()?.url}}
|
||||
alt="Nasa picture of the day" />
|
||||
</figure>
|
||||
</div> -->
|
||||
|
||||
<div class="hero bg-base-200 min-h-screen">
|
||||
<div class="hero-content flex-col lg:flex-col">
|
||||
<img
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ import { Picture } from '../../interfaces/picture';
|
|||
})
|
||||
export class POTD {
|
||||
|
||||
private nasaApi = inject(NAPOD)
|
||||
private readonly nasaApi = inject(NAPOD)
|
||||
nasaPOTD = signal< Picture | null >(null)
|
||||
|
||||
constructor(){
|
||||
|
|
|
|||
|
|
@ -35,8 +35,6 @@
|
|||
<ul class="list bg-base-100 rounded-box shadow-md">
|
||||
|
||||
<li class="p-4 pb-2 text-xs opacity-60 tracking-wide">Results</li>
|
||||
<!-- TODO why the fuck is nasaData an array?-->
|
||||
|
||||
@for(el of searchResults()!.collection.items; track el.data[0].nasa_id){
|
||||
<li class="list-row">
|
||||
<!-- 2 for small image -->
|
||||
|
|
@ -51,9 +49,6 @@
|
|||
<button class="btn btn-square btn-ghost" (click)="onClick(el.data[0].nasa_id)">
|
||||
<svg class="size-[1.2em]" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g stroke-linejoin="round" stroke-linecap="round" stroke-width="2" fill="none" stroke="currentColor"><path d="M6 3L20 12 6 21 6 3z"></path></g></svg>
|
||||
</button>
|
||||
<!-- <button class="btn btn-square btn-ghost">
|
||||
<svg class="size-[1.2em]" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g stroke-linejoin="round" stroke-linecap="round" stroke-width="2" fill="none" stroke="currentColor"><path d="M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z"></path></g></svg>
|
||||
</button> -->
|
||||
</li>
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -120,8 +120,4 @@ export class Auth {
|
|||
return
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,7 +17,6 @@ export class NAPOD {
|
|||
}
|
||||
|
||||
searchForVideos(query: string){
|
||||
// TODO: Si vide?
|
||||
return this.http.get<NasaApi>(`${environment.NASA_API_IMAGE_BASE_URL}/search?q=${query}&media_type=video&page_size=5`)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue