Skip to content

Commit

Permalink
Adding slides
Browse files Browse the repository at this point in the history
  • Loading branch information
Arpita-Jaiswal committed Nov 27, 2023
1 parent 91479c3 commit b7a5e2c
Show file tree
Hide file tree
Showing 7 changed files with 59 additions and 14 deletions.
1 change: 1 addition & 0 deletions slides/index.ftd
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@

- [Login](slides/login/)


-- end: ds.page
11 changes: 11 additions & 0 deletions slides/ui/assets/convert-dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions slides/ui/assets/convert.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions slides/ui/assets/go-back-dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions slides/ui/assets/go-back.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions slides/ui/functions.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,3 +121,8 @@ async function create_presentation_from_template(template) {

location.href = `/p/${presentation_id}/1`;
}

function goBack() {
window.history.back();
}

36 changes: 22 additions & 14 deletions slides/ui/utils.ftd
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
-- import: fastn-community.github.io/dark-flame-cs as cs

-- integer $current-slide-number: 1
-- boolean unimplemented: true

;; TODO: Issue with name preview-url which gets stored as "preview_url"
-- record slide:
Expand Down Expand Up @@ -570,14 +571,12 @@ button-icon: $assets.files.slides.ui.assets.play.svg
button-link: $present-link(id = $project-slide.id, order = $project-slide.order)

-- button: Download
if: { !unimplemented }
button-link: /
button-icon: $assets.files.slides.ui.assets.download.svg

-- button: Convert into Template
button-icon: $assets.files.slides.ui.assets.pipeline.svg
$on-click$: $convert-template-http(url = convert-template/, method = post, id = $project-slide.id)

-- button: Add to pipeline
if: { !unimplemented }
button-link: /
button-icon: $assets.files.slides.ui.assets.pipeline.svg

Expand Down Expand Up @@ -630,6 +629,7 @@ spacing.fixed.px: 8
padding-right.px: 24

-- ftd.image:
if: { !unimplemented }
src: $assets.files.slides.ui.assets.square.svg
width.fixed.px: 38
height.fixed.px: 38
Expand All @@ -644,6 +644,7 @@ height.fixed.px: 38
padding.px: 7
background.solid: $inherited.colors.background.step-1
border-radius.px: 8
link: $settings-link(id = $project-slide.id)

-- end: ftd.column

Expand Down Expand Up @@ -1029,6 +1030,8 @@ optional caption title:
optional string button-link:
optional ftd.image-src button-icon:
boolean $hover: false
optional ftd.resizing icon-width:
optional ftd.resizing icon-height:

-- ftd.row:
background.solid: $inherited.colors.background.step-1
Expand All @@ -1040,19 +1043,22 @@ background.solid if { button.hover }: $inherited.colors.background.step-2
$on-mouse-enter$: $ftd.set-bool($a = $button.hover, v = true)
$on-mouse-leave$: $ftd.set-bool($a = $button.hover, v = false)
spacing.fixed.px: 8
width.fixed.px: 154
width: hug-content
min-width: auto

-- ftd.image: $button.button-icon
if: { button.button-icon != NULL }
width.fixed.px: 16
width if { button.icon-width != NULL }: $button.icon-width
height.fixed.px: 16
height if { button.icon-height != NULL }: $button.icon-height

-- ftd.text: $button.title
if: { button.title != NULL }
role: $inherited.types.button-small
color: $inherited.colors.text-strong
link: $button.button-link
white-space: nowrap

-- end: ftd.row

Expand Down Expand Up @@ -1129,14 +1135,6 @@ js: $assets.files.slides.ui.functions.js

http(url, method, null, ("id", id), ("order", order))

-- void convert-template-http(url,method,id):
integer id:
string url:
string method:
js: $assets.files.slides.ui.functions.js

http(url, method, null, ("id", id))




Expand All @@ -1146,13 +1144,23 @@ integer order:

"pre/" + id + "/" + order + "/"

-- string settings-link(id):
integer id:

"s/" + id + "/"

-- string construct-slide-url(id,order):
integer id:
integer order:

"p/" + id + "/" + order
"p/" + id + "/" + order + "/"

-- integer increment-by-one(a):
integer a:

a + 1

-- void go-back():
js: $assets.files.slides.ui.functions.js

goBack()

0 comments on commit b7a5e2c

Please sign in to comment.