Skip to content

Commit

Permalink
Merge pull request #440 from titanism/master
Browse files Browse the repository at this point in the history
feat: fixed clickable article in status page (closes #615)
  • Loading branch information
AnandChowdhary committed Jul 20, 2022
2 parents 7c332f7 + 35bc432 commit b4ed507
Showing 1 changed file with 19 additions and 32 deletions.
51 changes: 19 additions & 32 deletions src/components/LiveStatus.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -98,26 +98,23 @@
<Loading />
{:else if sites.length}
{#each sites as site}
<article class={`${site.status} link`}>
<h4>
<article
class={`${site.status} link graph`}
style="--background: url('{`${graphsBaseUrl}/${site.slug}/response-time${
selected === "day"
? "-day"
: selected === "week"
? "-week"
: selected === "month"
? "-month"
: selected === "year"
? "-year"
: ""
}.png`}')"
><h4>
<img class="icon" alt="" src={site.icon} />
<a href={`${config.path}/history/${site.slug}`}>{site.name}</a>
</h4>
<img
alt=""
class="graph"
src={`${graphsBaseUrl}/${site.slug}/response-time${
selected === "day"
? "-day"
: selected === "week"
? "-week"
: selected === "month"
? "-month"
: selected === "year"
? "-year"
: ""
}.png`}
/>
<div>
{@html config.i18n.overallUptime.split("$UPTIME")[0]}
<span class="data"
Expand Down Expand Up @@ -156,21 +153,11 @@
</section>

<style>
article {
position: relative;
}
article > * {
position: relative;
z-index: 2;
}
article .graph {
z-index: 1;
height: 1rem;
position: absolute;
right: 0;
top: 0;
bottom: 0;
height: 100%;
article.graph {
background-image: var(--background);
background-size: contain;
background-repeat: no-repeat;
background-position: center right;
}
.icon {
height: 1rem;
Expand Down

0 comments on commit b4ed507

Please sign in to comment.