From bd13c388935a6e95ce6cd3575380d2c66a365069 Mon Sep 17 00:00:00 2001 From: totoro Date: Sun, 23 Jul 2017 23:08:25 +0200 Subject: [PATCH] made font awesome available for HTML_In_Form and add some creation helper --- web/fonts/awesome.anubis | 72 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 70 insertions(+), 2 deletions(-) diff --git a/web/fonts/awesome.anubis b/web/fonts/awesome.anubis index 02586a7..fb3a201 100644 --- a/web/fonts/awesome.anubis +++ b/web/fonts/awesome.anubis @@ -17,8 +17,76 @@ public type Font_Awesome: public define HTML_Off_Form to_HTML ( - Font_Awesome fa + Font_Awesome fa, + List(CoreAttrs) attrs, + String text )= since fa is awesome(code), - i([class("fa fa-"+code), attr("aria-hidden", "true")],"") + i([class("fa fa-"+code), attr("aria-hidden", "true")]+attrs, text) +. + + + +public define HTML_Off_Form + to_HTML + ( + Font_Awesome fa, + List(CoreAttrs) attrs + )= + to_HTML(fa, attrs, "") +. + +public define HTML_Off_Form + to_HTML + ( + Font_Awesome fa, + String text + )= + to_HTML(fa, [], text) +. + +public define HTML_Off_Form + to_HTML + ( + Font_Awesome fa + )= + to_HTML(fa, [], "") +. + +public define HTML_In_Form + to_HTML + ( + Font_Awesome fa, + List(CoreAttrs) attrs, + String text + )= + since fa is awesome(code), + i([class("fa fa-"+code), attr("aria-hidden", "true")]+attrs, text) +. + +public define HTML_In_Form + to_HTML + ( + Font_Awesome fa, + List(CoreAttrs) attrs + )= + to_HTML(fa, attrs, "") +. + + +public define HTML_In_Form + to_HTML + ( + Font_Awesome fa, + String text + )= + to_HTML(fa, [], text) +. + +public define HTML_In_Form + to_HTML + ( + Font_Awesome fa + )= + to_HTML(fa, [], "") . -- libgit2 0.21.4