{$post->getText()|noescape}
@@ -84,8 +84,8 @@
{/if}
{var $attachmentsLayout = $post->getChildrenWithLayout($width)}
-
-
- {include "../attachment.xml", attachment => $attachment[2], parent => $post, parentType => "post"}
+
diff --git a/Web/Presenters/templates/components/post/oldpost.xml b/Web/Presenters/templates/components/post/oldpost.xml
index 48063747..ff4ec03d 100644
--- a/Web/Presenters/templates/components/post/oldpost.xml
+++ b/Web/Presenters/templates/components/post/oldpost.xml
@@ -67,7 +67,7 @@
+ {include "../attachment.xml", attachment => $attachment[2], parent => $post, parentType => "post", tilesCount => sizeof($attachmentsLayout->tiles)}
+
{var $owner = $author->getId()}
@@ -79,8 +79,8 @@
{/if}
{var $attachmentsLayout = $post->getChildrenWithLayout($width)}
-
- {include "../attachment.xml", attachment => $attachment[2], parent => $post, parentType => "post"}
+
diff --git a/Web/Util/Makima/Makima.php b/Web/Util/Makima/Makima.php
index c9446826..3fc7b014 100644
--- a/Web/Util/Makima/Makima.php
+++ b/Web/Util/Makima/Makima.php
@@ -18,7 +18,7 @@ class Makima
$this->photos = $photos;
}
- private function getOrientation(Photo $photo, &$ratio): int
+ private function getOrientation($photo, &$ratio): int
{
[$width, $height] = $photo->getDimensions();
$ratio = $width / $height;
diff --git a/Web/static/css/main.css b/Web/static/css/main.css
index 4e0ec10b..3725ee70 100644
--- a/Web/static/css/main.css
+++ b/Web/static/css/main.css
@@ -2441,7 +2441,7 @@ a.poll-retract-vote {
position: relative;
}
-.post-horizontal .upload-item .play-button {
+.post-horizontal .upload-item .play-button, .compact_video .play-button {
position: absolute;
height: 30px;
width: 30px;
@@ -2452,7 +2452,7 @@ a.poll-retract-vote {
align-items: center;
}
-.post-horizontal .upload-item .play-button .play-button-ico {
+.post-horizontal .upload-item .play-button .play-button-ico, .compact_video .play-button .play-button-ico {
background: url(/assets/packages/static/openvk/img/wall.png) no-repeat 1px 0;
display: inline-block;
height: 15px;
@@ -2648,12 +2648,13 @@ a.poll-retract-vote {
padding: 3px 0;
}
-.video-wowzer a::before {
- content: "b";
- color: transparent;
- width: 12px;
- background-image: url(/assets/packages/static/openvk/img/videoico.png);
- display: none;
+.video-wowzer .small-video-ico {
+ vertical-align: bottom;
+ display: inline-block;
+ width: 11px;
+ height: 14px;
+ background: url(/assets/packages/static/openvk/img/wall.png?v=2);
+ background-position: -87px 0px;
}
/* Da search */
@@ -3511,3 +3512,26 @@ hr {
width: 30px;
height: 7px;
}
+
+.compact_video {
+ display: flex;
+ flex-direction: row;
+ justify-content: center;
+ align-items: center;
+ height: 100%;
+ width: 100%;
+
+ position: relative;
+}
+
+.compact_video .video-length {
+ text-align: center;
+ position: absolute;
+ width: 34px;
+ height: 14px;
+ bottom: 5px;
+ right: 5px;
+ background: rgba(0,0,0,0.5);
+ color: white;
+}
+
diff --git a/Web/static/css/nsfw-posts.css b/Web/static/css/nsfw-posts.css
index ed9841ca..1d946252 100644
--- a/Web/static/css/nsfw-posts.css
+++ b/Web/static/css/nsfw-posts.css
@@ -1,28 +1,28 @@
-.post-nsfw .post-content .media {
- filter: saturate(0.8) blur(15px);
-}
-
-.post-nsfw .post-content .attachment {
- overflow: hidden;
+.post-nsfw .post-content {
position: relative;
+ overflow: hidden;
+ cursor: pointer;
}
-.post-nsfw .post-content .attachment:active .media {
- filter: none;
+.post-nsfw .post-content .text {
+ filter: saturate(0.8) blur(28px);
+ pointer-events: none;
}
-.post-nsfw .post-content .attachment::after {
+.post-nsfw .post-content::after {
position: absolute;
- top: calc(50% - 16px);
+ top: 0;
left: 0;
width: 100%;
- padding: 8px 0;
- background-color: hsla(0, 0%, 0%, .5);
+ height: 100%;
+ z-index: 1;
+ background-color: hsla(0, 0%, 0%, .7);
color: #fff;
text-align: center;
content: attr(data-localized-nsfw-text);
-}
-.post-nsfw .post-content .attachment:active::after {
- display: none;
+ display: flex;
+ flex-direction: row;
+ justify-content: center;
+ align-items: center;
}
diff --git a/Web/static/img/videoico.png b/Web/static/img/videoico.png
deleted file mode 100644
index 4ebe30f3..00000000
Binary files a/Web/static/img/videoico.png and /dev/null differ
diff --git a/Web/static/img/wall.png b/Web/static/img/wall.png
index 70cd42c0..197dca8d 100644
Binary files a/Web/static/img/wall.png and b/Web/static/img/wall.png differ
diff --git a/Web/static/js/al_wall.js b/Web/static/js/al_wall.js
index d3530caf..be2e51ef 100644
--- a/Web/static/js/al_wall.js
+++ b/Web/static/js/al_wall.js
@@ -486,6 +486,7 @@ async function __uploadToTextarea(file, textareaNode) {
})
const json_response = await res.json()
if(!json_response.success) {
+ u(`#temp_filler${rand}`).remove()
fastError((tr("error_uploading_photo") + json_response.flash.message))
return
}
@@ -1025,6 +1026,13 @@ u(document).on('click', '.post-buttons .upload-item', (e) => {
e.preventDefault()
})
+u(document).on('click', '.post.post-nsfw .post-content', (e) => {
+ e.preventDefault()
+ e.stopPropagation()
+
+ u(e.target).closest('.post-nsfw').removeClass('post-nsfw')
+})
+
async function repost(id, repost_type = 'post') {
const repostsCount = u(`#repostsCount${id}`)
const previousVal = repostsCount.length > 0 ? Number(repostsCount.html()) : 0;
diff --git a/install/sqls/000XX-new-video-fields.sql b/install/sqls/000XX-new-video-fields.sql
new file mode 100644
index 00000000..8f7c2ea0
--- /dev/null
+++ b/install/sqls/000XX-new-video-fields.sql
@@ -0,0 +1,2 @@
+ALTER TABLE `videos` ADD `length` SMALLINT(5) UNSIGNED NULL DEFAULT NULL AFTER `name`, ADD INDEX `length` (`length`);
+ALTER TABLE `videos` ADD `height` SMALLINT(5) UNSIGNED NULL DEFAULT NULL AFTER `length`, ADD `width` SMALLINT(5) UNSIGNED NULL DEFAULT NULL AFTER `height`;
+ {include "../attachment.xml", attachment => $attachment[2], parent => $post, parentType => "post", tilesCount => sizeof($attachmentsLayout->tiles)}