-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: Continue to extracting js and css
Signed-off-by: Vincent Boutour <[email protected]>
- Loading branch information
Showing
33 changed files
with
347 additions
and
390 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
FIBR_THUMBNAIL_URL=http://localhost:4000 | ||
FIBR_EXIF_URL=http://localhost:5000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -50,6 +50,7 @@ init: | |
@curl --disable --silent --show-error --location --max-time 30 "https://raw.githubusercontent.com/ViBiOh/scripts/main/bootstrap" | bash -s -- "-c" "git_hooks" "coverage" "release" | ||
go install "github.com/golang/mock/[email protected]" | ||
go install "github.com/golangci/golangci-lint/cmd/golangci-lint@latest" | ||
go install "github.com/tdewolff/minify/v2/cmd/minify@latest" | ||
go install "golang.org/x/tools/cmd/goimports@latest" | ||
go install "golang.org/x/tools/go/analysis/passes/fieldalignment/cmd/fieldalignment@master" | ||
go install "mvdan.cc/gofumpt@latest" | ||
|
@@ -92,16 +93,18 @@ build: | |
## build: Build the application. | ||
.PHONY: build-web | ||
build-web: | ||
minify "cmd/fibr/static/scripts/async-image.js" > "cmd/fibr/static/scripts/async-image.min.js" && mv "cmd/fibr/static/scripts/async-image.min.js" "cmd/fibr/static/scripts/async-image.js" | ||
minify "cmd/fibr/static/scripts/map.js" > "cmd/fibr/static/scripts/map.min.js" && mv "cmd/fibr/static/scripts/map.min.js" "cmd/fibr/static/scripts/map.js" | ||
minify "cmd/fibr/static/scripts/navigation.js" > "cmd/fibr/static/scripts/navigation.min.js" && mv "cmd/fibr/static/scripts/navigation.min.js" "cmd/fibr/static/scripts/navigation.js" | ||
minify "cmd/fibr/static/scripts/upload.js" > "cmd/fibr/static/scripts/upload.min.js" && mv "cmd/fibr/static/scripts/upload.min.js" "cmd/fibr/static/scripts/upload.js" | ||
minify "cmd/fibr/static/styles/main.css" > "cmd/fibr/static/styles/main.min.css" && mv "cmd/fibr/static/styles/main.min.css" "cmd/fibr/static/styles/main.css" | ||
minify "cmd/fibr/static/styles/upload.css" > "cmd/fibr/static/styles/upload.min.css" && mv "cmd/fibr/static/styles/upload.min.css" "cmd/fibr/static/styles/upload.css" | ||
rm -f "cmd/fibr/static/scripts/index.min.js" "cmd/fibr/static/styles/main.min.css" | ||
minify --bundle --recursive --output "cmd/fibr/static/scripts/index.min.js" "cmd/fibr/static/scripts/" | ||
minify --bundle --recursive --output "cmd/fibr/static/styles/main.min.css" "cmd/fibr/static/styles/" | ||
|
||
## run: Locally run the application, e.g. node index.js, python -m myapp, go run myapp etc ... | ||
.PHONY: run | ||
run: | ||
$(MAIN_RUNNER) \ | ||
-ignorePattern ".git|node_modules" \ | ||
-authUsers "1:`htpasswd -nBb admin admin`" | ||
|
||
## config: Create local configuration | ||
.PHONY: config | ||
config: | ||
@cp .env.example .env |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/** | ||
* Generate a throbber. | ||
* @return {Element} | ||
*/ | ||
function generateThrobber(classNames = []) { | ||
const wrapper = document.createElement('div'); | ||
wrapper.classList.add('throbber'); | ||
classNames.forEach((className) => wrapper.classList.add(className)); | ||
|
||
for (let i = 1; i < 4; i++) { | ||
const dot = document.createElement('div'); | ||
dot.classList.add('throbber-dot', `throbber-dot-${i}`); | ||
wrapper.appendChild(dot); | ||
} | ||
|
||
return wrapper; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
.thumbnail { | ||
max-height: 100%; | ||
vertical-align: middle; | ||
width: 100%; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
.exif-button { | ||
bottom: 1rem; | ||
position: absolute; | ||
right: 1rem; | ||
} | ||
|
||
#exif-modal:target { | ||
display: flex; | ||
z-index: 5; | ||
} | ||
|
||
#exif-modal:target ~ .content { | ||
pointer-events: none; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.breakable { | ||
word-break: break-word; | ||
} |
Oops, something went wrong.