Skip to content
Snippets Groups Projects
Verified Commit c4562e5f authored by Louis's avatar Louis :fire:
Browse files

Fix image paths for Gitlab Pages

parent 2bfdb3c6
Branches master
No related tags found
No related merge requests found
Pipeline #214 passed with stages
in 56 seconds
...@@ -18,8 +18,8 @@ ...@@ -18,8 +18,8 @@
{ {
"name": "charles", "name": "charles",
"images": { "images": {
"text": "/charles-text.png", "text": "charles-text.png",
"entity": "/charles.png" "entity": "charles.png"
}, },
"text_start_locations": [ "text_start_locations": [
{ {
...@@ -37,8 +37,8 @@ ...@@ -37,8 +37,8 @@
{ {
"name": "wall", "name": "wall",
"images": { "images": {
"text": "/wall-text.png", "text": "wall-text.png",
"entity": "/wall.png" "entity": "wall.png"
}, },
"text_start_locations": [ "text_start_locations": [
{ {
...@@ -98,7 +98,7 @@ ...@@ -98,7 +98,7 @@
"data": "adjectives/you" "data": "adjectives/you"
}, },
"images": { "images": {
"text": "/you-text.png" "text": "you-text.png"
}, },
"text_start_locations": [ "text_start_locations": [
{ {
...@@ -114,7 +114,7 @@ ...@@ -114,7 +114,7 @@
"data": "adjectives/push" "data": "adjectives/push"
}, },
"images": { "images": {
"text": "/push-text.png" "text": "push-text.png"
}, },
"text_start_locations": [ "text_start_locations": [
{ {
...@@ -133,7 +133,7 @@ ...@@ -133,7 +133,7 @@
} }
}, },
"images": { "images": {
"text": "/stop-text.png" "text": "stop-text.png"
}, },
"text_start_locations": [ "text_start_locations": [
{ {
......
...@@ -23,8 +23,8 @@ ...@@ -23,8 +23,8 @@
{ {
"name": "charles", "name": "charles",
"images": { "images": {
"text": "/charles-text.png", "text": "charles-text.png",
"entity": "/charles.png" "entity": "charles.png"
}, },
"text_start_locations": [ "text_start_locations": [
{ {
...@@ -41,8 +41,8 @@ ...@@ -41,8 +41,8 @@
}, { }, {
"name": "flag", "name": "flag",
"images": { "images": {
"text": "/flag-text.png", "text": "flag-text.png",
"entity": "/flag.png" "entity": "flag.png"
}, },
"text_start_locations": [ "text_start_locations": [
{ {
...@@ -60,8 +60,8 @@ ...@@ -60,8 +60,8 @@
{ {
"name": "wall", "name": "wall",
"images": { "images": {
"text": "/wall-text.png", "text": "wall-text.png",
"entity": "/wall.png" "entity": "wall.png"
}, },
"text_start_locations": [ "text_start_locations": [
{ {
...@@ -257,7 +257,7 @@ ...@@ -257,7 +257,7 @@
"data": "adjectives/you" "data": "adjectives/you"
}, },
"images": { "images": {
"text": "/you-text.png" "text": "you-text.png"
}, },
"text_start_locations": [ "text_start_locations": [
{ {
...@@ -273,7 +273,7 @@ ...@@ -273,7 +273,7 @@
"data": "adjectives/push" "data": "adjectives/push"
}, },
"images": { "images": {
"text": "/push-text.png" "text": "push-text.png"
}, },
"text_start_locations": [ "text_start_locations": [
{ {
...@@ -293,7 +293,7 @@ ...@@ -293,7 +293,7 @@
} }
}, },
"images": { "images": {
"text": "/stop-text.png" "text": "stop-text.png"
}, },
"text_start_locations": [ "text_start_locations": [
{ {
...@@ -312,7 +312,7 @@ ...@@ -312,7 +312,7 @@
} }
}, },
"images": { "images": {
"text": "/win-text.png" "text": "win-text.png"
}, },
"text_start_locations": [ "text_start_locations": [
{ {
......
...@@ -82,7 +82,7 @@ export default class Level { ...@@ -82,7 +82,7 @@ export default class Level {
if (source.hasOwnProperty('connectors')) { if (source.hasOwnProperty('connectors')) {
for (const { x, y, type: cType } of source.connectors) { for (const { x, y, type: cType } of source.connectors) {
const entity = new Entity([x, y], textNoun) const entity = new Entity([x, y], textNoun)
entity.fallbackImage = `/${ cType }-text.png` entity.fallbackImage = `${ cType }-text.png`
entity.meta = { entity.meta = {
type: 'connector', type: 'connector',
name: cType, name: cType,
......
...@@ -95,7 +95,7 @@ export default class Level extends React.Component<Props> { ...@@ -95,7 +95,7 @@ export default class Level extends React.Component<Props> {
<div className="level-container"> <div className="level-container">
{[...range(width)].map(x => {[...range(width)].map(x =>
[...range(height)].map(y => ( [...range(height)].map(y => (
<img src="/background.png" className="level-tile" style={{ <img src="background.png" className="level-tile" style={{
left: (margin * x) + (x * 32 * scale), left: (margin * x) + (x * 32 * scale),
top: (margin * y) + (y * 32 * scale), top: (margin * y) + (y * 32 * scale),
width: size * scale, width: size * scale,
...@@ -123,7 +123,7 @@ export default class Level extends React.Component<Props> { ...@@ -123,7 +123,7 @@ export default class Level extends React.Component<Props> {
const top = (margin * y) + (y * 32 * scale) const top = (margin * y) + (y * 32 * scale)
return ( return (
<img className="level-entity" src={`/${ cType }-text.png`} style={{ <img className="level-entity" src={`${ cType }-text.png`} style={{
left, left,
top, top,
width: size * scale, width: size * scale,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment