Skip to content

Commit

Permalink
♻️ Use relative links in URLs
Browse files Browse the repository at this point in the history
  • Loading branch information
AnandChowdhary committed Oct 28, 2020
1 parent 2a5a306 commit 4ed23a7
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 24 deletions.
7 changes: 2 additions & 5 deletions src/components/ActiveIncidents.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,12 @@
<h4>{incident.title.replace('🛑', '').replace('⚠️', '').trim()}</h4>
<div>
{config.i18n.activeIncidentSummary
.replace(
/\$DATE/g,
new Date(incident.created_at).toLocaleString()
)
.replace(/\$DATE/g, new Date(incident.created_at).toLocaleString())
.replace(/\$POSTS/g, incident.comments)}
</div>
</div>
<div class="f r">
<a href={`/incident/${incident.number}`}>
<a href={`incident/${incident.number}`}>
{config.i18n.incidentReport.replace(/\$NUMBER/g, incident.number)}
</a>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/components/History.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
</div>
</div>
<div class="f r">
<a href={`/incident/${incident.number}`}>
<a href={`../incident/${incident.number}`}>
{config.i18n.incidentReport.replace(/\$NUMBER/g, incident.number)}
</a>
</div>
Expand Down
19 changes: 5 additions & 14 deletions src/components/Incident.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -86,14 +86,12 @@
</dl>
<div class="r">
<p>
<a
href={`https://github.com/${config.owner}/${config.repo}/issues/${number}`}>
<a href={`https://github.com/${config.owner}/${config.repo}/issues/${number}`}>
{config.i18n.incidentSubscribe}
</a>
</p>
<p>
<a
href={`https://github.com/${config.owner}/${config.repo}/issues/${number}`}>
<a href={`https://github.com/${config.owner}/${config.repo}/issues/${number}`}>
{config.i18n.incidentViewOnGitHub}
</a>
</p>
Expand All @@ -108,20 +106,13 @@
{@html config.i18n.incidentCommentSummary
.replace(
/\$DATE/,
`<a href=${comment.html_url}>${new Date(
comment.created_at
).toLocaleString()}</a>`
`<a href=${comment.html_url}>${new Date(comment.created_at).toLocaleString()}</a>`
)
.replace(
/\$AUTHOR/,
`<a href=${comment.user.html_url}>@${comment.user.login}</a>`
)}
.replace(/\$AUTHOR/, `<a href=${comment.user.html_url}>@${comment.user.login}</a>`)}
</div>
</article>
{/each}
{/if}
</section>

<footer>
<a href="/">{config.i18n.incidentBack}</a>
</footer>
<footer><a href="../">{config.i18n.incidentBack}</a></footer>
2 changes: 1 addition & 1 deletion src/components/Incidents.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
</div>
</div>
<div class="f r">
<a href={`/incident/${incident.number}`}>
<a href={`incident/${incident.number}`}>
{config.i18n.incidentReport.replace(/\$NUMBER/g, incident.number)}
</a>
</div>
Expand Down
4 changes: 1 addition & 3 deletions src/components/LiveStatus.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,7 @@
<article
class={`${site.status} link`}
style={`background-image: url("https://github.com/raw/${owner}/${repo}/master/graphs/${site.slug}.png`}>
<h4>
<a href={`/history/${site.slug}`}>{site.name}</a>
</h4>
<h4><a href={`history/${site.slug}`}>{site.name}</a></h4>
<div>
{@html config.i18n.overallUptime.replace(/\$UPTIME/g, site.uptime)}
</div>
Expand Down

0 comments on commit 4ed23a7

Please sign in to comment.