This commit is contained in:
Omar Najjar 2025-03-07 20:16:07 +11:00
parent 1b9b2b4bec
commit 9d9ec38a5d

View file

@ -4,36 +4,36 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>RADICAL - Australia's Democratic Revolution</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Roboto+Mono:wght@300;400;500;600;700&display=swap" rel="stylesheet">
<style>
:root {
--primary: #10b981;
--primary-light: #34d399;
--primary-dark: #059669;
--secondary: #8b5cf6;
--accent: #f43f5e;
--dark: #0f172a;
--darker: #020617;
--light: #f8fafc;
--border: #1e293b;
--text: #e2e8f0;
--text-muted: #94a3b8;
--success: #10b981;
--danger: #ef4444;
--card-bg: rgba(30, 41, 59, 0.7);
--primary: #ff0099;
--primary-light: #ff66c4;
--primary-dark: #cc007a;
--secondary: #ffffff;
--accent: #ff0099;
--dark: #000000;
--darker: #111111;
--light: #ffffff;
--border: #333333;
--text: #ffffff;
--text-muted: #aaaaaa;
--success: #ff0099;
--danger: #ff0099;
--card-bg: rgba(0, 0, 0, 0.8);
}
* {
box-sizing: border-box;
margin: 0;
padding: 0;
font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
font-family: 'Roboto Mono', monospace;
}
body {
background-color: var(--dark);
background-image:
radial-gradient(circle at 20% 30%, rgba(139, 92, 246, 0.15) 0%, transparent 30%),
radial-gradient(circle at 80% 70%, rgba(20, 184, 166, 0.1) 0%, transparent 30%);
color: var(--text);
line-height: 1.6;
overflow-x: hidden;
@ -49,81 +49,80 @@
text-align: center;
margin-bottom: 50px;
padding: 40px 20px;
border-radius: 16px;
border-radius: 0;
background: var(--card-bg);
border: 1px solid var(--border);
backdrop-filter: blur(10px);
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
border: 1px solid var(--primary);
box-shadow: 0 0 20px rgba(255, 0, 153, 0.3);
}
header h1 {
font-size: 4rem;
font-weight: 800;
font-weight: 700;
letter-spacing: -2px;
margin-bottom: 5px;
text-transform: uppercase;
background: linear-gradient(to right, var(--primary), var(--secondary));
-webkit-background-clip: text;
background-clip: text;
color: transparent;
color: var(--primary);
text-shadow: 0 0 10px rgba(255, 0, 153, 0.5);
}
header p {
font-size: 1.2rem;
font-weight: 300;
font-size: 1.1rem;
font-weight: 400;
margin-top: 10px;
max-width: 600px;
margin-left: auto;
margin-right: auto;
color: var(--text-muted);
color: var(--text);
}
.tagline {
display: inline-block;
background-color: rgba(255, 255, 255, 0.05);
background-color: var(--primary);
padding: 8px 20px;
border-radius: 50px;
border-radius: 0;
font-size: 0.9rem;
margin-top: 20px;
letter-spacing: 1px;
text-transform: uppercase;
border: 1px solid rgba(255, 255, 255, 0.1);
color: var(--dark);
font-weight: 600;
}
.new-proposal {
background: var(--card-bg);
border-radius: 16px;
border-radius: 0;
padding: 30px;
margin-bottom: 40px;
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
box-shadow: 0 0 20px rgba(255, 0, 153, 0.2);
border: 1px solid var(--border);
backdrop-filter: blur(10px);
transition: all 0.3s ease;
}
.new-proposal:hover {
box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
box-shadow: 0 0 30px rgba(255, 0, 153, 0.3);
border-color: var(--primary);
}
.proposal-input {
width: 100%;
padding: 20px;
border: none;
border-radius: 12px;
border-radius: 0;
resize: none;
font-size: 16px;
margin-bottom: 15px;
background-color: rgba(15, 23, 42, 0.7);
background-color: rgba(17, 17, 17, 1);
color: var(--text);
box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.1);
box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.5);
transition: all 0.3s ease;
border: 1px solid rgba(255, 255, 255, 0.05);
border: 1px solid var(--border);
font-family: 'Roboto Mono', monospace;
}
.proposal-input:focus {
outline: none;
box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.1), 0 0 0 3px rgba(16, 185, 129, 0.2);
border-color: rgba(16, 185, 129, 0.3);
box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.5), 0 0 0 2px rgba(255, 0, 153, 0.3);
border-color: var(--primary);
}
.proposal-input::placeholder {
@ -135,19 +134,19 @@
color: var(--text-muted);
text-align: right;
margin-bottom: 20px;
font-weight: 300;
font-weight: 400;
}
.char-counter.limit {
color: var(--danger);
font-weight: 500;
color: var(--primary);
font-weight: 700;
}
.post-button {
background-color: var(--primary);
color: white;
color: var(--dark);
border: none;
border-radius: 12px;
border-radius: 0;
padding: 12px 30px;
font-size: 16px;
font-weight: 600;
@ -155,24 +154,25 @@
float: right;
text-transform: uppercase;
letter-spacing: 1px;
box-shadow: 0 4px 10px rgba(16, 185, 129, 0.2);
box-shadow: 0 0 10px rgba(255, 0, 153, 0.3);
transition: all 0.3s ease;
font-family: 'Roboto Mono', monospace;
}
.post-button:hover {
background-color: var(--primary-light);
transform: translateY(-2px);
box-shadow: 0 6px 15px rgba(16, 185, 129, 0.3);
box-shadow: 0 0 15px rgba(255, 0, 153, 0.4);
}
.post-button:active {
transform: translateY(1px);
box-shadow: 0 2px 5px rgba(16, 185, 129, 0.3);
box-shadow: 0 0 5px rgba(255, 0, 153, 0.4);
}
.post-button:disabled {
background-color: rgba(255, 255, 255, 0.1);
color: rgba(255, 255, 255, 0.3);
background-color: #333;
color: #555;
cursor: not-allowed;
box-shadow: none;
transform: none;
@ -187,7 +187,7 @@
justify-content: space-between;
align-items: center;
margin-bottom: 30px;
border-bottom: 1px solid rgba(255, 255, 255, 0.05);
border-bottom: 1px solid var(--border);
padding-bottom: 15px;
}
@ -201,39 +201,40 @@
.sort-select {
padding: 10px 20px;
border-radius: 12px;
border: 1px solid rgba(255, 255, 255, 0.1);
background-color: rgba(15, 23, 42, 0.7);
border-radius: 0;
border: 1px solid var(--border);
background-color: var(--darker);
color: var(--text);
font-size: 14px;
cursor: pointer;
transition: all 0.3s ease;
font-family: 'Roboto Mono', monospace;
}
.sort-select:hover {
background-color: rgba(30, 41, 59, 0.8);
border-color: var(--primary);
}
.sort-select:focus {
outline: none;
box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
box-shadow: 0 0 0 2px rgba(255, 0, 153, 0.3);
}
.proposal-card {
background: var(--card-bg);
border-radius: 16px;
border-radius: 0;
padding: 30px;
margin-bottom: 25px;
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
border: 1px solid var(--border);
backdrop-filter: blur(10px);
transition: all 0.3s ease;
position: relative;
}
.proposal-card:hover {
transform: translateY(-3px);
box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
box-shadow: 0 0 30px rgba(255, 0, 153, 0.2);
border-color: var(--primary);
}
.proposal-author {
@ -256,7 +257,7 @@
justify-content: space-between;
align-items: center;
font-size: 14px;
border-top: 1px solid rgba(255, 255, 255, 0.05);
border-top: 1px solid var(--border);
padding-top: 15px;
}
@ -266,8 +267,8 @@
}
.vote-button {
background: rgba(15, 23, 42, 0.5);
border: 1px solid rgba(255, 255, 255, 0.05);
background: var(--darker);
border: 1px solid var(--border);
cursor: pointer;
display: flex;
align-items: center;
@ -275,24 +276,26 @@
font-size: 14px;
transition: all 0.2s ease;
padding: 6px 14px;
border-radius: 8px;
border-radius: 0;
font-family: 'Roboto Mono', monospace;
}
.vote-button:hover {
background-color: rgba(30, 41, 59, 0.8);
background-color: var(--darker);
color: var(--text);
border-color: var(--primary);
}
.vote-button.upvoted {
color: var(--success);
background-color: rgba(16, 185, 129, 0.1);
border-color: rgba(16, 185, 129, 0.2);
color: var(--dark);
background-color: var(--primary);
border-color: var(--primary);
}
.vote-button.downvoted {
color: var(--danger);
background-color: rgba(239, 68, 68, 0.1);
border-color: rgba(239, 68, 68, 0.2);
color: var(--primary);
background-color: transparent;
border-color: var(--primary);
}
.vote-icon {
@ -310,11 +313,11 @@
}
.net-votes.positive {
color: var(--success);
color: var(--primary);
}
.net-votes.negative {
color: var(--danger);
color: var(--text-muted);
}
.proposal-time {
@ -327,9 +330,8 @@
padding: 60px 40px;
color: var(--text-muted);
background: var(--card-bg);
border-radius: 16px;
border: 1px dashed rgba(255, 255, 255, 0.1);
backdrop-filter: blur(10px);
border-radius: 0;
border: 1px dashed var(--border);
}
.empty-state p {
@ -341,10 +343,10 @@
position: absolute;
top: 20px;
right: 20px;
background-color: var(--secondary);
color: white;
background-color: var(--primary);
color: var(--dark);
padding: 5px 12px;
border-radius: 8px;
border-radius: 0;
font-size: 12px;
font-weight: 600;
text-transform: uppercase;
@ -352,7 +354,8 @@
}
.trending-badge {
background-color: var(--accent);
background-color: var(--light);
color: var(--dark);
}
footer {
@ -361,7 +364,7 @@
padding: 30px 20px;
color: var(--text-muted);
font-size: 14px;
border-top: 1px solid rgba(255, 255, 255, 0.05);
border-top: 1px solid var(--border);
}
.footer-links {
@ -380,12 +383,7 @@
.footer-links a:hover {
color: var(--primary-light);
}
/* Glassmorphism effect on cards */
.glass {
backdrop-filter: blur(10px);
-webkit-backdrop-filter: blur(10px);
text-decoration: underline;
}
/* Responsive design */
@ -412,13 +410,13 @@
</head>
<body>
<div class="container">
<header class="glass">
<header>
<h1>RADICAL</h1>
<div class="tagline">Vibe, Vote, Veto</div>
<p>Australia's direct democracy movement. Share policy ideas, vote on proposals, take back control.</p>
</header>
<section class="new-proposal glass">
<section class="new-proposal">
<textarea id="proposal-input" class="proposal-input" placeholder="Your idea to revolutionize Australia? (280 character limit)" maxlength="280"></textarea>
<div id="char-counter" class="char-counter">280 characters remaining</div>
<button id="post-button" class="post-button" disabled>Post Proposal</button>
@ -436,8 +434,8 @@
</div>
<div id="proposals-container">
<div class="empty-state glass">
<p>No proposals yet. Be the first to start the revolution!</p>
<div class="empty-state">
<p>No proposals yet. Be the first to drop your hot take!</p>
</div>
</div>
</section>
@ -549,15 +547,16 @@
successEl.style.left = '50%';
successEl.style.transform = 'translateX(-50%)';
successEl.style.backgroundColor = 'var(--primary)';
successEl.style.color = 'white';
successEl.style.color = 'var(--dark)';
successEl.style.padding = '12px 24px';
successEl.style.borderRadius = '8px';
successEl.style.borderRadius = '0';
successEl.style.zIndex = '1000';
successEl.style.boxShadow = '0 4px 20px rgba(16, 185, 129, 0.3)';
successEl.style.boxShadow = '0 0 20px rgba(255, 0, 153, 0.5)';
successEl.style.transition = 'all 0.4s cubic-bezier(0.16, 1, 0.3, 1)';
successEl.style.opacity = '0';
successEl.style.fontSize = '14px';
successEl.style.fontWeight = '500';
successEl.style.fontWeight = '700';
successEl.style.fontFamily = "'Roboto Mono', monospace";
document.body.appendChild(successEl);
@ -667,7 +666,7 @@
// Show empty state if no proposals
if (proposals.length === 0) {
proposalsContainer.innerHTML = `
<div class="empty-state glass">
<div class="empty-state">
<p>No proposals yet. Be the first to drop your hot take!</p>
</div>
`;
@ -681,7 +680,7 @@
const voteClass = netVotes > 0 ? 'positive' : netVotes < 0 ? 'negative' : '';
const proposalCard = document.createElement('div');
proposalCard.className = 'proposal-card glass';
proposalCard.className = 'proposal-card';
// Badge for trending or power proposals
const badgeHtml = proposal.trending ?