chore: remove custom theme customization

Remove all theme customization code:
- Removed theme directory (custom.css, custom.js, favicon.svg)
- Removed app.html.heex template override
- Removed Dockerfile for custom build
- Reverted compose.yaml to only mount custom.exs for SMTP config

Keeping only SMTP configuration in custom.exs.

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

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-11-09 11:13:09 +01:00
parent 2381076947
commit 46ba4e0e06
6 changed files with 0 additions and 364 deletions

View File

@@ -1,26 +0,0 @@
FROM ghcr.io/asciinema/asciinema-server:latest AS base
# Download the source to find and patch the template
FROM elixir:1.18-alpine AS builder
# Install git and build dependencies
RUN apk add --no-cache git build-base nodejs npm
# Clone the asciinema-server repository
WORKDIR /app
RUN git clone https://github.com/asciinema/asciinema-server.git .
RUN git checkout v1.0.0
# Patch the layout template to inject custom theme
RUN sed -i '/<\/head>/i\ <!-- Custom Pivoine Rose Theme -->\n <link rel="stylesheet" href="/theme/custom.css" />\n <link rel="icon" type="image/svg+xml" href="/theme/favicon.svg" />' \
lib/asciinema_web/templates/layout/app.html.heex
# Build the release
RUN mix local.hex --force && \
mix local.rebar --force && \
mix deps.get --only prod && \
MIX_ENV=prod mix do compile, assets.deploy, release
# Final image: copy the patched release over the base image
FROM base
COPY --from=builder /app/_build/prod/rel/asciinema /opt/app/

View File

@@ -1,36 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no" />
<meta name="csrf-token" content={Plug.CSRFProtection.get_csrf_token()} />
<title>{page_title(@conn)}</title>
<link phx-track-static rel="stylesheet" href={Routes.static_path(@conn, "/assets/app.css")} />
<link rel="shortcut icon" href={Routes.static_path(@conn, "/images/favicon.png")} />
<%= if function_exported?(view_module(@conn), :head, 2) do %>
{view_module(@conn).head(view_template(@conn), assigns)}
<% end %>
<!-- Custom Pivoine Rose Theme -->
<link rel="stylesheet" href={Routes.static_path(@conn, "/assets/custom.css")} />
<link rel="icon" type="image/svg+xml" href={Routes.static_path(@conn, "/images/favicon-custom.svg")} />
</head>
<body class={"l-app " <> body_class(@conn)}>
{render("_header.html", conn: @conn, current_user: @current_user)}
{render("_flash.html", flash: @flash)}
<main role="main">
{@inner_content}
</main>
{render("_footer.html", conn: @conn)}
<script>
window.__asciinema__workerUrl = '<%= Routes.static_path(@conn, "/js/player-worker.min.js") %>';
</script>
<script phx-track-static src={Routes.static_path(@conn, "/assets/app.js")}>
</script>
</body>
</html>

View File

@@ -8,10 +8,6 @@ services:
volumes:
- asciinema_data:/var/opt/asciinema
- ./custom.exs:/opt/app/etc/custom.exs:ro
- ./theme/custom.css:/opt/app/lib/asciinema-1.0.0/priv/static/assets/custom.css:ro
- ./theme/favicon.svg:/opt/app/lib/asciinema-1.0.0/priv/static/images/favicon-custom.svg:ro
- ./theme/custom.js:/opt/app/lib/asciinema-1.0.0/priv/static/js/custom.js:ro
- ./app.html.heex:/opt/app/lib/asciinema-1.0.0/lib/asciinema_web/templates/layout/app.html.heex:ro
environment:
SECRET_KEY_BASE: ${ASCIINEMA_SECRET_KEY}
URL_HOST: ${ASCIINEMA_TRAEFIK_HOST}

View File

