Skip to content

Commit 3d7a70f

Browse files
committed
bookmark card updates
1 parent 3491cda commit 3d7a70f

File tree

9 files changed

+183
-325
lines changed

9 files changed

+183
-325
lines changed

package-lock.json

Lines changed: 92 additions & 159 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "favbox",
3-
"version": "2.0.0",
3+
"version": "2.0.1",
44
"private": false,
55
"type": "module",
66
"scripts": {
@@ -26,7 +26,6 @@
2626
"@tiptap/starter-kit": "^2.9.1",
2727
"@tiptap/vue-3": "^2.9.1",
2828
"@vueuse/core": "^9.13.0",
29-
"@vueuse/motion": "^2.2.5",
3029
"@zanmato/vue3-treeselect": "^0.4.1",
3130
"floating-vue": "^5.2.2",
3231
"jsstore": "^4.7.4",

src/ext/browser/components/SearchTerm.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
class="flex items-center"
1010
>
1111
<AppBadge
12-
v-motion-fade
1312
closable
1413
:color="getColor(tag.key)"
1514
@onClose="onClose(tag.key, tag.value)"

src/ext/browser/components/card/BookmarkCard.vue

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
:is="displayComponent"
44
:key="bookmark.id"
55
:bookmark="bookmark"
6+
class="bookmark-card"
67
>
78
<template #actions>
89
<div class="absolute right-2 top-0 transition-opacity duration-300 ease-out group-hover:opacity-100">
@@ -83,3 +84,31 @@ const displayComponent = computed({
8384
},
8485
});
8586
</script>
87+
<style scoped>
88+
.bookmark-card {
89+
opacity: 0;
90+
transform: translateY(30px);
91+
filter: blur(8px) brightness(0.6);
92+
animation: fadeBlurUp 1s ease-out forwards;
93+
animation-timeline: view();
94+
animation-range: entry 0% entry 40%;
95+
}
96+
97+
@keyframes fadeBlurUp {
98+
0% {
99+
opacity: 0;
100+
transform: translateY(30px);
101+
filter: blur(8px) brightness(0.6);
102+
}
103+
60% {
104+
opacity: 0.8;
105+
transform: translateY(-2px);
106+
filter: blur(2px) brightness(0.9);
107+
}
108+
100% {
109+
opacity: 1;
110+
transform: translateY(0);
111+
filter: blur(0px) brightness(1);
112+
}
113+
}
114+
</style>

src/ext/browser/components/card/type/CardView.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<template>
22
<div
3-
v-motion-fade-visible-once
43
class="group relative w-full max-w-sm overflow-hidden rounded-md border border-solid border-gray-100 bg-white shadow-sm transition-transform duration-300 ease-in-out hover:-translate-y-1 dark:border-neutral-900 dark:bg-neutral-950"
54
>
65
<a

