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:
- For pages: A clean, full-width layout focusing on content
- For posts: A sidebar layout that displays metadata alongside content
Key design elements:
- Wave-inspired gradients and decorative elements
- Two-level menu system (primary navigation + contextual secondary navigation)
- Responsive design that adapts to different screen sizes
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 titledescription_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 titledescription_html: HTML description/excerptdate_published: Publication date (formatted string)date_modified: Last modified date (formatted string)category: Post category nametags: 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