Skip to content

Restore Technical module #228

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 27, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions resources/ecs/main.ecs
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ BuildPage:
rest get Script from `/resources/ecs/life.ecs`
run Script with ShowdownModule as LifeModule
rest get Script from `/resources/ecs/technical.ecs`
! run Script with ShowdownModule as TechnicalModule
run Script with ShowdownModule as TechnicalModule

alias CurrentModule to HomeModule
send to HomeModule
Expand Down Expand Up @@ -220,13 +220,11 @@ BuildPage:
set the text of TechnicalButton to `Technical Overview`
on click TechnicalButton
begin
stop
! location `/technical.html`
gosub to DeselectAllButtons
set style `background` of TechnicalButton to `darkgray`
send `pause` to CurrentModule
alias CurrentModule to TechnicalModule
send to ContactModule
send to TechnicalModule
end

create ButtonItem in ButtonList
Expand Down Expand Up @@ -280,4 +278,5 @@ DeselectAllButtons:
set style `background` of AboutButton to ``
set style `background` of PhilosophyButton to ``
set style `background` of ContactButton to ``
set style `background` of TechnicalButton to ``
return
62 changes: 20 additions & 42 deletions resources/ecs/technical.ecs
Original file line number Diff line number Diff line change
@@ -1,47 +1,25 @@
! EasyCoder Main
! Technical

script Technical

div Body
div Main
div Header
div Document
img Banner
hr Rule
module ShowdownModule
variable Script

create Body
if mobile
set the style of Body to `width:100%`
else
set the style of Body to `width:100%;max-width:1200px;margin:0 auto`

create Header in Body
if mobile
set the style of Header to `text-align:center`
else
set the style of Header to `margin:0 2em;text-align:center`

create Banner in Header
if not mobile set the style of Banner to `width:50%;margin:0 auto`
set attribute `src` of Banner to `resources/img/banner.png`

create Rule in Body

create Main in Body
if not mobile
begin
set style `display` of Main to `flex`
end

create Document in Main
set the style of Document to `flex:1`

rest get Script from `/resources/ecs/showdown.ecs`
run Script with Document as ShowdownModule
import module Showdown

variable Script
variable Message

rest get Script from `/resources/md/technical.md`

rest get Script from `/resources/md/technical.md`
send Script to ShowdownModule
on message
begin
put the message into Message
if Message is `restore` send `show` to parent
else if Message is `pause` begin end
else go to Start
end

set ready
stop

stop
Start:
send Script to Showdown
stop