src/ext/browser/components/card/type/ListView.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<template>
22
<div
3-
v-motion-slide-visible-once-bottom
43
class="group relative min-h-min w-full overflow-hidden rounded-md border border-solid border-gray-100 bg-white p-3 shadow-sm dark:border-neutral-900 dark:bg-neutral-950"
54
>
65
<a
Lines changed: 61 additions & 156 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,45 @@
1-
<!-- eslint-disable tailwindcss/no-custom-classname -->
21
<template>
32
<div class="group relative">
4-
<!-- Main gradient background on hover -->
3+
<!-- Animated border background -->
54
<div
65
:class="[
7-
'duration-400 absolute -inset-1.5 rounded-xl opacity-0 blur-lg transition-all ease-out group-hover:opacity-40 group-hover:blur-xl dark:group-hover:opacity-50',
8-
gradient
6+
'absolute -inset-0.5 rounded-lg bg-gradient-to-r opacity-0 transition duration-500 group-hover:opacity-60',
7+
animatedBorderGradient
98
]"
109
/>
11-
12-
<!-- Subtle inner gradient for enhanced effect -->
10+
<!-- Glow effect -->
1311
<div
1412
:class="[
15-
'absolute -inset-0.5 rounded-lg opacity-0 blur-sm transition-all duration-300 ease-out group-hover:opacity-25 group-hover:blur-md',
16-
`${gradient}-inner`
17-
]"
18-
/>
19-
20-
<!-- Animated border -->
21-
<div
22-
:class="[
23-
'duration-400 absolute -inset-0.5 rounded-lg opacity-0 transition-all ease-out group-hover:opacity-50',
24-
`${gradient}-border`
13+
'absolute -inset-2 bg-black/10 opacity-0 blur-lg transition-all duration-300 hover:border-none group-hover:opacity-50 dark:z-0 dark:bg-white/10 dark:group-hover:opacity-100',
14+
gradient
2515
]"
2616
/>
27-
2817
<div
29-
v-motion-slide-visible-once-bottom
30-
class="group relative mb-3 min-h-max w-full max-w-md overflow-hidden rounded-md border border-solid border-gray-100 bg-white shadow-sm transition-all duration-300 ease-out hover:scale-[1.015] hover:border-transparent hover:shadow-lg hover:shadow-purple-500/5 dark:border-neutral-900 dark:bg-neutral-950 dark:shadow-sm dark:hover:shadow-lg dark:hover:shadow-purple-500/10"
18+
class="group relative mb-3 min-h-max w-full max-w-md overflow-hidden rounded-md border border-solid border-gray-100 bg-white shadow-sm hover:[box-shadow:0px_0px_0px_1px_rgba(233,_226,_238,_0.253)] dark:border-neutral-900 dark:bg-neutral-950 dark:shadow-sm dark:hover:[box-shadow:0px_0px_0px_1px_rgba(233,_226,_238,_0.253)]"
3119
>
3220
<a
3321
:href="bookmark.url"
3422
target="_blank"
3523
>
3624
<bookmark-image :bookmark="bookmark" />
37-
<div class="relative z-10 p-2">
38-
<h1 class="break-words text-sm text-black transition-colors duration-200 group-hover:text-purple-900 dark:text-white dark:group-hover:text-purple-100">{{ bookmark.title }}</h1>
39-
<p class="break-words py-2 text-xs text-gray-700 transition-colors duration-200 group-hover:text-gray-600 dark:text-neutral-500 dark:group-hover:text-neutral-400">
25+
<div class="p-2">
26+
<h1 class="break-words text-sm text-black dark:text-white">{{ bookmark.title }}</h1>
27+
<p class="break-words py-2 text-xs text-gray-700 dark:text-neutral-500">
4028
{{ bookmark.description }}
4129
</p>
4230
<div class="flex items-center gap-2">
4331
<bookmark-favicon
4432
:bookmark="bookmark"
45-
class="size-4 transition-transform duration-200 group-hover:scale-110"
33+
class="size-4"
4634
/>
47-
<span class="truncate text-xs font-thin text-soft-900 transition-colors duration-200 group-hover:text-gray-600 dark:text-neutral-500 dark:group-hover:text-neutral-400">
35+
<span class="truncate text-xs font-thin text-soft-900 dark:text-neutral-500">
4836
{{ bookmark.domain }}
4937
</span>
5038
</div>
5139
<div class="mt-2.5 flex flex-wrap gap-1">
5240
<app-badge
5341
v-for="(value, key) in bookmark.tags"
5442
:key="key"
55-
class="transition-all duration-200 group-hover:scale-105"
5643
>
5744
{{ value }}
5845
</app-badge>
@@ -78,165 +65,83 @@ defineProps({
7865
});
7966
8067
const gradients = [
81-
'aurora', 'cosmic', 'ocean', 'sunset', 'forest', 'neon', 'rainbow', 'fire', 'ice', 'galaxy',
68+
'green-blue-pink', 'pink-orange-purple', 'purple-green-yellow', 'red-yellow-blue',
69+
'blue-purple-orange', 'orange-green-purple', 'green-pink-yellow', 'pink-blue-yellow',
70+
'purple-pink-blue', 'orange-blue-purple',
71+
];
72+
73+
const animatedBorderGradients = [
74+
'from-gray-400 via-gray-100 to-gray-400',
75+
'from-slate-400 via-slate-200 to-slate-400',
76+
'from-cyan-400 via-blue-300 to-cyan-400',
77+
'from-indigo-400 via-violet-300 to-indigo-400',
78+
'from-sky-400 via-cyan-300 to-sky-400',
79+
'from-amber-400 via-orange-300 to-amber-400',
80+
'from-rose-400 via-pink-300 to-rose-400',
81+
'from-emerald-400 via-teal-300 to-emerald-400',
82+
'from-purple-400 via-fuchsia-300 to-purple-400',
83+
'from-lime-300 via-emerald-400 to-lime-300',
84+
'from-violet-400 via-purple-300 to-violet-400',
85+
'from-amber-500 via-yellow-300 to-amber-500',
86+
'from-blue-500 via-cyan-400 to-blue-500',
8287
];
8388
8489
const gradient = ref(gradients[Math.floor(Math.random() * gradients.length)]);
90+
const animatedBorderGradient = ref(animatedBorderGradients[Math.floor(Math.random() * animatedBorderGradients.length)]);
8591
</script>
8692

