From d22178e516caf492e427f484e75f8ec2de936c6b Mon Sep 17 00:00:00 2001 From: Ilia Miheev Date: Sun, 26 Jul 2026 14:08:41 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A1=D0=B4=D0=B5=D0=BB=D0=B0=D0=BB=20=D0=BA?= =?UTF-8?q?=D0=B0=D1=81=D1=82=D0=BE=D0=BC=D0=B8=D0=B7=D0=B0=D1=86=D0=B8?= =?UTF-8?q?=D1=8E=20=D1=87=D0=B5=D1=80=D0=B5=D0=B7=20env?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.example | 24 ++++++ .gitignore | 1 + package.json | 3 + public/config.js | 19 +++++ public/index.html | 3 +- public/Безымянный.png | Bin 0 -> 9249 bytes scripts/generate-config.js | 90 ++++++++++++++++++++++ src/components/AppHeader.vue | 18 +++-- src/components/ModeSidebar.vue | 17 +++-- src/components/ResultDisplay.vue | 4 +- src/config/appConfig.js | 31 ++++++++ src/config/applyTheme.js | 123 +++++++++++++++++++++++++++++++ src/main.js | 6 ++ src/styles/theme.css | 14 ++-- vue.config.js | 8 +- 15 files changed, 331 insertions(+), 30 deletions(-) create mode 100644 .env.example create mode 100644 public/config.js create mode 100644 public/Безымянный.png create mode 100644 scripts/generate-config.js create mode 100644 src/config/appConfig.js create mode 100644 src/config/applyTheme.js diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..ece51f9 --- /dev/null +++ b/.env.example @@ -0,0 +1,24 @@ +# Copy to .env and change values as needed. +# If .env is missing or a key is empty, built-in irandom defaults are used. + +# Branding +# Display name in sidebar / mobile header +VUE_APP_NAME=irandom +# Browser tab title (can differ from NAME) +VUE_APP_TITLE=irandom +# Link on logo + name +VUE_APP_BRAND_URL=https://git.imiheev.online/admin/irandom +# Logo path or absolute URL (file should be in public/ if relative) +VUE_APP_LOGO_URL=/logo.png + +# Theme colors (CSS hex) +VUE_APP_COLOR_PRIMARY=#c9a66b +VUE_APP_COLOR_ACCENT=#e6c566 +VUE_APP_COLOR_BG=#1a1815 +VUE_APP_COLOR_SURFACE=#2e2820 +VUE_APP_COLOR_SURFACE_RAISED=#3a3228 +VUE_APP_COLOR_TEXT=#ffffff +VUE_APP_COLOR_TEXT_MUTED=#c8c0b4 +VUE_APP_COLOR_DANGER=#ee5c5c +VUE_APP_COLOR_LINK=#4a6a8a +VUE_APP_COLOR_BORDER=#4a4034 diff --git a/.gitignore b/.gitignore index 1ea4b0b..e548c97 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ # local env files +.env .env.local .env.*.local diff --git a/package.json b/package.json index 9eb2c39..3ccabe1 100644 --- a/package.json +++ b/package.json @@ -3,6 +3,9 @@ "version": "0.1.0", "private": true, "scripts": { + "generate-config": "node scripts/generate-config.js", + "preserve": "node scripts/generate-config.js", + "prebuild": "node scripts/generate-config.js", "serve": "vue-cli-service serve", "build": "vue-cli-service build", "lint": "vue-cli-service lint" diff --git a/public/config.js b/public/config.js new file mode 100644 index 0000000..87054a4 --- /dev/null +++ b/public/config.js @@ -0,0 +1,19 @@ +/* Generated by scripts/generate-config.js — do not edit by hand */ +window.__APP_CONFIG__ = { + "name": "irandom", + "title": "irandom", + "brandUrl": "https://git.imiheev.online/admin/irandom", + "logoUrl": "/logo.png", + "colors": { + "primary": "#c9a66b", + "accent": "#e6c566", + "bg": "#1a1815", + "surface": "#2e2820", + "surfaceRaised": "#3a3228", + "text": "#ffffff", + "textMuted": "#c8c0b4", + "danger": "#ee5c5c", + "link": "#4a6a8a", + "border": "#4a4034" + } +}; diff --git a/public/index.html b/public/index.html index 61b126b..267a5d4 100644 --- a/public/index.html +++ b/public/index.html @@ -5,7 +5,8 @@ - irandom — простой генератор случайностей + irandom +