diff --git a/.env.example b/.env.example index 4f4367a..94d30b2 100644 --- a/.env.example +++ b/.env.example @@ -216,3 +216,4 @@ NETWORK_WELCOME_TEXT= NETWORK_CONTACT_EMAIL= NETWORK_CONTACT_DISCORD= NETWORK_CONTACT_GITHUB= +NETWORK_CONTACT_YOUTUBE= diff --git a/docker-compose.yml b/docker-compose.yml index 7eaf78b..50ca483 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -259,6 +259,7 @@ services: - NETWORK_CONTACT_EMAIL=${NETWORK_CONTACT_EMAIL:-} - NETWORK_CONTACT_DISCORD=${NETWORK_CONTACT_DISCORD:-} - NETWORK_CONTACT_GITHUB=${NETWORK_CONTACT_GITHUB:-} + - NETWORK_CONTACT_YOUTUBE=${NETWORK_CONTACT_YOUTUBE:-} - NETWORK_WELCOME_TEXT=${NETWORK_WELCOME_TEXT:-} - CONTENT_HOME=/content command: ["web"] diff --git a/src/meshcore_hub/common/config.py b/src/meshcore_hub/common/config.py index bf1b919..926ccd4 100644 --- a/src/meshcore_hub/common/config.py +++ b/src/meshcore_hub/common/config.py @@ -291,6 +291,9 @@ class WebSettings(CommonSettings): network_contact_github: Optional[str] = Field( default=None, description="GitHub repository URL" ) + network_contact_youtube: Optional[str] = Field( + default=None, description="YouTube channel URL" + ) network_welcome_text: Optional[str] = Field( default=None, description="Welcome text for homepage" ) diff --git a/src/meshcore_hub/web/app.py b/src/meshcore_hub/web/app.py index 045f8c3..be779ab 100644 --- a/src/meshcore_hub/web/app.py +++ b/src/meshcore_hub/web/app.py @@ -62,6 +62,7 @@ def create_app( network_contact_email: str | None = None, network_contact_discord: str | None = None, network_contact_github: str | None = None, + network_contact_youtube: str | None = None, network_welcome_text: str | None = None, ) -> FastAPI: """Create and configure the web dashboard application. @@ -80,6 +81,7 @@ def create_app( network_contact_email: Contact email address network_contact_discord: Discord invite/server info network_contact_github: GitHub repository URL + network_contact_youtube: YouTube channel URL network_welcome_text: Welcome text for homepage Returns: @@ -124,6 +126,9 @@ def create_app( app.state.network_contact_github = ( network_contact_github or settings.network_contact_github ) + app.state.network_contact_youtube = ( + network_contact_youtube or settings.network_contact_youtube + ) app.state.network_welcome_text = ( network_welcome_text or settings.network_welcome_text ) @@ -309,6 +314,7 @@ def get_network_context(request: Request) -> dict: "network_contact_email": request.app.state.network_contact_email, "network_contact_discord": request.app.state.network_contact_discord, "network_contact_github": request.app.state.network_contact_github, + "network_contact_youtube": request.app.state.network_contact_youtube, "network_welcome_text": request.app.state.network_welcome_text, "admin_enabled": request.app.state.admin_enabled, "custom_pages": custom_pages, diff --git a/src/meshcore_hub/web/cli.py b/src/meshcore_hub/web/cli.py index be07d6f..e8e5e7e 100644 --- a/src/meshcore_hub/web/cli.py +++ b/src/meshcore_hub/web/cli.py @@ -88,6 +88,13 @@ import click envvar="NETWORK_CONTACT_GITHUB", help="GitHub repository URL", ) +@click.option( + "--network-contact-youtube", + type=str, + default=None, + envvar="NETWORK_CONTACT_YOUTUBE", + help="YouTube channel URL", +) @click.option( "--network-welcome-text", type=str, @@ -116,6 +123,7 @@ def web( network_contact_email: str | None, network_contact_discord: str | None, network_contact_github: str | None, + network_contact_youtube: str | None, network_welcome_text: str | None, reload: bool, ) -> None: @@ -201,6 +209,7 @@ def web( network_contact_email=network_contact_email, network_contact_discord=network_contact_discord, network_contact_github=network_contact_github, + network_contact_youtube=network_contact_youtube, network_welcome_text=network_welcome_text, ) diff --git a/src/meshcore_hub/web/static/img/logo.svg b/src/meshcore_hub/web/static/img/logo.svg index 1709a2b..b398009 100644 --- a/src/meshcore_hub/web/static/img/logo.svg +++ b/src/meshcore_hub/web/static/img/logo.svg @@ -1,21 +1,45 @@ + id="svg3" + sodipodi:docname="logo_bak.svg" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg"> + + + stroke-linecap="round" + id="g3" + transform="translate(-1,-16)"> - + - + - + diff --git a/src/meshcore_hub/web/templates/base.html b/src/meshcore_hub/web/templates/base.html index 37b1b4b..6c8d952 100644 --- a/src/meshcore_hub/web/templates/base.html +++ b/src/meshcore_hub/web/templates/base.html @@ -113,6 +113,10 @@ {% if network_contact_github %} GitHub {% endif %} + {% if (network_contact_email or network_contact_discord or network_contact_github) and network_contact_youtube %} | {% endif %} + {% if network_contact_youtube %} + YouTube + {% endif %}

{% if admin_enabled %}Admin | {% endif %}Powered by MeshCore Hub {{ version }}