8793
<style scoped>
88-
/* Main gradients with reduced spread */
89-
.aurora {
90-
background: radial-gradient(ellipse at center, rgba(96, 165, 250, 0.3) 0%, rgba(168, 85, 247, 0.25) 40%, rgba(236, 72, 153, 0.2) 70%, transparent 90%);
91-
}
92-
93-
.cosmic {
94-
background: radial-gradient(ellipse at center, rgba(147, 51, 234, 0.35) 0%, rgba(79, 70, 229, 0.3) 35%, rgba(236, 72, 153, 0.25) 60%, transparent 85%);
95-
}
96-
97-
.ocean {
98-
background: radial-gradient(ellipse at center, rgba(6, 182, 212, 0.35) 0%, rgba(59, 130, 246, 0.3) 40%, rgba(168, 85, 247, 0.25) 70%, transparent 90%);
99-
}
100-
101-
.sunset {
102-
background: radial-gradient(ellipse at center, rgba(251, 146, 60, 0.35) 0%, rgba(239, 68, 68, 0.3) 40%, rgba(236, 72, 153, 0.25) 70%, transparent 90%);
103-
}
104-
105-
.forest {
106-
background: radial-gradient(ellipse at center, rgba(34, 197, 94, 0.35) 0%, rgba(132, 204, 22, 0.3) 40%, rgba(251, 191, 36, 0.25) 70%, transparent 90%);
107-
}
108-
109-
.neon {
110-
background: radial-gradient(ellipse at center, rgba(236, 72, 153, 0.4) 0%, rgba(168, 85, 247, 0.35) 35%, rgba(6, 182, 212, 0.25) 65%, transparent 85%);
111-
}
112-
113-
.rainbow {
114-
background: radial-gradient(ellipse at center, rgba(239, 68, 68, 0.25) 0%, rgba(251, 146, 60, 0.25) 20%, rgba(251, 191, 36, 0.25) 40%, rgba(34, 197, 94, 0.25) 60%, rgba(6, 182, 212, 0.25) 80%, transparent 95%);
115-
}
116-
117-
.fire {
118-
background: radial-gradient(ellipse at center, rgba(239, 68, 68, 0.4) 0%, rgba(251, 146, 60, 0.35) 40%, rgba(251, 191, 36, 0.25) 70%, transparent 90%);
119-
}
120-
121-
.ice {
122-
background: radial-gradient(ellipse at center, rgba(6, 182, 212, 0.35) 0%, rgba(59, 130, 246, 0.3) 40%, rgba(168, 85, 247, 0.25) 70%, transparent 90%);
123-
}
124-
125-
.galaxy {
126-
background: radial-gradient(ellipse at center, rgba(30, 41, 59, 0.4) 0%, rgba(88, 28, 135, 0.35) 35%, rgba(147, 51, 234, 0.25) 65%, transparent 85%);
127-
}
128-
129-
/* Inner gradients for enhanced effect */
130-
.aurora-inner {
131-
background: linear-gradient(45deg, rgba(96, 165, 250, 0.15) 0%, rgba(168, 85, 247, 0.12) 50%, rgba(236, 72, 153, 0.1) 100%);
132-
}
133-
134-
.cosmic-inner {
135-
background: linear-gradient(135deg, rgba(147, 51, 234, 0.18) 0%, rgba(79, 70, 229, 0.15) 50%, rgba(236, 72, 153, 0.12) 100%);
136-
}
137-
138-
.ocean-inner {
139-
background: linear-gradient(45deg, rgba(6, 182, 212, 0.18) 0%, rgba(59, 130, 246, 0.15) 50%, rgba(168, 85, 247, 0.12) 100%);
140-
}
141-
142-
.sunset-inner {
143-
background: linear-gradient(45deg, rgba(251, 146, 60, 0.18) 0%, rgba(239, 68, 68, 0.15) 50%, rgba(236, 72, 153, 0.12) 100%);
144-
}
145-
146-
.forest-inner {
147-
background: linear-gradient(45deg, rgba(34, 197, 94, 0.18) 0%, rgba(132, 204, 22, 0.15) 50%, rgba(251, 191, 36, 0.12) 100%);
148-
}
149-
150-
.neon-inner {
151-
background: linear-gradient(45deg, rgba(236, 72, 153, 0.2) 0%, rgba(168, 85, 247, 0.18) 50%, rgba(6, 182, 212, 0.15) 100%);
152-
}
153-
154-
.rainbow-inner {
155-
background: linear-gradient(45deg, rgba(239, 68, 68, 0.12) 0%, rgba(251, 191, 36, 0.12) 33%, rgba(34, 197, 94, 0.12) 66%, rgba(168, 85, 247, 0.12) 100%);
156-
}
157-
158-
.fire-inner {
159-
background: linear-gradient(45deg, rgba(239, 68, 68, 0.2) 0%, rgba(251, 146, 60, 0.18) 50%, rgba(251, 191, 36, 0.15) 100%);
160-
}
161-
162-
.ice-inner {
163-
background: linear-gradient(45deg, rgba(6, 182, 212, 0.18) 0%, rgba(59, 130, 246, 0.15) 50%, rgba(168, 85, 247, 0.12) 100%);
164-
}
165-
166-
.galaxy-inner {
167-
background: linear-gradient(45deg, rgba(30, 41, 59, 0.2) 0%, rgba(88, 28, 135, 0.18) 50%, rgba(147, 51, 234, 0.15) 100%);
94+
@keyframes gradient-shift {
95+
0%, 100% {
96+
background-position: 0% 50%;
97+
}
98+
50% {
99+
background-position: 100% 50%;
100+
}
168101
}
169102
170-
/* Subtle animated borders */
171-
.aurora-border {
172-
background: linear-gradient(90deg, rgba(96, 165, 250, 0.4), rgba(168, 85, 247, 0.4), rgba(236, 72, 153, 0.4), rgba(96, 165, 250, 0.4));
103+
.group:hover div[class*="from-"] {
173104
background-size: 200% 200%;
174-
animation: gradientShift 4s ease infinite;
105+
animation: gradient-shift 4s ease-in-out infinite;
175106
}
176107
177-
.cosmic-border {
178-
background: linear-gradient(90deg, rgba(147, 51, 234, 0.4), rgba(79, 70, 229, 0.4), rgba(236, 72, 153, 0.4), rgba(147, 51, 234, 0.4));
179-
background-size: 200% 200%;
180-
animation: gradientShift 4s ease infinite;
108+
.green-blue-pink {
109+
background: radial-gradient(circle, rgba(102, 255, 115, 0.3) 0%, rgba(102, 178, 255, 0.3) 40%, rgba(255, 102, 178, 0.3) 70%, transparent 100%);
181110
}
182111
183-
.ocean-border {
184-
background: linear-gradient(90deg, rgba(6, 182, 212, 0.4), rgba(59, 130, 246, 0.4), rgba(168, 85, 247, 0.4), rgba(6, 182, 212, 0.4));
185-
background-size: 200% 200%;
186-
animation: gradientShift 4s ease infinite;
112+
.pink-orange-purple {
113+
background: radial-gradient(circle, rgba(255, 102, 178, 0.3) 0%, rgba(255, 178, 102, 0.3) 40%, rgba(178, 102, 255, 0.3) 70%, transparent 100%);
187114
}
188115
189-
.sunset-border {
190-
background: linear-gradient(90deg, rgba(251, 146, 60, 0.4), rgba(239, 68, 68, 0.4), rgba(236, 72, 153, 0.4), rgba(251, 146, 60, 0.4));
191-
background-size: 200% 200%;
192-
animation: gradientShift 4s ease infinite;
116+
.purple-green-yellow {
117+
background: radial-gradient(circle, rgba(178, 102, 255, 0.3) 0%, rgba(102, 255, 178, 0.3) 40%, rgba(255, 255, 102, 0.3) 70%, transparent 100%);
193118
}
194119
195-
.forest-border {
196-
background: linear-gradient(90deg, rgba(34, 197, 94, 0.4), rgba(132, 204, 22, 0.4), rgba(251, 191, 36, 0.4), rgba(34, 197, 94, 0.4));
197-
background-size: 200% 200%;
198-
animation: gradientShift 4s ease infinite;
120+
.red-yellow-blue {
121+
background: radial-gradient(circle, rgba(255, 102, 102, 0.3) 0%, rgba(255, 255, 102, 0.3) 40%, rgba(102, 178, 255, 0.3) 70%, transparent 100%);
199122
}
200123
201-
.neon-border {
202-
background: linear-gradient(90deg, rgba(236, 72, 153, 0.5), rgba(168, 85, 247, 0.5), rgba(6, 182, 212, 0.5), rgba(236, 72, 153, 0.5));
203-
background-size: 200% 200%;
204-
animation: gradientShift 3s ease infinite;
124+
.blue-purple-orange {
125+
background: radial-gradient(circle, rgba(102, 204, 255, 0.3) 0%, rgba(204, 102, 255, 0.3) 40%, rgba(255, 204, 102, 0.3) 70%, transparent 100%);
205126
}
206127
207-
.rainbow-border {
208-
background: linear-gradient(90deg, rgba(239, 68, 68, 0.4), rgba(251, 146, 60, 0.4), rgba(251, 191, 36, 0.4), rgba(34, 197, 94, 0.4), rgba(6, 182, 212, 0.4), rgba(59, 130, 246, 0.4), rgba(168, 85, 247, 0.4));
209-
background-size: 300% 300%;
210-
animation: gradientShift 5s ease infinite;
128+
.orange-green-purple {
129+
background: radial-gradient(circle, rgba(255, 153, 102, 0.3) 0%, rgba(102, 255, 153, 0.3) 40%, rgba(153, 102, 255, 0.3) 70%, transparent 100%);
211130
}
212131
213-
.fire-border {
214-
background: linear-gradient(90deg, rgba(239, 68, 68, 0.5), rgba(251, 146, 60, 0.5), rgba(251, 191, 36, 0.4), rgba(239, 68, 68, 0.5));
215-
background-size: 200% 200%;
216-
animation: gradientShift 3s ease infinite;
132+
.green-pink-yellow {
133+
background: radial-gradient(circle, rgba(102, 255, 204, 0.3) 0%, rgba(255, 102, 204, 0.3) 40%, rgba(204, 255, 102, 0.3) 70%, transparent 100%);
217134
}
218135
219-
.ice-border {
220-
background: linear-gradient(90deg, rgba(6, 182, 212, 0.4), rgba(59, 130, 246, 0.4), rgba(168, 85, 247, 0.4), rgba(6, 182, 212, 0.4));
221-
background-size: 200% 200%;
222-
animation: gradientShift 4.5s ease infinite;
136+
.pink-blue-yellow {
137+
background: radial-gradient(circle, rgba(255, 102, 255, 0.3) 0%, rgba(102, 255, 255, 0.3) 40%, rgba(255, 255, 102, 0.3) 70%, transparent 100%);
223138
}
224139
225-
.galaxy-border {
226-
background: linear-gradient(90deg, rgba(30, 41, 59, 0.4), rgba(88, 28, 135, 0.4), rgba(147, 51, 234, 0.4), rgba(30, 41, 59, 0.4));
227-
background-size: 200% 200%;
228-
animation: gradientShift 5s ease infinite;
140+
.purple-pink-blue {
141+
background: radial-gradient(circle, rgba(153, 102, 255, 0.3) 0%, rgba(255, 102, 153, 0.3) 40%, rgba(102, 255, 255, 0.3) 70%, transparent 100%);
229142
}
230143
231-
@keyframes gradientShift {
232-
0% {
233-
background-position: 0% 50%;
234-
}
235-
50% {
236-
background-position: 100% 50%;
237-
}
238-
100% {
239-
background-position: 0% 50%;
240-
}
144+
.orange-blue-purple {
145+
background: radial-gradient(circle, rgba(255, 204, 102, 0.3) 0%, rgba(102, 204, 255, 0.3) 40%, rgba(204, 102, 255, 0.3) 70%, transparent 100%);
241146
}
242147
</style>

src/ext/browser/views/BookmarksView.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,6 @@ const handleRemove = async (bookmark) => {
231231
try {
232232
const id = bookmark.id.toString();
233233
await browser.bookmarks.remove(id);
234-
await bookmarkStorage.remove(id);
235234
bookmarksList.value = bookmarksList.value.filter((item) => item.id.toString() !== id);
236235
notify({ group: 'default', text: 'Bookmark successfully removed!' }, NOTIFICATION_DURATION);
237236
console.log(`Bookmark ${id} successfully removed`);

0 commit comments

Comments
 (0)