Skip to content
This repository was archived by the owner on Aug 27, 2022. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions admin/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
require_once('../lib/config.php');
require_once('../lib/configsetup.inc.php');


?>
<!DOCTYPE html>
<html>
Expand Down Expand Up @@ -158,6 +159,27 @@
</div>
</div>

<div style="position:sticky; width:225px; bottom:10px;">
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Css should be moved to sass

<button class="save-btn">
<span class="save">
<span data-i18n="save"></span>
</span>
<span class="saving">
<i class="fa fa-circle-o-notch fa-spin fa-fw"></i>
<span data-i18n="saving"></span>
</span>
<span class="success">
<i class="fa fa-check"></i>
<span data-i18n="success"></span>
</span>
<span class="error">
<i class="fa fa-times"></i>
<span data-i18n="saveerror"></span>
</span>
</button>
</div>


<script src="../node_modules/whatwg-fetch/dist/fetch.umd.js"></script>
<script type="text/javascript" src="../api/config.php"></script>
<script type="text/javascript" src="../node_modules/jquery/dist/jquery.min.js"></script>
Expand Down
4 changes: 3 additions & 1 deletion config/config.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
// G E N E R A L
// possible language values: de, el, en, es, fr, pl, it
$config['language'] = 'en';
$config['show_start_screen_title'] = true;
$config['start_screen_title'] = 'Photobooth';
$config['start_screen_subtitle'] = NULL;
$config['dev'] = false;
Expand Down Expand Up @@ -92,6 +93,7 @@
// U S E R I N T E R F A C E
// possible index_style values: "classic", "modern", "custom"
$config['index_style'] = 'modern';
$config['show_lines_hr'] = true;
$config['font_size'] = '16px';
$config['background_image'] = null;
$config['background_admin'] = null;
Expand Down Expand Up @@ -138,7 +140,7 @@
$config['is_event'] = true;
$config['event']['textLeft'] = 'We';
$config['event']['textRight'] = 'OpenSource';
// possible event symbol values: 'fa-camera-retro', 'fa-birthday-cake', 'fa-gift', 'fa-tree', 'fa-snowflake-o', 'fa-heart-o',
// possible event symbol values: 'fa-camera-retro', 'fa-birthday-cake', 'fa-gift', 'fa-tree', 'fa-snowflake-o', 'fa-heart-o',
// 'fa-heart', 'fa-heartbeat', 'fa-apple', 'fa-anchor', 'fa-glass', 'fa-gears', 'fa-users'
$config['event']['symbol'] = 'fa-heart-o';

Expand Down
2 changes: 1 addition & 1 deletion gallery.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,4 +101,4 @@
<script src="node_modules/@andreasremdt/simple-translator/dist/umd/translator.min.js"></script>
<script type="text/javascript" src="resources/js/i18n.js"></script>
</body>
</html>
</html>
23 changes: 14 additions & 9 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,19 @@
$images = getImagesFromDB();
$imagelist = ($config['newest_first'] === true) ? array_reverse($images) : $images;

if ($config['index_style'] === 'modern') {
$btnClass1 = 'round-btn';
$btnClass2 = 'round-btn';
$galleryIcon = 'fa-picture-o';
} else {
$btnClass1 = 'btn';
$btnClass2 = '';
$galleryIcon = 'fa-th';
switch ($config['index_style']) {
case "modern":
case "trm-transparent":
$btnClass1 = 'round-btn';
$btnClass2 = 'round-btn';
$galleryIcon = 'fa-picture-o';
break;

default:
$btnClass1 = 'btn';
$btnClass2 = '';
$galleryIcon = 'fa-th';
break;
}

if ($config['use_live_keying']):
Expand Down Expand Up @@ -173,7 +178,7 @@
</div>

<div id="adminsettings">
<div style="position:absolute; bottom:0; right:0;">
<div style="position:relative; bottom:150px; right:0px; width:150px; height:150px;">
<img src="resources/img/spacer.png" alt="adminsettings" ondblclick="adminsettings()" />
</div>
<?php else:
Expand Down
31 changes: 31 additions & 0 deletions lib/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,37 @@
$config = array_deep_merge($defaultConfig, $config);
}

switch ($config['language']) {
case 'de':
case 'DE':
$current_lang = 'de-DE';
break;
case 'el':
case 'EL':
$current_lang = 'el-EL';
break;
case 'es':
case 'ES':
$current_lang = 'es-ES';
break;
case 'fr':
case 'FR':
$current_lang = 'fr-FR';
break;
case 'pl':
case 'PL':
$current_lang = 'pl-PL';
break;
case 'it':
case 'IT':
$current_lang = 'it-IT';
break;
default:
$current_lang = 'en-EN';
break;
}
header('Content-Language: ' . $current_lang);

