newcandies 0.1.26 → 0.1.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Ionicons } from '@expo/vector-icons';
|
|
2
|
+
import { Link, Stack } from 'expo-router';
|
|
3
|
+
import { Pressable, Text, View } from 'react-native';
|
|
4
|
+
import Screen from '~/components/ui/screen';
|
|
5
|
+
import Squircle from '~/components/ui/squircle';
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
export default function NotFoundScreen() {
|
|
10
|
+
return (
|
|
11
|
+
<Screen>
|
|
12
|
+
<Stack.Screen options={{ title: 'Not Found', headerShown: false }} />
|
|
13
|
+
<View className="flex-1 items-center justify-center px-8">
|
|
14
|
+
<Ionicons name="alert-circle-outline" size={80} color="black" />
|
|
15
|
+
<Text className="mt-6 text-2xl font-bold text-foreground">Page Not Found</Text>
|
|
16
|
+
<Text className="mt-2 text-center text-muted-foreground">
|
|
17
|
+
{"The page you're looking for doesn't exist."}
|
|
18
|
+
</Text>
|
|
19
|
+
<Link href="/" asChild>
|
|
20
|
+
<Pressable className="mt-8">
|
|
21
|
+
<Squircle
|
|
22
|
+
cornerSmoothing={1}
|
|
23
|
+
className="bg-primary px-6 py-3"
|
|
24
|
+
style={{ borderRadius: 14 }}>
|
|
25
|
+
<Text className="font-semibold text-primary-foreground">Go to Home</Text>
|
|
26
|
+
</Squircle>
|
|
27
|
+
</Pressable>
|
|
28
|
+
</Link>
|
|
29
|
+
</View>
|
|
30
|
+
</Screen>
|
|
31
|
+
);
|
|
32
|
+
}
|
package/templates/app-briefs/expo-router/cozynotes/src/components/screens/home/note-card.tsx
CHANGED
|
@@ -1,18 +1,23 @@
|
|
|
1
1
|
import { Ionicons } from '@expo/vector-icons';
|
|
2
2
|
import { Link } from 'expo-router';
|
|
3
3
|
import { Pressable, View } from 'react-native';
|
|
4
|
+
import { twMerge } from 'tailwind-merge';
|
|
4
5
|
|
|
5
6
|
import Squircle from '~/components/ui/squircle';
|
|
6
7
|
import Text from '~/components/ui/text';
|
|
7
|
-
import { Note } from '~/lib/constants';
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Get the rotation for the note card
|
|
12
|
+
*/
|
|
10
13
|
const getRotation = (index: number) => {
|
|
11
14
|
const rotations = [-4, 3, -2, 5, -3, 2, -5, 4];
|
|
12
15
|
return rotations[index % rotations.length];
|
|
13
|
-
};
|
|
16
|
+
};
|
|
14
17
|
|
|
15
|
-
|
|
18
|
+
/**
|
|
19
|
+
* Get the offset for the note card
|
|
20
|
+
*/
|
|
16
21
|
const getOffset = (index: number) => {
|
|
17
22
|
const offsets = [-50, 60, -40, 70, -55, 50, -35, 65];
|
|
18
23
|
return offsets[index % offsets.length];
|
|
@@ -25,33 +30,23 @@ const NoteCard = ({ note, index }: { note: Note; index: number }) => {
|
|
|
25
30
|
return (
|
|
26
31
|
<Link href={{ pathname: '/note/[id]', params: { id: note.id } }} asChild>
|
|
27
32
|
<Pressable
|
|
33
|
+
className={twMerge('-mb-[60px] self-center')}
|
|
28
34
|
style={{
|
|
29
|
-
marginBottom: -60,
|
|
30
|
-
alignSelf: 'center',
|
|
31
35
|
marginLeft: offsetX,
|
|
32
36
|
transform: [{ rotate: `${rotation}deg` }],
|
|
33
37
|
zIndex: index,
|
|
34
38
|
}}>
|
|
35
39
|
<Squircle
|
|
36
40
|
cornerSmoothing={1}
|
|
37
|
-
className="bg-card"
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
height: 324,
|
|
41
|
-
borderRadius: 24,
|
|
42
|
-
padding: 20,
|
|
43
|
-
}}>
|
|
44
|
-
{/* Menu dots */}
|
|
45
|
-
<View style={{ position: 'absolute', top: 16, right: 16 }}>
|
|
46
|
-
<Ionicons name="ellipsis-horizontal" size={18} color="var(--color-muted-foreground)" />
|
|
41
|
+
className="h-80 w-60 rounded-3xl bg-card p-5">
|
|
42
|
+
<View className="absolute right-4 top-4">
|
|
43
|
+
<Ionicons name="ellipsis-horizontal" size={18} color="black" />
|
|
47
44
|
</View>
|
|
48
45
|
|
|
49
|
-
{/* Title */}
|
|
50
46
|
<Text variant="subtitle" className="mb-2 mr-10" numberOfLines={2}>
|
|
51
47
|
{note.title}
|
|
52
48
|
</Text>
|
|
53
49
|
|
|
54
|
-
{/* Content */}
|
|
55
50
|
<Text variant="note" className="opacity-90" numberOfLines={10}>
|
|
56
51
|
{note.content}
|
|
57
52
|
</Text>
|
|
@@ -13,8 +13,8 @@ const BackButton = ({ icon = 'chevron-back' }: BackButtonProps) => {
|
|
|
13
13
|
<Pressable onPress={() => router.back()}>
|
|
14
14
|
<Squircle
|
|
15
15
|
cornerSmoothing={1}
|
|
16
|
-
className="size-12 items-center justify-center bg-card rounded-
|
|
17
|
-
<Ionicons name={icon} size={26} color="
|
|
16
|
+
className="size-12 items-center justify-center bg-card rounded-xl">
|
|
17
|
+
<Ionicons name={icon} size={26} color="black" />
|
|
18
18
|
</Squircle>
|
|
19
19
|
</Pressable>
|
|
20
20
|
);
|