fixed indexold2.html -> index.js to work with new php format
This commit is contained in:
parent
09e751fb1e
commit
73d062639f
|
@ -50,15 +50,15 @@ fetch('assets/fetch-content-list.php?type=partial',{
|
||||||
})
|
})
|
||||||
.then(response=>response.json())
|
.then(response=>response.json())
|
||||||
.then(res=>{
|
.then(res=>{
|
||||||
let folder='assets/'
|
let folder='assets/made_content/partial/'
|
||||||
input_str=''
|
input_str=''
|
||||||
for(i in res){
|
for(i in res){
|
||||||
if(res[i].match(/.png|.PNG|.jpg|.JPG|.jpeg|.JPEG|.gif|.GIF/g)){
|
if(res[i][1].match(/.png|.PNG|.jpg|.JPG|.jpeg|.JPEG|.gif|.GIF/g)){
|
||||||
input_str+='<div class="image_box_img_wrap"><div><img src="'+folder+res[i]+'" /></div></div>'
|
input_str+=`<div class="image_box_img_wrap"><div><img src="${folder}${res[i][1]}" /></div></div>`
|
||||||
} else if(res[i].match(/.mp4|.MP4/g)){
|
} else if(res[i][1].match(/.mp4|.MP4/g)){
|
||||||
input_str+='<div class="image_box_img_wrap">'+
|
input_str+='<div class="image_box_img_wrap">'+
|
||||||
'<video class="videos" width="100%" height="100%'+
|
'<video class="videos" width="100%" height="100%'+
|
||||||
'" controls><source src=\''+folder+res[i]+
|
'" controls><source src=\''+folder+res[i][1]+
|
||||||
'\' type="video/mp4"></video></div>';
|
'\' type="video/mp4"></video></div>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue