feat: initialize Annual Gala Interactive System monorepo
- Set up pnpm workspace with 4 packages: shared, server, client-mobile, client-screen - Implement Redis atomic voting with Lua scripts (HINCRBY + distributed lock) - Add optimistic UI with IndexedDB queue for offline resilience - Configure Socket.io with auto-reconnection (infinite retries) - Separate mobile (Vant) and big screen (Pixi.js) dependencies Tech stack: - Frontend Mobile: Vue 3 + Vant + Socket.io-client - Frontend Screen: Vue 3 + Pixi.js + GSAP - Backend: Express + Socket.io + Redis + Prisma/MySQL Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
177
packages/client-mobile/src/assets/styles/global.scss
Normal file
177
packages/client-mobile/src/assets/styles/global.scss
Normal file
@@ -0,0 +1,177 @@
|
||||
@import './variables.scss';
|
||||
|
||||
// Reset
|
||||
*,
|
||||
*::before,
|
||||
*::after {
|
||||
box-sizing: border-box;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
html {
|
||||
font-size: 16px;
|
||||
-webkit-text-size-adjust: 100%;
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
|
||||
'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
|
||||
font-size: $font-size-md;
|
||||
line-height: 1.5;
|
||||
color: $color-text-primary;
|
||||
background-color: $color-bg-primary;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
// Safe area for notch devices
|
||||
.safe-area-top {
|
||||
padding-top: env(safe-area-inset-top);
|
||||
}
|
||||
|
||||
.safe-area-bottom {
|
||||
padding-bottom: env(safe-area-inset-bottom);
|
||||
}
|
||||
|
||||
// Utility classes
|
||||
.text-center {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.text-primary {
|
||||
color: $color-primary;
|
||||
}
|
||||
|
||||
.text-gold {
|
||||
color: $color-gold;
|
||||
}
|
||||
|
||||
.text-muted {
|
||||
color: $color-text-muted;
|
||||
}
|
||||
|
||||
.bg-primary {
|
||||
background-color: $color-primary;
|
||||
}
|
||||
|
||||
.bg-gold {
|
||||
background-color: $color-gold;
|
||||
}
|
||||
|
||||
// Guochao decorative elements
|
||||
.guochao-border {
|
||||
border: 2px solid $color-gold;
|
||||
border-radius: $radius-lg;
|
||||
position: relative;
|
||||
|
||||
&::before,
|
||||
&::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
border: 2px solid $color-gold;
|
||||
}
|
||||
|
||||
&::before {
|
||||
top: -6px;
|
||||
left: -6px;
|
||||
border-right: none;
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
&::after {
|
||||
bottom: -6px;
|
||||
right: -6px;
|
||||
border-left: none;
|
||||
border-top: none;
|
||||
}
|
||||
}
|
||||
|
||||
// Gold gradient text
|
||||
.gold-text {
|
||||
background: linear-gradient(135deg, $color-gold-light 0%, $color-gold 50%, $color-gold-dark 100%);
|
||||
-webkit-background-clip: text;
|
||||
-webkit-text-fill-color: transparent;
|
||||
background-clip: text;
|
||||
}
|
||||
|
||||
// Red gradient button
|
||||
.btn-primary {
|
||||
background: linear-gradient(135deg, $color-primary-light 0%, $color-primary 100%);
|
||||
color: $color-text-inverse;
|
||||
border: none;
|
||||
border-radius: $radius-lg;
|
||||
padding: $spacing-md $spacing-lg;
|
||||
font-size: $font-size-lg;
|
||||
font-weight: 500;
|
||||
box-shadow: $shadow-md;
|
||||
transition: all $transition-normal;
|
||||
|
||||
&:active {
|
||||
transform: scale(0.98);
|
||||
box-shadow: $shadow-sm;
|
||||
}
|
||||
}
|
||||
|
||||
// Card style
|
||||
.card {
|
||||
background: $color-bg-card;
|
||||
border-radius: $radius-lg;
|
||||
box-shadow: $shadow-md;
|
||||
padding: $spacing-md;
|
||||
}
|
||||
|
||||
// Animation keyframes
|
||||
@keyframes pulse {
|
||||
0%,
|
||||
100% {
|
||||
opacity: 1;
|
||||
}
|
||||
50% {
|
||||
opacity: 0.5;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes bounce {
|
||||
0%,
|
||||
100% {
|
||||
transform: translateY(0);
|
||||
}
|
||||
50% {
|
||||
transform: translateY(-10px);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes shimmer {
|
||||
0% {
|
||||
background-position: -200% 0;
|
||||
}
|
||||
100% {
|
||||
background-position: 200% 0;
|
||||
}
|
||||
}
|
||||
|
||||
// Loading skeleton
|
||||
.skeleton {
|
||||
background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
|
||||
background-size: 200% 100%;
|
||||
animation: shimmer 1.5s infinite;
|
||||
border-radius: $radius-sm;
|
||||
}
|
||||
|
||||
// Vant overrides
|
||||
:root {
|
||||
--van-primary-color: #{$color-primary};
|
||||
--van-success-color: #{$color-success};
|
||||
--van-warning-color: #{$color-warning};
|
||||
--van-danger-color: #{$color-error};
|
||||
--van-text-color: #{$color-text-primary};
|
||||
--van-text-color-2: #{$color-text-secondary};
|
||||
--van-text-color-3: #{$color-text-muted};
|
||||
--van-border-color: #{$color-border};
|
||||
--van-background: #{$color-bg-primary};
|
||||
--van-background-2: #{$color-bg-secondary};
|
||||
}
|
||||
72
packages/client-mobile/src/assets/styles/variables.scss
Normal file
72
packages/client-mobile/src/assets/styles/variables.scss
Normal file
@@ -0,0 +1,72 @@
|
||||
// Guochao Red & Gold Theme Variables
|
||||
|
||||
// Primary colors - 国潮红金配色
|
||||
$color-primary: #c41230; // 中国红
|
||||
$color-primary-light: #e8384f;
|
||||
$color-primary-dark: #9a0e26;
|
||||
|
||||
$color-gold: #d4a84b; // 金色
|
||||
$color-gold-light: #f0c96a;
|
||||
$color-gold-dark: #b8923f;
|
||||
|
||||
// Background colors
|
||||
$color-bg-primary: #fff5f5;
|
||||
$color-bg-secondary: #fef8f0;
|
||||
$color-bg-card: #ffffff;
|
||||
|
||||
// Text colors
|
||||
$color-text-primary: #1a1a1a;
|
||||
$color-text-secondary: #666666;
|
||||
$color-text-muted: #999999;
|
||||
$color-text-inverse: #ffffff;
|
||||
|
||||
// Status colors
|
||||
$color-success: #52c41a;
|
||||
$color-warning: #faad14;
|
||||
$color-error: #ff4d4f;
|
||||
$color-info: #1890ff;
|
||||
|
||||
// Border
|
||||
$color-border: #f0f0f0;
|
||||
$color-border-light: #f5f5f5;
|
||||
|
||||
// Shadows
|
||||
$shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
|
||||
$shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
|
||||
$shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
|
||||
$shadow-gold: 0 4px 12px rgba(212, 168, 75, 0.3);
|
||||
|
||||
// Border radius
|
||||
$radius-sm: 4px;
|
||||
$radius-md: 8px;
|
||||
$radius-lg: 12px;
|
||||
$radius-xl: 16px;
|
||||
$radius-full: 9999px;
|
||||
|
||||
// Spacing
|
||||
$spacing-xs: 4px;
|
||||
$spacing-sm: 8px;
|
||||
$spacing-md: 16px;
|
||||
$spacing-lg: 24px;
|
||||
$spacing-xl: 32px;
|
||||
|
||||
// Font sizes
|
||||
$font-size-xs: 10px;
|
||||
$font-size-sm: 12px;
|
||||
$font-size-md: 14px;
|
||||
$font-size-lg: 16px;
|
||||
$font-size-xl: 18px;
|
||||
$font-size-2xl: 20px;
|
||||
$font-size-3xl: 24px;
|
||||
|
||||
// Z-index
|
||||
$z-index-dropdown: 100;
|
||||
$z-index-sticky: 200;
|
||||
$z-index-fixed: 300;
|
||||
$z-index-modal: 400;
|
||||
$z-index-toast: 500;
|
||||
|
||||
// Transitions
|
||||
$transition-fast: 0.15s ease;
|
||||
$transition-normal: 0.3s ease;
|
||||
$transition-slow: 0.5s ease;
|
||||
Reference in New Issue
Block a user