@armoyu/ui 1.0.1 → 1.0.3
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/dist/app/Providers.d.ts +6 -0
- package/dist/app/Providers.d.ts.map +1 -0
- package/dist/app/Providers.js +37 -0
- package/dist/app/Providers.js.map +1 -0
- package/dist/app/api/proxy/[...path]/route.d.ts +22 -0
- package/dist/app/api/proxy/[...path]/route.d.ts.map +1 -0
- package/dist/app/api/proxy/[...path]/route.js +97 -0
- package/dist/app/api/proxy/[...path]/route.js.map +1 -0
- package/dist/app/layout.d.ts.map +1 -1
- package/dist/app/layout.js +16 -23
- package/dist/app/layout.js.map +1 -1
- package/dist/components/RollingNumber.d.ts +6 -6
- package/dist/components/RollingNumber.js +23 -23
- package/dist/components/RollingNumber.js.map +1 -1
- package/dist/components/StatsGrid.d.ts +5 -5
- package/dist/components/modules/auth/Dashboard.d.ts +1 -1
- package/dist/components/modules/auth/PostCard.d.ts +25 -24
- package/dist/components/modules/auth/PostCard.d.ts.map +1 -1
- package/dist/components/modules/auth/PostCard.js +115 -112
- package/dist/components/modules/auth/PostCard.js.map +1 -1
- package/dist/components/modules/auth/PostInteractionsModal.d.ts +11 -11
- package/dist/components/modules/auth/RepostModal.d.ts +21 -21
- package/dist/components/modules/auth/SidebarLeft.d.ts +1 -1
- package/dist/components/modules/auth/SidebarLeft.d.ts.map +1 -1
- package/dist/components/modules/auth/SidebarLeft.js +8 -40
- package/dist/components/modules/auth/SidebarLeft.js.map +1 -1
- package/dist/components/modules/auth/Stories.d.ts +1 -1
- package/dist/components/modules/auth/StoryViewer.d.ts +9 -9
- package/dist/components/modules/auth/widgets/EconomyWidget.d.ts +2 -0
- package/dist/components/modules/auth/widgets/EconomyWidget.d.ts.map +1 -0
- package/dist/components/modules/auth/widgets/EconomyWidget.js +38 -0
- package/dist/components/modules/auth/widgets/EconomyWidget.js.map +1 -0
- package/dist/components/modules/auth/widgets/LeagueWidget.d.ts +2 -0
- package/dist/components/modules/auth/widgets/LeagueWidget.d.ts.map +1 -0
- package/dist/components/modules/auth/widgets/LeagueWidget.js +36 -0
- package/dist/components/modules/auth/widgets/LeagueWidget.js.map +1 -0
- package/dist/components/modules/auth/widgets/MinecraftWidget.d.ts +2 -0
- package/dist/components/modules/auth/widgets/MinecraftWidget.d.ts.map +1 -0
- package/dist/components/modules/auth/widgets/MinecraftWidget.js +36 -0
- package/dist/components/modules/auth/widgets/MinecraftWidget.js.map +1 -0
- package/dist/components/modules/auth/widgets/RankingWidget.d.ts +5 -0
- package/dist/components/modules/auth/widgets/RankingWidget.d.ts.map +1 -0
- package/dist/components/modules/auth/widgets/RankingWidget.js +79 -0
- package/dist/components/modules/auth/widgets/RankingWidget.js.map +1 -0
- package/dist/components/modules/chat/ChatContainer.d.ts +1 -1
- package/dist/components/modules/chat/ChatInput.d.ts +4 -4
- package/dist/components/modules/chat/ChatList.d.ts +6 -6
- package/dist/components/modules/chat/ChatNotes.d.ts +1 -1
- package/dist/components/modules/community/GroupHeader.d.ts +10 -10
- package/dist/components/modules/community/GroupMenu.d.ts +9 -9
- package/dist/components/modules/community/SchoolCard.d.ts +6 -6
- package/dist/components/modules/community/SurveyCard.d.ts +6 -6
- package/dist/components/modules/forum/ForumBoard.d.ts +16 -16
- package/dist/components/modules/forum/ForumBoard.js +6 -6
- package/dist/components/modules/forum/ForumBoard.js.map +1 -1
- package/dist/components/modules/forum/TopicItem.d.ts +15 -15
- package/dist/components/modules/forum/TopicItem.js +6 -6
- package/dist/components/modules/forum/TopicItem.js.map +1 -1
- package/dist/components/modules/guest/Introduction.d.ts +1 -1
- package/dist/components/modules/magaza/BackToStore.d.ts +1 -1
- package/dist/components/modules/magaza/StoreHeader.d.ts +5 -5
- package/dist/components/modules/news/NewsCard.d.ts +11 -11
- package/dist/components/modules/news/NewsComments.d.ts +1 -1
- package/dist/components/modules/profile/ProfileContent.d.ts +4 -4
- package/dist/components/modules/profile/ProfileContent.d.ts.map +1 -1
- package/dist/components/modules/profile/ProfileContent.js +98 -70
- package/dist/components/modules/profile/ProfileContent.js.map +1 -1
- package/dist/components/modules/profile/ProfileHeader.d.ts +7 -7
- package/dist/components/modules/profile/ProfileHeader.js +19 -19
- package/dist/components/modules/profile/ProfileHeader.js.map +1 -1
- package/dist/components/modules/profile/ProfileStats.d.ts +6 -1
- package/dist/components/modules/profile/ProfileStats.d.ts.map +1 -1
- package/dist/components/modules/profile/ProfileStats.js +11 -6
- package/dist/components/modules/profile/ProfileStats.js.map +1 -1
- package/dist/components/modules/profile/TeamSelectorModal.d.ts +10 -10
- package/dist/components/modules/profile/tabs/AboutTab.d.ts +10 -0
- package/dist/components/modules/profile/tabs/AboutTab.d.ts.map +1 -0
- package/dist/components/modules/profile/tabs/AboutTab.js +9 -0
- package/dist/components/modules/profile/tabs/AboutTab.js.map +1 -0
- package/dist/components/modules/profile/tabs/CareerTab.d.ts +7 -0
- package/dist/components/modules/profile/tabs/CareerTab.d.ts.map +1 -0
- package/dist/components/modules/profile/tabs/CareerTab.js +46 -0
- package/dist/components/modules/profile/tabs/CareerTab.js.map +1 -0
- package/dist/components/modules/profile/tabs/FriendsTab.d.ts +7 -0
- package/dist/components/modules/profile/tabs/FriendsTab.d.ts.map +1 -0
- package/dist/components/modules/profile/tabs/FriendsTab.js +8 -0
- package/dist/components/modules/profile/tabs/FriendsTab.js.map +1 -0
- package/dist/components/modules/profile/tabs/GamesTab.d.ts +7 -0
- package/dist/components/modules/profile/tabs/GamesTab.d.ts.map +1 -0
- package/dist/components/modules/profile/tabs/GamesTab.js +37 -0
- package/dist/components/modules/profile/tabs/GamesTab.js.map +1 -0
- package/dist/components/modules/profile/tabs/PostsTab.d.ts +7 -0
- package/dist/components/modules/profile/tabs/PostsTab.d.ts.map +1 -0
- package/dist/components/modules/profile/tabs/PostsTab.js +81 -0
- package/dist/components/modules/profile/tabs/PostsTab.js.map +1 -0
- package/dist/components/modules/profile/widgets/ProfileBadgesWidget.d.ts +2 -0
- package/dist/components/modules/profile/widgets/ProfileBadgesWidget.d.ts.map +1 -0
- package/dist/components/modules/profile/widgets/ProfileBadgesWidget.js +6 -0
- package/dist/components/modules/profile/widgets/ProfileBadgesWidget.js.map +1 -0
- package/dist/components/modules/profile/widgets/ProfileCloudWidget.d.ts +6 -0
- package/dist/components/modules/profile/widgets/ProfileCloudWidget.d.ts.map +1 -0
- package/dist/components/modules/profile/widgets/ProfileCloudWidget.js +6 -0
- package/dist/components/modules/profile/widgets/ProfileCloudWidget.js.map +1 -0
- package/dist/components/modules/profile/widgets/ProfileFriendsWidget.d.ts +8 -0
- package/dist/components/modules/profile/widgets/ProfileFriendsWidget.d.ts.map +1 -0
- package/dist/components/modules/profile/widgets/ProfileFriendsWidget.js +12 -0
- package/dist/components/modules/profile/widgets/ProfileFriendsWidget.js.map +1 -0
- package/dist/components/modules/stations/StationCard.d.ts +2 -2
- package/dist/components/modules/stations/StationQRModal.d.ts +9 -9
- package/dist/components/shared/DevTools.d.ts +2 -0
- package/dist/components/shared/DevTools.d.ts.map +1 -0
- package/dist/components/shared/DevTools.js +39 -0
- package/dist/components/shared/DevTools.js.map +1 -0
- package/dist/components/shared/FloatingChatButton.d.ts +4 -4
- package/dist/components/shared/Header.d.ts +1 -1
- package/dist/components/shared/Header.d.ts.map +1 -1
- package/dist/components/shared/Header.js +108 -97
- package/dist/components/shared/Header.js.map +1 -1
- package/dist/components/shared/LoginModal.d.ts +4 -4
- package/dist/components/shared/LoginModal.d.ts.map +1 -1
- package/dist/components/shared/LoginModal.js +65 -69
- package/dist/components/shared/LoginModal.js.map +1 -1
- package/dist/components/shared/MainLayoutWrapper.d.ts +3 -3
- package/dist/components/showcase/ProfileTab.d.ts.map +1 -1
- package/dist/components/showcase/ProfileTab.js +43 -3
- package/dist/components/showcase/ProfileTab.js.map +1 -1
- package/dist/components/showcase/SocialTab.d.ts.map +1 -1
- package/dist/components/showcase/SocialTab.js +86 -2
- package/dist/components/showcase/SocialTab.js.map +1 -1
- package/dist/context/ArmoyuContext.d.ts +42 -0
- package/dist/context/ArmoyuContext.d.ts.map +1 -0
- package/dist/context/ArmoyuContext.js +76 -0
- package/dist/context/ArmoyuContext.js.map +1 -0
- package/dist/context/AuthContext.d.ts +18 -18
- package/dist/context/AuthContext.d.ts.map +1 -1
- package/dist/context/AuthContext.js +97 -74
- package/dist/context/AuthContext.js.map +1 -1
- package/dist/context/CartContext.d.ts +16 -16
- package/dist/context/SocketContext.d.ts +12 -12
- package/dist/context/SocketContext.d.ts.map +1 -1
- package/dist/context/SocketContext.js +31 -30
- package/dist/context/SocketContext.js.map +1 -1
- package/dist/index.d.ts +67 -65
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +83 -80
- package/dist/index.js.map +1 -1
- package/dist/lib/ArmoyuUI.d.ts +18 -0
- package/dist/lib/ArmoyuUI.d.ts.map +1 -0
- package/dist/lib/ArmoyuUI.js +25 -0
- package/dist/lib/ArmoyuUI.js.map +1 -0
- package/dist/lib/constants/educationData.d.ts +7 -7
- package/dist/lib/constants/seedData.d.ts +164 -164
- package/dist/lib/constants/seedData.d.ts.map +1 -1
- package/dist/lib/constants/seedData.js +694 -694
- package/dist/lib/constants/seedData.js.map +1 -1
- package/dist/lib/constants/stationData.d.ts +13 -13
- package/dist/lib/constants/stationData.js +166 -166
- package/dist/lib/constants/stationData.js.map +1 -1
- package/dist/lib/constants/surveyData.d.ts +2 -2
- package/dist/lib/constants/teamData.d.ts +12 -12
- package/package.json +14 -12
- package/next.config.ts +0 -13
- package/postcss.config.js +0 -6
- package/src/app/layout.tsx +0 -67
- package/src/app/page.tsx +0 -101
- package/src/components/Button.tsx +0 -41
- package/src/components/GenderStatsBar.tsx +0 -66
- package/src/components/RollingNumber.tsx +0 -50
- package/src/components/Slider.tsx +0 -114
- package/src/components/StatsGrid.tsx +0 -35
- package/src/components/ViewModeToggle.tsx +0 -39
- package/src/components/modules/auth/Dashboard.tsx +0 -649
- package/src/components/modules/auth/MediaLightbox.tsx +0 -112
- package/src/components/modules/auth/PostCard.tsx +0 -556
- package/src/components/modules/auth/PostInteractionsModal.tsx +0 -138
- package/src/components/modules/auth/RepostModal.tsx +0 -167
- package/src/components/modules/auth/SidebarLeft.tsx +0 -237
- package/src/components/modules/auth/Stories.tsx +0 -69
- package/src/components/modules/auth/StoryViewer.tsx +0 -146
- package/src/components/modules/chat/ChatContainer.tsx +0 -332
- package/src/components/modules/chat/ChatInput.tsx +0 -57
- package/src/components/modules/chat/ChatList.tsx +0 -179
- package/src/components/modules/chat/ChatMessage.tsx +0 -43
- package/src/components/modules/chat/ChatNotes.tsx +0 -58
- package/src/components/modules/community/GroupHeader.tsx +0 -111
- package/src/components/modules/community/GroupMenu.tsx +0 -82
- package/src/components/modules/community/SchoolCard.tsx +0 -104
- package/src/components/modules/community/SurveyCard.tsx +0 -149
- package/src/components/modules/forum/ForumBoard.tsx +0 -78
- package/src/components/modules/forum/ForumPost.tsx +0 -71
- package/src/components/modules/forum/NewTopicModal.tsx +0 -112
- package/src/components/modules/forum/TopicItem.tsx +0 -72
- package/src/components/modules/galleries/GalleryCard.tsx +0 -66
- package/src/components/modules/giveaways/GiveawayCard.tsx +0 -76
- package/src/components/modules/groups/ApplicationModal.tsx +0 -133
- package/src/components/modules/groups/GroupCard.tsx +0 -96
- package/src/components/modules/guest/Introduction.tsx +0 -60
- package/src/components/modules/magaza/BackToStore.tsx +0 -53
- package/src/components/modules/magaza/StoreHeader.tsx +0 -74
- package/src/components/modules/news/NewsCard.tsx +0 -66
- package/src/components/modules/news/NewsComments.tsx +0 -141
- package/src/components/modules/profile/CloudStorageModal.tsx +0 -200
- package/src/components/modules/profile/EditProfileModal.tsx +0 -191
- package/src/components/modules/profile/ProfileContent.tsx +0 -491
- package/src/components/modules/profile/ProfileHeader.tsx +0 -128
- package/src/components/modules/profile/ProfileStats.tsx +0 -72
- package/src/components/modules/profile/TeamSelectorModal.tsx +0 -129
- package/src/components/modules/stations/StationCard.tsx +0 -95
- package/src/components/modules/stations/StationQRModal.tsx +0 -102
- package/src/components/shared/FloatingChatButton.tsx +0 -57
- package/src/components/shared/Footer.tsx +0 -77
- package/src/components/shared/Header.tsx +0 -799
- package/src/components/shared/LoginModal.tsx +0 -208
- package/src/components/shared/MainLayoutWrapper.tsx +0 -15
- package/src/components/shared/PageWidth.tsx +0 -22
- package/src/components/showcase/CommunityTab.tsx +0 -22
- package/src/components/showcase/CorporateTab.tsx +0 -38
- package/src/components/showcase/GeneralTab.tsx +0 -41
- package/src/components/showcase/MessagesTab.tsx +0 -26
- package/src/components/showcase/ProfileTab.tsx +0 -20
- package/src/components/showcase/ShopTab.tsx +0 -24
- package/src/components/showcase/SocialTab.tsx +0 -28
- package/src/context/AuthContext.tsx +0 -104
- package/src/context/CartContext.tsx +0 -93
- package/src/context/ChatContext.tsx +0 -32
- package/src/context/LayoutContext.tsx +0 -29
- package/src/context/SocketContext.tsx +0 -50
- package/src/context/ThemeContext.tsx +0 -52
- package/src/index.ts +0 -96
- package/src/lib/constants/educationData.ts +0 -124
- package/src/lib/constants/punishmentData.ts +0 -201
- package/src/lib/constants/seedData.ts +0 -758
- package/src/lib/constants/stationData.ts +0 -170
- package/src/lib/constants/surveyData.ts +0 -53
- package/src/lib/constants/teamData.ts +0 -69
- package/src/lib/utils/numberFormat.ts +0 -16
- package/src/lib/utils/odpUtils.ts +0 -51
- package/src/types/index.ts +0 -1
- package/src/types/stats.ts +0 -17
|
@@ -1,149 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import React, { useState } from 'react';
|
|
4
|
-
import { Survey, SurveyAnswer } from '@armoyu/core';
|
|
5
|
-
import { CheckCircle2, Users, Calendar, BarChart3 } from 'lucide-react';
|
|
6
|
-
|
|
7
|
-
interface SurveyCardProps {
|
|
8
|
-
survey: Survey;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export function SurveyCard({ survey }: SurveyCardProps) {
|
|
12
|
-
const [hasVoted, setHasVoted] = useState(survey.hasVoted);
|
|
13
|
-
const [myVoteId, setMyVoteId] = useState(survey.myVoteId);
|
|
14
|
-
const [options, setOptions] = useState<SurveyAnswer[]>(survey.options);
|
|
15
|
-
const [totalVotes, setTotalVotes] = useState(survey.totalVotes);
|
|
16
|
-
|
|
17
|
-
const handleVote = (optionId: string) => {
|
|
18
|
-
if (hasVoted) return;
|
|
19
|
-
|
|
20
|
-
// Optimistic Update
|
|
21
|
-
setHasVoted(true);
|
|
22
|
-
setMyVoteId(optionId);
|
|
23
|
-
setTotalVotes(prev => prev + 1);
|
|
24
|
-
setOptions(prev => prev.map(opt => {
|
|
25
|
-
if (opt.id === optionId) {
|
|
26
|
-
return new SurveyAnswer({ ...opt, votes: opt.votes + 1 });
|
|
27
|
-
}
|
|
28
|
-
return opt;
|
|
29
|
-
}));
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
const getPercentage = (votes: number) => {
|
|
33
|
-
if (totalVotes === 0) return 0;
|
|
34
|
-
return Math.round((votes / totalVotes) * 100);
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
return (
|
|
38
|
-
<div className="glass-panel p-6 md:p-8 rounded-[40px] border border-armoyu-card-border bg-armoyu-card-bg shadow-xl hover:shadow-2xl transition-all duration-500 overflow-hidden relative group">
|
|
39
|
-
{/* Decorative Gradient Line */}
|
|
40
|
-
<div className="absolute top-0 left-0 w-full h-1 bg-gradient-to-r from-blue-500 via-indigo-500 to-purple-500 opacity-70"></div>
|
|
41
|
-
|
|
42
|
-
<div className="flex flex-col md:flex-row md:items-start justify-between gap-6 mb-8">
|
|
43
|
-
<div className="flex-1">
|
|
44
|
-
<div className="flex items-center gap-3 mb-4">
|
|
45
|
-
<div className="w-10 h-10 rounded-2xl bg-blue-500/10 flex items-center justify-center text-blue-500">
|
|
46
|
-
<BarChart3 size={20} />
|
|
47
|
-
</div>
|
|
48
|
-
<div>
|
|
49
|
-
<p className="text-[10px] font-black text-armoyu-text-muted uppercase tracking-widest leading-none mb-1">Topluluk Anketi</p>
|
|
50
|
-
<div className="flex items-center gap-2">
|
|
51
|
-
<img src={survey.author?.avatar} className="w-4 h-4 rounded-full" alt="" />
|
|
52
|
-
<p className="text-[10px] font-bold text-armoyu-text/60 uppercase">{survey.author?.displayName} tarafından</p>
|
|
53
|
-
</div>
|
|
54
|
-
</div>
|
|
55
|
-
</div>
|
|
56
|
-
|
|
57
|
-
<h3 className="text-xl md:text-2xl font-black text-armoyu-text uppercase tracking-tight italic leading-tight mb-3">
|
|
58
|
-
{survey.question}
|
|
59
|
-
</h3>
|
|
60
|
-
{survey.description && (
|
|
61
|
-
<p className="text-xs font-medium text-armoyu-text-muted leading-relaxed max-w-2xl">
|
|
62
|
-
{survey.description}
|
|
63
|
-
</p>
|
|
64
|
-
)}
|
|
65
|
-
</div>
|
|
66
|
-
|
|
67
|
-
<div className="flex flex-col md:items-end gap-2 shrink-0">
|
|
68
|
-
<div className="flex items-center gap-2 px-3 py-1.5 bg-black/5 dark:bg-white/5 rounded-xl border border-black/5 dark:border-white/5">
|
|
69
|
-
<Users size={14} className="text-blue-500" />
|
|
70
|
-
<span className="text-[10px] font-black text-armoyu-text uppercase tracking-widest">{totalVotes} Toplam Oy</span>
|
|
71
|
-
</div>
|
|
72
|
-
{survey.expiresAt && (
|
|
73
|
-
<div className="flex items-center gap-2 px-3 py-1.5 bg-black/5 dark:bg-white/5 rounded-xl border border-black/5 dark:border-white/5">
|
|
74
|
-
<Calendar size={14} className="text-orange-500" />
|
|
75
|
-
<span className="text-[10px] font-black text-armoyu-text uppercase tracking-widest">Bitiş: {survey.expiresAt}</span>
|
|
76
|
-
</div>
|
|
77
|
-
)}
|
|
78
|
-
</div>
|
|
79
|
-
</div>
|
|
80
|
-
|
|
81
|
-
<div className="space-y-4">
|
|
82
|
-
{options.map((opt) => {
|
|
83
|
-
const percentage = getPercentage(opt.votes);
|
|
84
|
-
const isSelected = myVoteId === opt.id;
|
|
85
|
-
|
|
86
|
-
return (
|
|
87
|
-
<div
|
|
88
|
-
key={opt.id}
|
|
89
|
-
className="relative group/opt"
|
|
90
|
-
onClick={() => handleVote(opt.id)}
|
|
91
|
-
>
|
|
92
|
-
<div
|
|
93
|
-
className={`flex items-center justify-between p-4 md:p-5 rounded-2xl border transition-all cursor-pointer relative z-10
|
|
94
|
-
${isSelected ? 'bg-blue-500/10 border-blue-500/50' : 'bg-black/5 dark:bg-white/5 border-transparent hover:border-blue-500/20'}`}
|
|
95
|
-
>
|
|
96
|
-
<div className="flex items-center gap-4 flex-1">
|
|
97
|
-
<div className={`w-6 h-6 rounded-lg border-2 flex items-center justify-center transition-all
|
|
98
|
-
${isSelected ? 'bg-blue-500 border-blue-500 text-white' : 'border-armoyu-card-border group-hover/opt:border-blue-500/50'}`}>
|
|
99
|
-
{isSelected && <CheckCircle2 size={14} />}
|
|
100
|
-
</div>
|
|
101
|
-
<span className={`text-sm md:text-base font-black uppercase tracking-tight ${isSelected ? 'text-blue-500' : 'text-armoyu-text'}`}>
|
|
102
|
-
{opt.text}
|
|
103
|
-
</span>
|
|
104
|
-
</div>
|
|
105
|
-
|
|
106
|
-
{hasVoted && (
|
|
107
|
-
<div className="flex items-center gap-3">
|
|
108
|
-
<span className="text-xs font-black text-armoyu-text/40">{opt.votes} OY</span>
|
|
109
|
-
<span className="text-lg font-black text-armoyu-text italic">%{percentage}</span>
|
|
110
|
-
</div>
|
|
111
|
-
)}
|
|
112
|
-
</div>
|
|
113
|
-
|
|
114
|
-
{/* Progress Bar Background */}
|
|
115
|
-
{hasVoted && (
|
|
116
|
-
<div className="absolute inset-0 z-0 p-1">
|
|
117
|
-
<div className="h-full bg-blue-500/10 rounded-xl transition-all duration-1000 ease-out" style={{ width: `${percentage}%` }}></div>
|
|
118
|
-
</div>
|
|
119
|
-
)}
|
|
120
|
-
</div>
|
|
121
|
-
);
|
|
122
|
-
})}
|
|
123
|
-
</div>
|
|
124
|
-
|
|
125
|
-
{!hasVoted && (
|
|
126
|
-
<div className="mt-8 pt-6 border-t border-armoyu-card-border flex items-center justify-center">
|
|
127
|
-
<p className="text-[10px] font-black text-armoyu-text-muted uppercase tracking-[0.2em] animate-pulse">
|
|
128
|
-
Seçiminizi yapmak için bir seçeneğe tıklayın
|
|
129
|
-
</p>
|
|
130
|
-
</div>
|
|
131
|
-
)}
|
|
132
|
-
|
|
133
|
-
{hasVoted && (
|
|
134
|
-
<div className="mt-8 pt-6 border-t border-armoyu-card-border flex items-center justify-between">
|
|
135
|
-
<p className="text-[10px] font-black text-emerald-500 uppercase tracking-widest flex items-center gap-2">
|
|
136
|
-
<CheckCircle2 size={12} /> Katılımınız için teşekkürler
|
|
137
|
-
</p>
|
|
138
|
-
<button
|
|
139
|
-
className="text-[9px] font-black text-armoyu-text-muted hover:text-blue-500 uppercase tracking-widest transition-colors"
|
|
140
|
-
onClick={() => window.location.reload()} // Mock reset
|
|
141
|
-
>
|
|
142
|
-
ANKETİ SIFIRLA (TEST)
|
|
143
|
-
</button>
|
|
144
|
-
</div>
|
|
145
|
-
)}
|
|
146
|
-
</div>
|
|
147
|
-
);
|
|
148
|
-
}
|
|
149
|
-
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import React from 'react';
|
|
4
|
-
import Link from 'next/link';
|
|
5
|
-
|
|
6
|
-
export interface ForumBoardProps {
|
|
7
|
-
id: string;
|
|
8
|
-
name: string;
|
|
9
|
-
desc: string;
|
|
10
|
-
topicCount: number;
|
|
11
|
-
postCount: number;
|
|
12
|
-
lastPost?: {
|
|
13
|
-
topicTitle: string;
|
|
14
|
-
author: string;
|
|
15
|
-
avatar: string;
|
|
16
|
-
time: string;
|
|
17
|
-
};
|
|
18
|
-
icon?: React.ReactNode;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export function ForumBoard({ id, name, desc, topicCount, postCount, lastPost, icon }: ForumBoardProps) {
|
|
22
|
-
return (
|
|
23
|
-
<Link href={`/forum/${id}`} className="block">
|
|
24
|
-
<div className="group flex flex-col md:flex-row items-center gap-6 p-6 md:p-8 glass-panel bg-armoyu-card-bg border border-armoyu-card-border hover:shadow-2xl transition-all duration-300 hover:border-blue-500/30">
|
|
25
|
-
|
|
26
|
-
{/* Icon */}
|
|
27
|
-
<div className="w-16 h-16 rounded-[22px] bg-blue-500/10 dark:bg-white/5 flex items-center justify-center text-blue-500 group-hover:bg-blue-600 group-hover:text-white transition-all shrink-0">
|
|
28
|
-
{icon || <svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2.5"><path d="M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z"></path></svg>}
|
|
29
|
-
</div>
|
|
30
|
-
|
|
31
|
-
{/* Info */}
|
|
32
|
-
<div className="flex-1 min-w-0 text-center md:text-left">
|
|
33
|
-
<h3 className="text-xl font-black text-armoyu-text mb-1 uppercase tracking-tight group-hover:text-blue-500 transition-colors">
|
|
34
|
-
{name}
|
|
35
|
-
</h3>
|
|
36
|
-
<p className="text-sm text-armoyu-text-muted font-medium line-clamp-2 leading-relaxed opacity-80">
|
|
37
|
-
{desc}
|
|
38
|
-
</p>
|
|
39
|
-
</div>
|
|
40
|
-
|
|
41
|
-
{/* Stats */}
|
|
42
|
-
<div className="hidden lg:flex items-center gap-10 px-8 border-x border-armoyu-card-border/50">
|
|
43
|
-
<div className="text-center">
|
|
44
|
-
<span className="block text-xl font-black text-armoyu-text">{topicCount}</span>
|
|
45
|
-
<span className="text-[10px] font-bold text-armoyu-text-muted uppercase tracking-widest">KONU</span>
|
|
46
|
-
</div>
|
|
47
|
-
<div className="text-center">
|
|
48
|
-
<span className="block text-xl font-black text-armoyu-text">{postCount}</span>
|
|
49
|
-
<span className="text-[10px] font-bold text-armoyu-text-muted uppercase tracking-widest">MESAJ</span>
|
|
50
|
-
</div>
|
|
51
|
-
</div>
|
|
52
|
-
|
|
53
|
-
{/* Last Post */}
|
|
54
|
-
<div className="hidden xl:flex items-center gap-4 w-64 shrink-0">
|
|
55
|
-
{lastPost ? (
|
|
56
|
-
<>
|
|
57
|
-
<img src={lastPost.avatar} alt={lastPost.author} className="w-10 h-10 rounded-full border border-blue-500/20" />
|
|
58
|
-
<div className="min-w-0">
|
|
59
|
-
<p className="text-xs font-bold text-armoyu-text truncate hover:text-blue-500 cursor-pointer">{lastPost.topicTitle}</p>
|
|
60
|
-
<p className="text-[10px] font-medium text-armoyu-text-muted mt-0.5 uppercase tracking-tighter">
|
|
61
|
-
<span className="text-blue-500 font-bold">{lastPost.author}</span> • {lastPost.time}
|
|
62
|
-
</p>
|
|
63
|
-
</div>
|
|
64
|
-
</>
|
|
65
|
-
) : (
|
|
66
|
-
<span className="text-xs font-bold text-armoyu-text-muted italic opacity-50 uppercase tracking-widest">HENÜZ KONU YOK</span>
|
|
67
|
-
)}
|
|
68
|
-
</div>
|
|
69
|
-
|
|
70
|
-
{/* Hover Arrow */}
|
|
71
|
-
<div className="md:hidden lg:flex shrink-0 w-10 h-10 rounded-full bg-black/5 dark:bg-white/5 items-center justify-center opacity-0 group-hover:opacity-100 group-hover:translate-x-1 transition-all">
|
|
72
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="3"><line x1="5" y1="12" x2="19" y2="12"></line><polyline points="12 5 19 12 12 19"></polyline></svg>
|
|
73
|
-
</div>
|
|
74
|
-
|
|
75
|
-
</div>
|
|
76
|
-
</Link>
|
|
77
|
-
);
|
|
78
|
-
}
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import React from 'react';
|
|
4
|
-
|
|
5
|
-
export interface ForumPostProps {
|
|
6
|
-
id: string;
|
|
7
|
-
author: string;
|
|
8
|
-
authorAvatar: string;
|
|
9
|
-
authorRank: string;
|
|
10
|
-
authorRankColor: string;
|
|
11
|
-
authorJoined: string;
|
|
12
|
-
authorPosts: number;
|
|
13
|
-
content: string;
|
|
14
|
-
time: string;
|
|
15
|
-
isMainPost?: boolean;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export function ForumPost({ author, authorAvatar, authorRank, authorRankColor, authorJoined, authorPosts, content, time, isMainPost }: ForumPostProps) {
|
|
19
|
-
return (
|
|
20
|
-
<div className={`flex flex-col lg:flex-row gap-0 glass-panel bg-armoyu-card-bg border border-armoyu-card-border rounded-[40px] overflow-hidden ${isMainPost ? 'border-blue-500/30' : ''}`}>
|
|
21
|
-
|
|
22
|
-
{/* User Sidebar */}
|
|
23
|
-
<div className="w-full lg:w-48 xl:w-64 bg-black/5 dark:bg-white/5 p-8 flex flex-col items-center border-b lg:border-r border-armoyu-card-border shrink-0">
|
|
24
|
-
<img src={authorAvatar} alt={author} className="w-20 h-20 rounded-full border-4 border-armoyu-bg mb-4 shadow-xl" />
|
|
25
|
-
<h3 className="text-sm font-black text-armoyu-text mb-2 uppercase tracking-tight text-center">{author}</h3>
|
|
26
|
-
<span className={`px-4 py-1.5 rounded-full text-[8px] font-black uppercase tracking-widest text-white mb-6 shadow-lg shadow-${authorRankColor}-500/20 bg-${authorRankColor}-500`}>
|
|
27
|
-
{authorRank}
|
|
28
|
-
</span>
|
|
29
|
-
|
|
30
|
-
<div className="space-y-4 w-full">
|
|
31
|
-
<div className="flex flex-col items-center">
|
|
32
|
-
<span className="text-[10px] font-black text-armoyu-text">Üyelik</span>
|
|
33
|
-
<span className="text-[8px] font-bold text-armoyu-text-muted uppercase tracking-widest">{authorJoined}</span>
|
|
34
|
-
</div>
|
|
35
|
-
<div className="flex flex-col items-center">
|
|
36
|
-
<span className="text-[10px] font-black text-armoyu-text">Toplam Mesaj</span>
|
|
37
|
-
<span className="text-[8px] font-bold text-armoyu-text-muted uppercase tracking-widest font-black text-blue-500">{authorPosts}</span>
|
|
38
|
-
</div>
|
|
39
|
-
</div>
|
|
40
|
-
</div>
|
|
41
|
-
|
|
42
|
-
{/* Content Area */}
|
|
43
|
-
<div className="flex-1 p-8 md:p-12 relative flex flex-col">
|
|
44
|
-
<div className="pb-6 mb-8 border-b border-armoyu-card-border flex justify-between items-center opacity-40">
|
|
45
|
-
<p className="text-[8px] font-black uppercase tracking-widest">{time}</p>
|
|
46
|
-
<div className="flex gap-4">
|
|
47
|
-
<button className="text-[8px] font-black uppercase tracking-widest hover:text-blue-500 transition-colors">#1</button>
|
|
48
|
-
<button className="text-[8px] font-black uppercase tracking-widest hover:text-blue-500 transition-colors">ŞİKAYET ET</button>
|
|
49
|
-
</div>
|
|
50
|
-
</div>
|
|
51
|
-
|
|
52
|
-
<div className="prose prose-sm dark:prose-invert max-w-none flex-1 text-armoyu-text text-md font-medium leading-[1.8] opacity-90 whitespace-pre-wrap">
|
|
53
|
-
{content}
|
|
54
|
-
</div>
|
|
55
|
-
|
|
56
|
-
{/* Actions */}
|
|
57
|
-
<div className="mt-12 pt-8 border-t border-armoyu-card-border flex flex-wrap gap-4">
|
|
58
|
-
<button className="flex items-center gap-2 px-6 py-3 bg-blue-600 hover:bg-blue-500 text-white font-black text-[10px] uppercase tracking-widest rounded-2xl transition-all shadow-xl shadow-blue-500/20 active:scale-95">
|
|
59
|
-
<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="3"><path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"></path></svg>
|
|
60
|
-
ALINTILA
|
|
61
|
-
</button>
|
|
62
|
-
<button className="flex items-center gap-2 px-6 py-3 bg-black/5 dark:bg-white/5 border border-armoyu-card-border hover:bg-black/10 text-armoyu-text font-black text-[10px] uppercase tracking-widest rounded-2xl transition-all active:scale-95">
|
|
63
|
-
<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="3"><path d="M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z"></path></svg>
|
|
64
|
-
BEĞEN
|
|
65
|
-
</button>
|
|
66
|
-
</div>
|
|
67
|
-
</div>
|
|
68
|
-
|
|
69
|
-
</div>
|
|
70
|
-
);
|
|
71
|
-
}
|
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import React, { useEffect } from 'react';
|
|
4
|
-
|
|
5
|
-
interface NewTopicModalProps {
|
|
6
|
-
isOpen: boolean;
|
|
7
|
-
onClose: () => void;
|
|
8
|
-
defaultBoard?: string;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
const BOARDS = [
|
|
12
|
-
"Duyurular & Haberler",
|
|
13
|
-
"Kurallar & Rehberler",
|
|
14
|
-
"Minecraft",
|
|
15
|
-
"Counter-Strike",
|
|
16
|
-
"Assetto Corsa",
|
|
17
|
-
"Web Geliştirme",
|
|
18
|
-
"Python & AI",
|
|
19
|
-
"Genel Sohbet"
|
|
20
|
-
];
|
|
21
|
-
|
|
22
|
-
export function NewTopicModal({ isOpen, onClose, defaultBoard }: NewTopicModalProps) {
|
|
23
|
-
useEffect(() => {
|
|
24
|
-
const handleEsc = (e: KeyboardEvent) => {
|
|
25
|
-
if (e.key === 'Escape') onClose();
|
|
26
|
-
};
|
|
27
|
-
window.addEventListener('keydown', handleEsc);
|
|
28
|
-
return () => window.removeEventListener('keydown', handleEsc);
|
|
29
|
-
}, [onClose]);
|
|
30
|
-
|
|
31
|
-
if (!isOpen) return null;
|
|
32
|
-
|
|
33
|
-
return (
|
|
34
|
-
<div className="fixed inset-0 z-[100] flex items-center justify-center p-4">
|
|
35
|
-
<div
|
|
36
|
-
className="absolute inset-0 bg-black/80 backdrop-blur-sm animate-in fade-in duration-300"
|
|
37
|
-
onClick={onClose}
|
|
38
|
-
/>
|
|
39
|
-
|
|
40
|
-
<div className="relative w-full max-w-2xl bg-white dark:bg-[#12121a] border border-gray-200 dark:border-white/10 rounded-[40px] shadow-2xl overflow-hidden animate-in zoom-in-95 fade-in duration-300">
|
|
41
|
-
|
|
42
|
-
<div className="p-8 border-b border-gray-100 dark:border-white/5 flex items-center justify-between">
|
|
43
|
-
<div>
|
|
44
|
-
<h2 className="text-2xl font-black text-gray-900 dark:text-white uppercase tracking-tighter italic">YENİ KONU OLUŞTUR</h2>
|
|
45
|
-
<p className="text-[10px] font-bold text-blue-500 uppercase tracking-widest mt-1">
|
|
46
|
-
TOPLULUKLA PAYLAŞIMA BAŞLA
|
|
47
|
-
</p>
|
|
48
|
-
</div>
|
|
49
|
-
<button onClick={onClose} className="w-10 h-10 rounded-full bg-gray-100 dark:bg-white/5 flex items-center justify-center hover:bg-gray-200 dark:hover:bg-white/10 transition-colors">
|
|
50
|
-
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="3" className="text-gray-900 dark:text-white"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>
|
|
51
|
-
</button>
|
|
52
|
-
</div>
|
|
53
|
-
|
|
54
|
-
<form className="p-8 space-y-6" onSubmit={(e) => { e.preventDefault(); alert('Konunuz başarıyla oluşturuldu!'); onClose(); }}>
|
|
55
|
-
<div className="space-y-4">
|
|
56
|
-
|
|
57
|
-
<div className="grid grid-cols-1 md:grid-cols-2 gap-4">
|
|
58
|
-
<div className="space-y-2">
|
|
59
|
-
<label className="text-[10px] font-black uppercase tracking-widest text-gray-500 dark:text-gray-400 ml-1">KATEGORİ SEÇİN</label>
|
|
60
|
-
<div className="relative">
|
|
61
|
-
<select
|
|
62
|
-
defaultValue={defaultBoard || "Genel Sohbet"}
|
|
63
|
-
className="w-full bg-gray-50 dark:bg-white/5 border border-gray-200 dark:border-white/10 rounded-2xl px-5 py-4 text-gray-900 dark:text-white focus:outline-none focus:ring-2 focus:ring-blue-500 transition-all font-bold text-sm appearance-none cursor-pointer"
|
|
64
|
-
>
|
|
65
|
-
{BOARDS.map(board => (
|
|
66
|
-
<option key={board} value={board} className="bg-white dark:bg-[#12121a]">{board}</option>
|
|
67
|
-
))}
|
|
68
|
-
</select>
|
|
69
|
-
<div className="absolute right-5 top-1/2 -translate-y-1/2 pointer-events-none text-gray-400">
|
|
70
|
-
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="3"><polyline points="6 9 12 15 18 9"></polyline></svg>
|
|
71
|
-
</div>
|
|
72
|
-
</div>
|
|
73
|
-
</div>
|
|
74
|
-
<div className="space-y-2">
|
|
75
|
-
<label className="text-[10px] font-black uppercase tracking-widest text-gray-500 dark:text-gray-400 ml-1">ETİKETLER (OPSİYONEL)</label>
|
|
76
|
-
<input type="text" className="w-full bg-gray-50 dark:bg-white/5 border border-gray-200 dark:border-white/10 rounded-2xl px-5 py-4 text-gray-900 dark:text-white placeholder:text-gray-400 focus:outline-none focus:ring-2 focus:ring-blue-500 transition-all font-bold text-sm" placeholder="soru, minecraft, hata..." />
|
|
77
|
-
</div>
|
|
78
|
-
</div>
|
|
79
|
-
|
|
80
|
-
<div className="space-y-2">
|
|
81
|
-
<label className="text-[10px] font-black uppercase tracking-widest text-gray-500 dark:text-gray-400 ml-1">KONU BAŞLIĞI</label>
|
|
82
|
-
<input required type="text" className="w-full bg-gray-50 dark:bg-white/5 border border-gray-200 dark:border-white/10 rounded-2xl px-5 py-4 text-gray-900 dark:text-white placeholder:text-gray-400 focus:outline-none focus:ring-2 focus:ring-blue-500 transition-all font-bold text-sm" placeholder="Konunuzu özetleyen kısa bir başlık..." />
|
|
83
|
-
</div>
|
|
84
|
-
|
|
85
|
-
<div className="space-y-2">
|
|
86
|
-
<label className="text-[10px] font-black uppercase tracking-widest text-gray-500 dark:text-gray-400 ml-1">KONU İÇERİĞİ</label>
|
|
87
|
-
<div className="relative group">
|
|
88
|
-
<textarea required rows={8} className="w-full bg-gray-50 dark:bg-white/5 border border-gray-200 dark:border-white/10 rounded-3xl px-6 py-5 text-gray-900 dark:text-white placeholder:text-gray-400 focus:outline-none focus:ring-2 focus:ring-blue-500 transition-all font-bold text-sm no-scrollbar leading-relaxed" placeholder="Konu detaylarını buraya yazın..." />
|
|
89
|
-
<div className="absolute bottom-4 right-6 flex items-center gap-2 opacity-50 text-[10px] font-bold uppercase tracking-widest pointer-events-none">
|
|
90
|
-
<span>Markdown Desteklenir</span>
|
|
91
|
-
</div>
|
|
92
|
-
</div>
|
|
93
|
-
</div>
|
|
94
|
-
</div>
|
|
95
|
-
|
|
96
|
-
<div className="flex flex-col sm:flex-row gap-4 pt-4">
|
|
97
|
-
<button
|
|
98
|
-
type="button"
|
|
99
|
-
onClick={onClose}
|
|
100
|
-
className="flex-1 py-5 bg-gray-100 dark:bg-white/5 hover:bg-gray-200 dark:hover:bg-white/10 text-gray-900 dark:text-white font-black text-xs uppercase tracking-widest rounded-2xl transition-all"
|
|
101
|
-
>
|
|
102
|
-
İPTAL ET
|
|
103
|
-
</button>
|
|
104
|
-
<button className="flex-[2] py-5 bg-blue-600 hover:bg-blue-500 text-white font-black text-xs uppercase tracking-widest rounded-2xl shadow-xl shadow-blue-500/30 transition-all active:scale-95">
|
|
105
|
-
KONUYU YAYINLA
|
|
106
|
-
</button>
|
|
107
|
-
</div>
|
|
108
|
-
</form>
|
|
109
|
-
</div>
|
|
110
|
-
</div>
|
|
111
|
-
);
|
|
112
|
-
}
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import React from 'react';
|
|
4
|
-
import Link from 'next/link';
|
|
5
|
-
|
|
6
|
-
export interface TopicItemProps {
|
|
7
|
-
id: string;
|
|
8
|
-
boardId: string;
|
|
9
|
-
title: string;
|
|
10
|
-
author: string;
|
|
11
|
-
authorAvatar: string;
|
|
12
|
-
replies: number;
|
|
13
|
-
views: number;
|
|
14
|
-
lastActivity: string;
|
|
15
|
-
lastAuthor: string;
|
|
16
|
-
isPinned?: boolean;
|
|
17
|
-
isHot?: boolean;
|
|
18
|
-
isSolved?: boolean;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export function TopicItem({ id, boardId, title, author, authorAvatar, replies, views, lastActivity, lastAuthor, isPinned, isHot, isSolved }: TopicItemProps) {
|
|
22
|
-
return (
|
|
23
|
-
<div className="group flex flex-col md:flex-row items-center gap-6 p-5 md:p-6 glass-panel bg-armoyu-card-bg border border-armoyu-card-border hover:shadow-xl transition-all duration-300 hover:border-blue-500/20">
|
|
24
|
-
|
|
25
|
-
{/* Topic Info */}
|
|
26
|
-
<div className="flex-1 min-w-0 flex items-center gap-4 w-full">
|
|
27
|
-
<img src={authorAvatar} alt={author} className="w-10 h-10 rounded-full border border-blue-500/20" />
|
|
28
|
-
<div className="min-w-0">
|
|
29
|
-
<div className="flex items-center gap-2 mb-1 flex-wrap">
|
|
30
|
-
{isPinned && <span className="px-2 py-0.5 bg-red-500 text-white text-[8px] font-black uppercase tracking-widest rounded-md">BAŞA TUTTURULDU</span>}
|
|
31
|
-
{isHot && <span className="px-2 py-0.5 bg-orange-500 text-white text-[8px] font-black uppercase tracking-widest rounded-md">POPÜLER</span>}
|
|
32
|
-
{isSolved && <span className="px-2 py-0.5 bg-emerald-500 text-white text-[8px] font-black uppercase tracking-widest rounded-md">ÇÖZÜLDÜ</span>}
|
|
33
|
-
<Link href={`/forum/${boardId}/${id}`} className="text-sm md:text-base font-black text-armoyu-text hover:text-blue-500 transition-colors truncate block">
|
|
34
|
-
{title}
|
|
35
|
-
</Link>
|
|
36
|
-
</div>
|
|
37
|
-
<p className="text-[10px] font-bold text-armoyu-text-muted uppercase tracking-widest">
|
|
38
|
-
<span className="text-blue-500">{author}</span> tarafından başlatıldı
|
|
39
|
-
</p>
|
|
40
|
-
</div>
|
|
41
|
-
</div>
|
|
42
|
-
|
|
43
|
-
{/* Stats */}
|
|
44
|
-
<div className="hidden lg:flex items-center gap-10 px-8 border-x border-armoyu-card-border/50 shrink-0">
|
|
45
|
-
<div className="text-center">
|
|
46
|
-
<span className="block text-sm font-black text-armoyu-text">{replies}</span>
|
|
47
|
-
<span className="text-[8px] font-bold text-armoyu-text-muted uppercase tracking-widest">YANIT</span>
|
|
48
|
-
</div>
|
|
49
|
-
<div className="text-center">
|
|
50
|
-
<span className="block text-sm font-black text-armoyu-text">{views}</span>
|
|
51
|
-
<span className="text-[8px] font-bold text-armoyu-text-muted uppercase tracking-widest">İZLENME</span>
|
|
52
|
-
</div>
|
|
53
|
-
</div>
|
|
54
|
-
|
|
55
|
-
{/* Last Post Activity */}
|
|
56
|
-
<div className="hidden md:flex flex-col text-right w-40 shrink-0">
|
|
57
|
-
<span className="text-xs font-black text-armoyu-text mb-0.5 truncate">{lastAuthor}</span>
|
|
58
|
-
<span className="text-[9px] font-bold text-armoyu-text-muted uppercase tracking-tighter">{lastActivity}</span>
|
|
59
|
-
</div>
|
|
60
|
-
|
|
61
|
-
{/* Mobile Stats Summary */}
|
|
62
|
-
<div className="md:hidden flex items-center justify-between w-full pt-4 border-t border-armoyu-card-border mt-2">
|
|
63
|
-
<div className="flex gap-4">
|
|
64
|
-
<span className="text-[10px] font-bold text-armoyu-text-muted uppercase tracking-widest">{replies} Yanıt</span>
|
|
65
|
-
<span className="text-[10px] font-bold text-armoyu-text-muted uppercase tracking-widest">{views} İzlenme</span>
|
|
66
|
-
</div>
|
|
67
|
-
<span className="text-[10px] font-bold text-blue-500 uppercase tracking-widest">{lastActivity}</span>
|
|
68
|
-
</div>
|
|
69
|
-
|
|
70
|
-
</div>
|
|
71
|
-
);
|
|
72
|
-
}
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import React from 'react';
|
|
4
|
-
|
|
5
|
-
export interface GalleryCardProps {
|
|
6
|
-
title: string;
|
|
7
|
-
count: number;
|
|
8
|
-
author: string;
|
|
9
|
-
date: string;
|
|
10
|
-
category: string;
|
|
11
|
-
image: string;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export function GalleryCard({ title, count, author, date, category, image }: GalleryCardProps) {
|
|
15
|
-
return (
|
|
16
|
-
<div className="group relative glass-panel rounded-3xl overflow-hidden border border-armoyu-card-border bg-armoyu-card-bg shadow-sm hover:shadow-2xl transition-all duration-500 cursor-pointer">
|
|
17
|
-
|
|
18
|
-
{/* Resim Alanı */}
|
|
19
|
-
<div className="aspect-[4/3] overflow-hidden relative">
|
|
20
|
-
<img
|
|
21
|
-
src={image}
|
|
22
|
-
alt={title}
|
|
23
|
-
className="w-full h-full object-cover group-hover:scale-110 transition-transform duration-1000"
|
|
24
|
-
/>
|
|
25
|
-
<div className="absolute inset-0 bg-gradient-to-t from-black/80 via-black/20 to-transparent opacity-60 group-hover:opacity-80 transition-opacity" />
|
|
26
|
-
|
|
27
|
-
{/* İtem Sayısı Badge */}
|
|
28
|
-
<div className="absolute top-4 right-4 bg-white/10 backdrop-blur-md border border-white/20 px-3 py-1.5 rounded-2xl text-[10px] font-black text-white flex items-center gap-2">
|
|
29
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="3"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><circle cx="8.5" cy="8.5" r="1.5"></circle><polyline points="21 15 16 10 5 21"></polyline></svg>
|
|
30
|
-
{count} Fotoğraf
|
|
31
|
-
</div>
|
|
32
|
-
</div>
|
|
33
|
-
|
|
34
|
-
{/* İçerik Bilgisi */}
|
|
35
|
-
<div className="p-5">
|
|
36
|
-
<div className="flex items-center gap-2 mb-2">
|
|
37
|
-
<span className="text-[10px] font-black uppercase tracking-widest text-blue-500 bg-blue-500/10 px-2 py-0.5 rounded-md">
|
|
38
|
-
{category}
|
|
39
|
-
</span>
|
|
40
|
-
<span className="text-[10px] font-bold text-armoyu-text-muted opacity-60">
|
|
41
|
-
{date}
|
|
42
|
-
</span>
|
|
43
|
-
</div>
|
|
44
|
-
|
|
45
|
-
<h3 className="text-lg font-black text-armoyu-text group-hover:text-blue-500 transition-colors mb-4 line-clamp-1">
|
|
46
|
-
{title}
|
|
47
|
-
</h3>
|
|
48
|
-
|
|
49
|
-
<div className="flex items-center justify-between pt-4 border-t border-armoyu-card-border">
|
|
50
|
-
<div className="flex items-center gap-2">
|
|
51
|
-
<img
|
|
52
|
-
src={`https://api.dicebear.com/7.x/avataaars/svg?seed=${author}`}
|
|
53
|
-
alt={author}
|
|
54
|
-
className="w-6 h-6 rounded-full bg-white/5 border border-black/10"
|
|
55
|
-
/>
|
|
56
|
-
<span className="text-xs font-bold text-armoyu-text-muted">@{author}</span>
|
|
57
|
-
</div>
|
|
58
|
-
<button className="p-2 rounded-xl bg-black/5 dark:bg-white/5 text-armoyu-text-muted hover:text-blue-500 hover:bg-blue-500/10 transition-all">
|
|
59
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2.5"><polyline points="9 18 15 12 9 6"></polyline></svg>
|
|
60
|
-
</button>
|
|
61
|
-
</div>
|
|
62
|
-
</div>
|
|
63
|
-
|
|
64
|
-
</div>
|
|
65
|
-
);
|
|
66
|
-
}
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import React from 'react';
|
|
4
|
-
|
|
5
|
-
export interface GiveawayCardProps {
|
|
6
|
-
title: string;
|
|
7
|
-
prize: string;
|
|
8
|
-
status: 'active' | 'ended';
|
|
9
|
-
participants: number;
|
|
10
|
-
timeLeft: string;
|
|
11
|
-
image: string;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export function GiveawayCard({ title, prize, status, participants, timeLeft, image }: GiveawayCardProps) {
|
|
15
|
-
const isActive = status === 'active';
|
|
16
|
-
|
|
17
|
-
return (
|
|
18
|
-
<div className={`group glass-panel rounded-[40px] overflow-hidden border transition-all duration-700 flex flex-col h-full bg-armoyu-card-bg shadow-sm ${isActive ? 'border-blue-500/20 hover:border-blue-500/50 hover:shadow-2xl hover:shadow-blue-500/20' : 'border-armoyu-card-border opacity-60 grayscale-[0.5]'}`}>
|
|
19
|
-
|
|
20
|
-
{/* Resim & Durum */}
|
|
21
|
-
<div className="aspect-square p-8 relative flex items-center justify-center">
|
|
22
|
-
<div className={`absolute inset-0 bg-gradient-to-br transition-opacity duration-500 ${isActive ? 'from-blue-600/10 to-indigo-600/10 opacity-100' : 'from-gray-500/5 to-gray-600/5 opacity-50'}`} />
|
|
23
|
-
<img
|
|
24
|
-
src={image}
|
|
25
|
-
alt={prize}
|
|
26
|
-
className="w-48 h-48 object-contain group-hover:scale-110 transition-transform duration-700 drop-shadow-2xl relative z-10"
|
|
27
|
-
/>
|
|
28
|
-
|
|
29
|
-
{/* Status Badge */}
|
|
30
|
-
<div className="absolute top-6 left-6 z-20">
|
|
31
|
-
<span className={`px-4 py-2 rounded-2xl text-[9px] font-black uppercase tracking-widest flex items-center gap-2 shadow-xl backdrop-blur-md border ${isActive ? 'bg-emerald-500/80 text-white border-emerald-400/30 shadow-emerald-500/20' : 'bg-gray-200 dark:bg-zinc-800/80 text-gray-500 dark:text-zinc-400 border-black/5 dark:border-white/5 shadow-black/5 dark:shadow-black/20'}`}>
|
|
32
|
-
{isActive && <span className="w-1.5 h-1.5 rounded-full bg-white animate-pulse shadow-[0_0_8px_rgba(255,255,255,0.8)]" />}
|
|
33
|
-
{isActive ? 'Aktif' : 'Bitti'}
|
|
34
|
-
</span>
|
|
35
|
-
</div>
|
|
36
|
-
</div>
|
|
37
|
-
|
|
38
|
-
{/* İçerik */}
|
|
39
|
-
<div className="px-8 pb-8 flex-1 flex flex-col text-center mt-[-40px]">
|
|
40
|
-
<div className="relative z-10 p-6 rounded-[32px] bg-white dark:bg-zinc-900 border border-armoyu-card-border shadow-xl shadow-black/[0.03] dark:shadow-2xl backdrop-blur-xl">
|
|
41
|
-
<h3 className="text-xl font-black text-blue-600 dark:text-white mb-2 line-clamp-1 leading-tight">{prize}</h3>
|
|
42
|
-
<p className="text-[10px] font-black text-blue-500 uppercase tracking-widest mb-6 block border-b border-black/5 dark:border-white/5 pb-2">
|
|
43
|
-
{title}
|
|
44
|
-
</p>
|
|
45
|
-
|
|
46
|
-
{/* Bilgi Grid */}
|
|
47
|
-
<div className="grid grid-cols-2 gap-3 mb-8">
|
|
48
|
-
<div className="p-3 rounded-2xl bg-black/5 dark:bg-white/5 border border-black/5 dark:border-white/5 flex flex-col items-center justify-center">
|
|
49
|
-
<span className="block text-[7px] font-black text-armoyu-text-muted uppercase mb-1 tracking-tighter">Kalan Süre</span>
|
|
50
|
-
<span className={`block text-xs font-black uppercase ${isActive ? 'text-blue-500' : 'text-zinc-500'}`}>{isActive ? timeLeft : 'Bitti'}</span>
|
|
51
|
-
</div>
|
|
52
|
-
<div className="p-3 rounded-2xl bg-black/5 dark:bg-white/5 border border-black/5 dark:border-white/5 flex flex-col items-center justify-center">
|
|
53
|
-
<span className="block text-[7px] font-black text-armoyu-text-muted uppercase mb-1 tracking-tighter">Katılımcı</span>
|
|
54
|
-
<span className="block text-xs font-black text-armoyu-text leading-none">{participants} <span className="text-[8px] opacity-60">Kişi</span></span>
|
|
55
|
-
</div>
|
|
56
|
-
</div>
|
|
57
|
-
|
|
58
|
-
<button
|
|
59
|
-
disabled={!isActive}
|
|
60
|
-
className={`w-full py-4 rounded-2xl font-black text-[11px] uppercase tracking-widest transition-all shadow-xl relative overflow-hidden group/btn ${isActive ? 'bg-blue-600 hover:bg-blue-500 text-white shadow-blue-500/20 active:scale-95' : 'bg-gray-100 dark:bg-zinc-800 text-gray-400 dark:text-zinc-500 cursor-not-allowed border border-black/5 dark:border-white/5 shadow-none'}`}
|
|
61
|
-
>
|
|
62
|
-
<div className="absolute inset-0 bg-gradient-to-r from-transparent via-white/10 to-transparent -translate-x-full group-hover/btn:translate-x-full transition-transform duration-1000" />
|
|
63
|
-
{isActive ? 'Çekilişe Katıl' : 'Sonuçları Gör'}
|
|
64
|
-
</button>
|
|
65
|
-
</div>
|
|
66
|
-
|
|
67
|
-
<div className="mt-8 flex justify-center -space-x-3">
|
|
68
|
-
{[1,2,3,4].map(i => (
|
|
69
|
-
<img key={i} src={`https://api.dicebear.com/7.x/avataaars/svg?seed=${i+12}`} className="w-8 h-8 rounded-full border-2 border-armoyu-card-bg bg-white/10" alt="part" />
|
|
70
|
-
))}
|
|
71
|
-
<div className="w-8 h-8 rounded-full border-2 border-armoyu-card-bg bg-armoyu-card-border flex items-center justify-center text-[10px] font-black text-armoyu-text">+{participants - 4}</div>
|
|
72
|
-
</div>
|
|
73
|
-
</div>
|
|
74
|
-
</div>
|
|
75
|
-
);
|
|
76
|
-
}
|