diff --git a/-/fastn-community.github.io/dark-mode-switcher/static/dark-mode-active-dark.png b/-/fastn-community.github.io/dark-mode-switcher/static/dark-mode-active-dark.png deleted file mode 100644 index ba1e665..0000000 Binary files a/-/fastn-community.github.io/dark-mode-switcher/static/dark-mode-active-dark.png and /dev/null differ diff --git a/-/fastn-community.github.io/dark-mode-switcher/static/light-mode-active-dark.png b/-/fastn-community.github.io/dark-mode-switcher/static/light-mode-active-dark.png deleted file mode 100644 index 9e45a2a..0000000 Binary files a/-/fastn-community.github.io/dark-mode-switcher/static/light-mode-active-dark.png and /dev/null differ diff --git a/-/fastn-community.github.io/dark-mode-switcher/static/light-mode-active.png b/-/fastn-community.github.io/dark-mode-switcher/static/light-mode-active.png deleted file mode 100644 index 9e45a2a..0000000 Binary files a/-/fastn-community.github.io/dark-mode-switcher/static/light-mode-active.png and /dev/null differ diff --git a/-/fastn-community.github.io/dark-mode-switcher/static/system-mode-active-dark.png b/-/fastn-community.github.io/dark-mode-switcher/static/system-mode-active-dark.png deleted file mode 100644 index cf1bd6c..0000000 Binary files a/-/fastn-community.github.io/dark-mode-switcher/static/system-mode-active-dark.png and /dev/null differ diff --git a/-/fastn-community.github.io/dark-mode-switcher/static/system-mode-active.png b/-/fastn-community.github.io/dark-mode-switcher/static/system-mode-active.png deleted file mode 100644 index cf1bd6c..0000000 Binary files a/-/fastn-community.github.io/dark-mode-switcher/static/system-mode-active.png and /dev/null differ diff --git a/-/fastn-community.github.io/design-system/assets/powered-by-dark.svg b/-/fastn-community.github.io/design-system/assets/powered-by-dark.svg deleted file mode 100644 index d4b5512..0000000 --- a/-/fastn-community.github.io/design-system/assets/powered-by-dark.svg +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/-/fastn-community.github.io/design-system/assets/powered-by.svg b/-/fastn-community.github.io/design-system/assets/powered-by.svg deleted file mode 100644 index d4b5512..0000000 --- a/-/fastn-community.github.io/design-system/assets/powered-by.svg +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/-/fifthtry.github.io/easy-contest/scripts/auto.sh b/-/fifthtry.github.io/easy-contest/scripts/auto.sh index 987f9be..b6ca32a 100644 --- a/-/fifthtry.github.io/easy-contest/scripts/auto.sh +++ b/-/fifthtry.github.io/easy-contest/scripts/auto.sh @@ -6,3 +6,14 @@ function build-wasm() { popd || return 1 } +function upload-frontend-debug() { + DEBUG_USE_TEJAR_FOLDER="/home/sidd/projects/work/ft/tejar-cache/" \ + FIFTHTRY_SITE_WRITE_TOKEN="fifthtry-write-token" \ + DEBUG_API_FIFTHTRY_COM="http://127.0.0.1" \ + clift upload localhost + + DEBUG_USE_TEJAR_FOLDER="/home/sidd/projects/work/ft/tejar-cache/" \ + FIFTHTRY_SITE_WRITE_TOKEN="fifthtry-write-token" \ + DEBUG_API_FIFTHTRY_COM="http://127.0.0.1" \ + clift upload localhost --file ec.wasm +} diff --git a/-/ui.fifthtry.com/assets/auto-mode-dark.svg b/-/ui.fifthtry.com/assets/auto-mode-dark.svg deleted file mode 100644 index ba03771..0000000 --- a/-/ui.fifthtry.com/assets/auto-mode-dark.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/-/ui.fifthtry.com/assets/auto-mode.svg b/-/ui.fifthtry.com/assets/auto-mode.svg deleted file mode 100644 index 8603de3..0000000 --- a/-/ui.fifthtry.com/assets/auto-mode.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/-/ui.fifthtry.com/assets/dark-mode-dark.svg b/-/ui.fifthtry.com/assets/dark-mode-dark.svg deleted file mode 100644 index 3ee10b6..0000000 --- a/-/ui.fifthtry.com/assets/dark-mode-dark.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/-/ui.fifthtry.com/assets/light-mode-dark.svg b/-/ui.fifthtry.com/assets/light-mode-dark.svg deleted file mode 100644 index 40f8edc..0000000 --- a/-/ui.fifthtry.com/assets/light-mode-dark.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/-/ui.fifthtry.com/assets/light-mode.svg b/-/ui.fifthtry.com/assets/light-mode.svg deleted file mode 100644 index 22606c2..0000000 --- a/-/ui.fifthtry.com/assets/light-mode.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/-/ui.fifthtry.com/assets/logo-dark.svg b/-/ui.fifthtry.com/assets/logo-dark.svg deleted file mode 100644 index c9b276c..0000000 --- a/-/ui.fifthtry.com/assets/logo-dark.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/-/ui.fifthtry.com/assets/logo.svg b/-/ui.fifthtry.com/assets/logo.svg deleted file mode 100644 index 47ae8db..0000000 --- a/-/ui.fifthtry.com/assets/logo.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/FASTN.ftd b/FASTN.ftd index 42b966b..0824532 100644 --- a/FASTN.ftd +++ b/FASTN.ftd @@ -13,3 +13,7 @@ provided-via: fifthtry.github.io/easy-contest/ds -- fastn.auto-import: fifthtry.github.io/easy-contest/assets -- fastn.auto-import: fifthtry.github.io/easy-contest/ds + +-- fastn.url-mappings: + +/b/* -> wasm+proxy://ec.wasm/* diff --git a/action/new-contest.ftd b/action/new-contest.ftd new file mode 100644 index 0000000..7223356 --- /dev/null +++ b/action/new-contest.ftd @@ -0,0 +1,18 @@ +-- optional string $title-error: +-- optional string $deploy-url-error: +-- optional string $source-url-error: +-- optional string $message-error: + +-- ftd.http-options opts: +redirect: follow +method: POST +fastn-module: www.fifthtry.com/action/new-contest + +-- void submit-values(title, deploy-url, source-url, message): +string title: +string deploy_url: +string source_url: +string message: +ftd.http-options opts: $opts + +console.log("data: " + title + " " + deploy_url + " " + source_url) diff --git a/pages/main/index.html b/action/new-contest/index.html similarity index 100% rename from pages/main/index.html rename to action/new-contest/index.html diff --git a/components/submission-box.ftd b/components/submission-box.ftd new file mode 100644 index 0000000..b516fe6 --- /dev/null +++ b/components/submission-box.ftd @@ -0,0 +1,38 @@ +-- import: fifthtry.github.io/easy-contest/records/submissions as s + +-- component submission-box: +s.submission sub: + +-- ds.container: +inset: $ds.spaces.inset-square.large +background.solid: $ds.colors.background.step-2 +width: fill-container +radius: $ds.radius.medium + +-- ds.column: + +-- ds.heading-small: $submission-box.sub.title +color: $ds.colors.text-strong +align: left + +-- ds.copy-large: $submission-box.sub.message +align: left + +-- ds.row: + +-- ds.copy-regular: $submission-box.sub.deploy_url +align: left + +-- ds.copy-regular: | + +-- ds.copy-regular: $submission-box.sub.source_url +align: left + +-- end: ds.row + + +-- end: ds.column + +-- end: ds.container + +-- end: submission-box diff --git a/pages/rules/index.html b/components/submission-box/index.html similarity index 100% rename from pages/rules/index.html rename to components/submission-box/index.html diff --git a/index.ftd b/index.ftd index 3c846d7..d3dd315 100644 --- a/index.ftd +++ b/index.ftd @@ -1,3 +1,16 @@ -- import: fifthtry.github.io/easy-contest/pages/main +-- import: fastn/processors as pr --- main.page: 100 domains contest +-- ftd.text: TODO: add landing page and other scenarios like ui.fifthtry.com + + +;;-- record page-data: +;;string msg: + +;;-- record msg: +;;page-data page: + + +;;-- msg data: +;;$processor$: pr.http +;;url: /b/wasm-test/ diff --git a/index.html b/index.html index 52d4c6b..9e2bc67 100644 --- a/index.html +++ b/index.html @@ -333,220 +333,9 @@ -
-

Could be a section in the main page itself? depends on the final content we end up with

-A place for Nandhini to write content related to the 100 domains contest
+ + +
+ + diff --git a/pages/main.ftd b/pages/main.ftd deleted file mode 100644 index 0d67d1a..0000000 --- a/pages/main.ftd +++ /dev/null @@ -1,12 +0,0 @@ --- import: fifthtry.github.io/easy-contest/components/header as h - --- component page: -caption page-title: Easy Contest - --- ds.page: $page.page-title - --- h.header: - --- end: ds.page - --- end: page diff --git a/pages/new-submission.ftd b/pages/new-submission.ftd new file mode 100644 index 0000000..27f7ffd --- /dev/null +++ b/pages/new-submission.ftd @@ -0,0 +1,153 @@ +-- import: ui.fifthtry.com/utils +-- import: ui.fifthtry.com/records/user-data as ud +-- import: ui.fifthtry.com/components/page as p +-- import: fifthtry.github.io/easy-contest/action/new-contest + +-- component page: +caption page-title: +module action: new-contest +ud.user-data user-data: +private string $sub-title: *$ftd.empty +private string $sub-deploy-url: *$ftd.empty +private string $sub-source-url: *$ftd.empty +private string $sub-message: *$ftd.empty + + -- p.page: $page.page-title + user-data: $page.user-data + + -- ds.heading-medium: New Submission + + -- ds.section-column: + inset: $ds.spaces.inset-tall.large + + -- ds.column: + width.fixed.px if { ftd.device != "mobile" }: 508 + align-content: top-left + spacing: $ds.spaces.vertical-gap.large + radius: $ds.radius.medium + inset: $ds.spaces.inset-square.large + border: $ds.borders.uniform.small + background.solid: $ds.colors.background.step-1 + + -- ds.column: + spacing: $ds.spaces.vertical-gap.extra-extra-small + align-content: left + + -- ds.copy-small: Title + + -- ftd.text-input: + placeholder: Submissions Title + type: text + width: fill-container + height.fixed.px: 40 + border-radius.px: 8 + background.solid: transparent + border-width.px: 1 + border-color: $inherited.colors.border + padding.px: 8 + color: $inherited.colors.text-strong + $on-input$: $ftd.set-string($a = $page.sub-title, v = $VALUE) + $on-input$: $utils.set-null($var = $page.action.title-error) + + -- ds.copy-small: $page.action.title-error + color: $ds.colors.error.text + if: { page.action.title-error != NULL } + + -- end: ds.column + + -- ds.column: + spacing: $ds.spaces.vertical-gap.extra-extra-small + align-content: left + + -- ds.copy-small: Deploy Url + + -- ftd.text-input: + placeholder: Deploy Url + type: text + width: fill-container + height.fixed.px: 40 + border-radius.px: 8 + background.solid: transparent + border-width.px: 1 + border-color: $inherited.colors.border + padding.px: 8 + color: $inherited.colors.text-strong + $on-input$: $ftd.set-string($a = $page.sub-deploy-url, v = $VALUE) + $on-input$: $utils.set-null($var = $page.action.deploy-url-error) + + -- ds.copy-small: $page.action.deploy-url-error + color: $ds.colors.error.text + if: { page.action.deploy-url-error != NULL } + + -- end: ds.column + + -- ds.column: + spacing: $ds.spaces.vertical-gap.extra-extra-small + align-content: left + + -- ds.copy-small: Source Url + + -- ftd.text-input: + placeholder: Source url + type: text + width: fill-container + height.fixed.px: 40 + border-radius.px: 8 + background.solid: transparent + border-width.px: 1 + border-color: $inherited.colors.border + padding.px: 8 + color: $inherited.colors.text-strong + $on-input$: $ftd.set-string($a = $page.sub-source-url, v = $VALUE) + $on-input$: $utils.set-null($var = $page.action.source-url-error) + + -- ds.copy-small: $page.action.source-url-error + color: $ds.colors.error.text + if: { page.action.source-url-error != NULL } + + -- end: ds.column + + -- ds.column: + spacing: $ds.spaces.vertical-gap.extra-extra-small + align-content: left + + -- ds.copy-small: Message + + -- ftd.text-input: + placeholder: Any message for us? + type: text + width: fill-container + multiline: true + height.fixed.px: 40 + border-radius.px: 8 + background.solid: transparent + border-width.px: 1 + border-color: $inherited.colors.border + padding.px: 8 + color: $inherited.colors.text-strong + $on-input$: $ftd.set-string($a = $page.sub-message, v = $VALUE) + $on-input$: $utils.set-null($var = $page.action.message-error) + + -- ds.copy-small: $page.action.message-error + color: $ds.colors.error.text + if: { page.action.message-error != NULL } + + -- end: ds.column + + -- ds.row: + spacing: $ds.spaces.horizontal-gap.small + + -- ds.primary-button: Save + width: wide + radius: curved + $on-click$: $page.action.submit-values(title = $page.sub-title, deploy_url = $page.sub-deploy-url, source_url = $page.sub-source-url, message = $page.sub-message) + + -- end: ds.row + + -- end: ds.column + + -- end: ds.section-column + + -- end: p.page + +-- end: page diff --git a/pages/new-submission/index.html b/pages/new-submission/index.html new file mode 100644 index 0000000..fd6da45 --- /dev/null +++ b/pages/new-submission/index.html @@ -0,0 +1,2757 @@ + + + + + + + + + + + + + + + + + + + + + + + +
+ + diff --git a/pages/rules.ftd b/pages/rules.ftd deleted file mode 100644 index 0dcae7f..0000000 --- a/pages/rules.ftd +++ /dev/null @@ -1,22 +0,0 @@ --- import: fifthtry.github.io/easy-contest/components/header as h - --- component page: -caption page-title: Rules | Easy Contest - --- ds.page: $page.page-title - --- h.header: - --- ds.section-column: - --- ds.markdown: - -Could be a section in the main page itself? depends on the final content we end up with - -A place for Nandhini to write content related to the 100 domains contest - --- end: ds.section-column - --- end: ds.page - --- end: page diff --git a/pages/submissions.ftd b/pages/submissions.ftd new file mode 100644 index 0000000..53543db --- /dev/null +++ b/pages/submissions.ftd @@ -0,0 +1,40 @@ +-- import: ui.fifthtry.com/components/page as p +-- import: fifthtry.github.io/easy-contest/records/submissions as s +-- import: fifthtry.github.io/easy-contest/components/submission-box as box + +-- component page: +caption page-title: +ud.user-data user-data: +s.submission list submissions: +string new-submissions-link: /contest/submissions/new/ + +-- p.page: $page.page-title +user-data: $page.user-data + +-- ds.row: + +-- ds.heading-medium: Your Submissions + +-- ds.primary-button: New +link: $page.new-submissions-link + +-- end: ds.row + +-- ds.section-column: +margin: $ds.spaces.vertical-gap.extra-extra-large +align-content: top-left + +-- ds.column: +spacing: $ds.spaces.vertical-gap.extra-large + +-- box.submission-box: +for: $sub in $page.submissions +sub: $sub + +-- end: ds.column + +-- end: ds.section-column + +-- end: p.page + +-- end: page diff --git a/pages/submissions/index.html b/pages/submissions/index.html new file mode 100644 index 0000000..fd6da45 --- /dev/null +++ b/pages/submissions/index.html @@ -0,0 +1,2757 @@ + + + + + + + + + + + + + + + + + + + + + + + +
+ + diff --git a/records/submission.ftd b/records/submission.ftd new file mode 100644 index 0000000..7499275 --- /dev/null +++ b/records/submission.ftd @@ -0,0 +1,9 @@ +-- record submission: +integer id: +string title: +string deploy_url: +string source_url: +string message: +integer user_id: +boolean is_winner: + diff --git a/records/submission/index.html b/records/submission/index.html new file mode 100644 index 0000000..fd6da45 --- /dev/null +++ b/records/submission/index.html @@ -0,0 +1,2757 @@ + + + + + + + + + + + + + + + + + + + + + + + +
+ + diff --git a/rules.ftd b/rules.ftd deleted file mode 100644 index dffa906..0000000 --- a/rules.ftd +++ /dev/null @@ -1,3 +0,0 @@ --- import: fifthtry.github.io/easy-contest/pages/rules - --- rules.page: Rules | 100 domains contest diff --git a/scripts/auto.sh b/scripts/auto.sh index 987f9be..b6ca32a 100644 --- a/scripts/auto.sh +++ b/scripts/auto.sh @@ -6,3 +6,14 @@ function build-wasm() { popd || return 1 } +function upload-frontend-debug() { + DEBUG_USE_TEJAR_FOLDER="/home/sidd/projects/work/ft/tejar-cache/" \ + FIFTHTRY_SITE_WRITE_TOKEN="fifthtry-write-token" \ + DEBUG_API_FIFTHTRY_COM="http://127.0.0.1" \ + clift upload localhost + + DEBUG_USE_TEJAR_FOLDER="/home/sidd/projects/work/ft/tejar-cache/" \ + FIFTHTRY_SITE_WRITE_TOKEN="fifthtry-write-token" \ + DEBUG_API_FIFTHTRY_COM="http://127.0.0.1" \ + clift upload localhost --file ec.wasm +}