summaryrefslogtreecommitdiff
path: root/doc/www.gnu.org/include/macros.wml
blob: 5ff726f3049fa2f7b31cb5447df375a1175c9644 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
##
#
# Useful macros
#
# createlink, footer, news, newsitem, PROJECT-LIST, PROJECT
#

##
#
# commented-code, code-line
#
# insert a commented code example in the text
#
# tag
#   commented-code
# attributes
#
# body
#   a list of code-lines
#
# tag
#   code-line
# attributes
#   code
# body
#   comment
#
<define-tag commented-code endtag=required>
  <ul>
  <table cellspacing="0" cellpadding="4">
  %body
  </table>
  </ul>
</define-tag>

<define-tag code-line endtag=required>
  <preserve code>
  <set-var %attributes>
  <tr><td valign="top"><code><get-var code></code></td><td style="padding-left: 20px;">%body</td></tr>
  <tr bgcolor="#999999"><td colspan="2"></td></tr>
  <restore code>
</define-tag>


##
#
# createlink
#
# create a link (a tag); if no name given, uses url as name
#
# tag
#   createlink
# attributes
#   name, url
#

<define-tag createlink>
<preserve name>
<preserve url>
<set-var %attributes>
<ifeq <get-var name> "" <set-var name="<get-var url>">>
<a href="<get-var url>"><get-var name></a>
<restore url>
<restore name>
</define-tag>

##
#
# Newslines
#
# Use the news and newsitem to create a table with news entries
#
<define-tag news endtag=required>
  <preserve newscount>
  <preserve __NEWSCNT>
  <set-var __NEWSCNT=0>
  <set-var %attributes>
  <table>
  %body
  </table>
  <restore __NEWSCNT>
  <restore newscount>
</define-tag>

<define-tag newsitem endtag=required>
  <preserve date>
  <set-var %attributes>
  <if <lt <get-var __NEWSCNT> <get-var newscount>>
    "<tr><td><strong><get-var date></strong></td><td>%body</td></tr>"
  >
  <increment __NEWSCNT>
  <restore date>
</define-tag>


##
#
# Project table as custom tag, to ensure consistency and
# simplify layout changes in the table
#
# tag: PROJECT-LIST
# attributes:
#
# tag: PROJECT
# attributes: name url
#

<define-tag project-list endtag=required>
  <table border="0" cellpadding="6">
  %body
  </table>
</define-tag>

<define-tag project endtag=required>
  <preserve name>
  <preserve url>
  <set-var %attributes>
  <tr>
    <td valign="top"><a href="<get-var url>"><get-var name></a></td>
    <td>%body</td>
  </tr>
  <restore url>
  <restore name>
</define-tag>


##
#
# Page footer
#
# tag: footer
#


<define-tag footer>
<BR><BR>
<HR>
<en>
Return to <A HREF="/home.html">GNU's home page</A>.
<P>

Please send FSF &amp; GNU inquiries &amp; questions to 

<A HREF="mailto:gnu@gnu.org"><EM>gnu@gnu.org</EM></A>.
There are also <A HREF="/home.html#ContactInfo">other ways to
contact</A> the FSF.
<P>

Please send comments on these web pages to

<A HREF="mailto:webmasters@www.gnu.org"><EM>webmasters@www.gnu.org</EM></A>,
send other questions to
<A HREF="mailto:gnu@gnu.org"><EM>gnu@gnu.org</EM></A>.
<P>
Copyright (C) 1999-2003 Free Software Foundation, Inc.,
51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
<P>
Verbatim copying and distribution of this entire article is
permitted in any medium, provided this notice is preserved.<P>
Updated:
</en>
$Date: 2005-07-02 20:32:08 $ $Author: mark $
<!--
<preserve info>
<set-var info=<get-file-properties <__file__>>>
<date <get-var info[2]>> <get-var last-modified-author>
<restore info>
-->
<HR>
</define-tag>