feat: add icons to kmenu

This commit is contained in:
2023-08-02 13:11:17 +02:00
parent 32b6b04eb9
commit c7bcc0415a
13 changed files with 47 additions and 19 deletions

View File

@ -158,7 +158,7 @@ const GET = async (
processImage(imageUrl, params)
);
cache.setImage(resizedImage.slice(), {
cache.setImage(resizedImage, {
url: imageUrl,
width: params.width,
height: params.height,
@ -166,8 +166,9 @@ const GET = async (
});
console.log("[api/image] not-cached: " + imageUrl);
console.log({ imageUrl, resizedImage });
return new Response(resizedImage, {
return new Response(new Uint8Array(resizedImage), {
headers: {
"Content-Type": mediaType,
},

View File

@ -1,10 +1,10 @@
import { Handlers, PageProps } from "$fresh/server.ts";
import { MainLayout } from "@components/layouts/main.tsx";
import IconArrowLeft from "https://deno.land/x/tabler_icons_tsx@0.0.3/tsx/arrow-left.tsx";
import { Article, getAllArticles } from "@lib/resource/articles.ts";
import { Card } from "@components/Card.tsx";
import { KMenu } from "@islands/KMenu.tsx";
import { Grid } from "@components/Grid.tsx";
import { IconArrowLeft } from "@components/icons.tsx";
export const handler: Handlers<Article[] | null> = {
async GET(_, ctx) {

View File

@ -1,9 +1,10 @@
import { Handlers, PageProps } from "$fresh/server.ts";
import { MainLayout } from "@components/layouts/main.tsx";
import IconArrowLeft from "https://deno.land/x/tabler_icons_tsx@0.0.3/tsx/arrow-left.tsx";
import { getAllMovies, Movie } from "@lib/resource/movies.ts";
import { MovieCard } from "@components/MovieCard.tsx";
import { Grid } from "@components/Grid.tsx";
import { IconArrowLeft } from "@components/icons.tsx";
import { KMenu } from "@islands/KMenu.tsx";
export const handler: Handlers<Movie[] | null> = {
async GET(_, ctx) {
@ -15,6 +16,7 @@ export const handler: Handlers<Movie[] | null> = {
export default function Greet(props: PageProps<Movie[] | null>) {
return (
<MainLayout url={props.url}>
<KMenu type="main" context={false} />
<header class="flex gap-4 items-center mb-5 md:hidden">
<a
class="px-4 ml-4 py-2 bg-gray-300 text-gray-800 rounded-lg flex items-center gap-1"

View File

@ -2,8 +2,8 @@ import { Handlers, PageProps } from "$fresh/server.ts";
import { RecipeCard } from "@components/RecipeCard.tsx";
import { MainLayout } from "@components/layouts/main.tsx";
import { getAllRecipes, Recipe } from "@lib/resource/recipes.ts";
import IconArrowLeft from "https://deno.land/x/tabler_icons_tsx@0.0.3/tsx/arrow-left.tsx";
import { Grid } from "@components/Grid.tsx";
import { IconArrowLeft } from "@components/icons.tsx";
export const handler: Handlers<Recipe[] | null> = {
async GET(_, ctx) {