Commit 23f0de20845afa0ef23a3e0085a4b3b7ad74a4c8
1 parent
e85764a7
move js_file and css_file with one arguments to original definition location (ty…
…pes/making_a_web_site.anubis)
Showing
2 changed files
with
15 additions
and
53 deletions
Show diff stats
web/CXM_making_a_web_site.anubis
| @@ -594,8 +594,6 @@ public type Web_Site:... | @@ -594,8 +594,6 @@ public type Web_Site:... | ||
| 594 | 'public' and 'journal'. | 594 | 'public' and 'journal'. |
| 595 | 595 | ||
| 596 | 596 | ||
| 597 | - | ||
| 598 | - | ||
| 599 | ** (2.3) Web servers parameters. | 597 | ** (2.3) Web servers parameters. |
| 600 | 598 | ||
| 601 | The web servers have several parameters useful for administration. They are described | 599 | The web servers have several parameters useful for administration. They are described |
| @@ -604,9 +602,6 @@ public type Web_Site:... | @@ -604,9 +602,6 @@ public type Web_Site:... | ||
| 604 | public type WebServersParameters: | 602 | public type WebServersParameters: |
| 605 | wsparms(Var(Bool) shutdown_required, | 603 | wsparms(Var(Bool) shutdown_required, |
| 606 | 604 | ||
| 607 | - | ||
| 608 | - | ||
| 609 | - | ||
| 610 | ** (2.4) Starting your web sites. | 605 | ** (2.4) Starting your web sites. |
| 611 | 606 | ||
| 612 | When you have described all your web sites (you may want to have several web sites, and | 607 | When you have described all your web sites (you may want to have several web sites, and |
| @@ -663,11 +658,6 @@ public define Start_Web_Sites_Result | @@ -663,11 +658,6 @@ public define Start_Web_Sites_Result | ||
| 663 | containing 'false' otherwise your servers will not run. You may also use the primitive | 658 | containing 'false' otherwise your servers will not run. You may also use the primitive |
| 664 | 'must_restart' (see 'predefined.anubis') to control the restarting of your servers. | 659 | 'must_restart' (see 'predefined.anubis') to control the restarting of your servers. |
| 665 | 660 | ||
| 666 | - | ||
| 667 | - | ||
| 668 | - | ||
| 669 | - | ||
| 670 | - | ||
| 671 | * (3) The HTML interface. | 661 | * (3) The HTML interface. |
| 672 | 662 | ||
| 673 | We propose an interface to dynamic HTML. Dynamic HTML includes HTML, and a combination | 663 | We propose an interface to dynamic HTML. Dynamic HTML includes HTML, and a combination |
| @@ -681,14 +671,6 @@ public define Start_Web_Sites_Result | @@ -681,14 +671,6 @@ public define Start_Web_Sites_Result | ||
| 681 | interface, and we comment them immediately. | 671 | interface, and we comment them immediately. |
| 682 | 672 | ||
| 683 | //public type HTML_Off_Form:... | 673 | //public type HTML_Off_Form:... |
| 684 | - | ||
| 685 | - | ||
| 686 | - | ||
| 687 | - | ||
| 688 | - | ||
| 689 | - | ||
| 690 | - | ||
| 691 | - | ||
| 692 | 674 | ||
| 693 | 675 | ||
| 694 | public define Printable_tree [HTML_Id x . Printable_tree y] = str_pt(x.id, y). | 676 | public define Printable_tree [HTML_Id x . Printable_tree y] = str_pt(x.id, y). |
| @@ -697,10 +679,6 @@ public define Printable_tree [WebArgName x . Printable_tree y] = str_pt(x.name | @@ -697,10 +679,6 @@ public define Printable_tree [WebArgName x . Printable_tree y] = str_pt(x.name | ||
| 697 | public define Printable_tree [WebArgValue x . Printable_tree y] = str_pt(x.value, y). | 679 | public define Printable_tree [WebArgValue x . Printable_tree y] = str_pt(x.value, y). |
| 698 | public define Printable_tree [InitialValue x . Printable_tree y] = str_pt(x.value, y). | 680 | public define Printable_tree [InitialValue x . Printable_tree y] = str_pt(x.value, y). |
| 699 | 681 | ||
| 700 | - | ||
| 701 | - | ||
| 702 | - | ||
| 703 | - | ||
| 704 | public define CoreAttrs attr(String name, Bool value) = attr(name, if value then "true" else "false"). | 682 | public define CoreAttrs attr(String name, Bool value) = attr(name, if value then "true" else "false"). |
| 705 | 683 | ||
| 706 | 684 | ||
| @@ -904,11 +882,11 @@ public define HTML_Header_Row($T) | @@ -904,11 +882,11 @@ public define HTML_Header_Row($T) | ||
| 904 | header_row([],cells). | 882 | header_row([],cells). |
| 905 | 883 | ||
| 906 | public define HTML_Header_Row($T) | 884 | public define HTML_Header_Row($T) |
| 907 | - header_row | ||
| 908 | - ( | ||
| 909 | - HTML_Header_Cell($T) cell | ||
| 910 | - ) = | ||
| 911 | - header_row([],[cell]). | 885 | + header_row |
| 886 | + ( | ||
| 887 | + HTML_Header_Cell($T) cell | ||
| 888 | + ) = | ||
| 889 | + header_row([],[cell]). | ||
| 912 | 890 | ||
| 913 | 891 | ||
| 914 | 892 | ||
| @@ -937,12 +915,12 @@ public define Actioner_Aspect | @@ -937,12 +915,12 @@ public define Actioner_Aspect | ||
| 937 | 915 | ||
| 938 | 916 | ||
| 939 | public define Actioner_Aspect | 917 | public define Actioner_Aspect |
| 940 | - link | ||
| 941 | - ( | ||
| 942 | - List(Text_Option) options, | ||
| 943 | - String text | ||
| 944 | - ) = | ||
| 945 | - link(options, text, failure). | 918 | + link |
| 919 | + ( | ||
| 920 | + List(Text_Option) options, | ||
| 921 | + String text | ||
| 922 | + )= | ||
| 923 | + link(options, text, failure). | ||
| 946 | 924 | ||
| 947 | public define Actioner_Aspect | 925 | public define Actioner_Aspect |
| 948 | link | 926 | link |
| @@ -997,27 +975,8 @@ public define String | @@ -997,27 +975,8 @@ public define String | ||
| 997 | aural then "aural", | 975 | aural then "aural", |
| 998 | all then "all" | 976 | all then "all" |
| 999 | }. | 977 | }. |
| 1000 | - | ||
| 1001 | - | ||
| 1002 | - . | ||
| 1003 | 978 | ||
| 1004 | 979 | ||
| 1005 | -public define CSS_File | ||
| 1006 | - css_file | ||
| 1007 | - ( | ||
| 1008 | - String file_name | ||
| 1009 | - )= | ||
| 1010 | - css_file(file_name, all). | ||
| 1011 | - | ||
| 1012 | - | ||
| 1013 | - | ||
| 1014 | -public define JS_File | ||
| 1015 | - js_file | ||
| 1016 | - ( | ||
| 1017 | - String file_name | ||
| 1018 | - ) = | ||
| 1019 | - js_file(file_name, []). | ||
| 1020 | - | ||
| 1021 | //public type HTML_Meta:... | 980 | //public type HTML_Meta:... |
| 1022 | 981 | ||
| 1023 | 982 |
web/types/making_a_web_site.anubis
| @@ -151,7 +151,10 @@ public type JS_File: | @@ -151,7 +151,10 @@ public type JS_File: | ||
| 151 | public type Script: | 151 | public type Script: |
| 152 | script( String script_type, | 152 | script( String script_type, |
| 153 | String content). | 153 | String content). |
| 154 | - | 154 | + |
| 155 | +public define JS_File js_file(String file_name) = js_file(file_name, []). | ||
| 156 | +public define CSS_File css_file(String file_name)= css_file(file_name, all). | ||
| 157 | + | ||
| 155 | public type CoreAttrs:... | 158 | public type CoreAttrs:... |
| 156 | public type HTML_Partial_Content:... | 159 | public type HTML_Partial_Content:... |
| 157 | public type HTML_Body:... | 160 | public type HTML_Body:... |