From 35c3e690223675ba6827c0700e1c8fac16d8ebfe Mon Sep 17 00:00:00 2001 From: Adrian Salceanu Date: Thu, 6 Jan 2022 23:01:45 +0100 Subject: [PATCH] Better header element --- Project.toml | 2 +- src/Headings.jl | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Project.toml b/Project.toml index e35276e8..1e39a570 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "StippleUI" uuid = "a3c5d34a-b254-4859-a8fa-b86abb7e84a3" authors = ["Adrian Salceanu "] -version = "0.14.2" +version = "0.14.3" [deps] Colors = "5ae59095-9a9b-59fe-a467-6f913c188581" diff --git a/src/Headings.jl b/src/Headings.jl index 6da17be4..9966b526 100644 --- a/src/Headings.jl +++ b/src/Headings.jl @@ -4,15 +4,17 @@ import Genie, Stipple export heading -function heading(title::String = ""; +function heading( title::String = ""; class::String = "", - img::Union{String,Nothing} = nothing, + img::Union{AbstractString,Nothing} = nothing, h = Genie.Renderer.Html.h1(title, class="st-header__title text-h3"), + content::Union{AbstractString,Nothing,Vector{AbstractString}} = nothing, kwargs...) Genie.Renderer.Html.header(; class="$(class) st-header q-pa-sm", kwargs...) do; [ img h + content ]end end