Adopt the Coulobre ribbon logo
Coulobre Panel CI / Checks (Python 3.12) (pull_request) Canceled after 0s
Coulobre Panel CI / Checks (Python 3.14) (pull_request) Canceled after 0s

This commit is contained in:
parkel committed 2026-11-22 23:46:37 +01:00
1 parent 187c80ff6d
commit f4a889660f
9 files changed
+60 -14

No files matched your search

+2
View File
@@ -1,5 +1,7 @@
# Coulobre Panel # Coulobre Panel
<img src="src/coulobre/hosting/static/hosting/coulobre-mark.svg" alt="" width="72">
Coulobre Panel is an open-source web hosting control panel for hosting providers Coulobre Panel is an open-source web hosting control panel for hosting providers
and resellers. The project is in early development. and resellers. The project is in early development.
+20 -5
View File
@@ -11,10 +11,11 @@ from urllib.parse import parse_qs
from .cli import comma_separated, number from .cli import comma_separated, number
from .config import REMOTE_MODES, InstallError, parse_plan, port from .config import REMOTE_MODES, InstallError, parse_plan, port
from .engine import Installer from .engine import SOURCE, Installer
COOKIE = "coulobre_installer" COOKIE = "coulobre_installer"
MAX_FORM = 16384 MAX_FORM = 16384
BRAND_MARK = SOURCE / "src/coulobre/hosting/static/hosting/coulobre-mark.svg"
FORM = """<form method="post" action="/review"> FORM = """<form method="post" action="/review">
<p>Full-service setup is recommended for a public single server. The panel, <p>Full-service setup is recommended for a public single server. The panel,
websites, databases, DNS and mail run locally. Adjust the settings below websites, databases, DNS and mail run locally. Adjust the settings below
@@ -44,7 +45,10 @@ for a different deployment.</p>
<input name="mail_sending_addresses"></label> <input name="mail_sending_addresses"></label>
</fieldset> </fieldset>
<button type="submit">Review installation</button></form>""" <button type="submit">Review installation</button></form>"""
STYLE = """body{font:1rem system-ui,sans-serif;max-width:46rem;margin:auto; STYLE = """:root{color-scheme:light}
h1{display:flex;align-items:center;gap:.65rem}
h1 img{width:1.9rem;height:1.9rem;flex:none}
body{font:1rem system-ui,sans-serif;max-width:46rem;margin:auto;
padding:1rem;color:#14372e} fieldset{margin:1rem 0;border:1px solid #a9beb2; padding:1rem;color:#14372e} fieldset{margin:1rem 0;border:1px solid #a9beb2;
border-radius:.4rem;padding:1rem} label{display:block;margin-bottom:.75rem} border-radius:.4rem;padding:1rem} label{display:block;margin-bottom:.75rem}
input,select{display:block;box-sizing:border-box;width:100%;padding:.45rem; input,select{display:block;box-sizing:border-box;width:100%;padding:.45rem;
@@ -223,8 +227,10 @@ class WizardHandler(BaseHTTPRequestHandler):
head = '<meta http-equiv="refresh" content="2">' if refresh else "" head = '<meta http-equiv="refresh" content="2">' if refresh else ""
html = f"""<!doctype html><html lang="en"><head><meta charset="utf-8"> html = f"""<!doctype html><html lang="en"><head><meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/svg+xml" href="/favicon.svg">
{head}<title>Install Coulobre Panel</title><style>{STYLE}</style></head> {head}<title>Install Coulobre Panel</title><style>{STYLE}</style></head>
<body><main><h1>Install Coulobre Panel</h1>{body}</main></body> <body><main><h1><img src="/favicon.svg" alt="">Install Coulobre Panel</h1>
{body}</main></body>
</html>""".encode() </html>""".encode()
self.send_response(status) self.send_response(status)
self.send_header("Cache-Control", "no-store") self.send_header("Cache-Control", "no-store")
@@ -234,7 +240,7 @@ class WizardHandler(BaseHTTPRequestHandler):
self.send_header("Referrer-Policy", "no-referrer") self.send_header("Referrer-Policy", "no-referrer")
self.send_header( self.send_header(
"Content-Security-Policy", "Content-Security-Policy",
"default-src 'none'; style-src 'unsafe-inline'; " "default-src 'none'; style-src 'unsafe-inline'; img-src 'self'; "
"form-action 'self'; frame-ancestors 'none'; base-uri 'none'", "form-action 'self'; frame-ancestors 'none'; base-uri 'none'",
) )
if cookie: if cookie:
@@ -254,12 +260,21 @@ class WizardHandler(BaseHTTPRequestHandler):
return self.headers.get("Host") == self.server.authority return self.headers.get("Host") == self.server.authority
def do_GET(self): def do_GET(self):
if not self.host_allowed() or self.path != "/": if not self.host_allowed() or self.path not in {"/", "/favicon.svg"}:
self.page( self.page(
"<p>Use the installer address shown in the terminal.</p>", "<p>Use the installer address shown in the terminal.</p>",
status=403, status=403,
) )
return return
if self.path == "/favicon.svg":
svg = BRAND_MARK.read_bytes()
self.send_response(200)
self.send_header("Content-Type", "image/svg+xml")
self.send_header("Content-Length", str(len(svg)))
self.send_header("X-Content-Type-Options", "nosniff")
self.end_headers()
self.wfile.write(svg)
return
state = self.server.wizard state = self.server.wizard
if not self.authorized(): if not self.authorized():
self.page( self.page(
+1
View File
@@ -42,6 +42,7 @@ server = ["gunicorn>=27.0.1,<28"]
"coulobre.hosting" = [ "coulobre.hosting" = [
"static/hosting/*.js", "static/hosting/*.js",
"static/hosting/*.css", "static/hosting/*.css",
"static/hosting/*.svg",
"templates/*.html", "templates/*.html",
"templates/hosting/*.conf", "templates/hosting/*.conf",
"templates/hosting/*.html", "templates/hosting/*.html",
@@ -0,0 +1,16 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="-12 -12 312 312">
<style>
path { fill: #15392f; }
@media (prefers-color-scheme: dark) {
path { fill: #c7e8ca; }
}
</style>
<path d="M0 199 V132 C0 104 27 89 61 78 L217 36
C245 28 263 19 263 0 C272 1 279 11 279 21 V73
C279 91 267 101 244 108 L48 169 C24 177 8 186 0 199 Z"/>
<path d="M208 124 C246 136 288 151 288 178 V239
C277 221 246 211 208 202 Z"/>
<path d="M46 175 L218 211 C259 220 280 233 286 246
C294 266 269 288 228 288 C217 288 207 287 195 284
L45 249 C16 242 0 227 0 212 C0 197 18 185 46 175 Z"/>
</svg>

After

Width:  |  Height:  |  Size: 684 B

+15 -3
View File
@@ -168,9 +168,21 @@ button, input, select, textarea {
place-items: center; place-items: center;
border-radius: 0.55rem; border-radius: 0.55rem;
background: var(--brand-bg); background: var(--brand-bg);
color: var(--brand-ink); }
font-size: 1.12rem;
font-weight: 800; .brand-mark::before {
content: "";
width: 66%;
height: 66%;
background: var(--brand-ink);
mask: url("coulobre-mark.svg") center / contain no-repeat;
}
@media (forced-colors: active) {
.brand-mark::before {
forced-color-adjust: none;
background: CanvasText;
}
} }
.brand-product { .brand-product {
@@ -4,8 +4,7 @@
<main class="sign-in"> <main class="sign-in">
<div class="sign-in-inner"> <div class="sign-in-inner">
<div class="brand sign-in-brand"> <div class="brand sign-in-brand">
<span class="brand-mark" aria-hidden="true">C</span> {% include "hosting/brand.html" %}
<span>Coulobre <span class="brand-product">Panel</span></span>
</div> </div>
<section class="sign-in-card"> <section class="sign-in-card">
{% block authentication_content %}{% include "hosting/authentication_card.html" %}{% endblock %} {% block authentication_content %}{% include "hosting/authentication_card.html" %}{% endblock %}
@@ -4,6 +4,7 @@
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<title>{% block title %}Coulobre Panel{% endblock %}</title> <title>{% block title %}Coulobre Panel{% endblock %}</title>
<link rel="icon" type="image/svg+xml" href="{% static 'hosting/coulobre-mark.svg' %}">
<link rel="stylesheet" href="{% static 'hosting/panel.css' %}"> <link rel="stylesheet" href="{% static 'hosting/panel.css' %}">
{% if custom_panel_theme %}<link rel="stylesheet" href="{% url 'panel:theme_stylesheet' %}">{% endif %} {% if custom_panel_theme %}<link rel="stylesheet" href="{% url 'panel:theme_stylesheet' %}">{% endif %}
<script src="{% static 'hosting/panel-appearance.js' %}"></script> <script src="{% static 'hosting/panel-appearance.js' %}"></script>
@@ -14,8 +15,7 @@
<div class="panel"> <div class="panel">
<aside class="sidebar"> <aside class="sidebar">
<a class="brand" href="{% url 'panel:accounts' %}"> <a class="brand" href="{% url 'panel:accounts' %}">
<span class="brand-mark" aria-hidden="true">C</span> {% include "hosting/brand.html" %}
<span>Coulobre <span class="brand-product">Panel</span></span>
</a> </a>
<button class="menu-toggle" type="button" aria-controls="panel-navigation" aria-expanded="true" hidden> <button class="menu-toggle" type="button" aria-controls="panel-navigation" aria-expanded="true" hidden>
<span class="menu-icon" aria-hidden="true"></span> <span class="menu-icon" aria-hidden="true"></span>
@@ -0,0 +1,2 @@
<span class="brand-mark" aria-hidden="true"></span>
<span>Coulobre <span class="brand-product">Panel</span></span>
@@ -4,8 +4,7 @@
<main class="sign-in"> <main class="sign-in">
<div class="sign-in-inner"> <div class="sign-in-inner">
<div class="brand sign-in-brand"> <div class="brand sign-in-brand">
<span class="brand-mark" aria-hidden="true">C</span> {% include "hosting/brand.html" %}
<span>Coulobre <span class="brand-product">Panel</span></span>
</div> </div>
<section class="sign-in-card"> <section class="sign-in-card">
<h1>Sign in</h1> <h1>Sign in</h1>