if ($config['dev']) {
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
Expand Down
11 changes: 11 additions & 0 deletions lib/configsetup.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@
],
'value' => $config['language'],
],
'show_start_screen_title' => [
'type' => 'checkbox',
'name' => 'show_start_screen_title',
'value' => $config['show_start_screen_title'],
],
'start_screen_title' => [
'type' => 'input',
'placeholder' => $defaultConfig['start_screen_title'],
Expand Down Expand Up @@ -416,10 +421,16 @@
'options' => [
'classic' => 'classic',
'modern' => 'modern',
'trm-transparent' => 'trm-transparent',
'custom' => 'custom',
],
'value' => $config['index_style'],
],
'show_lines_hr' => [
'type' => 'checkbox',
'name' => 'show_lines_hr',
'value' => $config['show_lines_hr'],
],
'font_size' => [
'type' => 'input',
'name' => 'font_size',
Expand Down
2 changes: 2 additions & 0 deletions resources/lang/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,8 @@
"show_date": "Datum in Galerie unter dem Foto anzeigen (funktioniert nur wenn Bilder mit Datum benannt werden)",
"show_error_messages": "Fehlermeldungen anzeigen",
"show_faq": "FAQ öffnen",
"show_start_screen_title":"Zeigt Titel und Untertitel auf der Startseite an",
"show_lines_hr":"Dekorative Linien anzeigen",
"show_fork": "Fork Logo anzeigen",
"show_gallery": "Galerie aktivieren",
"show_manual": "Handbuch öffnen",
Expand Down
2 changes: 2 additions & 0 deletions resources/lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,8 @@
"show_date": "Show date below images in Gallery (only works if dateformat images is used)",
"show_error_messages": "Show error messages",
"show_faq": "Open FAQ",
"show_start_screen_title":"Shows title and subtitle on start screen",
"show_lines_hr":"Show decorate Lines",
"show_fork": "Show Fork Badge",
"show_gallery": "Show Gallery",
"show_manual": "Open Manual",
Expand Down
20 changes: 17 additions & 3 deletions template/classic.template.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,30 +7,44 @@
<div class="startInner">
<?php if ($config['is_event']): ?>
<div class="names">
<hr class="small" />
<?php if ($config['show_lines_hr']): ?>
<hr>
<hr class="small" />
<?php endif; ?>
<div>
<h1><?=$config['event']['textLeft']?>
<i class="fa <?=$config['event']['symbol']?>" aria-hidden="true"></i>
<?=$config['event']['textRight']?>
<?php if ($config['show_start_screen_title']): ?>
<br>
<?=$config['start_screen_title']?>
<?php endif; ?>
</h1>
<?php if ($config['show_start_screen_title']): ?>
<h2><?=$config['start_screen_subtitle']?></h2>
<?php endif; ?>
</div>
<?php if ($config['show_lines_hr']): ?>
<hr>
<hr class="small" />
<?php endif; ?>
</div>
<?php else: ?>
<div class="names">
<hr class="small" />
<?php if ($config['show_lines_hr']): ?>
<hr>
<hr class="small" />
<?php endif; ?>
<?php if ($config['show_start_screen_title']): ?>
<div>
<h1><?=$config['start_screen_title']?></h1>
<h2><?=$config['start_screen_subtitle']?></h2>
</div>
<?php endif; ?>
<?php if ($config['show_lines_hr']): ?>
<hr>
<hr class="small" />
<?php endif; ?>
</div>
<?php endif; ?>

Expand Down Expand Up @@ -61,4 +75,4 @@
<?php if($config['toggle_fs_button']): ?>
<a href="#" id="fs-button" class="btn btn--small fs-button"><i class="fa fa-arrows-alt"></i> <span data-i18n="toggleFullscreen"></span></a>
<?php endif; ?>
</div>
</div>
30 changes: 19 additions & 11 deletions template/modern.template.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,37 +6,45 @@
<div class="divinnen2">
<?php if ($config['is_event']): ?>
<div class="names">
<hr class="small" />
<?php if ($config['show_lines_hr']): ?>
<hr>
<hr class="small" />
<?php endif; ?>
<div>
<h1>
<?=$config['event']['textLeft']?>
<i class="fa <?=$config['event']['symbol']?>" aria-hidden="true"></i>
<?=$config['event']['textRight']?>
<?php if ($config['show_start_screen_title']): ?>
<br>
<?=$config['start_screen_title']?>
<?php endif; ?>
</h1>
<?php if ($config['show_start_screen_title']): ?>
<h2><?=$config['start_screen_subtitle']?></h2>
<?php endif; ?>
</div>

<hr>
<?php if ($config['show_lines_hr']): ?>
<hr class="small" />

<hr>
<?php endif; ?>
</div>
<?php else: ?>
<div class="names">

<hr class="small" />
<?php if ($config['show_lines_hr']): ?>
<hr>

<hr class="small" />
<?php endif; ?>
<?php if ($config['show_start_screen_title']): ?>
<div>
<h1><?=$config['start_screen_title']?></h1>
<h2><?=$config['start_screen_subtitle']?></h2>
</div>

<hr>
<?php endif; ?>
<?php if ($config['show_lines_hr']): ?>
<hr class="small" />

<hr>
<?php endif; ?>
</div>
<?php endif; ?>

Expand Down Expand Up @@ -73,4 +81,4 @@
<?php if ($config['show_fork']): ?>
<a href="https://github.com/andi34/photobooth" class="github-fork-ribbon" data-ribbon="Fork me on GitHub">Fork me on GitHub</a>
<?php endif; ?>
</div>
</div>