f0ckv2/views/item.html

112 lines
5.3 KiB
HTML
Raw Normal View History

2021-12-26 22:11:16 +00:00
@include(snippets/header)
2023-11-29 03:46:21 +00:00
<canvas class="hidden-xs" id="bg"></canvas>
2023-05-03 02:53:22 +00:00
<div class="wrapper">
<div id="main">
<div class="container">
<div class="_204863">
<div class="imageDoor" style="--hover-image: url('/t/{{ item.id }}.webp');">
<img src="/t/{{ item.id }}.webp" alt="" />
</div>
<div class="gapLeft">
<span class="populateME"><b>f0ck</b> - {{ item.id }}</span>
2021-12-04 11:19:47 +00:00
</div>
2023-05-03 02:53:22 +00:00
@if(session)
<div class="gapRight">
2023-11-29 03:46:21 +00:00
<button id="togglebg">&#128161;</button>
2023-05-03 02:53:22 +00:00
<svg class="iconset" id="a_favo"><use href="/s/img/iconset.svg#heart_{{ Object.values(item.favorites).filter(u => u.user == session.user)[0] ? 'solid' : 'regular' }}"></use></svg>
2023-05-06 04:54:09 +00:00
<svg class="iconset" id="a_tfull"><use href="/s/img/iconset.svg#window-{{ fullscreen == 1 ? 'minimize' : 'maximize' }}"></use></svg>
2023-05-03 02:53:22 +00:00
<svg class="iconset" id="a_delete"><use href="/s/img/iconset.svg#cross"></use></svg>
2021-12-04 11:19:47 +00:00
</div>
2023-11-29 03:46:21 +00:00
@else
<div class="gapRight">
<button id="togglebg">&#128161;</button>
</div>
2021-12-04 11:19:47 +00:00
@endif
</div>
2023-05-03 02:53:22 +00:00
<div class="content">
<div class="next-post">
@if(pagination.prev)
<div class="arrow-next">
<a id="next" href="{{ link.main }}{{ pagination.prev }}"></a>
</div>
@else
<div class="arrow-next">
<a id="next" href="#" style="color: #ccc !important;"></a>
</div>
@endif
2021-12-04 11:19:47 +00:00
</div>
2023-05-03 02:53:22 +00:00
<div class="media-object">
@if(item.mime.startsWith("video"))
<div class="embed-responsive embed-responsive-16by9">
<video id="my-video" class="embed-responsive-item" width="640" height="360" src="{{ item.dest }}" preload="auto" autoplay controls loop playsinline></video>
</div>
@elseif(item.mime.startsWith("audio"))
<div class="embed-responsive embed-responsive-16by9" style="background: url('@if(item.coverart)//f0ck.me{{ item.coverart }}@else/s/img/200.gif@endif') no-repeat center / contain black;">
<audio id="my-video" class="embed-responsive-item" autoplay controls loop src="{{ item.dest }}" data-setup="{}" poster="@if(item.coverart){{ item.coverart }}@else/s/img/200.gif@endif" type="{{ item.mime }}"></audio>
</div>
@elseif(item.mime.startsWith("image"))
<div class="embed-responsive embed-responsive-16by9">
<div class="embed-responsive-image" id="image-scroll">
<a href="{{ item.dest }}" id="elfe" target="_blank"><img id="f0ck-image" class="img-fluid" src="{{ item.dest }}" loading="lazy" decoding="async"/></a>
</div>
</div>
@else
<h1>404 - Not f0cked</h1>
@endif
2021-12-04 11:19:47 +00:00
</div>
2023-05-03 02:53:22 +00:00
<div class="previous-post">
@if(pagination.next)
<div class="arrow-prev">
<a id="prev" href="{{ link.main }}{{ pagination.next }}"></a>
</div>
@else
<div class="arrow-prev">
<a id="prev" href="#" style="color: #ccc !important;"></a>
2021-12-04 11:19:47 +00:00
</div>
2023-05-03 02:53:22 +00:00
@endif
2021-12-04 11:19:47 +00:00
</div>
</div>
2023-05-03 02:53:22 +00:00
<div class="metadata">
<span class="badge badge-dark">
<a href="/{{ item.id }}" class="id-link">{{ item.id }}</a>
@if(session)
(<a id="a_username" href="/user/{{ user.name.toLowerCase() }}/f0cks@if(tmp.mime)/{{ tmp.mime }}@endif">{{ user.name }}</a>)
@endif
</span>
<span class="badge badge-dark">{{ user.network }} / {{ user.channel }}</span>
<span class="badge badge-dark image-source">
@if(item.src.long.length)
<a href="{{ item.src.long }}" target="_blank">{{ item.src.short }}</a>
@else
hidden
@endif
</span>
<span class="badge badge-dark"><a class="dest-link" href="{{ item.dest }}" target="_blank">{{ item.mime }}</a> / {{ item.size }}</span>
<span class="badge badge-dark"><time class="timeago" tooltip="{{ item.timestamp.timefull }}">{{ item.timestamp.timeago }}</time></span>
<span class="badge badge-dark">{{ phrase }}</span>
<span class="badge badge-dark" id="tags">
@if(typeof item.tags !== "undefined")
@each(item.tags as tag)
<span @if(session)tooltip="{{ tag.user }}"@endif class="badge {{ tag.badge }} mr-2">
2023-06-09 13:31:59 +00:00
<a href="/tag/{{ tag.normalized }}">{!! tag.tag !!}</a>@if(session)&nbsp;<a class="removetag" href="#">&#215;</a>@endif
2023-05-03 02:53:22 +00:00
</span>
@endeach
2021-12-04 11:19:47 +00:00
@endif
2022-01-01 01:17:31 +00:00
@if(session)
2023-05-03 02:53:22 +00:00
<a href="#" id="a_addtag">add tag</a>&nbsp;-&nbsp;<a href="#" id="a_toggle">toggle</a>
<datalist id="testlist"></datalist>
2022-01-01 01:17:31 +00:00
@endif
2021-12-04 11:19:47 +00:00
</span>
2023-05-03 02:53:22 +00:00
<span class="badge" id="favs"@if(!item.favorites.length || !session) hidden@endif>
@if(item.favorites.length && session)
@each(item.favorites as fav)
<a href="/user/{{ fav.user.toLowerCase() }}/favs" tooltip="{{ fav.user }}" flow="up"><img src="@if(fav.avatar)/t/{{ fav.avatar }}.webp@else/s/img/default.png@endif" style="height: 32px; width: 32px" /></a>
2021-12-04 11:19:47 +00:00
@endeach
2023-05-03 02:53:22 +00:00
@endif
</span>
</div>
</div>
2021-12-04 11:19:47 +00:00
</div>
2023-05-03 02:53:22 +00:00
</div>
@include(snippets/footer)