Skip to content
Open
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
62 changes: 60 additions & 2 deletions src/lib/components/Doomers.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
note?: string
number: number
source: string
isGrounding?: boolean
}
let doomers: Doomer[] = [
{
Expand Down Expand Up @@ -207,16 +208,51 @@
probability: '99.99%',
number: 0.99999999,
source: 'https://twitter.com/romanyam/status/1767575356155027503'
},
{
name: 'Russian Roulette (10 trigger pulls)',
probability: '83.9%',
number: 0.8385,
source: 'https://en.wikipedia.org/wiki/Russian_roulette',
isGrounding: true
},
{
name: 'Gunshot wound to the chest',
probability: '33.8%',
number: 0.338,
source: 'https://www.med.upenn.edu/trauma/penetrating-trauma.html',
isGrounding: true
},
{
name: 'Russian Roulette (1 trigger pull)',
probability: '16.7%',
number: 0.1667,
source: 'https://en.wikipedia.org/wiki/Russian_roulette',
isGrounding: true
},
{
name: 'BASE jumping every week for 1 year',
probability: '2%',
number: 0.02,
source: 'https://skydiveguides.com/is-base-jumping-dangerous/',
isGrounding: true
},
{
name: 'Shark attack (yearly risk)',
probability: '0.00002%',
number: 0.0000002,
source: 'https://www.theguardian.com/science/2011/aug/17/shark-attacks-rare-deaths-rarer',
isGrounding: true
}
]
doomers = doomers.sort((a, b) => b.number - a.number)
</script>

<ul>
{#each doomers as doomer (doomer.name)}
<li class="doomer">
<li class="doomer" class:grounding={doomer.isGrounding}>
<div class="pdoom">
<a href={doomer.source}>

Check warning on line 255 in src/lib/components/Doomers.svelte

View workflow job for this annotation

GitHub Actions / pnpm-check

Use $lib/components/Link.svelte or $lib/components/LinkWithoutIcon.svelte instead
<b>
{doomer.probability}
</b>
Expand All @@ -224,7 +260,7 @@
</div>
<div class="details">
<h3 class="name">
<div class="bar" style={`width: calc(${doomer.number * 100}%`} />
<div class="bar" style={`width: calc(${doomer.number * 100}%)`} />
{doomer.name}
{#if doomer.title}
<div class="title">
Expand Down Expand Up @@ -254,6 +290,28 @@
z-index: 2;
}

.grounding .bar {
background-color: #666;
opacity: 0.5;
}

.grounding .pdoom a {
color: #666;
}

.grounding .name {
font-style: italic;
opacity: 0.7;
}

.grounding-label {
font-size: 0.7rem;
font-weight: normal;
margin-left: 0.5rem;
opacity: 0.5;
font-style: normal;
}

.note {
font-size: 0.8rem;
}
Expand Down
Loading