branch: elpa/dslide commit 3547b1a1a73b42256261cadb4c991649d97e9e38 Author: Psionik K <73710933+psioni...@users.noreply.github.com> Commit: Psionik K <73710933+psioni...@users.noreply.github.com>
rearranged demo Signed-off-by: Psionik K <73710933+psioni...@users.noreply.github.com> --- test/demo.org | 121 +++++++++++++++++++++++++++++----------------------------- 1 file changed, 61 insertions(+), 60 deletions(-) diff --git a/test/demo.org b/test/demo.org index 3166d11bcb..1e482c2faf 100644 --- a/test/demo.org +++ b/test/demo.org @@ -27,15 +27,6 @@ Isn't this animation so cool? This is a reason to be alive ** Pen 🖊️ [[https://www.youtube.com/watch?v=Ct6BUPvE2sM][In case you live under a rock]] -* Reveal Items -:PROPERTIES: -:MS_SECTION_ACTIONS: ms-action-item-reveal -:END: -Positron is deeply committed to bringing you the finest in: -- Pen 🖊️ -- Pineapple 🍍 -- Apple 🍎 -- Pen 🖊️ * Flat Slide :PROPERTIES: :MS_SLIDE_ACTION: ms-action-narrow :with-children t @@ -50,53 +41,27 @@ This slide shows its child headings inline. ** Red Team - Uses some metasploit and calls it a day - Failure is an option -* Hidden Babel Slide -This slide has a child, but it will not be displayed. It will only run the babel block within, which finds and updates the text below: - -Can has display? -** No Display! Only Execute! +* Reveal Items :PROPERTIES: -:MS_SLIDE_ACTION: nil -:MS_SECTION_ACTIONS: ms-action-babel +:MS_SECTION_ACTIONS: ms-action-item-reveal :END: -These three org blocks will not be displayed since this slide has no slide action. They will however execute when navigating forward and backward. Note these features: - -- Blocks can have methods -- Multiple blocks can have the init, end, and final method. They are always executed top to bottom. This allows better code re-use. - -#+attr_methods: end init -#+begin_src elisp :results none - ;; No need to deal with restriction or restore point. - (org-up-heading-safe) - (if (re-search-forward "\?" nil t) - (setq-local ms-can-has-overlay - (make-overlay (match-end 0) (match-end 0))) - (message "Ouchie, the document changed!")) -#+end_src - -Some extra init can also be returned to with step backwards -#+attr_methods: init step-backward -#+begin_src elisp :results none - (overlay-put ms-can-has-overlay 'after-string - (propertize " No display! Only execute!" - 'face 'error)) -#+end_src - -When going backwards, we begin at the end, which can also be stepped forwards to -#+attr_methods: step-forward end -#+begin_src elisp :results none - (overlay-put ms-can-has-overlay 'after-string - (propertize " No display! Only execute!" - 'face 'success)) -#+end_src +Positron is deeply committed to bringing you the finest in: +- Pen 🖊️ +- Pineapple 🍍 +- Apple 🍎 +- Pen 🖊️ +* Image Slides +:PROPERTIES: +:MS_SLIDE_ACTION: ms-action-narrow +:MS_SECTION_ACTIONS: ms-action-image ms-action-babel +:MS_CHILD_ACTION: ms-child-action-slide +:END: +This is an image slide. You can view the images inline using ~org-toggle-inline-images~. Each image will be opened in a full-screen buffer, which is configured to act as a slide, so it still responds to the keybindings. -Our cleanup is always run -#+attr_methods: final -#+begin_src elisp :results none - (when (bound-and-true-p ms-can-has-overlay) - (delete-overlay ms-can-has-overlay) - (makunbound 'ms-can-has-overlay)) -#+end_src +#+ATTR_HTML: :width 45% + [[./images/emacsen4.jpeg]] [[./images/self-care5.jpeg]] +#+ATTR_HTML: :width 45% + [[./images/before-google3.jpeg]] [[./images/all-software-is-the-same-with-tang.jpeg]] * Babel Slide Integration :PROPERTIES: :MS_SECTION_ACTIONS: ms-action-babel @@ -139,17 +104,53 @@ Both backwards and forward are supported on this slide. (mapc #'delete-overlay overlays) (makunbound 'overlays) #+end_src +* Hidden Babel Slide +This slide has a child, but it will not be displayed. It will only run the babel block within, which finds and updates the text below: -* Image Slides +Can has display? +** No Display! Only Execute! :PROPERTIES: -:MS_SECTION_ACTIONS: ms-action-image +:MS_SLIDE_ACTION: nil +:MS_SECTION_ACTIONS: ms-action-babel :END: -This is an image slide. You can view the images inline using ~org-toggle-inline-images~. Each image will be opened in a full-screen buffer, which is configured to act as a slide, so it still responds to the keybindings. +These three org blocks will not be displayed since this slide has no slide action. They will however execute when navigating forward and backward. Note these features: -#+ATTR_HTML: :width 45% - [[./images/emacsen4.jpeg]] [[./images/self-care5.jpeg]] -#+ATTR_HTML: :width 45% - [[./images/before-google3.jpeg]] [[./images/all-software-is-the-same-with-tang.jpeg]] +- Blocks can have methods +- Multiple blocks can have the init, end, and final method. They are always executed top to bottom. This allows better code re-use. + +#+attr_methods: end init +#+begin_src elisp :results none + ;; No need to deal with restriction or restore point. + (org-up-heading-safe) + (if (re-search-forward "\?" nil t) + (setq-local ms-can-has-overlay + (make-overlay (match-end 0) (match-end 0))) + (message "Ouchie, the document changed!")) +#+end_src + +Some extra init can also be returned to with step backwards +#+attr_methods: init step-backward +#+begin_src elisp :results none + (overlay-put ms-can-has-overlay 'after-string + (propertize " No display! Only execute!" + 'face 'error)) +#+end_src + +When going backwards, we begin at the end, which can also be stepped forwards to +#+attr_methods: step-forward end +#+begin_src elisp :results none + (overlay-put ms-can-has-overlay 'after-string + (propertize " No display! Only execute!" + 'face 'success)) +#+end_src + +Our cleanup is always run +#+attr_methods: final +#+begin_src elisp :results none + (when (bound-and-true-p ms-can-has-overlay) + (delete-overlay ms-can-has-overlay) + (makunbound 'ms-can-has-overlay)) +#+end_src * Package Integration :PROPERTIES: :MS_SECTION_ACTIONS: ms-action-babel