Supervisor update 2
This commit is contained in:
BIN
supervisor/html/.index.html.swp
Normal file
BIN
supervisor/html/.index.html.swp
Normal file
Binary file not shown.
@ -257,8 +257,8 @@
|
||||
tr.innerHTML = `
|
||||
<td class="px-6 py-4">${checkin.path_order}</td>
|
||||
<td class="px-6 py-4">
|
||||
${location.photos ?
|
||||
`<img src="${checkin.photos}" class="h-20 w-20 object-cover rounded">` : ''}
|
||||
${checkin.photos ?
|
||||
`<img src="/media/compressed/${checkin.photos}" class="h-20 w-20 object-cover rounded" onclick="showLargeImage(this.src)">` : ''}
|
||||
<div class="text-sm">${checkin.photos}</div>
|
||||
</td>
|
||||
<td class="px-6 py-4">
|
||||
@ -424,7 +424,21 @@
|
||||
calculateTotalPoints();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// 画像拡大表示用のモーダル関数
|
||||
function showLargeImage(src) {
|
||||
const modal = document.createElement('div');
|
||||
modal.classList.add('fixed', 'inset-0', 'bg-black', 'bg-opacity-75', 'flex', 'items-center', 'justify-center', 'z-50');
|
||||
|
||||
const img = document.createElement('img');
|
||||
img.src = src;
|
||||
img.classList.add('max-w-3xl', 'max-h-[90vh]', 'object-contain');
|
||||
|
||||
modal.appendChild(img);
|
||||
modal.onclick = () => modal.remove();
|
||||
document.body.appendChild(modal);
|
||||
}
|
||||
|
||||
// 新規CP追加用のモーダル
|
||||
function showAddCPModal() {
|
||||
const modal = document.createElement('div');
|
||||
|
||||
@ -46,6 +46,12 @@ server {
|
||||
index index.html;
|
||||
}
|
||||
|
||||
location = /media/ {
|
||||
alias /app/media/; # MEDIA_ROOT のパス
|
||||
expires 30d; # キャッシュの設定
|
||||
add_header Cache-Control "public, no-transform";
|
||||
}
|
||||
|
||||
error_page 404 /404.html;
|
||||
error_page 500 502 503 504 /50x.html;
|
||||
location = /50x.html {
|
||||
|
||||
Reference in New Issue
Block a user