mirror of
https://mgit.msbls.de/m/gitea-custom.git
synced 2026-02-06 00:02:08 +00:00
refactor: clean up themes, templates, and add comprehensive README
- Themes now only override CSS variables (no selector overrides) - Removed duplicate styles from header.tmpl (just loads Inter font now) - Cleaned up logo SVG (simpler, no overlapping text) - Improved home page with proper hero layout and sign-in/explore buttons - Added detailed README documenting the setup, deployment, and design principles
This commit is contained in:
105
README.md
105
README.md
@@ -1,3 +1,104 @@
|
||||
# gitea-custom
|
||||
# mGit Custom Theme
|
||||
|
||||
Shared Gitea theme and customizations
|
||||
Shared Gitea customizations for all mGit instances. This repo is the single source of truth for branding, themes, and template overrides.
|
||||
|
||||
## Instances
|
||||
|
||||
| Instance | URL | Host |
|
||||
|----------|-----|------|
|
||||
| Primary | `mgit.msbls.de` | mvpsm |
|
||||
| Backup (mirror) | `mgit.x.msbls.de` | mgitx |
|
||||
|
||||
Both run Gitea 1.24.x via Dokploy with this repo cloned to `/home/m/gitea-custom/`.
|
||||
|
||||
## How It Works
|
||||
|
||||
Gitea supports customization by mounting files into its `$GITEA_CUSTOM` directory (`/data/gitea/` in Docker). The Dokploy compose files bind-mount subdirectories from this repo:
|
||||
|
||||
```yaml
|
||||
volumes:
|
||||
- /home/m/gitea-custom/public:/data/gitea/public:ro
|
||||
- /home/m/gitea-custom/templates:/data/gitea/templates:ro
|
||||
- /home/m/gitea-custom/options:/data/gitea/options:ro
|
||||
```
|
||||
|
||||
A cron job on each host runs every 30 minutes to pull changes and restart Gitea if the repo was updated.
|
||||
|
||||
## File Structure
|
||||
|
||||
```
|
||||
gitea-custom/
|
||||
├── public/
|
||||
│ └── assets/
|
||||
│ ├── css/
|
||||
│ │ ├── theme-mgit-dark.css # Dark theme (CSS variables only)
|
||||
│ │ └── theme-mgit-light.css # Light theme (CSS variables only)
|
||||
│ └── img/
|
||||
│ ├── logo.svg # Main logo (200x200)
|
||||
│ └── favicon.svg # Favicon (32x32)
|
||||
├── templates/
|
||||
│ ├── custom/
|
||||
│ │ ├── header.tmpl # Injects Inter font from Google Fonts
|
||||
│ │ ├── footer.tmpl # Custom footer script
|
||||
│ │ ├── body_inner_pre.tmpl # Empty (available for banners)
|
||||
│ │ └── extra_links.tmpl # Empty (available for nav links)
|
||||
│ └── home.tmpl # Custom homepage
|
||||
└── options/ # Reserved for locale overrides
|
||||
```
|
||||
|
||||
## Themes
|
||||
|
||||
Two custom themes are provided — **mGit Dark** and **mGit Light**. They use Gitea's built-in CSS variable system and only override color tokens and font stacks. This approach is forward-compatible with Gitea upgrades because we don't override Gitea's own selectors.
|
||||
|
||||
**Color palette:** Tailwind CSS slate (grays) + blue (primary).
|
||||
**Fonts:** Inter (proportional), JetBrains Mono (monospace).
|
||||
|
||||
To make these themes available, add them to `app.ini` on each instance:
|
||||
|
||||
```ini
|
||||
[ui]
|
||||
THEMES = gitea-auto,gitea-light,gitea-dark,mgit-light,mgit-dark
|
||||
DEFAULT_THEME = mgit-dark
|
||||
```
|
||||
|
||||
In Dokploy, set these as environment variables:
|
||||
|
||||
```
|
||||
GITEA__ui__THEMES=gitea-auto,gitea-light,gitea-dark,mgit-light,mgit-dark
|
||||
GITEA__ui__DEFAULT_THEME=mgit-dark
|
||||
```
|
||||
|
||||
## Making Changes
|
||||
|
||||
1. Edit files in this repo and push to `main`
|
||||
2. Changes auto-deploy within 30 minutes via cron on each host
|
||||
3. For immediate deployment: `ssh <host> "cd /home/m/gitea-custom && git pull"` then restart the Gitea container
|
||||
|
||||
**To restart Gitea after changes:**
|
||||
```bash
|
||||
docker restart $(docker ps -q --filter "ancestor=docker.gitea.com/gitea:1.24.4")
|
||||
```
|
||||
|
||||
## Template Hooks
|
||||
|
||||
Gitea provides these injection points in `templates/custom/`:
|
||||
|
||||
| File | Purpose |
|
||||
|------|---------|
|
||||
| `header.tmpl` | Injected in `<head>` — use for fonts, analytics, extra CSS |
|
||||
| `footer.tmpl` | Injected before `</body>` — use for scripts |
|
||||
| `body_inner_pre.tmpl` | Before top nav — use for announcement banners |
|
||||
| `extra_links.tmpl` | Extra items in the top nav bar |
|
||||
| `home.tmpl` | Full homepage override (in `templates/`, not `templates/custom/`) |
|
||||
|
||||
## Adding New Assets
|
||||
|
||||
- **CSS themes:** Add `public/assets/css/theme-<name>.css` and register in `THEMES`
|
||||
- **Images:** Add to `public/assets/img/` — accessible at `/assets/img/<file>`
|
||||
- **Locale overrides:** Add to `options/locale/locale_en-US.ini`
|
||||
|
||||
## Design Principles
|
||||
|
||||
- **Work with Gitea, not against it** — only override CSS variables, avoid selector overrides
|
||||
- **Keep it minimal** — less custom CSS = fewer things that break on upgrades
|
||||
- **Both themes must stay in sync** — same structure, only color values differ
|
||||
|
||||
@@ -6,253 +6,64 @@ gitea-theme-meta-info {
|
||||
:root {
|
||||
--is-dark-theme: true;
|
||||
|
||||
/* Typography - Same modern font stack */
|
||||
--fonts-proportional: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif !important;
|
||||
--fonts-monospace: 'JetBrains Mono', 'Fira Code', 'Consolas', 'Monaco', 'Courier New', monospace !important;
|
||||
--fonts-emoji: 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji', sans-serif !important;
|
||||
|
||||
/* Color Palette - Dark theme with good contrast */
|
||||
/* Primary palette */
|
||||
--color-primary: #3b82f6;
|
||||
--color-primary-dark-1: #2563eb;
|
||||
--color-primary-dark-2: #1e40af;
|
||||
--color-primary-light-1: #60a5fa;
|
||||
--color-primary-light-2: #93c5fd;
|
||||
--color-primary-alpha-20: rgba(59, 130, 246, 0.2);
|
||||
--color-primary-alpha-60: rgba(59, 130, 246, 0.6);
|
||||
|
||||
/* Semantic */
|
||||
--color-secondary: #94a3b8;
|
||||
--color-success: #10b981;
|
||||
--color-warning: #f59e0b;
|
||||
--color-danger: #ef4444;
|
||||
--color-error: #ef4444;
|
||||
|
||||
/* Background colors - Dark */
|
||||
/* Backgrounds */
|
||||
--color-body: #0f172a;
|
||||
--color-body-secondary: #1e293b;
|
||||
--color-body-tertiary: #334155;
|
||||
--color-box-body: #1e293b;
|
||||
--color-box-body-highlight: #334155;
|
||||
|
||||
/* Text colors - Light on dark */
|
||||
/* Text */
|
||||
--color-text: #f1f5f9;
|
||||
--color-text-secondary: #cbd5e1;
|
||||
--color-text-muted: #94a3b8;
|
||||
--color-text-light: #64748b;
|
||||
--color-text-light: #94a3b8;
|
||||
--color-text-light-1: #cbd5e1;
|
||||
--color-text-light-2: #64748b;
|
||||
|
||||
/* Border colors */
|
||||
--color-border: #334155;
|
||||
--color-border-secondary: #475569;
|
||||
/* Borders */
|
||||
--color-secondary-dark-2: #334155;
|
||||
--color-secondary-dark-1: #475569;
|
||||
|
||||
/* Code block colors */
|
||||
/* Code */
|
||||
--color-code-bg: #1e293b;
|
||||
--color-code-border: #334155;
|
||||
--color-code-text: #f1f5f9;
|
||||
|
||||
/* Link colors */
|
||||
--color-link: #60a5fa;
|
||||
--color-link-hover: #93c5fd;
|
||||
/* Inputs */
|
||||
--color-input-background: #1e293b;
|
||||
--color-input-border: #334155;
|
||||
|
||||
/* Spacing improvements */
|
||||
--spacing-xs: 0.25rem;
|
||||
--spacing-sm: 0.5rem;
|
||||
--spacing-md: 1rem;
|
||||
--spacing-lg: 1.5rem;
|
||||
--spacing-xl: 2rem;
|
||||
/* Shadows */
|
||||
--color-shadow: rgba(0, 0, 0, 0.4);
|
||||
|
||||
/* Border radius */
|
||||
--radius-sm: 0.375rem;
|
||||
--radius-md: 0.5rem;
|
||||
--radius-lg: 0.75rem;
|
||||
/* Accent bar */
|
||||
--color-accent: #3b82f6;
|
||||
|
||||
/* Typography */
|
||||
--fonts-regular: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
|
||||
--fonts-mono: 'JetBrains Mono', 'Fira Code', ui-monospace, 'Cascadia Code', 'Consolas', monospace;
|
||||
}
|
||||
|
||||
/* Base typography improvements */
|
||||
/* Accent top border */
|
||||
body::before {
|
||||
content: '';
|
||||
display: block;
|
||||
height: 3px;
|
||||
background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-primary-dark-2) 100%);
|
||||
}
|
||||
|
||||
/* Font smoothing for dark backgrounds */
|
||||
body {
|
||||
font-family: var(--fonts-proportional);
|
||||
font-size: 15px;
|
||||
line-height: 1.6;
|
||||
letter-spacing: -0.01em;
|
||||
color: var(--color-text);
|
||||
background-color: var(--color-body);
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
/* Headings */
|
||||
h1, h2, h3, h4, h5, h6 {
|
||||
font-weight: 600;
|
||||
line-height: 1.3;
|
||||
letter-spacing: -0.02em;
|
||||
color: var(--color-text);
|
||||
margin-top: 1.5em;
|
||||
margin-bottom: 0.75em;
|
||||
}
|
||||
|
||||
h1 { font-size: 2rem; }
|
||||
h2 { font-size: 1.75rem; }
|
||||
h3 { font-size: 1.5rem; }
|
||||
h4 { font-size: 1.25rem; }
|
||||
h5 { font-size: 1.125rem; }
|
||||
h6 { font-size: 1rem; }
|
||||
|
||||
/* Links */
|
||||
a {
|
||||
color: var(--color-link);
|
||||
text-decoration: none;
|
||||
transition: color 0.2s ease;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
color: var(--color-link-hover);
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
/* Code blocks */
|
||||
code, pre {
|
||||
font-family: var(--fonts-monospace);
|
||||
font-size: 0.9em;
|
||||
}
|
||||
|
||||
pre {
|
||||
background-color: var(--color-code-bg);
|
||||
border: 1px solid var(--color-code-border);
|
||||
border-radius: var(--radius-md);
|
||||
padding: var(--spacing-md);
|
||||
overflow-x: auto;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
code {
|
||||
background-color: var(--color-code-bg);
|
||||
padding: 0.2em 0.4em;
|
||||
border-radius: var(--radius-sm);
|
||||
color: var(--color-code-text);
|
||||
}
|
||||
|
||||
pre code {
|
||||
background-color: transparent;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
/* Buttons */
|
||||
.ui.button, .ui.buttons .button {
|
||||
font-family: var(--fonts-proportional);
|
||||
font-weight: 500;
|
||||
letter-spacing: -0.01em;
|
||||
border-radius: var(--radius-md);
|
||||
transition: all 0.2s ease;
|
||||
}
|
||||
|
||||
.ui.primary.button {
|
||||
background-color: var(--color-primary);
|
||||
color: white;
|
||||
}
|
||||
|
||||
.ui.primary.button:hover {
|
||||
background-color: var(--color-primary-light-1);
|
||||
}
|
||||
|
||||
/* Forms */
|
||||
.ui.input input, .ui.form input[type="text"],
|
||||
.ui.form input[type="email"], .ui.form input[type="password"],
|
||||
.ui.form textarea, .ui.form select {
|
||||
font-family: var(--fonts-proportional);
|
||||
background-color: var(--color-body-secondary);
|
||||
color: var(--color-text);
|
||||
border: 1px solid var(--color-border);
|
||||
border-radius: var(--radius-md);
|
||||
transition: border-color 0.2s ease, box-shadow 0.2s ease;
|
||||
}
|
||||
|
||||
.ui.input input:focus, .ui.form input:focus,
|
||||
.ui.form textarea:focus, .ui.form select:focus {
|
||||
border-color: var(--color-primary);
|
||||
box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
|
||||
}
|
||||
|
||||
/* Logo styling */
|
||||
.ui.menu .item img.logo {
|
||||
height: 32px;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
/* Header improvements */
|
||||
.ui.menu {
|
||||
background-color: var(--color-body-secondary);
|
||||
border-bottom: 1px solid var(--color-border);
|
||||
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
|
||||
.ui.menu .item {
|
||||
color: var(--color-text-secondary);
|
||||
}
|
||||
|
||||
.ui.menu .item:hover {
|
||||
background-color: var(--color-body-tertiary);
|
||||
color: var(--color-text);
|
||||
}
|
||||
|
||||
/* Cards and containers */
|
||||
.ui.card, .ui.segment {
|
||||
background-color: var(--color-body-secondary);
|
||||
border: 1px solid var(--color-border);
|
||||
border-radius: var(--radius-lg);
|
||||
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
|
||||
color: var(--color-text);
|
||||
}
|
||||
|
||||
/* Repository list items */
|
||||
.repository.list .item {
|
||||
border-bottom: 1px solid var(--color-border);
|
||||
padding: var(--spacing-md) 0;
|
||||
}
|
||||
|
||||
.repository.list .item:hover {
|
||||
background-color: var(--color-body-tertiary);
|
||||
}
|
||||
|
||||
/* Table improvements */
|
||||
.ui.table {
|
||||
background-color: var(--color-body-secondary);
|
||||
border: 1px solid var(--color-border);
|
||||
border-radius: var(--radius-md);
|
||||
overflow: hidden;
|
||||
color: var(--color-text);
|
||||
}
|
||||
|
||||
.ui.table thead th {
|
||||
background-color: var(--color-body-tertiary);
|
||||
font-weight: 600;
|
||||
color: var(--color-text);
|
||||
border-bottom: 1px solid var(--color-border);
|
||||
}
|
||||
|
||||
.ui.table tbody tr {
|
||||
border-bottom: 1px solid var(--color-border);
|
||||
}
|
||||
|
||||
.ui.table tbody tr:hover {
|
||||
background-color: var(--color-body-tertiary);
|
||||
}
|
||||
|
||||
/* Badge and label improvements */
|
||||
.ui.label {
|
||||
font-weight: 500;
|
||||
border-radius: var(--radius-sm);
|
||||
padding: 0.35em 0.75em;
|
||||
}
|
||||
|
||||
/* Footer styling */
|
||||
footer {
|
||||
border-top: 1px solid var(--color-border);
|
||||
background-color: var(--color-body-secondary);
|
||||
padding: var(--spacing-xl) 0;
|
||||
margin-top: var(--spacing-xl);
|
||||
color: var(--color-text-secondary);
|
||||
}
|
||||
|
||||
/* Responsive improvements */
|
||||
@media (max-width: 768px) {
|
||||
body {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
h1 { font-size: 1.75rem; }
|
||||
h2 { font-size: 1.5rem; }
|
||||
h3 { font-size: 1.25rem; }
|
||||
}
|
||||
|
||||
|
||||
@@ -6,227 +6,58 @@ gitea-theme-meta-info {
|
||||
:root {
|
||||
--is-dark-theme: false;
|
||||
|
||||
/* Typography - Modern font stack */
|
||||
--fonts-proportional: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif !important;
|
||||
--fonts-monospace: 'JetBrains Mono', 'Fira Code', 'Consolas', 'Monaco', 'Courier New', monospace !important;
|
||||
--fonts-emoji: 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji', sans-serif !important;
|
||||
|
||||
/* Color Palette - Professional and cohesive */
|
||||
/* Primary palette */
|
||||
--color-primary: #2563eb;
|
||||
--color-primary-dark-1: #1e40af;
|
||||
--color-primary-dark-2: #1e3a8a;
|
||||
--color-primary-light-1: #3b82f6;
|
||||
--color-primary-light-2: #60a5fa;
|
||||
--color-primary-alpha-20: rgba(37, 99, 235, 0.1);
|
||||
--color-primary-alpha-60: rgba(37, 99, 235, 0.6);
|
||||
|
||||
/* Semantic */
|
||||
--color-secondary: #64748b;
|
||||
--color-success: #10b981;
|
||||
--color-warning: #f59e0b;
|
||||
--color-danger: #ef4444;
|
||||
--color-error: #ef4444;
|
||||
|
||||
/* Background colors */
|
||||
/* Backgrounds */
|
||||
--color-body: #ffffff;
|
||||
--color-body-secondary: #f8fafc;
|
||||
--color-body-tertiary: #f1f5f9;
|
||||
--color-box-body: #f8fafc;
|
||||
--color-box-body-highlight: #f1f5f9;
|
||||
|
||||
/* Text colors */
|
||||
/* Text */
|
||||
--color-text: #1e293b;
|
||||
--color-text-secondary: #475569;
|
||||
--color-text-muted: #64748b;
|
||||
--color-text-light: #94a3b8;
|
||||
--color-text-light: #64748b;
|
||||
--color-text-light-1: #475569;
|
||||
--color-text-light-2: #94a3b8;
|
||||
|
||||
/* Border colors */
|
||||
--color-border: #e2e8f0;
|
||||
--color-border-secondary: #cbd5e1;
|
||||
/* Borders */
|
||||
--color-secondary-dark-2: #e2e8f0;
|
||||
--color-secondary-dark-1: #cbd5e1;
|
||||
|
||||
/* Code block colors */
|
||||
/* Code */
|
||||
--color-code-bg: #f8fafc;
|
||||
--color-code-border: #e2e8f0;
|
||||
--color-code-text: #1e293b;
|
||||
|
||||
/* Link colors */
|
||||
--color-link: #2563eb;
|
||||
--color-link-hover: #1e40af;
|
||||
/* Inputs */
|
||||
--color-input-background: #ffffff;
|
||||
--color-input-border: #e2e8f0;
|
||||
|
||||
/* Spacing improvements */
|
||||
--spacing-xs: 0.25rem;
|
||||
--spacing-sm: 0.5rem;
|
||||
--spacing-md: 1rem;
|
||||
--spacing-lg: 1.5rem;
|
||||
--spacing-xl: 2rem;
|
||||
/* Shadows */
|
||||
--color-shadow: rgba(0, 0, 0, 0.06);
|
||||
|
||||
/* Border radius */
|
||||
--radius-sm: 0.375rem;
|
||||
--radius-md: 0.5rem;
|
||||
--radius-lg: 0.75rem;
|
||||
/* Accent bar */
|
||||
--color-accent: #2563eb;
|
||||
|
||||
/* Typography */
|
||||
--fonts-regular: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
|
||||
--fonts-mono: 'JetBrains Mono', 'Fira Code', ui-monospace, 'Cascadia Code', 'Consolas', monospace;
|
||||
}
|
||||
|
||||
/* Base typography improvements */
|
||||
body {
|
||||
font-family: var(--fonts-proportional);
|
||||
font-size: 15px;
|
||||
line-height: 1.6;
|
||||
letter-spacing: -0.01em;
|
||||
color: var(--color-text);
|
||||
background-color: var(--color-body);
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
/* Accent top border */
|
||||
body::before {
|
||||
content: '';
|
||||
display: block;
|
||||
height: 3px;
|
||||
background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-primary-dark-2) 100%);
|
||||
}
|
||||
|
||||
/* Headings */
|
||||
h1, h2, h3, h4, h5, h6 {
|
||||
font-weight: 600;
|
||||
line-height: 1.3;
|
||||
letter-spacing: -0.02em;
|
||||
color: var(--color-text);
|
||||
margin-top: 1.5em;
|
||||
margin-bottom: 0.75em;
|
||||
}
|
||||
|
||||
h1 { font-size: 2rem; }
|
||||
h2 { font-size: 1.75rem; }
|
||||
h3 { font-size: 1.5rem; }
|
||||
h4 { font-size: 1.25rem; }
|
||||
h5 { font-size: 1.125rem; }
|
||||
h6 { font-size: 1rem; }
|
||||
|
||||
/* Links */
|
||||
a {
|
||||
color: var(--color-link);
|
||||
text-decoration: none;
|
||||
transition: color 0.2s ease;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
color: var(--color-link-hover);
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
/* Code blocks */
|
||||
code, pre {
|
||||
font-family: var(--fonts-monospace);
|
||||
font-size: 0.9em;
|
||||
}
|
||||
|
||||
pre {
|
||||
background-color: var(--color-code-bg);
|
||||
border: 1px solid var(--color-code-border);
|
||||
border-radius: var(--radius-md);
|
||||
padding: var(--spacing-md);
|
||||
overflow-x: auto;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
code {
|
||||
background-color: var(--color-code-bg);
|
||||
padding: 0.2em 0.4em;
|
||||
border-radius: var(--radius-sm);
|
||||
color: var(--color-code-text);
|
||||
}
|
||||
|
||||
pre code {
|
||||
background-color: transparent;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
/* Buttons */
|
||||
.ui.button, .ui.buttons .button {
|
||||
font-family: var(--fonts-proportional);
|
||||
font-weight: 500;
|
||||
letter-spacing: -0.01em;
|
||||
border-radius: var(--radius-md);
|
||||
transition: all 0.2s ease;
|
||||
}
|
||||
|
||||
.ui.primary.button {
|
||||
background-color: var(--color-primary);
|
||||
color: white;
|
||||
}
|
||||
|
||||
.ui.primary.button:hover {
|
||||
background-color: var(--color-primary-dark-1);
|
||||
}
|
||||
|
||||
/* Forms */
|
||||
.ui.input input, .ui.form input[type="text"],
|
||||
.ui.form input[type="email"], .ui.form input[type="password"],
|
||||
.ui.form textarea, .ui.form select {
|
||||
font-family: var(--fonts-proportional);
|
||||
border: 1px solid var(--color-border);
|
||||
border-radius: var(--radius-md);
|
||||
transition: border-color 0.2s ease, box-shadow 0.2s ease;
|
||||
}
|
||||
|
||||
.ui.input input:focus, .ui.form input:focus,
|
||||
.ui.form textarea:focus, .ui.form select:focus {
|
||||
border-color: var(--color-primary);
|
||||
box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
|
||||
}
|
||||
|
||||
/* Logo styling */
|
||||
.ui.menu .item img.logo {
|
||||
height: 32px;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
/* Header improvements */
|
||||
.ui.menu {
|
||||
border-bottom: 1px solid var(--color-border);
|
||||
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
|
||||
/* Cards and containers */
|
||||
.ui.card, .ui.segment {
|
||||
border: 1px solid var(--color-border);
|
||||
border-radius: var(--radius-lg);
|
||||
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
|
||||
/* Repository list items */
|
||||
.repository.list .item {
|
||||
border-bottom: 1px solid var(--color-border);
|
||||
padding: var(--spacing-md) 0;
|
||||
}
|
||||
|
||||
.repository.list .item:hover {
|
||||
background-color: var(--color-body-secondary);
|
||||
}
|
||||
|
||||
/* Table improvements */
|
||||
.ui.table {
|
||||
border: 1px solid var(--color-border);
|
||||
border-radius: var(--radius-md);
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.ui.table thead th {
|
||||
background-color: var(--color-body-secondary);
|
||||
font-weight: 600;
|
||||
color: var(--color-text);
|
||||
}
|
||||
|
||||
/* Badge and label improvements */
|
||||
.ui.label {
|
||||
font-weight: 500;
|
||||
border-radius: var(--radius-sm);
|
||||
padding: 0.35em 0.75em;
|
||||
}
|
||||
|
||||
/* Footer styling */
|
||||
footer {
|
||||
border-top: 1px solid var(--color-border);
|
||||
background-color: var(--color-body-secondary);
|
||||
padding: var(--spacing-xl) 0;
|
||||
margin-top: var(--spacing-xl);
|
||||
}
|
||||
|
||||
/* Responsive improvements */
|
||||
@media (max-width: 768px) {
|
||||
body {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
h1 { font-size: 1.75rem; }
|
||||
h2 { font-size: 1.5rem; }
|
||||
h3 { font-size: 1.25rem; }
|
||||
}
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
|
||||
<defs>
|
||||
<linearGradient id="faviconGradient" x1="0%" y1="0%" x2="100%" y2="100%">
|
||||
<stop offset="0%" style="stop-color:#2563eb;stop-opacity:1" />
|
||||
<stop offset="100%" style="stop-color:#1e40af;stop-opacity:1" />
|
||||
<linearGradient id="favGrad" x1="0%" y1="0%" x2="100%" y2="100%">
|
||||
<stop offset="0%" stop-color="#3b82f6"/>
|
||||
<stop offset="100%" stop-color="#1e40af"/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<rect width="32" height="32" fill="url(#faviconGradient)" rx="6"/>
|
||||
<text x="16" y="22" font-family="Inter, -apple-system, sans-serif" font-size="18" font-weight="700" fill="#ffffff" text-anchor="middle" letter-spacing="-0.02em">m</text>
|
||||
<rect width="32" height="32" fill="url(#favGrad)" rx="6"/>
|
||||
<text x="16" y="23" font-family="Inter, -apple-system, system-ui, sans-serif" font-size="20" font-weight="700" fill="#ffffff" text-anchor="middle">m</text>
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 591 B After Width: | Height: | Size: 517 B |
@@ -1,12 +1,10 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="200" height="200" viewBox="0 0 200 200">
|
||||
<defs>
|
||||
<linearGradient id="mgitGradient" x1="0%" y1="0%" x2="100%" y2="100%">
|
||||
<stop offset="0%" style="stop-color:#2563eb;stop-opacity:1" />
|
||||
<stop offset="100%" style="stop-color:#1e40af;stop-opacity:1" />
|
||||
<linearGradient id="mgitGrad" x1="0%" y1="0%" x2="100%" y2="100%">
|
||||
<stop offset="0%" stop-color="#3b82f6"/>
|
||||
<stop offset="100%" stop-color="#1e40af"/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<rect width="200" height="200" fill="url(#mgitGradient)" rx="24"/>
|
||||
<circle cx="100" cy="100" r="65" fill="#ffffff" opacity="0.95"/>
|
||||
<text x="100" y="125" font-family="Inter, -apple-system, sans-serif" font-size="56" font-weight="700" fill="#2563eb" text-anchor="middle" letter-spacing="-0.02em">m</text>
|
||||
<text x="100" y="155" font-family="Inter, -apple-system, sans-serif" font-size="24" font-weight="600" fill="#1e40af" text-anchor="middle" letter-spacing="-0.01em">Git</text>
|
||||
<rect width="200" height="200" fill="url(#mgitGrad)" rx="40"/>
|
||||
<text x="100" y="138" font-family="Inter, -apple-system, system-ui, sans-serif" font-size="120" font-weight="700" fill="#ffffff" text-anchor="middle" letter-spacing="-6">m</text>
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 837 B After Width: | Height: | Size: 549 B |
@@ -0,0 +1 @@
|
||||
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
<footer style="background: var(--color-body-secondary, #f8fafc); border-top: 1px solid var(--color-border, #e2e8f0); padding: 2rem 0; margin-top: 3rem; text-align: center; color: var(--color-text-secondary, #475569);">
|
||||
<div style="max-width: 1200px; margin: 0 auto; padding: 0 1rem;">
|
||||
<p style="margin: 0.5rem 0; font-size: 0.95rem;">
|
||||
<strong style="color: var(--color-text, #1e293b); font-weight: 600;">mGit</strong> - A Git hosting solution
|
||||
</p>
|
||||
<p style="margin: 0.5rem 0; font-size: 0.9rem;">
|
||||
Powered by <a href="https://gitea.io" target="_blank" rel="noopener" style="color: var(--color-link, #2563eb); text-decoration: none;">Gitea</a>
|
||||
<span style="margin: 0 0.5rem;">•</span>
|
||||
<a href="https://flexsiebels.de" target="_blank" rel="noopener" style="color: var(--color-link, #2563eb); text-decoration: none;">flexsiebels.de</a>
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
<script>
|
||||
// Replace default footer text
|
||||
(function() {
|
||||
const footer = document.querySelector('.page-footer');
|
||||
if (footer) {
|
||||
const powered = footer.querySelector('.powered-by, [class*="powered"]');
|
||||
if (powered) powered.innerHTML = 'Powered by <a href="https://gitea.io" target="_blank">Gitea</a>';
|
||||
}
|
||||
})();
|
||||
</script>
|
||||
|
||||
@@ -1,40 +1,3 @@
|
||||
<style>
|
||||
/* mGit Branding and Typography */
|
||||
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');
|
||||
|
||||
/* Logo styling for mGit */
|
||||
.ui.menu .item img.logo {
|
||||
height: 36px;
|
||||
width: auto;
|
||||
margin-right: 8px;
|
||||
}
|
||||
|
||||
/* mGit text logo styling */
|
||||
.ui.menu .item .mgit-logo-text {
|
||||
font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
|
||||
font-weight: 700;
|
||||
font-size: 1.5rem;
|
||||
letter-spacing: -0.03em;
|
||||
color: var(--color-text, #1e293b);
|
||||
text-decoration: none;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
|
||||
/* Subtle top border accent */
|
||||
body {
|
||||
border-top: 3px solid var(--color-primary, #2563eb);
|
||||
}
|
||||
|
||||
/* Header menu improvements */
|
||||
.ui.menu {
|
||||
font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
/* Improve readability */
|
||||
.ui.menu .item {
|
||||
letter-spacing: -0.01em;
|
||||
}
|
||||
</style>
|
||||
<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=Inter:wght@400;500;600;700&display=swap" rel="stylesheet">
|
||||
|
||||
@@ -1,37 +1,94 @@
|
||||
{{template "base/head" .}}
|
||||
<style>
|
||||
.page-content.home {
|
||||
.mgit-home {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
min-height: calc(100vh - 200px);
|
||||
padding: 2rem 1rem;
|
||||
}
|
||||
.home .center {
|
||||
.mgit-hero {
|
||||
text-align: center;
|
||||
max-width: 600px;
|
||||
}
|
||||
.home .mgit-logo-text {
|
||||
font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
|
||||
font-weight: 700;
|
||||
font-size: 4rem;
|
||||
letter-spacing: -0.05em;
|
||||
color: var(--color-primary, #2563eb);
|
||||
margin: 0;
|
||||
line-height: 1.2;
|
||||
}
|
||||
.home .mgit-logo-text::before {
|
||||
content: '';
|
||||
display: block;
|
||||
.mgit-mark {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 80px;
|
||||
height: 4px;
|
||||
background: linear-gradient(90deg, #2563eb 0%, #1e40af 100%);
|
||||
margin: 0 auto 1.5rem;
|
||||
border-radius: 2px;
|
||||
height: 80px;
|
||||
background: linear-gradient(135deg, var(--color-primary, #3b82f6), var(--color-primary-dark-2, #1e40af));
|
||||
border-radius: 20px;
|
||||
margin-bottom: 1.5rem;
|
||||
}
|
||||
.mgit-mark svg {
|
||||
width: 48px;
|
||||
height: 48px;
|
||||
}
|
||||
.mgit-title {
|
||||
font-size: 2.5rem;
|
||||
font-weight: 700;
|
||||
letter-spacing: -0.04em;
|
||||
color: var(--color-text, #1e293b);
|
||||
margin: 0 0 0.5rem;
|
||||
}
|
||||
.mgit-subtitle {
|
||||
font-size: 1.1rem;
|
||||
color: var(--color-text-light, #64748b);
|
||||
margin: 0 0 2rem;
|
||||
line-height: 1.6;
|
||||
}
|
||||
.mgit-actions {
|
||||
display: flex;
|
||||
gap: 0.75rem;
|
||||
justify-content: center;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.mgit-actions a {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
padding: 0.625rem 1.25rem;
|
||||
border-radius: 0.5rem;
|
||||
font-weight: 500;
|
||||
font-size: 0.95rem;
|
||||
text-decoration: none;
|
||||
transition: all 0.15s ease;
|
||||
}
|
||||
.mgit-btn-primary {
|
||||
background: var(--color-primary, #2563eb);
|
||||
color: #fff !important;
|
||||
}
|
||||
.mgit-btn-primary:hover {
|
||||
opacity: 0.9;
|
||||
text-decoration: none !important;
|
||||
}
|
||||
.mgit-btn-secondary {
|
||||
border: 1px solid var(--color-secondary-dark-2, #e2e8f0);
|
||||
color: var(--color-text, #1e293b) !important;
|
||||
background: var(--color-box-body, transparent);
|
||||
}
|
||||
.mgit-btn-secondary:hover {
|
||||
border-color: var(--color-primary, #2563eb);
|
||||
text-decoration: none !important;
|
||||
}
|
||||
</style>
|
||||
<div role="main" aria-label="{{if .IsSigned}}{{ctx.Locale.Tr "dashboard"}}{{else}}{{ctx.Locale.Tr "home_title"}}{{end}}" class="page-content home">
|
||||
<div class="center">
|
||||
<div class="mgit-logo-text">mGit</div>
|
||||
<div role="main" aria-label="{{if .IsSigned}}{{ctx.Locale.Tr "dashboard"}}{{else}}{{ctx.Locale.Tr "home_title"}}{{end}}" class="page-content mgit-home">
|
||||
<div class="mgit-hero">
|
||||
<div class="mgit-mark">
|
||||
<svg viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<text x="16" y="24" font-family="Inter, -apple-system, system-ui, sans-serif" font-size="22" font-weight="700" fill="#ffffff" text-anchor="middle">m</text>
|
||||
</svg>
|
||||
</div>
|
||||
<h1 class="mgit-title">mGit</h1>
|
||||
<p class="mgit-subtitle">Private Git hosting for projects, code, and collaboration.</p>
|
||||
<div class="mgit-actions">
|
||||
{{if .IsSigned}}
|
||||
<a href="{{AppSubUrl}}/" class="mgit-btn-primary">Dashboard</a>
|
||||
{{else}}
|
||||
<a href="{{AppSubUrl}}/user/login" class="mgit-btn-primary">Sign In</a>
|
||||
{{end}}
|
||||
<a href="{{AppSubUrl}}/explore/repos" class="mgit-btn-secondary">Explore</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{template "base/footer" .}}
|
||||
|
||||
Reference in New Issue
Block a user