Skip to content

Commit eac9801

Browse files
committed
Documentation updates
1 parent 0d57321 commit eac9801

File tree

6 files changed

+39
-606
lines changed

6 files changed

+39
-606
lines changed

resources/doc/browser.json

Lines changed: 1 addition & 570 deletions
Large diffs are not rendered by default.

resources/doc/core.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

resources/ecs/codex.ecs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ L2:
299299
set the style of ReferencePanel to `display:none;width:100%;height:100%`
300300

301301
gosub to ShowHelpPage
302-
rest get Script from `/resources/ecs/docman.ecs`
302+
rest get Script from `/resources/ecs/docman.ecs?v=` cat now
303303
run Script with ReferencePanel as DocManModule
304304
put empty into storage as `.ref`
305305

@@ -625,7 +625,7 @@ DoOpen:
625625
SelectFile:
626626
index File to the index of FileName
627627
set the content of NameEditor to File
628-
if PasswordValid rest get Content from `/resources/scripts/` cat File
628+
if PasswordValid rest get Content from `/resources/scripts/` cat File cat `?v=` cat now
629629
else get Content from storage as File
630630
put Content into Current
631631
set the content of Status to `Script '` cat File cat `' loaded`
@@ -823,7 +823,7 @@ ProcessMarkdown: ! TODO Count the links & set up listeners
823823
end
824824
on click Link
825825
begin
826-
put attribute `data-id` of Link into Step
826+
put attribute `data-codexid` of Link into Step
827827
goto ShowHelpPage
828828
end
829829
return
@@ -878,7 +878,7 @@ Decorate:
878878
put left N of Payload into Data
879879
add 1 to N
880880
put from N of Payload into Payload
881-
put `<b><a href="" id="ec-link-` cat LinkCount cat `" data-id="` cat Data cat `">`
881+
put `<b><a href="" id="ec-link-` cat LinkCount cat `" data-codexid="` cat Data cat `">`
882882
cat Payload cat `</a></b>` into Payload
883883
add 1 to LinkCount
884884
end
@@ -1021,4 +1021,4 @@ GetPassword:
10211021

10221022
SetPasswordValid:
10231023
set PasswordValid
1024-
return
1024+
return

resources/ecs/docman.ecs

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -344,17 +344,30 @@ Viewer:
344344
create DescriptionDiv in ContentDiv
345345
put 0 into LinkCount
346346
set the content of DescriptionDiv to showdown decode Description with DecoratorCallback
347+
print LinkCount cat ` links`
347348
set the elements of Link to LinkCount
348349
put 0 into Index
349350
while Index is less than LinkCount
350351
begin
351352
index Link to Index
352-
attach Link to `ec-link-` cat Index
353+
attach Link to `ec-docman-` cat Index
353354
add 1 to Index
354355
end
355-
on click Link
356-
begin
357-
put attribute `data-id` of Link into Data
356+
on click Link go to OnClickLink
357+
put the json index of Keyword in KeywordKeys into Index
358+
take 1 from Index
359+
if Index is less than 0 add the json count of KeywordKeys to Index
360+
set the text of PreviousButton to element Index of KeywordKeys
361+
add 2 to Index
362+
if Index is not less than the json count of KeywordKeys
363+
take the json count of KeywordKeys from Index
364+
set the text of NextButton to element Index of KeywordKeys
365+
stop
366+
367+
OnClickLink:
368+
dummy
369+
put attribute `data-docmanid` of Link into Data
370+
print `Link ` cat the index of Link cat `: ` cat Data
358371
put the position of `|` in Data into N
359372
if N is less than 0 put Data into Keyword
360373
else
@@ -381,17 +394,6 @@ Viewer:
381394
put Keyword into storage as `.docman-` cat PackageName cat `-` cat Group cat `-keyword`
382395
put property Group of Package into Keywords
383396
go to Groups
384-
end
385-
386-
put the json index of Keyword in KeywordKeys into Index
387-
take 1 from Index
388-
if Index is less than 0 add the json count of KeywordKeys to Index
389-
set the text of PreviousButton to element Index of KeywordKeys
390-
add 2 to Index
391-
if Index is not less than the json count of KeywordKeys
392-
take the json count of KeywordKeys from Index
393-
set the text of NextButton to element Index of KeywordKeys
394-
stop
395397

