mirror of
https://github.com/bpatrik/pigallery2.git
synced 2025-01-26 05:27:35 +02:00
changing supported image formats
This commit is contained in:
parent
9ea2f16f52
commit
ea8b780f25
4
.gitignore
vendored
4
.gitignore
vendored
@ -23,3 +23,7 @@ sqlite.db
|
|||||||
dist/
|
dist/
|
||||||
release/
|
release/
|
||||||
out-tsc/
|
out-tsc/
|
||||||
|
ffmpeg/
|
||||||
|
locale.source.xlf
|
||||||
|
package-lock.json
|
||||||
|
test.*
|
||||||
|
@ -133,6 +133,9 @@ apt-get install build-essential libkrb5-dev gcc g++
|
|||||||
|
|
||||||
## 3. Feature list
|
## 3. Feature list
|
||||||
|
|
||||||
|
* supported formats:
|
||||||
|
* images: **jpg, jpeg, jpe, webp, png, gif, svg**
|
||||||
|
* videos: **mp4, ogg, ogv, webm**
|
||||||
* **Rendering directories as it is**
|
* **Rendering directories as it is**
|
||||||
* Listing subdirectories recursively
|
* Listing subdirectories recursively
|
||||||
* Listing photos in a nice grid layout
|
* Listing photos in a nice grid layout
|
||||||
|
@ -15,14 +15,11 @@ export class DiskMangerWorker {
|
|||||||
|
|
||||||
private static readonly SupportedEXT = {
|
private static readonly SupportedEXT = {
|
||||||
photo: [
|
photo: [
|
||||||
'.bmp',
|
|
||||||
'.gif',
|
'.gif',
|
||||||
'.jpeg', '.jpg', '.jpe',
|
'.jpeg', '.jpg', '.jpe',
|
||||||
'.png',
|
'.png',
|
||||||
'.tiff', '.tif',
|
|
||||||
'.webp',
|
'.webp',
|
||||||
'.ico',
|
'.svg'
|
||||||
'.tga'
|
|
||||||
],
|
],
|
||||||
video: [
|
video: [
|
||||||
'.mp4',
|
'.mp4',
|
||||||
|
@ -36,7 +36,7 @@ export class GalleryRouter {
|
|||||||
|
|
||||||
|
|
||||||
private static addGetImage(app: Express) {
|
private static addGetImage(app: Express) {
|
||||||
app.get(['/api/gallery/content/:mediaPath(*\.(jpg|bmp|png|gif|jpeg))'],
|
app.get(['/api/gallery/content/:mediaPath(*\.(jpg|jpeg|jpe|webp|png|gif|svg))'],
|
||||||
AuthenticationMWs.authenticate,
|
AuthenticationMWs.authenticate,
|
||||||
// TODO: authorize path
|
// TODO: authorize path
|
||||||
GalleryMWs.loadFile,
|
GalleryMWs.loadFile,
|
||||||
@ -73,7 +73,7 @@ export class GalleryRouter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static addGetImageThumbnail(app: Express) {
|
private static addGetImageThumbnail(app: Express) {
|
||||||
app.get('/api/gallery/content/:mediaPath(*\.(jpg|bmp|png|gif|jpeg))/thumbnail/:size?',
|
app.get('/api/gallery/content/:mediaPath(*\.(jpg|jpeg|jpe|webp|png|gif|svg))/thumbnail/:size?',
|
||||||
AuthenticationMWs.authenticate,
|
AuthenticationMWs.authenticate,
|
||||||
// TODO: authorize path
|
// TODO: authorize path
|
||||||
GalleryMWs.loadFile,
|
GalleryMWs.loadFile,
|
||||||
@ -93,7 +93,7 @@ export class GalleryRouter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static addGetImageIcon(app: Express) {
|
private static addGetImageIcon(app: Express) {
|
||||||
app.get('/api/gallery/content/:mediaPath(*\.(jpg|bmp|png|gif|jpeg))/icon',
|
app.get('/api/gallery/content/:mediaPath(*\.(jpg|jpeg|jpe|webp|png|gif|svg))/icon',
|
||||||
AuthenticationMWs.authenticate,
|
AuthenticationMWs.authenticate,
|
||||||
// TODO: authorize path
|
// TODO: authorize path
|
||||||
GalleryMWs.loadFile,
|
GalleryMWs.loadFile,
|
||||||
|
@ -16,11 +16,17 @@
|
|||||||
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-131201011-1"></script>
|
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-131201011-1"></script>
|
||||||
<script>
|
<script>
|
||||||
window.dataLayer = window.dataLayer || [];
|
window.dataLayer = window.dataLayer || [];
|
||||||
function gtag(){dataLayer.push(arguments);}
|
|
||||||
|
function gtag() {
|
||||||
|
dataLayer.push(arguments);
|
||||||
|
}
|
||||||
|
|
||||||
gtag('js', new Date());
|
gtag('js', new Date());
|
||||||
|
|
||||||
gtag('config', 'UA-131201011-1');
|
gtag('config', 'UA-131201011-1');
|
||||||
</script>
|
</script>
|
||||||
|
<!-- Place this tag in your head or just before your close body tag. -->
|
||||||
|
<script async defer src="https://buttons.github.io/buttons.js"></script>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body class="text-center">
|
<body class="text-center">
|
||||||
@ -30,8 +36,10 @@
|
|||||||
<div class="cover-container d-flex w-100 h-100 p-3 mx-auto flex-column ">
|
<div class="cover-container d-flex w-100 h-100 p-3 mx-auto flex-column ">
|
||||||
<header class="masthead">
|
<header class="masthead">
|
||||||
<div class="inner">
|
<div class="inner">
|
||||||
<h3 class="masthead-brand"><img src="assets/icon_inv.png" width="30" height="30" class="d-inline-block align-top"
|
<h3 class="masthead-brand">
|
||||||
alt=""> PiGallery 2</h3>
|
<img src="assets/icon_inv.png" width="30" height="30" class="d-inline-block align-top"
|
||||||
|
alt=""> PiGallery 2
|
||||||
|
</h3>
|
||||||
<nav class="nav nav-masthead justify-content-center">
|
<nav class="nav nav-masthead justify-content-center">
|
||||||
<a class="nav-link active" href="index.html">Features</a>
|
<a class="nav-link active" href="index.html">Features</a>
|
||||||
<a class="nav-link" href="https://github.com/bpatrik/pigallery2">Install</a>
|
<a class="nav-link" href="https://github.com/bpatrik/pigallery2">Install</a>
|
||||||
@ -46,7 +54,17 @@
|
|||||||
PiGallery 2 is a self-hosted directory-first photo gallery website.
|
PiGallery 2 is a self-hosted directory-first photo gallery website.
|
||||||
</h3>
|
</h3>
|
||||||
<a href="https://pigallery2.herokuapp.com/">Try our live demo! <span class="small">(First load may take up 30s, while the server boots up)</span></a>
|
<a href="https://pigallery2.herokuapp.com/">Try our live demo! <span class="small">(First load may take up 30s, while the server boots up)</span></a>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="github-button-wrapper">
|
||||||
|
<!-- Place this tag where you want the button to render. -->
|
||||||
|
<a class="github-button" href="https://github.com/bpatrik/pigallery2" data-size="large" data-icon="octicon-star"
|
||||||
|
data-show-count="true" aria-label="Star bpatrik/pigallery2 on GitHub">Star</a>
|
||||||
|
<!-- Place this tag where you want the button to render. -->
|
||||||
|
<a class="github-button" href="https://github.com/bpatrik/pigallery2/fork" data-size="large" data-icon="octicon-repo-forked"
|
||||||
|
data-show-count="true" aria-label="Fork bpatrik/pigallery2 on GitHub">Fork</a>
|
||||||
</div>
|
</div>
|
||||||
<img class="banner-photo" src="assets/main_page.jpg" style="width: 100%">
|
<img class="banner-photo" src="assets/main_page.jpg" style="width: 100%">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@ -142,6 +160,12 @@
|
|||||||
<h3 class="section-header">All features:</h3>
|
<h3 class="section-header">All features:</h3>
|
||||||
<hr/>
|
<hr/>
|
||||||
<ul class="text-left">
|
<ul class="text-left">
|
||||||
|
<li>supported formats:
|
||||||
|
<ul>
|
||||||
|
<li>images: <strong>jpg, jpeg, jpe, webp, png, gif, svg</strong></li>
|
||||||
|
<li>videos: <strong>mp4, ogg, ogv, webm</strong></li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
<li><strong>Rendering directories as it is</strong>
|
<li><strong>Rendering directories as it is</strong>
|
||||||
<ul>
|
<ul>
|
||||||
<li>Listing subdirectories recursively</li>
|
<li>Listing subdirectories recursively</li>
|
||||||
|
@ -129,8 +129,10 @@ hr{
|
|||||||
background: white;
|
background: white;
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
}
|
}
|
||||||
|
.github-button-wrapper{
|
||||||
|
margin-top: 10px;
|
||||||
|
float: right;
|
||||||
|
}
|
||||||
.banner-photo{
|
.banner-photo{
|
||||||
margin-top: 30px;
|
|
||||||
margin-bottom: 30px;
|
margin-bottom: 30px;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user