~crc-x/+junk/old-forthlets

« back to all changes in this revision

Viewing changes to site.retro

  • Committer: Charles Childers
  • Date: 2010-01-15 05:00:22 UTC
  • Revision ID: git-v1:b06537131be8245b64ea534415ed85aae04ca1ef
rxweb merged into this repo

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
new
2
 
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
3
 
| demos of using RxWeb                                         |
4
 
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
5
 
 
6
 
| ------------------------------------------------------------ |
7
 
| The all-important 404 page                                   |
8
 
| ------------------------------------------------------------ |
9
 
: /404.rw
10
 
  ( html
11
 
    ( head ( title ." 404 Error: Page Not Found" ) )
12
 
    ( body
13
 
      ( h2 ." Error 404" )
14
 
      ( p ." The page you requested could not be found. Please go back" _
15
 
          ." and try again."
16
 
      )
17
 
    )
18
 
  )
19
 
;
20
 
' 404 is notfound
21
 
| ------------------------------------------------------------ |
22
 
 
23
 
 
24
 
 
25
 
| ------------------------------------------------------------ |
26
 
| The main (default) page                                      |
27
 
| ------------------------------------------------------------ |
28
 
: /index.rw
29
 
  ( html
30
 
    ( head ( title ." Index of RxWeb demo" ) )
31
 
    ( body
32
 
      ( h2 ." Welcome to RxWeb!" )
33
 
      ( ul
34
 
        ( li attr: href="/page1.rw" ( a ." Page #1" ) )
35
 
        ( li attr: href="/page2.rw" ( a ." Page #2" ) )
36
 
        ( li attr: href="/page3.rw" ( a ." Page #3" ) )
37
 
      )
38
 
    )
39
 
  )
40
 
;
41
 
: / /index.rw ;                           | map / to /index.rw |
42
 
| ------------------------------------------------------------ |
43
 
 
44
 
 
45
 
 
46
 
| ------------------------------------------------------------ |
47
 
| The demo pages                                               |
48
 
| ------------------------------------------------------------ |
49
 
: /page1.rw
50
 
  ( html
51
 
    ( head ( title ." Page #1" ) )
52
 
    ( body
53
 
      ( h2 ." Page 1" )
54
 
      ( p ." The following words are visible in the underlying" _
55
 
          ." Retro dictionary:"
56
 
      )
57
 
      ( p words )
58
 
    )
59
 
  )
60
 
;
61
 
 
62
 
: /page2.rw
63
 
  ( html
64
 
    ( head ( title ." Page #2" ) )
65
 
    ( body
66
 
      ( h2 ." Page 2" )
67
 
      ( p ." Below is an empty block from the editor." )
68
 
      ( pre v )
69
 
      ( p
70
 
        attr: href="/prev.rw" ( a ." Previous" )
71
 
        _ ." |" _
72
 
        attr: href="/next.rw" ( a ." Next" )
73
 
      )
74
 
    )
75
 
  )
76
 
;
77
 
 
78
 
: nope ;
79
 
: /next.rw ['] nope ['] v :is n ['] v :devector save /page2.rw ;
80
 
: /prev.rw ['] nope ['] v :is p ['] v :devector save /page2.rw ;
81
 
 
82
 
: /page3.rw
83
 
  ( html
84
 
    ( head ( title ." Page #3" ) )
85
 
    ( body
86
 
      ( h2 ." Page 3" )
87
 
      ( p ." This concludes the demo!" )
88
 
    )
89
 
  )
90
 
;
91
 
| ------------------------------------------------------------ |
92
 
 
93
 
 
94
 
 
95
 
| ------------------------------------------------------------ |
96
 
| That's All                                                   |
97
 
| ------------------------------------------------------------ |
98
 
end
99
 
bye