include ./report.pug include ./banmessage.pug mixin post(post, truncate, manage=false, globalmanage=false, ban=false, overboard=false) .anchor(id=post.postId) div(class=`post-container ${post.thread || ban === true ? '' : 'op'}` data-board=post.board data-post-id=post.postId data-user-id=post.userId data-name=post.name data-tripcode=post.tripcode data-subject=post.subject data-email=post.email) - const postURL = `/${post.board}/${(modview || manage || globalmanage) ? 'manage/' : ''}thread/${post.thread || post.postId}.html`; .post-info span label if !overboard if globalmanage input.post-check(type='checkbox', name='globalcheckedposts' value=post._id) else if !ban input.post-check(type='checkbox', name='checkedposts' value=post.postId) | if manage - const ip = viewRawIp === true ? post.ip.raw : post.ip.cloak; a.bold(href=`${upLevel ? '../' : ''}recent.html?ip=${encodeURIComponent(ip)}`) [#{ip}] else if modview a.bold(href=`${upLevel ? '../' : ''}recent.html?postid=${post.postId}`) [+] else if globalmanage a.bold(class='post-board', href=`/${post.board}/manage/index.html`) /#{post.board}/ | - const ip = viewRawIp === true ? post.ip.raw : post.ip.cloak; a.bold(href=`?ip=${encodeURIComponent(ip)}`) [#{ip}] | if !post.thread include ../includes/posticons.pug if post.subject span.post-subject #{post.subject} | if post.email a.post-name(href=`mailto:${post.email}`) #{post.name} else span.post-name #{post.name} | if post.country && post.country.code include ../includes/postflag.pug if post.tripcode span.post-tripcode #{post.tripcode} | if post.capcode span.post-capcode #{post.capcode} | - const postDate = new Date(post.date); time.post-date.reltime(datetime=postDate.toISOString()) #{postDate.toLocaleString(pageLanguage, { hourCycle:'h23' })} | if post.userId span.user-id(style=`background-color: #${post.userId}`) #{post.userId} | span.post-links a.noselect.no-decoration(href=`${postURL}#${post.postId}`) #{__('No.')} span.post-quoters a.no-decoration(href=`${postURL}#postform`) #{post.postId} | if !post.thread && (truncate || manage || globalmanage) | span.noselect: a(href=`${postURL}`) [#{__('Open')}] select.jsonly.postmenu option(value='single') #{__('Hide')} if post.userId option(value='fid') #{__('Filter ID')} if post.name option(value='fname') #{__('Filter Name')} if post.subject option(value='fsub') #{__('Filter Subject')} if post.tripcode option(value='ftrip') #{__('Filter Tripcode')} if !overboard && !ban option(value='moderate') #{__('Moderate')} if !ban && (modview || manage || globalmanage) option(value='edit') #{__('Edit')} if !post.thread option(value='watch') #{__('Watch')} option(value='playlist') #{__('Playlist')} .post-data if post.files.length > 0 .post-files(class=(post.files.length > 1 ? 'fn' : '')) each file, fileindex in post.files if file.mimetype === 'tegaki/replay' && post.files.some(f => f.originalFilename.slice(0, -3) === file.originalFilename.slice(0,-4)) - continue; //Skip showing tegaki replay alone if is includes the image .post-file - const type = file.mimetype.split('/')[0] span.post-file-info span a.filename(href='/file/'+file.filename title='Download '+file.originalFilename download=file.originalFilename) #{post.spoiler || file.spoiler ? __('Spoiler File') : file.originalFilename} br if globalmanage && file.phash != null span #{file.phash} br if !file.attachment && !(post.spoiler || file.spoiler) span.jsonly b [ a.dummy-link.hide-image.noselect(data-src=`/file/${file.hasThumb ? 'thumb/'+file.hash+file.thumbextension : file.filename}`) #{__('Hide')} b ] span | (#{file.sizeString} if file.geometryString | , #{file.geometryString} if file.durationString | , #{file.durationString} | ) if type === 'image' if (board && board.settings.reverseImageSearchLinks === true) || (overboard && overboardReverseLinks === true) || manage || globalmanage | span: a(href=`${reverseImageLinksURL.replace('%s', encodeURIComponent(meta.url+'/file/'+file.filename))}` rel='nofollow' referrerpolicy='same-origin' title=__('Reverse Image Search') target='_blank') #{__('Reverse')} if file.originalFilename.endsWith('-tegaki.png') - const matchingReplayFile = post.files.find(f => f.originalFilename.slice(0, -4) === file.originalFilename.slice(0,-3)); if matchingReplayFile !== undefined | span: a.dummy-link.replay-tegaki.noselect(href=`/file/${matchingReplayFile.filename}` download=matchingReplayFile.originalFilename) #{__('Replay')} if file.mimetype === 'tegaki/replay' | span.jsonly: a.dummy-link.replay-tegaki.noselect(href=`/file/${file.filename}` download=file.originalFilename) #{__('Replay')} .post-file-src(data-type=type data-attachment=(file.attachment ? "true" : "false")) a(target='_blank' href=`/file/${file.filename}`) if post.spoiler || file.spoiler div.spoilerimg.file-thumb else if file.hasThumb img.file-thumb(src=`/file/thumb/${file.hash}${file.thumbextension}` height=file.geometry.thumbheight width=file.geometry.thumbwidth loading='lazy') else if file.attachment div.attachmentimg.file-thumb(data-mimetype=file.mimetype) else if type === 'audio' div.audioimg.file-thumb else img.file-thumb(src=`/file/${file.filename}` height=file.geometry.height width=file.geometry.width loading='lazy') - if (post.message && modview) { post.message = post.message.replace(new RegExp(`