$(document).ready(async function() { const apiBaseUrl = window.location.origin; let currentFilePage = 1; let totalFilePages = 1; let searchKeyword; const filePageSize = 10; const dataList = await pageQueryTemplates(); renderTemplates(dataList); function renderTemplates(list) { const container = $('#file-list'); container.empty(); list.forEach(file => { const fileItem = $(`