fix: job page layout
This commit is contained in:
@@ -172,7 +172,7 @@ export function getEditorTools() {
|
||||
regex: /https:\/\/docs\.google\.com\/presentation\/d\/e\/([A-Za-z0-9_-]+)\/pub/,
|
||||
embedUrl:
|
||||
'https://docs.google.com/presentation/d/e/<%= remote_id %>/embed',
|
||||
html: "<iframe width='100%' height='300' frameborder='0' allowfullscreen='true'></iframe>",
|
||||
html: "<iframe style='width: 100%; height: 28rem;' frameborder='0' allowfullscreen='true'></iframe>",
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
@@ -13,12 +13,14 @@ export class Upload {
|
||||
}
|
||||
|
||||
render() {
|
||||
console.log('render')
|
||||
this.wrapper = document.createElement('div')
|
||||
this.renderUpload(this.data)
|
||||
return this.wrapper
|
||||
}
|
||||
|
||||
renderUpload(file) {
|
||||
console.log(file.file_type)
|
||||
if (this.isVideo(file.file_type)) {
|
||||
const app = createApp(VideoBlock, {
|
||||
file: file.file_url,
|
||||
@@ -31,14 +33,17 @@ export class Upload {
|
||||
})
|
||||
app.mount(this.wrapper)
|
||||
return
|
||||
} else if (file.file_type == 'pdf') {
|
||||
return `<iframe src="${encodeURI(
|
||||
} else if (file.file_type == 'PDF') {
|
||||
this.wrapper.innerHTML = `<iframe src="${encodeURI(
|
||||
file.file_url
|
||||
)}#toolbar=0" width='100%' height='700px' class="mb-4"></iframe>`
|
||||
return
|
||||
} else {
|
||||
return `<img class="mb-4" src=${encodeURI(
|
||||
console.log('in else')
|
||||
this.wrapper.innerHTML = `<img class="mb-4" src=${encodeURI(
|
||||
file.file_url
|
||||
)} width='100%'>`
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user