Add a default image for the movies
This commit is contained in:
parent
d59064a82a
commit
a60528da15
12
Makefile
12
Makefile
@ -1,4 +1,4 @@
|
|||||||
.PHONY: docker migration dev clean test build-prepare build-js build-css build-font build-go copy-templates watch-js watch-css watch-templates watch
|
.PHONY: docker migration dev clean test build-prepare build-js build-css build-font build-go copy-templates copy-images watch-js watch-css watch-templates watch
|
||||||
|
|
||||||
DB_USER=test
|
DB_USER=test
|
||||||
DB_PASS=test
|
DB_PASS=test
|
||||||
@ -33,7 +33,10 @@ build-go: build-prepare
|
|||||||
copy-templates: build-prepare
|
copy-templates: build-prepare
|
||||||
cp -r ./src/templates/* ./build/templates
|
cp -r ./src/templates/* ./build/templates
|
||||||
|
|
||||||
build: build-js build-css build-font copy-templates build-go
|
copy-images: build-prepare
|
||||||
|
cp -r ./src/public/img/* ./build/public/img
|
||||||
|
|
||||||
|
build: build-js build-css build-font copy-templates copy-images build-go
|
||||||
|
|
||||||
watch-js: build-prepare
|
watch-js: build-prepare
|
||||||
node ./node_modules/.bin/nodemon -e js -w src/public/js/app.js -x 'make build-js' &
|
node ./node_modules/.bin/nodemon -e js -w src/public/js/app.js -x 'make build-js' &
|
||||||
@ -44,10 +47,13 @@ watch-css: build-prepare
|
|||||||
watch-templates: build-prepare
|
watch-templates: build-prepare
|
||||||
node ./node_modules/.bin/nodemon -e tmpl -w src/templates -x 'make copy-templates' &
|
node ./node_modules/.bin/nodemon -e tmpl -w src/templates -x 'make copy-templates' &
|
||||||
|
|
||||||
|
watch-images: build-prepare
|
||||||
|
node ./node_modules/.bin/nodemon -e jpg,png -w src/public/img -x 'make copy-images' &
|
||||||
|
|
||||||
watch-go: build-prepare
|
watch-go: build-prepare
|
||||||
CONFIG_FILE="./config.yml" fresh -c fresh.conf
|
CONFIG_FILE="./config.yml" fresh -c fresh.conf
|
||||||
|
|
||||||
watch: watch-js watch-css watch-templates watch-go
|
watch: watch-js watch-css watch-templates watch-images watch-go
|
||||||
|
|
||||||
docker:
|
docker:
|
||||||
$(DOCKER_COMPOSE) up -d
|
$(DOCKER_COMPOSE) up -d
|
||||||
|
BIN
src/public/img/noimage.png
Normal file
BIN
src/public/img/noimage.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.3 KiB |
@ -16,7 +16,7 @@
|
|||||||
{{ range $.Data.movies }}
|
{{ range $.Data.movies }}
|
||||||
<div class="col-xs-12 col-md-3">
|
<div class="col-xs-12 col-md-3">
|
||||||
<a href="#" class="thumbnail" data-imdbid="{{.ImdbID}}">
|
<a href="#" class="thumbnail" data-imdbid="{{.ImdbID}}">
|
||||||
<img src="/img/movies/{{.ImdbID}}.jpg">
|
<img src="/img/movies/{{.ImdbID}}.jpg" onerror="this.onerror=null;this.src='/img/noimage.png';">
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user