From 457fc6c99f46d41608e50ae992196031e35459b7 Mon Sep 17 00:00:00 2001 From: totoro Date: Mon, 20 May 2019 16:05:04 +0900 Subject: [PATCH] [ADD] add more helper for html_wave_box and typo --- web/widgets/css_helper.anubis | 98 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---------------------------------- 1 file changed, 64 insertions(+), 34 deletions(-) diff --git a/web/widgets/css_helper.anubis b/web/widgets/css_helper.anubis index a79e915..2059810 100644 --- a/web/widgets/css_helper.anubis +++ b/web/widgets/css_helper.anubis @@ -16,46 +16,56 @@ read calexium_lib/web/CXM_making_a_web_site.anubis public define HTML_Partial_Content html_wave_box ( - String legend, - HTML_Partial_Content content, - List(CoreAttrs) attrs + List(CoreAttrs) attrs, + String legend, + List(HTML_Partial_Content) content )= - partial_content([], - div(attrs, - sequence( - [ + partial_content( + div(attrs, [ text([class("frame_wave")], legend), //legend - div([class("frame_blk")], partial(content)) - ]))). + div([class("frame_blk")], content) + ])) +. public define HTML_Partial_Content html_wave_box ( - String legend, - HTML_Off_Form content, - List(CoreAttrs) attrs + List(CoreAttrs) attrs, + String legend, + List(HTML_Off_Form) content )= - partial_content([], + partial_content( div(attrs, - sequence( [ text([class("frame_wave")], legend), //legend div([class("frame_blk")], content) - ]))). + ])) +. public define HTML_Off_Form html_wave_box ( - String legend, - HTML_Off_Form content, - List(CoreAttrs) attrs + List(CoreAttrs) attrs, + String legend, + List(HTML_Off_Form) content )= div(attrs, - sequence( [ text([class("frame_wave")], legend), //legend - div([class("frame_blk")], content) - ])). + div([class("frame_blk")], content) + ]) +. + +public define HTML_Off_Form + html_wave_box + ( + List(CoreAttrs) attrs, + String legend, + HTML_Off_Form content + )= + html_wave_box(attrs, legend, [content]) +. + public define HTML_Off_Form html_wave_box @@ -63,7 +73,8 @@ public define HTML_Off_Form String legend, HTML_Off_Form content )= - html_wave_box(legend, content, [class("frame")]). + html_wave_box([class("frame")], legend, content) +. public define HTML_Partial_Content html_wave_box @@ -71,16 +82,18 @@ public define HTML_Partial_Content String legend, HTML_Partial_Content content )= - html_wave_box(legend, content, [class("frame")]). + html_wave_box([class("frame")], legend, [content]) +. public define HTML_Partial_Content html_wave_box ( - String legend, List(CoreAttrs) attrs, + String legend, HTML_Partial_Content content )= - html_wave_box(legend, content, [class("frame")]+attrs). + html_wave_box([class("frame") . attrs] , legend, [content]) +. public define HTML_Partial_Content html_wave_box @@ -88,21 +101,21 @@ public define HTML_Partial_Content String legend, HTML_Off_Form content )= - html_wave_box(legend, content, [class("frame")]). + html_wave_box([class("frame")], legend, [content]) +. public define HTML_Off_Form html_wave_box_custom_size ( - Int size, - String legend, - HTML_Off_Form content, + Int size, + String legend, + List(HTML_Off_Form) content, )= div([style("width: "+abs_to_decimal(size)+"px")], - sequence( [ text([class("frame_wave")], legend), //legend - div([class("frame_blk")], content) - ])). + div([class("frame_blk")], content) + ]). public define HTML_Off_Form html_wave_box_wide @@ -110,7 +123,7 @@ public define HTML_Off_Form String legend, HTML_Off_Form content )= - html_wave_box(legend, content, [class("frame wide")]). + html_wave_box([class("frame wide")], legend, [content]). public define HTML_Partial_Content html_wave_box_wide @@ -118,7 +131,7 @@ public define HTML_Partial_Content String legend, HTML_Partial_Content content )= - html_wave_box(legend, content, [class("frame wide")]). + html_wave_box([class("frame wide")], legend, content, ). /**** CHANGELIST ****/ public type ChangeListItem: @@ -135,6 +148,23 @@ public define ChangeListItem String value )= change_list_item(icon, label, text(value)). + +public define ChangeListItem + change_list_item + ( + String icon, + String label, + Int value + )= + change_list_item(icon, label, text(value)). + +public define ChangeListItem + change_list_item + ( + String label, + Int value + )= + change_list_item("", label, text(value)). public define ChangeListItem change_list_item -- libgit2 0.21.4