$def with (announcement, cookie_name, cookie_duration_days=30) $# Renders a dismissible banner element containing the given announcement. $# If the patron has dismissed the banner in the past, the banner will not $# be rendered. $# $# announcement (str) -- Rendered content that will be displayed in the banner $# cookie_name (str) -- identifier for the banner. If the user dismisses the banner, a cookie with this name is set $# cookie_duration_days (int) -- TTL before cookie expires in days $ hide_banner = cookies().get(cookie_name) $if not hide_banner:
$:announcement