Skip to content

Commit 793b0aa

Browse files
committed
Link help pages
1 parent 4bffb88 commit 793b0aa

File tree

3 files changed

+54
-19
lines changed

3 files changed

+54
-19
lines changed

iwsy/resources/ecs/help.txt

Lines changed: 32 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,13 @@
55
import div Container
66

77
callback DecoratorCallback
8+
a Link
89
variable Mobile
910
variable Page
1011
variable Content
1112
variable Payload
1213
variable ImageCount
14+
variable LinkCount
1315
variable Function
1416
variable Data
1517
variable Source
@@ -34,22 +36,36 @@
3436
stop
3537

3638
Show:
37-
put 0 into ImageCount
3839
set style `display` of Container to `block`
3940
get Page from storage as `.help`
4041
GetPage:
4142
if Page is empty
4243
begin
43-
put `start` into Page
44+
put `iwsy` into Page
4445
put Page into storage as `.help`
4546
end
47+
put 0 into ImageCount
48+
put 0 into LinkCount
4649
iwsy remove styles
47-
rest get Content from `/resources/help/` cat Page cat `.md`
50+
rest get Content from `/resources/help/` cat Page cat `.md?v=` cat now
4851
or begin
4952
put empty into Page
5053
go to GetPage
5154
end
5255
set the content of Container to showdown decode Content with DecoratorCallback
56+
set the elements of Link to LinkCount
57+
put 0 into N
58+
while N is less than LinkCount
59+
begin
60+
index Link to N
61+
attach Link to `ec-link-` cat N
62+
add 1 to N
63+
end
64+
on click Link
65+
begin
66+
put attribute `data-page` of Link into Page
67+
go to GetPage
68+
end
5369
stop
5470

5571
!------------------------------------------------------------------------------
@@ -69,6 +85,7 @@ Decorate:
6985
add 1 to N
7086
put from N of Payload into Data
7187
if Function is `img` gosub to ProcessImage
88+
else if Function is `page` gosub to ProcessPage
7289
end
7390
set the payload of DecoratorCallback to Payload
7491
stop
@@ -110,6 +127,18 @@ ProcessImage:
110127
add 1 to ImageCount
111128
return
112129

130+
! Process a request for a new page.
131+
ProcessPage:
132+
put the position of `:` in Data into N
133+
if N is -1 return
134+
put left N of Data into Page
135+
add 1 to N
136+
put from N of Data into Data
137+
put `<a id="ec-link-` cat LinkCount cat `" href="#" data-page="` cat Page
138+
cat `">` cat Data cat `</a>` into Payload
139+
add 1 to LinkCount
140+
return
141+
113142
Exit:
114143
set style `display` of Container to `none`
115144
stop

iwsy/resources/help/iwsy.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# I Wanna Show You
2+
3+
I Wanna Show You (IWSY, pronounced "You-zee" as an approximation to the initials) is an online presentation package. It has the ability to deliver slideshows that either run under manual control or unattended, but instead of being a PC application that's tied to the desktop, IWSY is entirely browser-based. IWSY presentations can run here in this web app, they can be embedded in other web pages or they can run as independent web pages.
4+
5+
The basic features of IWSY are:
6+
7+
- A step editor, where you create a set of steps that together form your presentation
8+
- A block editor, where you define templates to control where things appear on the screen
9+
- A content editor, where you keep all the text that will be shown in your presentation
10+
- A presentation viewer that runs your shows or displays any step
11+
- A block viewer to visualise your blocks
12+
- User management - each user has their own account and storage area
13+
- Image management - users can create folders, upload/delete images and so on
14+
- Built-in help - what you're reading
15+
16+
The block and content editors may be an unfamiliar concept. Rather than hand-editing each slide you use blocks to define the areas of the screen that will hold text or images. Each block has a name so you can choose which ones to use for any given part of the show. Similarly, the text content is all edited separately and each item has a name.
17+
18+
All text input in IWSY is in MarkDown format, which is much simpler than HTML, being mostly plain text. All standard features of MarkDown are supported, plus some custom additions documented in these Help pages.
19+
20+
~page:start:Starting a project~

iwsy/resources/help/start.md

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,4 @@
1-
# I Wanna Show You
1+
~page:iwsy:Home~
22

3-
I Wanna Show You, (IWSY, pronounced "You-zee" as an approximation to the initials) is an online presentation package. As with traditional applications such as PowerPoint, it has the ability to deliver slideshows that either run under manual control or unattended, but there the similarities end. Instead of being a PC application that's tied to the desktop, IWSY is entirely browser-based. IWSY presentations can run here in this web app, they can be embedded in other web pages or they can run as independent web pages.
3+
# Starting a project
44

5-
The basic features of IWSY are:
6-
7-
- A step editor, where you create a set of steps that together form your presentation
8-
- A block editor, where you define templates to control where things appear on the screen
9-
- A content editor, where you keep all the text that will be shown in your presentation
10-
- A presentation viewer that runs your shows or displays any step
11-
- A block viewer to visualise your blocks
12-
- User management - each user has their own account and storage area
13-
- Image management - users can create folders, upload/delete images and so on
14-
- Built-in help - what you're reading
15-
16-
The block and content editors may be an unfamiliar concept. Rather than hand-editing each slide you use blocks to define the areas of the screen that will hold text or images. Each block has a name so you can choose which ones to use for any given part of the show. Similarly, the text content is all edited separately and each item has a name.
17-
18-
All text input in IWSY is in MarkDown format, which is much simpler than HTML, being mostly plain text. All standard features of MarkDown are supported, plus some custom additions documented in these Help pages.

0 commit comments

Comments
 (0)