Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
sin22766 committed Jul 16, 2023
2 parents e2ec3be + 45d3534 commit 4b8db22
Show file tree
Hide file tree
Showing 6 changed files with 50 additions and 8 deletions.
1 change: 1 addition & 0 deletions src/app.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<meta charset="utf-8" />
<link rel="icon" href="%sveltekit.assets%/favicon.png" />
<meta name="viewport" content="width=device-width" />
<link href='https://fonts.googleapis.com/css?family=Montserrat' rel='stylesheet'>
%sveltekit.head%
</head>
<body data-sveltekit-preload-data="hover">
Expand Down
3 changes: 0 additions & 3 deletions src/app.postcss
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
/* Write your global styles here, in PostCSS syntax */
@tailwind base;
@tailwind base;
@tailwind components;
@tailwind utilities;
@tailwind components;
@tailwind utilities;
33 changes: 33 additions & 0 deletions src/lib/components/ItemMenu.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<script lang="ts">
import Icon from "@iconify/svelte";
export let name = "Default",
ingredient = 0,
timeCook = 0,
imgID = "/Image.svg";
</script>

<div class="w-full justify-start items-center my-1 inline-flex flex items-center">
<div class="w-full h-16 flex">
<img
src={imgID}
alt=""
height="1.5rem"
class="relative flex-col justify-start items-start flex w-16 h-16"
/>
<div class="flex flex-col pl-4">
<h1 class="text-black text-base font-normal">{name}</h1>
<div class="text-black text-xs font-normal">
Expired in {ingredient} days
</div>
<div class="text-neutral-600 text-xs font-normal">
Amount : {timeCook} unit
</div>
</div>
</div>
<div>
<a href="/fridge">
<Icon icon="ic:baseline-arrow-forward-ios" />
</a>
</div>
</div>
7 changes: 3 additions & 4 deletions src/routes/+layout.svelte
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
<script lang="ts">
import { onMount } from 'svelte';
import { onMount } from 'svelte';
import '../app.postcss';
onMount(() => {
onMount(()=>{
Notification.requestPermission();
});
})
</script>

<slot />
6 changes: 6 additions & 0 deletions src/routes/fridge/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,12 @@
<a class="text-white" href="/fridge/add">+</a>
</div>
<nav class="fixed bottom-0 w-screen border-t-2 border-" />
<button on:click={()=>{
new Notification("Hello", {
body: "Hello, world!",
});
}}>--noti--
</button>
</div>
<Drawer
placement="bottom"
Expand Down
8 changes: 7 additions & 1 deletion tailwind.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,13 @@ const config = {
extend: {
boxShadow: {
'top': '0 -20px 60px -15px rgba(0, 0, 0, 0.3)',
}
},
fontFamily: {
'sans': ['Montserrat'],
'serif': ['Montserrat'],
'mono': ['Montserrat'],

}
}
},

Expand Down

0 comments on commit 4b8db22

Please sign in to comment.