Skip to content

Commit

Permalink
reorganise assets and scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
itsjavi committed Sep 2, 2020
1 parent 8a7f7d9 commit f147700
Show file tree
Hide file tree
Showing 11 changed files with 24 additions and 14 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ install:
rm -rf tmp/pandoc-css && git clone https://gist.github.com/5917178.git tmp/pandoc-css

index-page:
pandoc --from gfm --to html --standalone README.md --output .gh-pages/index.html --template src/index.template.html
pandoc --from gfm --to html --standalone README.md --output .gh-pages/index.html --template src/docs/index.template.html

pages:
./src/scripts/build-gh-pages.sh
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ You can check all available assets in the following [reference pages](https://it

---

For fonts and audio reference, check the [`/assets/`](https://github.com/itsjavi/pokemon-assets/tree/master/assets) folder.
For fonts and audio reference,
check the [`/assets/`](https://github.com/itsjavi/pokemon-assets/tree/master/assets) folder.

---

Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion assets/sass/items.scss → src/sass/items.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
.pkitem {
display: inline-block;
vertical-align: middle;
background-image: url(../img/items.png);
background-image: url(../../assets/img/items.png);
image-rendering: crisp-edges;
image-rendering: -moz-crisp-edges;
image-rendering: -webkit-crisp-edges;
Expand Down
2 changes: 1 addition & 1 deletion assets/sass/marks.scss → src/sass/marks.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
.pkmark {
display: inline-block;
vertical-align: middle;
background-image: url(../img/marks.png);
background-image: url(../../assets/img/marks.png);
image-rendering: crisp-edges;
image-rendering: -moz-crisp-edges;
image-rendering: -webkit-crisp-edges;
Expand Down
4 changes: 2 additions & 2 deletions assets/sass/pokemon.scss → src/sass/pokemon.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.pkm.shiny {
background-image: url(../img/pokemon-shiny.png);
background-image: url(../../assets/img/pokemon-shiny.png);
}

.pkm-wrapper {
Expand All @@ -15,7 +15,7 @@
.pkm {
display: inline-block;
vertical-align: middle;
background-image: url(../img/pokemon.png);
background-image: url(../../assets/img/pokemon.png);
image-rendering: crisp-edges;
image-rendering: -moz-crisp-edges;
image-rendering: -webkit-crisp-edges;
Expand Down
2 changes: 1 addition & 1 deletion assets/sass/ribbons.scss → src/sass/ribbons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
.pkribbon {
display: inline-block;
vertical-align: middle;
background-image: url(../img/ribbons.png);
background-image: url(../../assets/img/ribbons.png);
image-rendering: crisp-edges;
image-rendering: -moz-crisp-edges;
image-rendering: -webkit-crisp-edges;
Expand Down
2 changes: 1 addition & 1 deletion assets/sass/symbols.scss → src/sass/symbols.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
.pksymbol {
display: inline-block;
vertical-align: middle;
background-image: url(../img/symbols.png);
background-image: url(../../assets/img/symbols.png);
image-rendering: crisp-edges;
image-rendering: -moz-crisp-edges;
image-rendering: -webkit-crisp-edges;
Expand Down
17 changes: 13 additions & 4 deletions src/scripts/generate-spritesheet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,22 +66,31 @@ HIGHEST=0
WIDEST_ALL=0
HIGHEST_ALL=0

css="
.${_CSS_PREFIX} {
styles_base_main="
display: inline-block;
vertical-align: middle;
background-image: url(../img/${_OUT_NAME}.png);
image-rendering: crisp-edges;
image-rendering: -moz-crisp-edges;
image-rendering: -webkit-crisp-edges;
image-rendering: pixelated;
"

css="
.${_CSS_PREFIX} {
background-image: url(../img/${_OUT_NAME}.png);
${styles_base_main}
}"
scss="$css

scss="
@mixin sprite-rect (\$w, \$h, \$x, \$y) {
width: \$w;
height: \$h;
background-position: \$x \$y;
}
.${_CSS_PREFIX} {
background-image: url(../../assets/img/${_OUT_NAME}.png);
${styles_base_main}
}
"
html="<!DOCTYPE html>
<html lang=\"en\">
Expand Down
2 changes: 1 addition & 1 deletion src/scripts/import-generated-spritesheet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ name=$1

rm -f "assets/css/${name}.css" "assets/sass/${name}.scss" "assets/img/${name}.png"
cp "tmp/output-${name}/css/styles.css" "assets/css/${name}.css"
cp "tmp/output-${name}/sass/styles.scss" "assets/sass/${name}.scss"
cp "tmp/output-${name}/sass/styles.scss" "src/sass/${name}.scss"
cp "tmp/output-${name}/img/sprites.png" "assets/img/${name}.png"
2 changes: 1 addition & 1 deletion src/scripts/import-shiny-pokemon-spritesheet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ cp "tmp/output-pokemon-shiny/img/sprites.png" "assets/img/pokemon-shiny.png"
extraCss='.pkm.shiny { background-image: url(../img/pokemon-shiny.png); }'

printf '%s\n%s\n' $extraCss "$(cat ./assets/css/pokemon.css)" >./assets/css/pokemon.css
printf '%s\n%s\n' $extraCss "$(cat ./assets/sass/pokemon.scss)" >./assets/sass/pokemon.scss
printf '%s\n%s\n' $extraCss "$(cat ./assets/sass/pokemon.scss)" >./src/sass/pokemon.scss

0 comments on commit f147700

Please sign in to comment.