pull/11/head
Squidly271 2021-11-08 19:46:30 -05:00
parent 329332cd13
commit 40722f6b8b
6 changed files with 36 additions and 29 deletions

View File

@ -2082,7 +2082,7 @@ function showSidebarApp(apppath,appname) {
post({action:'getPopupDescription',appName:appname,appPath:apppath},function(result) {
$("#sidenavContent").html(result.description);
$('.screenshot').magnificPopup({
closeMarkup: "<button type='button' class='mfp-close narrow'>"+tr("CLOSE")+"</button>",
closeMarkup: "<span class='mfp-close narrow'>"+tr("CLOSE")+"</span>",
closeOnContentClick: true,
type:'image',
removalDelay: 300,

View File

@ -1,10 +1,10 @@
2115bd6806361d88563c7304692b9d95 ./Apps.page
5af077fe584df9ac650668f8d64b52ec ./Apps.page
83b3f89cd42e8601c7c217d5b4889c81 ./CA_notices.page
7ee0b23dbd92ed55f611360a983f9565 ./ca_settings.page
1b49ec9797713ce869ea0c1066a109f2 ./default.cfg
18ade20ccdeb4bd9429af4fd9eae48f4 ./include/exec.php
b27be72c48168f6df05a3ebb4ab0a210 ./include/helpers.php
8ba23d3d51816bbb91245cfc3fcb8024 ./include/paths.php
cc8b89a7e27b40866770c2ac513e7e3f ./include/paths.php
410c0166bae560754e231486050621f6 ./javascript/libraries.js
8c24d585c7dd3ff9ef961bb2c2705711 ./PluginAPI.page
b398273cf7daa62ab00d2de2336ca25f ./README.md
@ -20,6 +20,6 @@ b398273cf7daa62ab00d2de2336ca25f ./README.md
09b5297db02076376519d92e2ce76cc6 ./scripts/showStatistics.php
4425f8fd4ef662a7dc65cee01de3e419 ./scripts/updatePLG.sh
2bd671daecaf01549f8cc0202cb184b3 ./scripts/updatePluginSupport.php
7e117b8329e599baa925132bac72193d ./skins/Narrow/css.php
038b040dbe3283fc9a9eb4f9eb0d845b ./skins/Narrow/css.php
cfa1511913f794c8c5980460dfcdf049 ./skins/Narrow/skin.html
2cf83b67cf9453f0545370c40e25379c ./skins/Narrow/skin.php
2b90c86c2661fcd9c3db7d14185a2fb8 ./skins/Narrow/skin.php

View File

@ -66,4 +66,6 @@ $caPaths['info'] = $caPaths['tempFiles']."/info.j
$caPaths['dockerSearchResults'] = $caPaths['tempFiles']."/dockerSearch.json";
$caPaths['dockerSearchInstall'] = $caPaths['tempFiles']."/dockerConvert.xml";
$caPaths['dockerSearchActive'] = $caPaths['tempFiles']."/dockerSearchActive";
$caPaths['VideoStill'] = "https://github.com/Squidly271/community.applications/raw/master/webImages/movie-850.svg";
$caPaths['SpotlightIcon'] = "https://raw.githubusercontent.com/Squidly271/community.applications/master/webImages/Unraid.svg";
?>

View File

@ -482,7 +482,8 @@ table {background-color:transparent;}
button.mfp-close,button.mfp-arrow {overflow: visible;cursor: pointer;background: transparent;border: 0;-webkit-appearance: none;display: block;outline: none;padding: 0;z-index: 1046;box-shadow: none;touch-action: manipulation; }
button::-moz-focus-inner {padding: 0;border: 0; }
.mfp-close {cursor:pointer !important;width: fit-content !important;height: 44px;line-height: 44px;position: absolute;right: 0;top: 0;text-decoration: none;text-align: center;opacity: 0.65;padding: 0 0 18px 10px;color: #FFF;font-style: normal;font-size: 2rem;font-family: Arial, Baskerville, monospace; }
.mfp-close:hover,.mfp-close:focus {opacity: 1; }
/* .mfp-close:hover,.mfp-close:focus {opacity: 1; } */
.mfp-close:hover {color:<?=$unRaid66color?> !important;}
.mfp-close:active {top: 1px; }
.mfp-close-btn-in .mfp-close {color: #333; }
.mfp-image-holder .mfp-close,.mfp-iframe-holder .mfp-close {color: #FFF;right: -6px;text-align: center;width: 100%; }

View File

@ -847,7 +847,7 @@ function displaySearchResults($pageNumber) {
# Generate the app's card #
###########################
function displayCard($template) {
global $caSettings;
global $caSettings, $caPaths;
$appName = str_replace("-"," ",$template['display_dockerName']);
$popupType = $template['RepositoryTemplate'] ? "ca_repoPopup" : "ca_appPopup";
@ -1052,7 +1052,7 @@ function displayCard($template) {
if ( $RecommendedDate ) {
$card .= "
<div class='homespotlightIconArea ca_center' data-apppath='$Path' data-appname='$Name' data-repository='".htmlentities($RepoName,ENT_QUOTES)."'>
<div><img class='spotlightIcon' src='https://raw.githubusercontent.com/Squidly271/community.applications/master/webImages/Unraid.svg'></img></div>
<div><img class='spotlightIcon' src='{$caPaths['SpotlightIcon']}'></img></div>
<div class='spotlightDate'>".tr(date("M Y",$RecommendedDate),0)."</div>
</div>
";
@ -1094,7 +1094,7 @@ function displayCard($template) {
}
function displayPopup($template) {
global $caSettings;
global $caSettings, $caPaths;
extract($template);
@ -1173,7 +1173,7 @@ function displayPopup($template) {
$card .= "
<div class='spotlightPopup'>
<div class='spotlightIconArea ca_center'>
<div><img class='spotlightIcon' src='https://raw.githubusercontent.com/Squidly271/community.applications/master/webImages/Unraid.svg'></img></div>
<div><img class='spotlightIcon' src='{$caPaths['SpotlightIcon']}'></img></div>
<div class='spotlightDate'>".tr(date("M Y",$RecommendedDate),0)."</div>
</div>
<div class='spotlightInfoArea'>
@ -1185,6 +1185,28 @@ function displayPopup($template) {
</div>
";
}
if ( $Screenshot || $Photo || $Video) {
$ScreenshotTitle = $Screenshot || $Video ? tr("Screenshots") : tr("Photos");
$card .= "<div><div class='screenshotText'>$ScreenshotTitle</div>";
if ( $Screenshot || $Photo ) {
$pictures = $Screenshot ? $Screenshot : $Photo;
if ( ! is_array($pictures) )
$pictures = [$pictures];
foreach ($pictures as $shot) {
$card .= "<a class='screenshot mfp-image' href='".trim($shot)."'><img class='screen' src='".trim($shot)."'></img></a>";
}
}
if ( $Video ) {
if ( ! is_array($Video) )
$Video = [$Video];
foreach ( $Video as $vid ) {
$card .= "<a class='screenshot mfp-iframe' href='".trim($vid)."'><img class='vid' src='{$caPaths['VideoStill']}'></img></a>";
}
}
$card .= "</div>";
}
$appType = $Plugin ? tr("Plugin") : tr("Docker");
$appType = $Language ? tr("Language") : $appType;
@ -1240,25 +1262,7 @@ function displayPopup($template) {
</div>
</div>
";
if ( $Screenshot || $Photo || $Video) {
$ScreenshotTitle = $Screenshot ? tr("Screenshots") : tr("Photos");
$pictures = $Screenshot ? $Screenshot : $Photo;
if ( ! is_array($pictures) )
$pictures = [$pictures];
$card .= "<div><div class='screenshotText'>$ScreenshotTitle</div>";
foreach ($pictures as $shot) {
$card .= "<a class='screenshot mfp-image' href='".trim($shot)."'><img class='screen' src='".trim($shot)."'></img></a>";
}
if ( $Video ) {
if ( ! $Video[1] ) {
$Video = [$Video];
}
foreach ( $Video as $vid ) {
$card .= "<a class='screenshot mfp-iframe' href='".trim($vid['Link'])."'><img class='vid' src='".trim($vid['Still'])."'></img></a>";
}
}
$card .= "</div>";
}
if (is_array($trends) && (count($trends) > 1) ){
if ( $downloadtrend ) {
$card .= "