Compare commits
No commits in common. "84431ddb85ec91264917eeb93de94a16ed919ad4" and "fb62fbccf7b22c5ca92d9dc6221f302892de7f53" have entirely different histories.
84431ddb85
...
fb62fbccf7
8
Makefile
8
Makefile
@ -38,24 +38,20 @@ $(error Edit this Makefile and set the ROOT_PATH variable)
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
SRC_DIR = src
|
SRC_DIR = src
|
||||||
RES_DIR = resources
|
|
||||||
_SRC_FLS = config.html config.js index.html index.js imgsort.php style.css style.css.map
|
_SRC_FLS = config.html config.js index.html index.js imgsort.php style.css style.css.map
|
||||||
SRC_FLS = $(foreach f,$(_SRC_FLS),$(SRC_DIR)/$(f))
|
SRC_FLS = $(foreach f,$(_SRC_FLS),$(SRC_DIR)/$(f))
|
||||||
INSTALL_FLS = $(foreach f,$(_SRC_FLS),$(INSTALL_DIR)/$(f)) $(INSTALL_DIR)/favicon.png
|
INSTALL_FLS = $(foreach f,$(_SRC_FLS),$(INSTALL_DIR)/$(f))
|
||||||
SASS_CMD = sass --color --load-path=src/sass
|
SASS_CMD = sass --color --load-path=src/sass
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
install: $(INSTALL_FLS) imgsort2-nginx.conf imgsort2-php-fpm.conf
|
install: $(INSTALL_FLS) imgsort2-nginx.conf imgsort2-php-fpm.conf
|
||||||
|
|
||||||
|
|
||||||
$(INSTALL_DIR)/%.php: $(SRC_DIR)/%.php
|
$(INSTALL_DIR)/%.php: $(SRC_DIR)/%.php
|
||||||
sed 's|$$rootDir = .*|$$rootDir = "$(ROOT_DIR)/";|; s|$$rootPath = .*|$$rootPath = "$(ROOT_PATH)/";|; s|$$stagingDirName = .*|$$stagingDirName = "$(STAGING_DIR)/";|' $< > $@
|
sed 's|$$rootDir = .*|$$rootDir = "$(ROOT_DIR)/";|; s|$$rootPath = .*|$$rootPath = "$(ROOT_PATH)/";|; s|$$stagingDirName = .*|$$stagingDirName = "$(STAGING_DIR)/";|' $< > $@
|
||||||
chmod 0744 $@
|
chmod 0744 $@
|
||||||
|
|
||||||
$(INSTALL_DIR)/%.png: $(RES_DIR)/%.png
|
|
||||||
install -m 0744 $< $@
|
|
||||||
|
|
||||||
$(INSTALL_DIR)/%: $(SRC_DIR)/%
|
$(INSTALL_DIR)/%: $(SRC_DIR)/%
|
||||||
install -m 0744 $< $@
|
install -m 0744 $< $@
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
const imageExtensions = ['gif','jpg','jpeg','png', 'webp', 'svg', 'ico', 'bmp'];
|
const imageExtensions = ['gif','jpg','jpeg','png', 'webp', 'svg', 'pdf'];
|
||||||
const videoExtensions =['mpg', 'mp2', 'mpeg', 'mpe', 'mpv', 'mp4'];
|
const videoExtensions =['mpg', 'mp2', 'mpeg', 'mpe', 'mpv', 'mp4'];
|
||||||
const audioExtensions =['mp3', 'ogg', 'wav', 'flac'];
|
const audioExtensions =['mp3', 'ogg', 'wav', 'flac'];
|
||||||
|
|
||||||
@ -113,7 +113,7 @@ let currentFile = "";
|
|||||||
let currentFileIdx = null;
|
let currentFileIdx = null;
|
||||||
|
|
||||||
function createMediaFileElement(file, autoplay=false) {
|
function createMediaFileElement(file, autoplay=false) {
|
||||||
const fileExt = file.split('.').pop().toLowerCase();
|
const fileExt = file.split('.').pop();
|
||||||
if (imageExtensions.includes(fileExt)) { // if image
|
if (imageExtensions.includes(fileExt)) { // if image
|
||||||
let img = document.createElement("img");
|
let img = document.createElement("img");
|
||||||
img.setAttribute('src', stagingPath + file)
|
img.setAttribute('src', stagingPath + file)
|
||||||
|
Loading…
Reference in New Issue
Block a user