-
-
Notifications
You must be signed in to change notification settings - Fork 178
split template: add top/bottom orientation #372
Comments
Heya! I'd be happy to take on this issue. Just found about DeckDeckGo today and I must say it looks great! The docs are superb too. 🕺 |
Awesome @timrodz and happy to here the docs is cool 👍 It would be super neat if you could give a hand. You could find the source of the "split slide/template" in https://github.com/deckgo/deckdeckgo/tree/master/webcomponents/slides/split
Not the most really beautiful test page though ;) Ping me if you have any questions or let me know how I could help. |
Thank you, @peterpeterparker! I'll have a go at it 😄 |
Hi @peterpeterparker, I've had a look at the codebase and had a few questions / thoughts I'd like to verify - I haven't used Stencil before, so I'm quite unfamiliar with the codebase or the way Stencil works.
|
|
Thanks for your answers!
Let me rephrase my question: What's the relationship between If I take the boolean It is also referenced as a
Coming from React, I can see accessing variables inside Render() like so: Based on Stencil's docs, I can infer that I can simply use JSX to change the class names and then I'll go along and toy around with |
Exactly you could define a new
Exactly, you read my mind 👍 P.S.: Note in Stencil JSX class is class, not className as in React |
Awesome, thank you! I'll have a jam during the weekend - It's almost there! 🕺 |
Awesome! Ping me anytime if you've got questions or need help. |
Getting there! Just need to add diff properties to the .scss file My approach has been to make it so that we touch as little code as possible: @Prop() isVertical: boolean = false;
render() {
const verticalAttr = this.isVertical ? '-vertical' : '';
return <Host class={{'deckgo-slide-container': true}}>
<div class={`deckgo-slide${verticalAttr}`}>
<slot name="title"></slot>
<div class="deckgo-slide-split deckgo-slide-split-start"><slot name="start"></slot></div>
<div class="deckgo-slide-split deckgo-slide-split-end"><slot name="end"></slot></div>
<slot name="notes"></slot>
<slot name="actions"></slot>
<slot name="background"></slot>
</div>
</Host>;
} Looks like I'll probably have to add |
Current implementation: It's able to split 50/50 vertically - But I need to take the paddings in the formula, so might have to re-calculate div.deckgo-slide-vertical {
@extend div, .deckgo-slide;
flex-flow: column wrap;
}
div.deckgo-slide-split-vertical {
@extend div, .deckgo-slide-split;
// TODO
} |
It looks good 👍 thx! Furthermore you teach me something, I never used about size, yes the size is given by the class
Super cool, go for the PR 🚀 |
Thx you for the neat PR @timrodz 🙏 |
… editor, therefore already reflect the attribute
… editor, therefore already reflect the attribute
|
Description
The "split" template (https://docs.deckdeckgo.com/slides/split), display currently the content in two columns "left/right".
The idea would be to add a new options in order to be able to display the content in two rows "top/bottom"
This enhancement should find place in the related slide web component.
Once implemented, the option could be added our editor ("studio").
Questions
About the implementation in the editor, for simplicity reason, should we add the "bottom/top" as an option of the split template (new button for option which link to a right popover with the option) or should we "just" add two different templates style in the list of selectable template ("when user add a new slide")
Should we go one step further and add more options to the templates for example to be able to display "left/right" on desktop/projector and for the same content "top/bottom" on mobile/tablet. Maybe, to ease the development, if this is cool, we could do that later in another issue?
The text was updated successfully, but these errors were encountered: