Initial commit: Text Corruptor PWA

Features:
- Zalgo text generator with adjustable intensity (1-10)
- Real-time text corruption as you type
- Click-to-copy functionality with visual feedback
- Progressive Web App with offline support
- Responsive design for mobile and desktop
- Dark theme with glitch-inspired aesthetics

Technical implementation:
- Pure JavaScript implementation (no frameworks)
- Service Worker for offline functionality
- PWA manifest for installability
- Python development server
- Comprehensive linting setup (ESLint, Prettier, Black, Pylint)

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Ole-Morten Duesund 2025-08-18 20:00:58 +02:00
commit 44a2ac4cbd
23 changed files with 1672 additions and 0 deletions

344
app/styles.css Normal file
View file

@ -0,0 +1,344 @@
/**
* Styles for Text Corruptor
* Dark theme with glitch-inspired aesthetics
*/
:root {
--bg-primary: #0f0f14;
--bg-secondary: #1a1a2e;
--bg-tertiary: #16213e;
--text-primary: #eaeaea;
--text-secondary: #a8a8b3;
--accent: #00ff88;
--accent-hover: #00cc6a;
--error: #ff3366;
--border: #2a2a3e;
--shadow: rgba(0, 255, 136, 0.1);
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
background: var(--bg-primary);
color: var(--text-primary);
min-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
padding: 20px;
background-image: repeating-linear-gradient(
0deg,
transparent,
transparent 2px,
rgba(0, 255, 136, 0.03) 2px,
rgba(0, 255, 136, 0.03) 4px
);
}
.container {
width: 100%;
max-width: 800px;
background: var(--bg-secondary);
border-radius: 16px;
padding: 40px;
box-shadow:
0 10px 40px rgba(0, 0, 0, 0.5),
0 0 100px var(--shadow);
border: 1px solid var(--border);
}
header {
text-align: center;
margin-bottom: 40px;
}
h1 {
font-size: 2.5rem;
font-weight: 700;
margin-bottom: 10px;
background: linear-gradient(135deg, var(--accent), #00ffff);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
text-shadow: 0 0 40px var(--shadow);
animation: glitch 3s infinite;
}
@keyframes glitch {
0%,
100% {
text-shadow: 0 0 40px var(--shadow);
}
25% {
text-shadow:
-2px 0 var(--error),
2px 0 var(--accent);
}
50% {
text-shadow:
2px 0 var(--error),
-2px 0 var(--accent);
}
75% {
text-shadow: 0 0 40px var(--shadow);
}
}
.subtitle {
color: var(--text-secondary);
font-size: 1.1rem;
}
.controls {
display: flex;
align-items: center;
gap: 15px;
margin-bottom: 30px;
padding: 20px;
background: var(--bg-tertiary);
border-radius: 12px;
border: 1px solid var(--border);
}
.controls label {
color: var(--text-secondary);
font-size: 0.95rem;
}
#intensity {
flex: 1;
-webkit-appearance: none;
appearance: none;
height: 6px;
background: var(--border);
border-radius: 3px;
outline: none;
transition: all 0.3s ease;
}
#intensity::-webkit-slider-thumb {
-webkit-appearance: none;
appearance: none;
width: 20px;
height: 20px;
background: var(--accent);
border-radius: 50%;
cursor: pointer;
transition: all 0.3s ease;
box-shadow: 0 0 10px var(--shadow);
}
#intensity::-moz-range-thumb {
width: 20px;
height: 20px;
background: var(--accent);
border-radius: 50%;
cursor: pointer;
transition: all 0.3s ease;
box-shadow: 0 0 10px var(--shadow);
}
#intensity:hover::-webkit-slider-thumb {
transform: scale(1.2);
box-shadow: 0 0 20px var(--shadow);
}
#intensity:hover::-moz-range-thumb {
transform: scale(1.2);
box-shadow: 0 0 20px var(--shadow);
}
#intensityValue {
min-width: 30px;
text-align: center;
font-weight: 600;
color: var(--accent);
font-size: 1.1rem;
}
.text-area-container {
margin-bottom: 25px;
position: relative;
}
.text-area-container label {
display: block;
margin-bottom: 10px;
color: var(--text-secondary);
font-size: 0.95rem;
text-transform: uppercase;
letter-spacing: 1px;
}
textarea {
width: 100%;
min-height: 150px;
padding: 15px;
background: var(--bg-tertiary);
border: 2px solid var(--border);
border-radius: 12px;
color: var(--text-primary);
font-size: 1rem;
font-family: 'Courier New', monospace;
resize: vertical;
outline: none;
transition: all 0.3s ease;
}
textarea:focus {
border-color: var(--accent);
box-shadow: 0 0 20px var(--shadow);
}
#outputText {
cursor: pointer;
position: relative;
}
#outputText:hover {
background: rgba(0, 255, 136, 0.05);
}
.copy-notification {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
background: var(--accent);
color: var(--bg-primary);
padding: 12px 24px;
border-radius: 8px;
font-weight: 600;
opacity: 0;
pointer-events: none;
transition: all 0.3s ease;
z-index: 10;
}
.copy-notification.show {
opacity: 1;
animation: pulse 0.5s ease;
}
@keyframes pulse {
0% {
transform: translate(-50%, -50%) scale(0.8);
}
50% {
transform: translate(-50%, -50%) scale(1.1);
}
100% {
transform: translate(-50%, -50%) scale(1);
}
}
.clear-btn {
width: 100%;
padding: 15px;
background: transparent;
border: 2px solid var(--accent);
border-radius: 12px;
color: var(--accent);
font-size: 1rem;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 1px;
cursor: pointer;
transition: all 0.3s ease;
margin-top: 20px;
}
.clear-btn:hover {
background: var(--accent);
color: var(--bg-primary);
box-shadow: 0 0 30px var(--shadow);
transform: translateY(-2px);
}
.clear-btn:active {
transform: translateY(0);
}
footer {
text-align: center;
margin-top: 30px;
padding-top: 20px;
border-top: 1px solid var(--border);
}
footer p {
color: var(--text-secondary);
font-size: 0.9rem;
}
/* Mobile responsiveness */
@media (max-width: 600px) {
.container {
padding: 25px;
}
h1 {
font-size: 2rem;
}
.controls {
flex-direction: column;
align-items: stretch;
gap: 10px;
}
textarea {
min-height: 120px;
font-size: 0.95rem;
}
}
/* Glitch effect for corrupted text */
#outputText {
animation: subtle-glitch 5s infinite;
}
@keyframes subtle-glitch {
0%,
100% {
filter: none;
}
92% {
filter: none;
}
93% {
filter: drop-shadow(-2px 0 var(--error)) drop-shadow(2px 0 var(--accent));
}
94% {
filter: none;
}
}
/* Loading state */
@keyframes spin {
to {
transform: rotate(360deg);
}
}
/* Print styles */
@media print {
body {
background: white;
color: black;
}
.container {
box-shadow: none;
border: 1px solid #ccc;
}
.clear-btn {
display: none;
}
}