@@ -1,278 +0,0 @@
/* Pivoine Rose Custom Theme for Asciinema Server */
/* Primary Color: #CE275B (Pivoine Rose) */
/* Background: Gray tones */
:root {
--pivoine-rose: #CE275B;
--pivoine-rose-dark: #A61E47;
--pivoine-rose-light: #E63368;
--gray-50: #FAFAFA;
--gray-100: #F5F5F5;
--gray-200: #EEEEEE;
--gray-300: #E0E0E0;
--gray-400: #BDBDBD;
--gray-500: #9E9E9E;
--gray-600: #757575;
--gray-700: #616161;
--gray-800: #424242;
--gray-900: #212121;
}
/* Override Bootstrap primary color */
.btn-primary,
.badge-primary,
.bg-primary,
.text-primary,
a.text-primary:hover,
a.text-primary:focus {
background-color: var(--pivoine-rose) !important;
border-color: var(--pivoine-rose) !important;
color: white !important;
}
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
background-color: var(--pivoine-rose-dark) !important;
border-color: var(--pivoine-rose-dark) !important;
}
/* Links */
a {
color: var(--pivoine-rose);
}
a:hover,
a:focus {
color: var(--pivoine-rose-dark);
}
/* Body and backgrounds */
body {
background-color: var(--gray-100);
color: var(--gray-900);
}
/* Header/Navbar */
.navbar {
background-color: var(--gray-800) !important;
border-bottom: 3px solid var(--pivoine-rose);
}
.navbar-dark .navbar-brand {
color: var(--pivoine-rose) !important;
font-weight: 600;
}
.navbar-dark .navbar-brand:hover {
color: var(--pivoine-rose-light) !important;
}
.navbar-dark .navbar-nav .nav-link {
color: var(--gray-200) !important;
}
.navbar-dark .navbar-nav .nav-link:hover {
color: var(--pivoine-rose) !important;
}
/* Cards and containers */
.card,
.list-group-item {
background-color: white;
border-color: var(--gray-300);
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
.card-header,
.list-group-item.active {
background-color: var(--gray-800);
border-color: var(--gray-700);
color: white;
}
/* Main content area */
.container,
.container-fluid {
background-color: var(--gray-50);
padding: 2rem 1rem;
}
main {
background-color: white;
border-radius: 4px;
padding: 2rem;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
/* Buttons */
.btn {
border-radius: 4px;
font-weight: 500;
transition: all 0.2s ease;
}
.btn-outline-primary {
color: var(--pivoine-rose);
border-color: var(--pivoine-rose);
}
.btn-outline-primary:hover {
background-color: var(--pivoine-rose);
border-color: var(--pivoine-rose);
color: white;
}
.btn-secondary {
background-color: var(--gray-600);
border-color: var(--gray-600);
}
.btn-secondary:hover {
background-color: var(--gray-700);
border-color: var(--gray-700);
}
/* Forms */
.form-control {
border-color: var(--gray-300);
border-radius: 4px;
}
.form-control:focus {
border-color: var(--pivoine-rose);
box-shadow: 0 0 0 0.2rem rgba(206, 39, 91, 0.25);
}
/* Alerts */
.alert-primary {
background-color: rgba(206, 39, 91, 0.1);
border-color: var(--pivoine-rose);
color: var(--pivoine-rose-dark);
}
/* Tables */
.table {
background-color: white;
}
.table thead th {
background-color: var(--gray-100);
border-bottom: 2px solid var(--pivoine-rose);
color: var(--gray-800);
}
.table-striped tbody tr:nth-of-type(odd) {
background-color: var(--gray-50);
}
/* Pagination */
.pagination .page-item.active .page-link {
background-color: var(--pivoine-rose);
border-color: var(--pivoine-rose);
}
.pagination .page-link {
color: var(--pivoine-rose);
}
.pagination .page-link:hover {
color: var(--pivoine-rose-dark);
background-color: var(--gray-100);
}
/* Player/Terminal */
.asciinema-player-wrapper,
.asciinema-terminal {
border-radius: 4px;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
/* Footer */
footer {
background-color: var(--gray-800);
color: var(--gray-400);
border-top: 3px solid var(--pivoine-rose);
}
footer a {
color: var(--gray-300);
}
footer a:hover {
color: var(--pivoine-rose);
}
/* Badges */
.badge {
border-radius: 3px;
font-weight: 500;
}
.badge-secondary {
background-color: var(--gray-600);
}
/* Dropdowns */
.dropdown-menu {
border-color: var(--gray-300);
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
.dropdown-item:hover,
.dropdown-item:focus {
background-color: var(--gray-100);
color: var(--pivoine-rose);
}
/* Loading/Progress */
.progress-bar {
background-color: var(--pivoine-rose);
}
/* Custom recording list */
.recording-item {
transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.recording-item:hover {
transform: translateY(-2px);
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
/* Logo styling */
.navbar-brand svg,
.navbar-brand img {
filter: brightness(0) saturate(100%) invert(28%) sepia(91%) saturate(2059%) hue-rotate(325deg) brightness(89%) contrast(92%);
transition: filter 0.2s ease;
}
.navbar-brand:hover svg,
.navbar-brand:hover img {
filter: brightness(0) saturate(100%) invert(36%) sepia(96%) saturate(2373%) hue-rotate(329deg) brightness(96%) contrast(87%);
}
/* Responsive adjustments */
@media (max-width: 768px) {
main {
padding: 1rem;
}
.container,
.container-fluid {
padding: 1rem 0.5rem;
}
}
/* Smooth animations */
* {
transition-property: background-color, border-color, color;
transition-duration: 0.15s;
transition-timing-function: ease-in-out;
}
button,
.btn,
a {
transition-property: all;
}

View File

@@ -1,17 +0,0 @@
// Pivoine Rose Custom Theme Injector
(function() {
// Inject custom CSS
var customCSS = document.createElement('link');
customCSS.rel = 'stylesheet';
customCSS.href = '/assets/custom.css';
document.head.appendChild(customCSS);
// Inject custom favicon
var customFavicon = document.createElement('link');
customFavicon.rel = 'icon';
customFavicon.type = 'image/svg+xml';
customFavicon.href = '/images/favicon-custom.svg';
document.head.appendChild(customFavicon);
console.log('Pivoine Rose theme loaded');
})();

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 29 KiB