396398
Decorate:
397399
put the payload of DecoratorCallback into Payload
@@ -426,7 +428,7 @@ ProcessQuote:
426428
return
427429

428430
ProcessLink:
429-
put `<a href="#" id="ec-link-` cat LinkCount cat `" data-id="` cat Data cat `">`
431+
put `<a href="#" id="ec-docman-` cat LinkCount cat `" data-docmanid="` cat Data cat `">`
430432
cat Display cat `</a>` into Payload
431433
add 1 to LinkCount
432434
return

resources/ecs/home.ecs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
variable Item
99
variable Message
1010

11-
rest get Script from `/resources/md/home.md`
11+
rest get Script from `/resources/md/home.md?v=` cat now
1212
if mobile
1313
begin
1414
replace `/SIDEBAR/` with `below` in Script

resources/ecs/main.ecs

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -107,29 +107,29 @@ BuildPage:
107107

108108
require js `dist/plugins/showdown.js`
109109

110-
rest get Script from `/resources/ecs/showdown.ecs`
110+
rest get Script from `/resources/ecs/showdown.ecs?v=` cat now
111111
run Script with Document as ShowdownModule
112-
rest get Script from `/resources/ecs/home.ecs`
112+
rest get Script from `/resources/ecs/home.ecs?v=` cat now
113113
run Script with ShowdownModule as HomeModule
114-
rest get Script from `/resources/ecs/intro.ecs`
114+
rest get Script from `/resources/ecs/intro.ecs?v=` cat now
115115
run Script with ShowdownModule as IntroModule
116-
rest get Script from `/resources/ecs/examples.ecs`
116+
rest get Script from `/resources/ecs/examples.ecs?v=` cat now
117117
run Script with ShowdownModule as ExamplesModule
118-
rest get Script from `/resources/ecs/about.ecs`
118+
rest get Script from `/resources/ecs/about.ecs?v=` cat now
119119
run Script with ShowdownModule as AboutModule
120-
rest get Script from `/resources/ecs/philosophy.ecs`
120+
rest get Script from `/resources/ecs/philosophy.ecs?v=` cat now
121121
run Script with ShowdownModule as PhilosophyModule
122-
rest get Script from `/resources/ecs/contact.ecs`
122+
rest get Script from `/resources/ecs/contact.ecs?v=` cat now
123123
run Script with ShowdownModule as ContactModule
124-
rest get Script from `/resources/ecs/life.ecs`
124+
rest get Script from `/resources/ecs/life.ecs?v=` cat now
125125
run Script with ShowdownModule as LifeModule
126-
rest get Script from `/resources/ecs/technical.ecs`
126+
rest get Script from `/resources/ecs/technical.ecs?v=` cat now
127127
run Script with ShowdownModule as TechnicalModule
128-
rest get Script from `/resources/ecs/howitworks.ecs`
128+
rest get Script from `/resources/ecs/howitworks.ecs?v=` cat now
129129
run Script with ShowdownModule as HowItWorksModule
130-
rest get Script from `/resources/ecs/wordpress.ecs`
130+
rest get Script from `/resources/ecs/wordpress.ecs?v=` cat now
131131
run Script with ShowdownModule as WordPressModule
132-
rest get Script from `/resources/ecs/pie.ecs`
132+
rest get Script from `/resources/ecs/pie.ecs?v=` cat now
133133
run Script with ShowdownModule as PieModule
134134

135135
alias CurrentModule to HomeModule
@@ -300,7 +300,7 @@ RunCodex:
300300
require js `dist/plugins/codemirror.js`
301301
require js `dist/plugins/float.js`
302302
require js `dist/plugins/vfx.js`
303-
rest get Script from `/resources/ecs/codex.ecs`
303+
rest get Script from `/resources/ecs/codex.ecs?v=` cat now
304304
send `pause` to CurrentModule
305305
set style `display` of Body to `none`
306306
run Script as CodexModule

0 commit comments

Comments
 (0)