diff options
Diffstat (limited to 'client/src/app/shared/shared-custom-markup/custom-markup.service.ts')
-rw-r--r-- | client/src/app/shared/shared-custom-markup/custom-markup.service.ts | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/client/src/app/shared/shared-custom-markup/custom-markup.service.ts b/client/src/app/shared/shared-custom-markup/custom-markup.service.ts index db5f64ee8..aa5dbe643 100644 --- a/client/src/app/shared/shared-custom-markup/custom-markup.service.ts +++ b/client/src/app/shared/shared-custom-markup/custom-markup.service.ts | |||
@@ -122,7 +122,13 @@ export class CustomMarkupService { | |||
122 | const data = el.dataset as ChannelMiniatureMarkupData | 122 | const data = el.dataset as ChannelMiniatureMarkupData |
123 | const component = this.dynamicElementService.createElement(ChannelMiniatureMarkupComponent) | 123 | const component = this.dynamicElementService.createElement(ChannelMiniatureMarkupComponent) |
124 | 124 | ||
125 | this.dynamicElementService.setModel(component, { name: data.name }) | 125 | const model = { |
126 | name: data.name, | ||
127 | displayLatestVideo: this.buildBoolean(data.displayLatestVideo) ?? true, | ||
128 | displayDescription: this.buildBoolean(data.displayDescription) ?? true | ||
129 | } | ||
130 | |||
131 | this.dynamicElementService.setModel(component, model) | ||
126 | 132 | ||
127 | return component | 133 | return component |
128 | } | 134 | } |
@@ -178,7 +184,12 @@ export class CustomMarkupService { | |||
178 | const data = el.dataset as ContainerMarkupData | 184 | const data = el.dataset as ContainerMarkupData |
179 | 185 | ||
180 | const root = document.createElement('div') | 186 | const root = document.createElement('div') |
181 | root.classList.add('peertube-container') | 187 | |
188 | const layoutClass = data.layout | ||
189 | ? 'layout-' + data.layout | ||
190 | : 'layout-row' | ||
191 | |||
192 | root.classList.add('peertube-container', layoutClass) | ||
182 | 193 | ||
183 | if (data.width) { | 194 | if (data.width) { |
184 | root.setAttribute('width', data.width) | 195 | root.setAttribute('width', data.width) |