Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove absolute url mentions #158

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
"version": "1.0.0",
"description": "rocket.watch frontend",
"main": "index.js",
"engines": {
"node": "18.x"
},
"scripts": {
"test": "make test"
},
Expand Down
12 changes: 6 additions & 6 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@

<!-- for Facebook -->
<meta property="og:type" content="article" />
<meta property="og:url" content="https://rocket.watch" />
<meta property="og:image" content="https://rocket.watch/assets/rocketwatch.png" />
<meta property="og:url" content="https://rocketwatch.space" />
<meta property="og:image" content="/assets/rocketwatch.png" />
<meta property="og:description" content="Watch Rocket Launches Live!" />


<!-- for Twitter -->
<meta name="twitter:card" content="summary" />
<meta name="twitter:title" content="rocket.watch" />
<meta name="twitter:description" content="Watch Rocket Launches Live!" />
<meta name="twitter:image" content="https://rocket.watch/assets/rocketwatch.png" />
<meta name="twitter:image" content="/assets/rocketwatch.png" />



Expand All @@ -34,8 +34,8 @@
"@context": "https://schema.org",
"@type": "Organization",
"name": "rocket.watch",
"url": "https://rocket.watch",
"logo": "https://rocket.watch/assets/icon.png",
"url": "https://rocketwatch.space",
"logo": "/assets/icon.png",
"sameAs": ["https://twitter.com/rocket_watch", "https://www.reddit.com/r/RocketWatch", "https://play.google.com/store/apps/details?id=pl.yasiu.rocketwatch"]
}
</script>
Expand Down Expand Up @@ -81,7 +81,7 @@
<li>
<a class="tooltipped" href="/#search" data-tooltip="Search"><i class="fas fa-search"></i></a>
</li>
<li><a class="waves-effect waves-light btn hoverable blurple" href="https://rocket.watch/discord" target="_blank"><i class="fab fa-discord"></i> Discord</a>
<li><a class="waves-effect waves-light btn hoverable blurple" href="/discord" target="_blank"><i class="fab fa-discord"></i> Discord</a>
</li>
</ul>
</nav>
Expand Down
4 changes: 2 additions & 2 deletions src/pages/agency.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ export default function agency(name) {
<div class="card">
<div class="card-image">
<a href="/#rocket=${launcher.id}">
<img src="${launcher.image_url || "https://rocket.watch/assets/rocket_placeholder.jpg"}">
<img src="${launcher.image_url || "/assets/rocket_placeholder.jpg"}">
</a>
<span class="card-title">
<a class="chip" href="/#rocket=${launcher.id}">${launcher.name}</a>
Expand Down Expand Up @@ -187,4 +187,4 @@ export default function agency(name) {
}
});
}
}
}
4 changes: 2 additions & 2 deletions src/pages/countdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export default function countdown(id) {
</div>
</div>
<div class="card-action" id="buttons">
<a class="waves-effect waves-light btn hoverable blurple" href="https://rocket.watch/discord" target="_blank"><i class="fab fa-discord"></i> Discord</a>
<a class="waves-effect waves-light btn hoverable blurple" href="/discord" target="_blank"><i class="fab fa-discord"></i> Discord</a>
<a class="waves-effect waves-light btn hoverable tooltipped" href="/#launch=${launch.launch_library_id || launch.slug}" data-tooltip="Load live sources">Exit countdown mode</a>
</div>`;

Expand Down Expand Up @@ -71,4 +71,4 @@ export default function countdown(id) {
$info.innerHTML = `<h1 class="white-text" onclick="location.reload(true)">${data.detail || "Error"}</h1>`;
}
});
}
}
2 changes: 1 addition & 1 deletion src/pages/live.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export default function watch(id, mode = "live") {
</div>
</div>
<div id="buttons">
<a class="waves-effect waves-light btn hoverable blurple" href="https://rocket.watch/discord" target="_blank"><i class="fab fa-discord"></i> Discord</a>
<a class="waves-effect waves-light btn hoverable blurple" href="/discord" target="_blank"><i class="fab fa-discord"></i> Discord</a>
<a class="waves-effect waves-light btn hoverable" href="/#launch=${launch.launch_library_id || launch.slug}">Exit TV mode</a>
</div>
<div class="card-tabs">
Expand Down
4 changes: 2 additions & 2 deletions src/pages/nation.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export default function nation(code) {
<div class="card">
<div class="card-image">
<a href="/#location=${location.id}">
<img src="${location.map_image || "https://rocket.watch/assets/rocket_placeholder.jpg"}">
<img src="${location.map_image || "/assets/rocket_placeholder.jpg"}">
</a>
<span class="card-title">
<a class="chip" href="/#location=${location.id}">${location.name}</a>
Expand All @@ -66,4 +66,4 @@ export default function nation(code) {
materialize();
});
});
}
}
4 changes: 2 additions & 2 deletions src/pages/rocket.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export default function rocket(id) {
<div class="card">
<div class="card-image">
<a href="/#rocket=${launcher.id}">
<img src="${launcher.image_url || "https://rocket.watch/assets/rocket_placeholder.jpg"}" >
<img src="${launcher.image_url || "/assets/rocket_placeholder.jpg"}" >
</a>
<span class="card-title">
<a class="chip" href="/#agency=${launcher.manufacturer.id}">${launcher.manufacturer.name}</a>
Expand All @@ -79,4 +79,4 @@ export default function rocket(id) {
});
}
materialize();
}
}
6 changes: 3 additions & 3 deletions src/pages/watch.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,10 @@ export default async function watch(id) {
if (data) {
const reddit_frame_select = document.getElementById("reddit_frame_select");
if (data.rocket.first_stage.cores && data.rocket.first_stage.cores[0].reused) {
$badges.innerHTML += `<a class="chip tooltipped"><img src="https://rocket.watch/res/reuse.png">Reused booster</a>`
$badges.innerHTML += `<a class="chip tooltipped"><img src="/res/reuse.png">Reused booster</a>`
}
if (data.rocket.second_stage.payloads && data.rocket.second_stage.payloads[0].reused) {
$badges.innerHTML += `<a class="chip tooltipped"><img src="https://rocket.watch/res/reuse.png">Reused capsule</a>`
$badges.innerHTML += `<a class="chip tooltipped"><img src="/res/reuse.png">Reused capsule</a>`
}
if (data.links && data.links.reddit_launch) {
window.reddit_posts.push({
Expand Down Expand Up @@ -311,4 +311,4 @@ export default async function watch(id) {
$info.innerHTML = `<h1 class="white-text" onclick="location.reload(true)">${data.detail || "Error"}</h1>`;
}
})
}
}