first commit
This commit is contained in:
BIN
html/@eaDir/album.php@SynoEAStream
Normal file
BIN
html/@eaDir/album.php@SynoEAStream
Normal file
Binary file not shown.
BIN
html/@eaDir/assets@SynoEAStream
Normal file
BIN
html/@eaDir/assets@SynoEAStream
Normal file
Binary file not shown.
BIN
html/@eaDir/config.php@SynoEAStream
Normal file
BIN
html/@eaDir/config.php@SynoEAStream
Normal file
Binary file not shown.
BIN
html/@eaDir/index.php@SynoEAStream
Normal file
BIN
html/@eaDir/index.php@SynoEAStream
Normal file
Binary file not shown.
22
html/album.php
Normal file
22
html/album.php
Normal file
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
require '../vendor/autoload.php';
|
||||
require './config.php';
|
||||
|
||||
$albumId = $_GET['id'];
|
||||
|
||||
print_r($album_id);
|
||||
|
||||
$images = immichRequest("$IMMICH_URL/api/albums/$albumId");
|
||||
|
||||
$loader = new \Twig\Loader\FilesystemLoader('../templates');
|
||||
$twig = new \Twig\Environment($loader);
|
||||
|
||||
logData($_SERVER["HTTP_X_REAL_IP"] . ' - ' . 'Album ' . $images['albumName'] . ' wurde aufgerufen');
|
||||
|
||||
echo $twig->render('portfolio_album.twig', [
|
||||
'images_data' => $images,
|
||||
'immich_url' => $IMMICH_URL,
|
||||
'web_url' => $WEB_URL,
|
||||
'project_title' => $PROJECT_TITLE
|
||||
]);
|
||||
BIN
html/assets/@eaDir/css@SynoEAStream
Normal file
BIN
html/assets/@eaDir/css@SynoEAStream
Normal file
Binary file not shown.
BIN
html/assets/@eaDir/fonts@SynoEAStream
Normal file
BIN
html/assets/@eaDir/fonts@SynoEAStream
Normal file
Binary file not shown.
BIN
html/assets/@eaDir/js@SynoEAStream
Normal file
BIN
html/assets/@eaDir/js@SynoEAStream
Normal file
Binary file not shown.
BIN
html/assets/css/@eaDir/bootstrap.css@SynoEAStream
Normal file
BIN
html/assets/css/@eaDir/bootstrap.css@SynoEAStream
Normal file
Binary file not shown.
BIN
html/assets/css/@eaDir/bootstrap.min.css@SynoEAStream
Normal file
BIN
html/assets/css/@eaDir/bootstrap.min.css@SynoEAStream
Normal file
Binary file not shown.
BIN
html/assets/css/@eaDir/font-awesome.css@SynoEAStream
Normal file
BIN
html/assets/css/@eaDir/font-awesome.css@SynoEAStream
Normal file
Binary file not shown.
BIN
html/assets/css/@eaDir/font-awesome.min.css@SynoEAStream
Normal file
BIN
html/assets/css/@eaDir/font-awesome.min.css@SynoEAStream
Normal file
Binary file not shown.
BIN
html/assets/css/@eaDir/style.css@SynoEAStream
Normal file
BIN
html/assets/css/@eaDir/style.css@SynoEAStream
Normal file
Binary file not shown.
8374
html/assets/css/bootstrap.css
vendored
Normal file
8374
html/assets/css/bootstrap.css
vendored
Normal file
File diff suppressed because it is too large
Load Diff
7
html/assets/css/bootstrap.min.css
vendored
Normal file
7
html/assets/css/bootstrap.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
2337
html/assets/css/font-awesome.css
vendored
Normal file
2337
html/assets/css/font-awesome.css
vendored
Normal file
File diff suppressed because it is too large
Load Diff
4
html/assets/css/font-awesome.min.css
vendored
Normal file
4
html/assets/css/font-awesome.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
1091
html/assets/css/style.css
Normal file
1091
html/assets/css/style.css
Normal file
File diff suppressed because it is too large
Load Diff
BIN
html/assets/fonts/@eaDir/FontAwesome.otf@SynoEAStream
Normal file
BIN
html/assets/fonts/@eaDir/FontAwesome.otf@SynoEAStream
Normal file
Binary file not shown.
BIN
html/assets/fonts/@eaDir/fontawesome-webfont.eot@SynoEAStream
Normal file
BIN
html/assets/fonts/@eaDir/fontawesome-webfont.eot@SynoEAStream
Normal file
Binary file not shown.
BIN
html/assets/fonts/@eaDir/fontawesome-webfont.svg@SynoEAStream
Normal file
BIN
html/assets/fonts/@eaDir/fontawesome-webfont.svg@SynoEAStream
Normal file
Binary file not shown.
BIN
html/assets/fonts/@eaDir/fontawesome-webfont.ttf@SynoEAStream
Normal file
BIN
html/assets/fonts/@eaDir/fontawesome-webfont.ttf@SynoEAStream
Normal file
Binary file not shown.
BIN
html/assets/fonts/@eaDir/fontawesome-webfont.woff2@SynoEAStream
Normal file
BIN
html/assets/fonts/@eaDir/fontawesome-webfont.woff2@SynoEAStream
Normal file
Binary file not shown.
BIN
html/assets/fonts/@eaDir/fontawesome-webfont.woff@SynoEAStream
Normal file
BIN
html/assets/fonts/@eaDir/fontawesome-webfont.woff@SynoEAStream
Normal file
Binary file not shown.
BIN
html/assets/fonts/FontAwesome.otf
Normal file
BIN
html/assets/fonts/FontAwesome.otf
Normal file
Binary file not shown.
BIN
html/assets/fonts/fontawesome-webfont.eot
Normal file
BIN
html/assets/fonts/fontawesome-webfont.eot
Normal file
Binary file not shown.
2671
html/assets/fonts/fontawesome-webfont.svg
Normal file
2671
html/assets/fonts/fontawesome-webfont.svg
Normal file
File diff suppressed because it is too large
Load Diff
|
After Width: | Height: | Size: 434 KiB |
BIN
html/assets/fonts/fontawesome-webfont.ttf
Normal file
BIN
html/assets/fonts/fontawesome-webfont.ttf
Normal file
Binary file not shown.
BIN
html/assets/fonts/fontawesome-webfont.woff
Normal file
BIN
html/assets/fonts/fontawesome-webfont.woff
Normal file
Binary file not shown.
BIN
html/assets/fonts/fontawesome-webfont.woff2
Normal file
BIN
html/assets/fonts/fontawesome-webfont.woff2
Normal file
Binary file not shown.
BIN
html/assets/js/@eaDir/custom.js@SynoEAStream
Normal file
BIN
html/assets/js/@eaDir/custom.js@SynoEAStream
Normal file
Binary file not shown.
BIN
html/assets/js/@eaDir/jquery.js@SynoEAStream
Normal file
BIN
html/assets/js/@eaDir/jquery.js@SynoEAStream
Normal file
Binary file not shown.
BIN
html/assets/js/@eaDir/valde.min.js@SynoEAStream
Normal file
BIN
html/assets/js/@eaDir/valde.min.js@SynoEAStream
Normal file
Binary file not shown.
19
html/assets/js/custom.js
Normal file
19
html/assets/js/custom.js
Normal file
@@ -0,0 +1,19 @@
|
||||
|
||||
(function($) {
|
||||
'use strict';
|
||||
|
||||
// Main Navigation
|
||||
$( '.hamburger-menu' ).on( 'click', function() {
|
||||
$(this).toggleClass('close');
|
||||
$('.site-branding').toggleClass('hide');
|
||||
$('.site-navigation').toggleClass('show');
|
||||
$('.site-header').toggleClass('no-shadow');
|
||||
});
|
||||
|
||||
// Scroll to Next Section
|
||||
$( '.scroll-down' ).click(function() {
|
||||
$( 'html, body' ).animate({
|
||||
scrollTop: $( '.scroll-down' ).offset().top + 100
|
||||
}, 800 );
|
||||
});
|
||||
})(jQuery);
|
||||
6
html/assets/js/jquery.js
vendored
Normal file
6
html/assets/js/jquery.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
html/assets/js/valde.min.js
vendored
Normal file
1
html/assets/js/valde.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
44
html/config.php
Normal file
44
html/config.php
Normal file
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
$PROJECT_TITLE = 'Webgallery';
|
||||
|
||||
$WEB_URL = 'https://www.mschwab.net';
|
||||
$IMMICH_URL = 'https://immich.mschwab.net';
|
||||
$IMMICH_API_KEY = '5lm5xdIcSeGdNY6sOYljV1Am8BqB3Bbqe19PUcIkzzo';
|
||||
|
||||
function immichRequest($url) {
|
||||
global $IMMICH_API_KEY;
|
||||
$ch = curl_init($url);
|
||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||
curl_setopt($ch, CURLOPT_HTTPHEADER, [
|
||||
"x-api-key: $IMMICH_API_KEY",
|
||||
"Content-Type: application/json"
|
||||
]);
|
||||
|
||||
$response = curl_exec($ch);
|
||||
curl_close($ch);
|
||||
|
||||
return json_decode($response, true);
|
||||
}
|
||||
|
||||
function logData(string $message, ?array $data = null) {
|
||||
$logDir = '../logs';
|
||||
$today = date('Y-m-d');
|
||||
$now = date('Y-m-d H:i:s');
|
||||
|
||||
$date = new DateTime("now", new DateTimeZone('Europe/Zurich'));
|
||||
|
||||
if (!is_dir($logDir)) {
|
||||
mkdir($logDir, 0777, true);
|
||||
}
|
||||
$logFile = $logDir . '/log-' . $date->format('Y-m-d') . '.log';
|
||||
|
||||
$logData = '[' . $date->format('Y-m-d H:i:s') . ']' . ' - ' . $message . "\n";
|
||||
|
||||
if ($data) {
|
||||
$dataString = print_r($data, true) . "\n";
|
||||
$logData .= $dataString;
|
||||
}
|
||||
|
||||
file_put_contents($logFile, $logData, FILE_APPEND);
|
||||
}
|
||||
22
html/index.php
Normal file
22
html/index.php
Normal file
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
require '../vendor/autoload.php';
|
||||
require './config.php';
|
||||
|
||||
$albums = immichRequest("$IMMICH_URL/api/albums");
|
||||
|
||||
foreach($albums as $key => $value) {
|
||||
if($value['albumName'] == 'Camera') {
|
||||
unset($albums[$key]);
|
||||
}
|
||||
}
|
||||
|
||||
$loader = new \Twig\Loader\FilesystemLoader('../templates');
|
||||
$twig = new \Twig\Environment($loader);
|
||||
|
||||
echo $twig->render('portfolio.twig', [
|
||||
'albums_data' => $albums,
|
||||
'immich_url' => $IMMICH_URL,
|
||||
'web_url' => $WEB_URL,
|
||||
'project_title' => $PROJECT_TITLE
|
||||
]);
|
||||
Reference in New Issue
Block a user