Skip to content

Commit

Permalink
task: drop unnecessary htmlframe (#412)
Browse files Browse the repository at this point in the history
  • Loading branch information
benjaminkott authored Oct 22, 2023
1 parent e8057b7 commit 03d1ccb
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 23 deletions.
8 changes: 4 additions & 4 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,19 +40,19 @@

<body class="gallery-mode--overlay ">

<?php if ($config['preview']['showFrame'] && !empty($config['picture']['htmlframe'])): ?>
<?php if ($config['preview']['showFrame'] && !empty($config['picture']['frame'])): ?>
<img
id="picture--frame"
class="<?php echo $config['preview']['flip']; ?> <?php echo $config['preview']['style']; ?>"
src="<?php echo $config['picture']['htmlframe']; ?>"
src="<?php echo $config['picture']['frame']; ?>"
alt="pictureFrame"
/>
<?php endif; ?>
<?php if ($config['preview']['showFrame'] && !empty($config['collage']['htmlframe'])): ?>
<?php if ($config['preview']['showFrame'] && !empty($config['collage']['frame'])): ?>
<img
id="collage--frame"
class="<?php echo $config['preview']['flip']; ?> <?php echo $config['preview']['style']; ?>"
src="<?php echo $config['collage']['htmlframe']; ?>"
src="<?php echo $config['collage']['frame']; ?>"
alt="collageFrame"
/>
<?php endif; ?>
Expand Down
8 changes: 0 additions & 8 deletions lib/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -241,14 +241,6 @@
$config['background']['chroma'] = 'url(' . $bg_url . ')';
}

if ($config['preview']['showFrame'] && !empty($config['picture']['frame'])) {
$config['picture']['htmlframe'] = $config['picture']['frame'];
}

if ($config['preview']['showFrame'] && !empty($config['collage']['frame'])) {
$config['collage']['htmlframe'] = $config['collage']['frame'];
}

if (empty($config['webserver']['ip'])) {
$config['webserver']['ip'] = $photobooth->getIp();
}
Expand Down
2 changes: 0 additions & 2 deletions lib/src/Utility/ThemeUtility.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ public static function renderCustomUserStyle(array $config): string
'--font-size' => $config['ui']['font_size'] ?? '__UNSET__',
'--font-color' => $config['colors']['font'] ?? '__UNSET__',
'--preview-rotation' => $config['preview']['rotation'] ?? '__UNSET__',
'--picture-frame' => $config['picture']['htmlframe'] ?? '__UNSET__',
'--collage-frame' => $config['collage']['htmlframe'] ?? '__UNSET__',
];

$output = '';
Expand Down
2 changes: 0 additions & 2 deletions src/sass/components/_root.scss
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,4 @@
--font-size: 1rem;
--font-color: transparent;
--preview-rotation: 0deg;
--picture-frame: none;
--collage-frame: none;
}
14 changes: 7 additions & 7 deletions test/preview.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@
?>

<body>
<?php if ($config['preview']['showFrame'] && !empty($config['picture']['htmlframe'])): ?>
<img id="picture--frame" class="<?php echo $config['preview']['flip']; ?> <?php echo $config['preview']['style']; ?>" src="<?php echo $config['picture']['htmlframe']; ?>" alt="pictureFrame" />
<?php if ($config['preview']['showFrame'] && !empty($config['picture']['frame'])): ?>
<img id="picture--frame" class="<?php echo $config['preview']['flip']; ?> <?php echo $config['preview']['style']; ?>" src="<?php echo $config['picture']['frame']; ?>" alt="pictureFrame" />
<?php endif; ?>
<?php if ($config['preview']['showFrame'] && !empty($config['collage']['htmlframe'])): ?>
<img id="collage--frame" class="<?php echo $config['preview']['flip']; ?> <?php echo $config['preview']['style']; ?>" src="<?php echo $config['collage']['htmlframe']; ?>" alt="collageFrame" />
<?php if ($config['preview']['showFrame'] && !empty($config['collage']['frame'])): ?>
<img id="collage--frame" class="<?php echo $config['preview']['flip']; ?> <?php echo $config['preview']['style']; ?>" src="<?php echo $config['collage']['frame']; ?>" alt="collageFrame" />
<?php endif; ?>
<video id="video--view" class="<?php echo $config['preview']['flip']; ?> <?php echo $config['preview']['style']; ?>" autoplay playsinline></video>

Expand All @@ -36,13 +36,13 @@

echo ComponentUtility::renderButton('startPreview', 'fa fa-play', 'startPreview');
echo ComponentUtility::renderButton('stopPreview', 'fa fa-stop', 'stopPreview');
if ($config['preview']['showFrame'] && !empty($config['picture']['htmlframe'])) {
if ($config['preview']['showFrame'] && !empty($config['picture']['frame'])) {
echo ComponentUtility::renderButton('showPictureFrame', 'fa fa-eye', 'showPictureFrame');
}
if ($config['preview']['showFrame'] && !empty($config['collage']['htmlframe'])) {
if ($config['preview']['showFrame'] && !empty($config['collage']['frame'])) {
echo ComponentUtility::renderButton('showCollageFrame', 'fa fa-eye', 'showCollageFrame');
}
if ($config['preview']['showFrame'] && !empty($config['picture']['htmlframe']) || $config['preview']['showFrame'] && !empty($config['collage']['htmlframe'])) {
if ($config['preview']['showFrame'] && !empty($config['picture']['frame']) || $config['preview']['showFrame'] && !empty($config['collage']['frame'])) {
echo ComponentUtility::renderButton('hideFrame', 'fa fa-eye-slash', 'hideFrame');
}
echo ComponentUtility::renderButtonLink('back', 'fa fa-chevron-left', PathUtility::getPublicPath('test'));
Expand Down

0 comments on commit 03d1ccb

Please sign in to comment.