From 15d3c2f78e3685a990db35794dbda0a9c81ad9ac Mon Sep 17 00:00:00 2001 From: Christian Wiwie Date: Tue, 17 Mar 2020 22:27:48 +0100 Subject: [PATCH] #8374: Not triggering post height limit when showing individual post under /display --- showmore_dyn/showmore_dyn.css | 25 +++++++++++++++++++++++++ showmore_dyn/showmore_dyn.js | 7 ++++++- 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/showmore_dyn/showmore_dyn.css b/showmore_dyn/showmore_dyn.css index f8c052a8..3e41fd3d 100644 --- a/showmore_dyn/showmore_dyn.css +++ b/showmore_dyn/showmore_dyn.css @@ -1,11 +1,24 @@ .wall-item-body-toggle { + width: 100%; text-align: center; background-image: linear-gradient(rgba(0, 0, 0, 0), #f6f6f6); cursor: pointer; height: 50px; + position: absolute; + top: auto; + bottom: 0; + z-index: 11; + left: 0; display: none; } + .wall-item-body-toggle-text { + width: 100%; + position: absolute; + top: auto; + bottom: 0; + z-index: 12; + left: 0; text-shadow: 0 0 5px #f6f6f6; font-weight: bold; background: none !important; @@ -13,6 +26,18 @@ padding: 0 !important; cursor: pointer; } + .wall-item-body-toggle-text:hover { text-decoration: underline; } + +.wall-item-body { + position: relative; + width: 100%; +} + +.wall-item-body-wrapper { + position: relative; + width: 100%; + display: inline-block; +} diff --git a/showmore_dyn/showmore_dyn.js b/showmore_dyn/showmore_dyn.js index 956ba2c1..4b32b2d3 100644 --- a/showmore_dyn/showmore_dyn.js +++ b/showmore_dyn/showmore_dyn.js @@ -1,9 +1,14 @@ var nextBodyIdx = 0; $(document).ready(function() { + loc = window.location.pathname; + if (loc.startsWith('/display')) { + return; + } + $("head").append(''); var newStyleElement = $("head").children(':last'); - newStyleElement.html('.limit-height{max-height: ' + postLimitHeight + 'px; overflow: hidden; display:inline-block;}'); + newStyleElement.html('.limit-height{max-height: ' + postLimitHeight + 'px; overflow: hidden; }'); handleNewWallItemBodies();