[Scummvm-git-logs] scummvm-web master -> f89c624205118204978b969f1bba673248be0207

lotharsm noreply at scummvm.org
Sat Mar 19 19:13:26 UTC 2022


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm-web' repo located at https://github.com/scummvm/scummvm-web .

Summary:
f89c624205 WEB: Adding a caption to random screenshots


Commit: f89c624205118204978b969f1bba673248be0207
    https://github.com/scummvm/scummvm-web/commit/f89c624205118204978b969f1bba673248be0207
Author: Thunderforge (wjherrmann at gmail.com)
Date: 2022-03-19T20:13:23+01:00

Commit Message:
WEB: Adding a caption to random screenshots

The caption is a hyperlink that goes to the corresponding game page on https://www.scummvm.org/compatibility/ . This allows users to quickly look up compatibility info as well as see which platforms are supported.

Changed paths:
    include/OrmObjects/Screenshot.php
    scss/pages/_screenshots.scss
    templates/components/random_screenshot.tpl


diff --git a/include/OrmObjects/Screenshot.php b/include/OrmObjects/Screenshot.php
index 3eab6bbf..24ddfed7 100644
--- a/include/OrmObjects/Screenshot.php
+++ b/include/OrmObjects/Screenshot.php
@@ -28,6 +28,7 @@ class Screenshot extends BaseScreenshot
                 $this->files[] = [
                     'filename' => $name,
                     'caption' => $this->getCaption(),
+                    'url' => "compatibility/DEV/" . $this->getGame()->getId()
                 ];
             }
         }
diff --git a/scss/pages/_screenshots.scss b/scss/pages/_screenshots.scss
index 35f81c84..161395ed 100644
--- a/scss/pages/_screenshots.scss
+++ b/scss/pages/_screenshots.scss
@@ -1,6 +1,4 @@
 .random-screenshot {
-  display: block;
-  margin: 0 auto;
   width: 100%;
 }
 
diff --git a/templates/components/random_screenshot.tpl b/templates/components/random_screenshot.tpl
index cf720217..5e551c09 100644
--- a/templates/components/random_screenshot.tpl
+++ b/templates/components/random_screenshot.tpl
@@ -4,9 +4,14 @@
 {assign var='rand_file' value=$rand_files[$rand_pos]}
 
 {capture "content"}
-<a href="{$smarty.const.DIR_SCREENSHOTS}/{$rand_file.filename}_full.png" title="{$rand_file.caption}">
-    <img class="random-screenshot" src="{$smarty.const.DIR_SCREENSHOTS}/{$rand_file.filename}_full.png" alt="{$rand_file.caption}">
-</a>
+<div class="image">
+    <a href="{$smarty.const.DIR_SCREENSHOTS}/{$rand_file.filename}_full.png" title="{$rand_file.caption}">
+        <img class="random-screenshot" src="{$smarty.const.DIR_SCREENSHOTS}/{$rand_file.filename}_full.png" alt="{$rand_file.caption}">
+    </a>
+</div>
+<div class="caption">
+    <a href="{$rand_file.url}">{$rand_file.caption}</a>
+</div>
 {/capture}
 {include file='components/roundbox.tpl' class="gallery" content=$smarty.capture.content}
 




More information about the Scummvm-git-logs mailing list