Skip to content

Commit 3079be4

Browse files
committed
Random_Identity
1 parent ec69e91 commit 3079be4

3 files changed

Lines changed: 191 additions & 0 deletions

File tree

src/data/content.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ import GKQuiz from "../pages/games/Gk_quiz"
2525
import { DogHttpCode } from "../pages/activities/DogHttpCode";
2626
import { CatHttpCode } from "../pages/activities/CatHttpCode";
2727
import FlappyBird from "../pages/games/FlappyBird";
28+
import RandomIdentity from "../pages/activities/RandomIdentity";
2829

2930
export const activities = [
3031
{
@@ -90,6 +91,13 @@ export const activities = [
9091
urlTerm: "cat-http-status",
9192
element: <CatHttpCode />,
9293
},
94+
{
95+
title: "Random Identity Generator",
96+
description:"Get random identity for yourself",
97+
icon:"https://is1-ssl.mzstatic.com/image/thumb/Purple211/v4/2a/51/52/2a5152df-66f0-fc94-6e5e-251d3b2d6ef8/AppIcon-0-0-1x_U007emarketing-0-6-0-85-220.png/1200x630wa.png",
98+
urlTerm:"random-identity",
99+
element:<RandomIdentity/>
100+
}
93101
];
94102

95103
export const games = [
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
// src/pages/activities/RandomIdentity.jsx
2+
import { useState } from "react";
3+
import "../../styles/pages/activities/RandomIdentity.css";
4+
5+
const identities = [
6+
"🦊 Sly Fox — clever, quick, slightly chaotic",
7+
"🐢 Chill Turtle — slow today, still winning",
8+
"🐼 Cozy Panda — productivity is optional",
9+
"🐧 Focused Penguin — cute but on task",
10+
"🐱 Curious Cat — click everything, learn everything",
11+
"🐯 Tiger Mode — roar through your to-do list",
12+
"🐤 Soft Chick — be gentle with yourself",
13+
"🦁 King Lion — confidence level: 100",
14+
"🦄 Rainbow Unicorn — unique, unbothered, magical",
15+
"🐙 Octo-Tasker — doing 8 things at once",
16+
"🦥 Lazy Sloth — rest is a feature, not a bug",
17+
"🐝 Busy Bee — buzzing with ideas",
18+
"🦖 Dino Dev — old school but powerful",
19+
"🦜 Parrot Pro — repeating good habits",
20+
"🦔 Spiky Hedgehog — cute but don’t test me",
21+
"🦋 Glow Butterfly — transformation era",
22+
"🦚 Peacock Vibes — you look good today",
23+
"🐸 Frog Jumper — hop over problems",
24+
"🐕 Loyal Doggo — supportive teammate energy",
25+
"🐍 Sneaky Python — silent, smart, sssssharp",
26+
"🪽 Soft Angel Mode — kindness first",
27+
"🌊 Ocean Brain — calm but deep",
28+
"🔥 Hot Streak — everything is working today",
29+
"🌙 Night Coder — 2 AM productivity unlocked"
30+
];
31+
32+
export default function RandomIdentity() {
33+
const [text, setText] = useState(identities[0]);
34+
35+
function changeIdentity() {
36+
const random = Math.floor(Math.random() * identities.length);
37+
setText(identities[random]);
38+
}
39+
40+
return (
41+
<div className="identity-wrapper">
42+
<div className="identity-glow"></div>
43+
<div className="identity-card">
44+
<h2 className="identity-title">Today’s Random Identity ✨</h2>
45+
<p className="identity-sub">Click to find today’s vibe</p>
46+
<p className="identity-box">{text}</p>
47+
<button onClick={changeIdentity} className="identity-btn">
48+
Give me another
49+
</button>
50+
<p className="identity-hint">Tip: keep clicking till it feels right 😌</p>
51+
</div>
52+
</div>
53+
);
54+
}
Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
/* src/styles/pages/activities/RandomIdentity.css */
2+
:root {
3+
--bg: radial-gradient(circle at top, #0f172a 0%, #020617 45%, #000 80%);
4+
--card-bg: rgba(10, 16, 26, 0.45);
5+
--border: rgba(255, 255, 255, 0.12);
6+
--accent: #f97316;
7+
--accent-soft: rgba(249, 115, 22, 0.25);
8+
--text-primary: #e2e8f0;
9+
--text-secondary: #94a3b8;
10+
--radius-lg: 1.4rem;
11+
}
12+
13+
.identity-wrapper {
14+
min-height: 80vh;
15+
display: grid;
16+
place-items: center;
17+
background: var(--bg);
18+
position: relative;
19+
padding: 2.5rem 1.2rem;
20+
overflow: hidden;
21+
}
22+
23+
.identity-glow {
24+
position: absolute;
25+
width: 420px;
26+
height: 420px;
27+
background: radial-gradient(circle, rgba(249, 115, 22, 0.35), rgba(2, 6, 23, 0));
28+
filter: blur(60px);
29+
top: -70px;
30+
right: -40px;
31+
pointer-events: none;
32+
}
33+
34+
.identity-card {
35+
width: min(460px, 100%);
36+
background: radial-gradient(circle at top, rgba(15, 23, 42, 0.65), rgba(15, 23, 42, 0.25));
37+
border: 1px solid rgba(148, 163, 184, 0.15);
38+
border-top: 1px solid rgba(255, 255, 255, 0.2);
39+
border-radius: var(--radius-lg);
40+
backdrop-filter: blur(14px);
41+
box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
42+
padding: 1.8rem 1.4rem 2.1rem;
43+
text-align: center;
44+
position: relative;
45+
}
46+
47+
.identity-title {
48+
color: var(--text-primary);
49+
font-size: 1.5rem;
50+
font-weight: 700;
51+
letter-spacing: -0.01em;
52+
}
53+
54+
.identity-sub {
55+
margin-top: 0.3rem;
56+
color: var(--text-secondary);
57+
font-size: 0.85rem;
58+
}
59+
60+
.identity-box {
61+
background: radial-gradient(circle at top, rgba(15, 23, 42, 0.1), rgba(15, 23, 42, 0));
62+
border: 1px solid rgba(148, 163, 184, 0.2);
63+
border-radius: 1.1rem;
64+
margin-top: 1.1rem;
65+
padding: 1.1rem 1rem;
66+
min-height: 78px;
67+
display: flex;
68+
align-items: center;
69+
justify-content: center;
70+
color: var(--text-primary);
71+
font-weight: 600;
72+
line-height: 1.45;
73+
font-size: 1.02rem;
74+
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
75+
}
76+
77+
.identity-btn {
78+
width: fit-content;
79+
margin: 1.25rem auto 0;
80+
background: linear-gradient(135deg, #fb923c 0%, #f97316 45%, #ea580c 100%);
81+
color: #0f172a;
82+
border: none;
83+
padding: 0.6rem 1.5rem;
84+
border-radius: 999px;
85+
cursor: pointer;
86+
font-weight: 600;
87+
letter-spacing: -0.01em;
88+
display: flex;
89+
gap: 0.35rem;
90+
align-items: center;
91+
justify-content: center;
92+
transition: transform 0.1s ease-out, box-shadow 0.15s ease-out;
93+
box-shadow: 0 12px 25px rgba(249, 115, 22, 0.4);
94+
}
95+
96+
.identity-btn::after {
97+
content: "↻";
98+
font-size: 0.8rem;
99+
}
100+
101+
.identity-btn:hover {
102+
transform: translateY(-1px);
103+
box-shadow: 0 15px 28px rgba(249, 115, 22, 0.45);
104+
}
105+
106+
.identity-btn:active {
107+
transform: translateY(0);
108+
}
109+
110+
.identity-hint {
111+
margin-top: 0.85rem;
112+
font-size: 0.7rem;
113+
color: var(--text-secondary);
114+
}
115+
116+
@media (max-width: 520px) {
117+
.identity-card {
118+
padding: 1.4rem 1rem 1.8rem;
119+
}
120+
.identity-title {
121+
font-size: 1.35rem;
122+
}
123+
.identity-box {
124+
font-size: 0.97rem;
125+
}
126+
.identity-wrapper {
127+
padding-inline: 0.65rem;
128+
}
129+
}

0 commit comments

Comments
 (0)