Skip to content

Commit

Permalink
Uses inline svg, migrates static/ to src/svg/
Browse files Browse the repository at this point in the history
  • Loading branch information
mrharpo committed Jan 9, 2024
1 parent 3beb81c commit af5434b
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 4 deletions.
1 change: 0 additions & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ jobs:
# Fixes duplicate "main" definition in package.json
sed -i '17d' node_modules/javascript-astar/package.json
npm run ci
cp -r static build/
- name: 🚀 Deploy
uses: JamesIves/github-pages-deploy-action@v4
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"scripts": {
"build": "parcel build --no-cache --dist-dir dist src/index.html",
"ci": "parcel build --no-cache --dist-dir build --public-url /LaunchChess src/index.html src/*.svg",
"dev": "parcel --port 5555 --no-cache --dist-dir dist src/index.html"
"dev": "parcel --no-cache --dist-dir dist src/index.html src/*.svg"
},
"browserslist": [
"defaults"
Expand Down
6 changes: 4 additions & 2 deletions src/Toolbar.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import m from 'mithril'
import { confirm } from 'alertifyjs'
import '../node_modules/material-design-icons-iconfont/dist/material-design-icons.css'
import chess_tile from './svg/Chess_tile_ql.svg'


export const StatusIcon = state =>
m(
Expand Down Expand Up @@ -81,7 +83,7 @@ export const ForwardsButton = (state, actions) =>
'i.material-icons',
{
title: 'does nothing',
onclick: e => {},
onclick: e => { },
},
'arrow_right'
)
Expand All @@ -106,7 +108,7 @@ export const PiecesToggle = (state, actions) =>
title: state.pieces ? 'hide pieces' : 'show pieces',
onclick: e => actions.togglePieces(),
},
m('img.svgicon', { src: 'static/Chess_tile_ql.svg' })
m('img.svgicon', { src: chess_tile })
)

export const HistoryIncrement = (state, actions) =>
Expand Down
File renamed without changes
File renamed without changes
File renamed without changes

0 comments on commit af5434b

Please sign in to comment.