cynthia_websites_mini_client/pottery/molds/oceanic_layout

Oceanic Layout Module

A modern, blue-themed layout with wave-inspired design elements. This layout offers two different presentation styles:

Key design elements:

This module is written to test the docs, it seems to be a good fit for the oceanic theme.

Values

pub fn menu_1(
  from model: model_type.Model,
) -> List(@internal Element(messages.Msg))

Primary navigation menu generator

Creates the main site navigation menu from menu items in level 1. Handles the active state based on current URL hash.

@param content Dictionary mapping menu levels to lists of menu items @return List of HTML elements representing menu items

pub fn menu_2(
  from model: model_type.Model,
) -> List(@internal Element(messages.Msg))

Secondary navigation menu generator

Creates a supplementary navigation menu from menu items in level 2. This menu typically shows context-specific navigation options.

@param content Dictionary mapping menu levels to lists of menu items @return List of HTML elements representing secondary menu items

pub fn page_layout(
  from content: @internal Element(messages.Msg),
  with variables: dict.Dict(String, dynamic.Dynamic),
  store model: model_type.Model,
) -> @internal Element(messages.Msg)

Page layout handler for the Oceanic theme

This function creates the layout structure for regular pages (not blog posts). Pages use a simpler, full-width layout without the metadata sidebar.

Required metadata keys:

  • title: The page title
  • description_html: HTML description that appears below the title

@param content The main page content as an Element @param variables Dictionary containing page metadata @param store Client data store for menus and other data @param priority If true, skips loading menus (for initial fast rendering) @return A fully constructed page layout

pub fn post_layout(
  from content: @internal Element(messages.Msg),
  with variables: dict.Dict(String, dynamic.Dynamic),
  store model: model_type.Model,
) -> @internal Element(messages.Msg)

Post layout handler for the Oceanic theme

This function creates the layout structure for blog posts. Posts use a sidebar layout to display metadata alongside content.

Required metadata keys:

  • title: The post title
  • description_html: HTML description/excerpt
  • date_published: Publication date (formatted string)
  • date_modified: Last modified date (formatted string)
  • category: Post category name
  • tags: Comma-separated list of tags

@param content The main post content as an Element @param variables Dictionary containing post metadata @param store Client data store for menus and other data @param priority If true, skips loading menus (for initial fast rendering) @return A fully constructed post layout

pub fn render_nav_menu(
  items: dict.Dict(Int, List(#(String, String))),
) -> List(@internal Element(messages.Msg))

Generic menu rendering utility

This is a helper function that can render menu items from any level in a simple list format. Used by other components that need a basic representation of menu items.

@param items Dictionary of menu items by level @return Flat list of HTML elements representing all menu items

Search Document