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_PASS=test
|
||||
@ -33,7 +33,10 @@ build-go: build-prepare
|
||||
copy-templates: build-prepare
|
||||
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
|
||||
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
|
||||
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
|
||||
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_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 }}
|
||||
<div class="col-xs-12 col-md-3">
|
||||
<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>
|
||||
</div>
|
||||
{{ end }}
|
||||
|
Loading…
x
Reference in New Issue
Block a user