Skip to content
Logo LogoDuck Framework
Explore the Main Site
⌘ K
Logo LogoDuck Framework
Explore the Main Site

Getting Started

  • Getting Started
  • Project Structure
  • Settings Configuration
  • Build a Reactive Chat App in 5 Minutes
  • Simple Counter App
  • Micro Applications

Command Line Interface

  • Duck Sync

Core Concepts

  • Templates
  • Template Tags & Filters
  • Lively UI
  • Blueprints
  • Duck Shortcuts
  • Duck Utilities

Reactivity & Real-Time

  • WebSockets Support
  • Socket I/O (xsocket)
  • Cached Views
  • Component Caching Utilities
  • Background Thread & Asyncio Loop Managers
  • Task Automations

Networking & Protocols

  • Web Server Gateway (WSGI)
  • Asynchronous Server Gateway (ASGI)
  • HTTP/2 and HTTPS
  • Free SSL Certificate

Request Handling & Auth

  • Request & Response
  • Duck Middlewares
  • Authentication
  • JWT in Duck
  • Sessions in Duck

Data Layer & Integrations

  • Database
  • Django Integration
  • Duck MCP (Model Context Protocol) Support
  • Sitemap

Deployment & Operations

  • Deployment Guide
  • Duck System Monitor
  • Duck Dashboard
  • Duck Service Management
  • Duck Logging System

Reference

  • AI Agent Guidelines
    • Agents.md
    • General Code Style Guide
    • Duck Project Guide
    • HTML Components Guide
    • Security Guide
  • Changelog

API Documentation

  • API Reference
    • duck
Duck Framework
/
API Reference
/
duck
/
duck.etc
/
duck.etc.blueprints
/
duck.etc.blueprints.welcome
/
duck.etc.blueprints.welcome.ui
/
duck.etc.blueprints.welcome.ui.components
/
duck.etc.blueprints.welcome.ui.components.nav_footer

duck.etc.blueprints.welcome.ui.components.nav_footer¶

NavBar and Footer components — top navigation and bottom footer for the welcome page, both linking to the official Duck Framework properties. The navbar also surfaces a link to the project’s dashboard when one is registered.

Module Contents¶

Classes¶

Footer

Bottom footer with brand attribution and quick links.

NavBar

Sticky, glass-effect top navigation bar with brand mark and links.

Functions¶

resolve_dashboard_url

Attempts to resolve the project’s dashboard URL.

API¶

class duck.etc.blueprints.welcome.ui.components.nav_footer.Footer(element: Optional[str] = None, properties: Optional[Dict[str, str]] = None, props: Optional[Dict[str, str]] = None, style: Optional[Dict[str, str]] = None, inner_html: Optional[Union[str, str, float]] = None, children: Optional[List[duck.html.components.HtmlComponent]] = None, **kwargs)[source]¶

Bases: duck.html.components.InnerComponent

Bottom footer with brand attribution and quick links.

Mirrors the navbar links so they remain reachable after scrolling through the full page, and includes the dashboard link when one is registered.

Initialization

Initialize an HTML component.

Parameters:
  • element – The HTML element tag name (e.g., textarea, input, button). Can be None, but make sure element is returned by get_element method.

  • accept_inner_html – Whether the HTML component accepts an inner body (e.g., inner-body-here).

  • inner_html – Inner html to add to the HTML component. Defaults to None.

  • properties – Dictionary for properties to initialize the component with.

  • props – Just same as properties argument (added for simplicity).

  • style – Dictionary for style to initialize the component with.

  • event_handlers – Events to automatically bind. Each dictionary maps an event name to its handler and may include additional keyword arguments forwarded to bind(), e.g. event_handlers=[{"click": on_button_click, **extra_kwargs}].

  • **kwargs – Extra keyword arguments

Raises:

HtmlComponentError – If ‘element’ is not a string or ‘inner_html’ is set but ‘accept_inner_html’ is False.

build_brand() → duck.html.components.container.Container[source]¶

Returns the footer brand attribution text.

Returns:

A Container with the brand markup.

build_links() → duck.html.components.container.Container[source]¶

Returns the row of footer links, including a dashboard link when one is available for this project.

Returns:

A Container holding the footer link anchors.

get_element() → str[source]¶
Returns:

The HTML element tag for this component.

on_create() → None[source]¶

Builds the footer brand label and link row.

class duck.etc.blueprints.welcome.ui.components.nav_footer.NavBar(element: Optional[str] = None, properties: Optional[Dict[str, str]] = None, props: Optional[Dict[str, str]] = None, style: Optional[Dict[str, str]] = None, inner_html: Optional[Union[str, str, float]] = None, children: Optional[List[duck.html.components.HtmlComponent]] = None, **kwargs)[source]¶

Bases: duck.html.components.InnerComponent

Sticky, glass-effect top navigation bar with brand mark and links.

Links to the official site and docs open in a new tab. When the project registers a dashboard route, a “Dashboard” link is shown as the primary call to action.

Initialization

Initialize an HTML component.

Parameters:
  • element – The HTML element tag name (e.g., textarea, input, button). Can be None, but make sure element is returned by get_element method.

  • accept_inner_html – Whether the HTML component accepts an inner body (e.g., inner-body-here).

  • inner_html – Inner html to add to the HTML component. Defaults to None.

  • properties – Dictionary for properties to initialize the component with.

  • props – Just same as properties argument (added for simplicity).

  • style – Dictionary for style to initialize the component with.

  • event_handlers – Events to automatically bind. Each dictionary maps an event name to its handler and may include additional keyword arguments forwarded to bind(), e.g. event_handlers=[{"click": on_button_click, **extra_kwargs}].

  • **kwargs – Extra keyword arguments

Raises:

HtmlComponentError – If ‘element’ is not a string or ‘inner_html’ is set but ‘accept_inner_html’ is False.

arrow_icon() → str[source]¶

Returns an inline SVG arrow-right icon for the dashboard link.

Returns:

SVG string.

build_brand() → duck.html.components.container.Container[source]¶

Returns the brand mark with animated pulse dot.

Returns:

A Container rendered as an anchor to the official site.

build_burger() → duck.html.components.container.Container[source]¶

Returns the hamburger button shown only on mobile.

Clicking it toggles the wc-nav-open class on the nav, which slides the link drawer into view and animates the burger bars into an X.

Returns:

A Container rendered as a

build_links() → duck.html.components.container.Container[source]¶

Returns the navigation link list — shown inline on desktop and as a full-width drawer on mobile.

Returns:

A Container holding the navigation link anchors.

build_toggle_script() → duck.html.components.container.Container[source]¶

Returns an inline script that wires the burger button toggle.

The script is intentionally tiny — it just flips the wc-nav-open class and syncs aria-expanded. All visual logic lives in CSS.

Returns:

A Container rendered as a