Current section

Files

Jump to
lustre_ssg src lustre@ssg@atom.erl
Raw

src/lustre@ssg@atom.erl

-module(lustre@ssg@atom).
-compile([no_auto_import, nowarn_unused_vars, nowarn_unused_function, nowarn_nomatch]).
-export([feed/1, entry/1, id/1, title/1, updated/1, published/1, author/1, contributor/1, source/1, link/1, name/1, email/1, uri/1, category/1, generator/2, icon/1, logo/1, rights/1, subtitle/1, summary/1, content/1]).
-spec feed(list(lustre@internals@vdom:element(PAN))) -> lustre@internals@vdom:element(PAN).
feed(Children) ->
lustre@element:element(
<<"feed"/utf8>>,
[lustre@attribute:attribute(
<<"xmlns"/utf8>>,
<<"http://www.w3.org/2005/Atom"/utf8>>
)],
Children
).
-spec entry(list(lustre@internals@vdom:element(PAR))) -> lustre@internals@vdom:element(PAR).
entry(Children) ->
lustre@element:element(<<"entry"/utf8>>, [], Children).
-spec id(binary()) -> lustre@internals@vdom:element(any()).
id(Uri) ->
lustre@element:element(<<"id"/utf8>>, [], [lustre@element:text(Uri)]).
-spec title(binary()) -> lustre@internals@vdom:element(any()).
title(Title) ->
lustre@element:element(
<<"title"/utf8>>,
[lustre@attribute:attribute(<<"type"/utf8>>, <<"html"/utf8>>)],
[lustre@element:text(Title)]
).
-spec updated(binary()) -> lustre@internals@vdom:element(any()).
updated(Iso_timestamp) ->
lustre@element:element(
<<"updated"/utf8>>,
[],
[lustre@element:text(Iso_timestamp)]
).
-spec published(binary()) -> lustre@internals@vdom:element(any()).
published(Iso_timestamp) ->
lustre@element:element(
<<"published"/utf8>>,
[],
[lustre@element:text(Iso_timestamp)]
).
-spec author(list(lustre@internals@vdom:element(PAZ))) -> lustre@internals@vdom:element(PAZ).
author(Children) ->
lustre@element:element(<<"author"/utf8>>, [], Children).
-spec contributor(list(lustre@internals@vdom:element(PBD))) -> lustre@internals@vdom:element(PBD).
contributor(Children) ->
lustre@element:element(<<"contributor"/utf8>>, [], Children).
-spec source(list(lustre@internals@vdom:element(PBH))) -> lustre@internals@vdom:element(PBH).
source(Children) ->
lustre@element:element(<<"source"/utf8>>, [], Children).
-spec link(list(lustre@internals@vdom:attribute(PBL))) -> lustre@internals@vdom:element(PBL).
link(Attributes) ->
lustre@element:advanced(
<<""/utf8>>,
<<"link"/utf8>>,
Attributes,
[],
true,
false
).
-spec name(binary()) -> lustre@internals@vdom:element(any()).
name(Name) ->
lustre@element:element(<<"name"/utf8>>, [], [lustre@element:text(Name)]).
-spec email(binary()) -> lustre@internals@vdom:element(any()).
email(Email) ->
lustre@element:element(<<"email"/utf8>>, [], [lustre@element:text(Email)]).
-spec uri(binary()) -> lustre@internals@vdom:element(any()).
uri(Uri) ->
lustre@element:element(<<"uri"/utf8>>, [], [lustre@element:text(Uri)]).
-spec category(list(lustre@internals@vdom:attribute(PBS))) -> lustre@internals@vdom:element(PBS).
category(Attributes) ->
lustre@element:advanced(
<<""/utf8>>,
<<"category"/utf8>>,
Attributes,
[],
true,
false
).
-spec generator(list(lustre@internals@vdom:attribute(PBW)), binary()) -> lustre@internals@vdom:element(PBW).
generator(Attributes, Name) ->
lustre@element:element(
<<"generator"/utf8>>,
Attributes,
[lustre@element:text(Name)]
).
-spec icon(binary()) -> lustre@internals@vdom:element(any()).
icon(Path) ->
lustre@element:element(<<"icon"/utf8>>, [], [lustre@element:text(Path)]).
-spec logo(binary()) -> lustre@internals@vdom:element(any()).
logo(Path) ->
lustre@element:element(<<"logo"/utf8>>, [], [lustre@element:text(Path)]).
-spec rights(binary()) -> lustre@internals@vdom:element(any()).
rights(Rights) ->
lustre@element:element(<<"rights"/utf8>>, [], [lustre@element:text(Rights)]).
-spec subtitle(binary()) -> lustre@internals@vdom:element(any()).
subtitle(Subtitle) ->
lustre@element:element(
<<"subtitle"/utf8>>,
[lustre@attribute:attribute(<<"type"/utf8>>, <<"html"/utf8>>)],
[lustre@element:text(Subtitle)]
).
-spec summary(binary()) -> lustre@internals@vdom:element(any()).
summary(Summary) ->
lustre@element:element(
<<"summary"/utf8>>,
[lustre@attribute:attribute(<<"type"/utf8>>, <<"html"/utf8>>)],
[lustre@element:text(Summary)]
).
-spec content(binary()) -> lustre@internals@vdom:element(any()).
content(Content) ->
lustre@element:element(
<<"content"/utf8>>,
[lustre@attribute:attribute(<<"type"/utf8>>, <<"html"/utf8>>)],
[lustre@element:text(Content)]
).