diff --git a/web/widgets/specialized_elements.anubis b/web/widgets/specialized_elements.anubis new file mode 100644 index 0000000..8733820 --- /dev/null +++ b/web/widgets/specialized_elements.anubis @@ -0,0 +1,55 @@ +/* + * Created by PyramIDE. + * User: フランスのトトロ aka (David RENÉ) + * Date: 01/06/2017 + * Time: 12:03 + * © Calexium + */ + +read calexium_lib/web/CXM_making_a_web_site.anubis + +public define HTML_Off_Form + phone + ( + List(CoreAttrs) attrs, + String phone_number + )= + if phone_number = "" then empty + else + with _attrs = [data("phone-number", phone_number), event(onclick, "hk_phone_call(this)"), class("phone_click") . attrs], + div([ + image(_attrs, "/icons/16x16/phone.png"), + text(_attrs, phone_number) + ]) +. + +public define HTML_Off_Form + phone + ( + String phone_number + )= + phone([], phone_number) +. + +public define HTML_Off_Form + email + ( + List(CoreAttrs) attrs, + String email_str + )= + if email_str = "" then empty + else + with _attrs = [data("email", email_str), event(onclick, "hk_send_email(this)"), class("email_click") . attrs], + div([ + image(_attrs, "/icons/16x16/email.png"), + text(_attrs, email_str) + ]) +. + +public define HTML_Off_Form + email + ( + String phone_number + )= + email([], phone_number) +. -- libgit2 0.21.4