Commit bd13c388935a6e95ce6cd3575380d2c66a365069

Authored by totoro
1 parent 7b9687b1

made font awesome available for HTML_In_Form and add some creation helper

Showing 1 changed file with 70 additions and 2 deletions   Show diff stats
web/fonts/awesome.anubis
... ... @@ -17,8 +17,76 @@ public type Font_Awesome:
17 17 public define HTML_Off_Form
18 18 to_HTML
19 19 (
20   - Font_Awesome fa
  20 + Font_Awesome fa,
  21 + List(CoreAttrs) attrs,
  22 + String text
21 23 )=
22 24 since fa is awesome(code),
23   - i([class("fa fa-"+code), attr("aria-hidden", "true")],"")
  25 + i([class("fa fa-"+code), attr("aria-hidden", "true")]+attrs, text)
  26 +.
  27 +
  28 +
  29 +
  30 +public define HTML_Off_Form
  31 + to_HTML
  32 + (
  33 + Font_Awesome fa,
  34 + List(CoreAttrs) attrs
  35 + )=
  36 + to_HTML(fa, attrs, "")
  37 +.
  38 +
  39 +public define HTML_Off_Form
  40 + to_HTML
  41 + (
  42 + Font_Awesome fa,
  43 + String text
  44 + )=
  45 + to_HTML(fa, [], text)
  46 +.
  47 +
  48 +public define HTML_Off_Form
  49 + to_HTML
  50 + (
  51 + Font_Awesome fa
  52 + )=
  53 + to_HTML(fa, [], "")
  54 +.
  55 +
  56 +public define HTML_In_Form
  57 + to_HTML
  58 + (
  59 + Font_Awesome fa,
  60 + List(CoreAttrs) attrs,
  61 + String text
  62 + )=
  63 + since fa is awesome(code),
  64 + i([class("fa fa-"+code), attr("aria-hidden", "true")]+attrs, text)
  65 +.
  66 +
  67 +public define HTML_In_Form
  68 + to_HTML
  69 + (
  70 + Font_Awesome fa,
  71 + List(CoreAttrs) attrs
  72 + )=
  73 + to_HTML(fa, attrs, "")
  74 +.
  75 +
  76 +
  77 +public define HTML_In_Form
  78 + to_HTML
  79 + (
  80 + Font_Awesome fa,
  81 + String text
  82 + )=
  83 + to_HTML(fa, [], text)
  84 +.
  85 +
  86 +public define HTML_In_Form
  87 + to_HTML
  88 + (
  89 + Font_Awesome fa
  90 + )=
  91 + to_HTML(fa, [], "")
24 92 .
... ...