Replace patreon links with links to the home page

This commit is contained in:
2023-09-15 12:02:36 +02:00
parent d57a5c788d
commit 6dc282946c
9 changed files with 84 additions and 99 deletions

View File

@@ -18,14 +18,14 @@ onMount(() => {
}
// 30% pixeldrain socials
// 20% pixeldrain socials
// 20% reviews
// 50% patreon
let rand = Math.random()
if (rand < 0.3) {
if (rand < 0.2) {
set_ad_type("socials")
} else if (rand < 0.5) {
} else if (rand < 0.4) {
set_ad_type("reviews")
} else {
set_ad_type("patreon_support")
@@ -149,54 +149,16 @@ head.valueimpression_loaded.subscribe(v => {
<img bind:this={banner} usemap="#socials_map" class="banner" src="/res/img/advertising/pixeldrain_socials.webp" style="display: inline-block; width: 728px; height: 90px;" alt="Pixeldrain social media"/>
{:else if ad_type === "patreon_support"}
<div class="banner support_banner">
<span style="display: block; margin-bottom: 2px;">
No ads today. Pixeldrain is currently funded by our subscribers!
</span>
<a href="https://www.patreon.com/join/pixeldrain" rel="noreferrer" class="button button_highlight" target="_blank">
<a href="/#pro" rel="noreferrer" class="button button_highlight" target="_blank">
<i class="icon">bolt</i>
Support Pixeldrain to help keep the project going
</a>
</div>
{:else if ad_type === "twitter"}
<div class="banner social_button">
<a href="https://twitter.com/Fornax96" rel="noreferrer" class="button" target="_blank" style="background-color: #1a8cd8; color: #ffffff;">
<Twitter style="color: #ffffff;"/>
Follow Pixeldrain on Twitter: @Fornax96
</a>
</div>
{:else if ad_type === "mastodon"}
<div class="banner social_button">
<a href="https://mastodon.social/@fornax" rel="noreferrer" class="button" target="_blank" style="background-color: #595aff; color: #ffffff;">
<Mastodon style="color: #ffffff;"/>
Follow Pixeldrain on Mastodon: fornax@mastodon.social
</a>
</div>
{:else if ad_type === "reddit"}
<div class="banner social_button">
<a href="https://www.reddit.com/r/PixelDrain"
rel="noreferrer" class="button" target="_blank" style="background-color: #ff4500; color: #ffffff;"
>
<Reddit style="color: #ffffff;"/>
Follow Pixeldrain on Reddit: /r/pixeldrain
</a>
</div>
{:else if ad_type === "lemmy"}
<div class="banner social_button">
<a href="https://lemmy.fornaxian.tech/c/pixeldrain"
rel="noreferrer" class="button" target="_blank" style="background-color: #14854f; color: #ffffff;"
>
Follow Pixeldrain on Lemmy: lemmy.fornaxian.tech
</a>
</div>
{:else if ad_type === "socials"}
<div class="banner center">
@@ -268,10 +230,6 @@ head.valueimpression_loaded.subscribe(v => {
text-align: center;
padding: 2px;
}
.social_button {
text-align: center;
padding: 4px;
}
.socials {
display: inline-block;
text-align: center;

View File

@@ -32,8 +32,8 @@ $: transfer_left = $download_limits.transfer_limit - $download_limits.transfer_l
<p>
<strong>
<a href="https://www.patreon.com/join/pixeldrain" target="_blank" class="button button_highlight" rel="noreferrer">
<i class="icon">bolt</i> Support Pixeldrain on Patreon
<a href="/#pro" target="_blank" class="button button_highlight" rel="noreferrer">
<i class="icon">bolt</i> Upgrade your account
</a>
to disable the transfer limit
</strong>

View File

@@ -1,5 +1,5 @@
<script>
import { createEventDispatcher, onMount } from "svelte";
import { createEventDispatcher } from "svelte";
import { formatDataVolume } from "../../util/Formatting.svelte";
import { download_limits } from "../DownloadLimitStore";
import IconBlock from "./IconBlock.svelte";
@@ -48,8 +48,10 @@ let file = {
</p>
{/if}
<p>
This warning disappears when you are a
<a href="https://www.patreon.com/join/pixeldrain/checkout?rid=5736701&cadence=12" target="_blank" rel="noreferrer">Patreon supporter</a>,
This warning disappears when you have a
<a href="/#pro" target="_blank">
premium account
</a>
or when the uploader of the file enables
<a href="/user/subscription">bandwidth sharing</a> on their Pro account
(and their data cap has not been used up). Using a download manager with
@@ -72,7 +74,7 @@ let file = {
<button on:click={() => {dispatch("download")}}>
<i class="icon">download</i> Download
</button>
<a href="https://www.patreon.com/join/pixeldrain" target="_blank" class="button button_highlight" rel="noreferrer">
<i class="icon">bolt</i> Support Pixeldrain on Patreon
<a href="/#pro" target="_blank" class="button button_highlight">
<i class="icon">bolt</i> Upgrade your account
</a>
</IconBlock>

View File

@@ -41,8 +41,8 @@ export let file = {
{formatDuration((file.size/file.download_speed_limit)*1000)}
</li>
<li>
<a href="https://www.patreon.com/join/pixeldrain" target="_blank" class="button button_highlight" rel="noreferrer">
<i class="icon">bolt</i> Support Pixeldrain on Patreon
<a href="/#pro" target="_blank" class="button button_highlight">
<i class="icon">bolt</i> Upgrade your account
</a>
and earn my eternal gratitude
{#if !window.user_authenticated}

View File

@@ -36,7 +36,7 @@ onMount(() => {
<div class="top_row pro_feat">
<span class="bold">Pro</span>
</div>
<div class="top_row pro_feat">
<div class="top_row prepaid_feat">
<span class="bold">Prepaid</span> (currently only in Europe)
</div>
@@ -51,7 +51,7 @@ onMount(() => {
<span class="bold">€40 / year</span><br/>
Charged through Patreon
</div>
<div class="feature_cell pro_feat">
<div class="feature_cell prepaid_feat">
<span class="bold">€2 / month</span><br/>
From account credit
</div>
@@ -67,7 +67,7 @@ onMount(() => {
<span class="bold">2 TB per month</span><br/>
Transfer limit used for downloading and sharing files
</div>
<div class="feature_cell vspan2 pro_feat">
<div class="feature_cell vspan2 prepaid_feat">
<span class="bold">€2.00 per TB</span><br/>
Used for downloading and sharing files. There is no limit. You only
@@ -91,7 +91,7 @@ onMount(() => {
<span class="bold">No limit</span><br/>
But files expire when they are not downloaded
</div>
<div class="feature_cell pro_feat">
<div class="feature_cell prepaid_feat">
<span class="bold">€4 / TB / month</span><br/>
There is no limit. You only pay for what you use
</div>
@@ -108,9 +108,9 @@ onMount(() => {
</div>
<div class="feature_cell pro_feat">
<span class="bold">240 days</span><br/>
After last download
After last download. Plans without expiry are available on Patreon
</div>
<div class="feature_cell pro_feat">
<div class="feature_cell prepaid_feat">
<span class="bold">Never</span><br/>
While subscription is active
</div>
@@ -147,7 +147,7 @@ onMount(() => {
<div class="feature_cell free_feat span2">
No customization
</div>
<div class="feature_cell pro_feat">
<div class="feature_cell prepaid_feat">
Custom <span class="bold">colour theme</span>,
<span class="bold">background</span> and
<span class="bold">banner images</span>
@@ -187,7 +187,7 @@ onMount(() => {
Subscription managed by Patreon
{/if}
</div>
<div class="bottom_row pro_feat">
<div class="bottom_row prepaid_feat">
{#if window.user.username === ""}
<!-- User is not logged in -->
Account required<br/>
@@ -343,8 +343,8 @@ header {
box-shadow: inset 0 0 10px -4px var(--shadow_color);
}
header > h1 {
margin-top: 70px;
margin-bottom: 70px;
margin-top: 60px;
margin-bottom: 60px;
color: #ffffff;
text-shadow: 0 0 3px #000000;
}
@@ -399,7 +399,10 @@ header > h1 {
border: 1px solid var(--highlight_color);
}
.free_feat {
border: 1px solid var(--danger_color);
border: 1px solid #ebcb8b;
}
.prepaid_feat {
border: 1px solid #ec2cfa;
}
.span2 {
grid-column: span 2;

View File

@@ -77,8 +77,8 @@ header {
box-shadow: inset 0 0 10px -4px var(--shadow_color);
}
header > h1 {
margin-top: 70px;
margin-bottom: 70px;
margin-top: 60px;
margin-bottom: 60px;
color: #ffffff;
text-shadow: 0 0 3px #000000;
}

View File

@@ -252,7 +252,8 @@ onDestroy(() => {
{/if}
{#if transfer_cap === -1}
Premium transfers in the last 30 days: {formatDataVolume(transfer_used, 3)}<br/>
Premium transfers in the last 30 days: {formatDataVolume(transfer_used, 3)}.
<a href="/user/sharing/bandwidth">Configure limit</a>
{:else}
Premium transfers:
{formatDataVolume(transfer_used, 3)}

View File

@@ -1,5 +1,4 @@
<script>
import { formatDataVolume } from "../util/Formatting.svelte"
import ProgressBar from "../util/ProgressBar.svelte";
export let total = 0
@@ -10,24 +9,46 @@ $: frac = used / total
<ProgressBar total={total} used={used}></ProgressBar>
{#if frac > 0.99}
{#if frac > 1}
<div class="highlight_yellow">
You have used all of your data cap. People can still download your
files, but advertisements are shown and hotlinking is disabled.
<br/>
<a class="button button_highlight" href="https://www.patreon.com/join/pixeldrain">
Upgrade options
<p>
You have used all of your data cap. People can still download your
files, but premium features are disabled. This means that the
download page shows pixeldrain branding, people who download your
files have a daily download limit and hotlinking is disabled.
</p>
{#if window.user.monthly_transfer_cap > 0}
<p>
You have a billshock limit configured. <a
href="/user/sharing/bandwidth">increase or disable the limit</a> to
continue sharing files.
</p>
{/if}
<a class="button button_highlight" href="/#pro">
<i class="icon">bolt</i> Upgrade options
</a>
</div>
{:else if frac > 0.8}
<div class="highlight_blue">
You have used {(frac*100).toFixed(0)}% of your data cap. If your
data runs out people won't be able to download your files directly
from the API anymore, ads will be shown on the file viewer and
transfer rates will be limited.
<br/>
<a class="button button_highlight" href="https://www.patreon.com/join/pixeldrain">
Upgrade options
<p>
You have used {(frac*100).toFixed(0)}% of your data cap. If your
data runs out people won't be able to download your files directly
from the API anymore, ads will be shown on the file viewer and
transfer rates will be limited.
</p>
{#if window.user.monthly_transfer_cap > 0}
<p>
You have a billshock limit configured. <a
href="/user/sharing/bandwidth">increase or disable the limit</a> to
continue sharing files.
</p>
{/if}
<a class="button button_highlight" href="/#pro">
<i class="icon">bolt</i> Upgrade options
</a>
</div>
{/if}

View File

@@ -18,24 +18,24 @@ out of
<div class="highlight_red">
<span class="warn_text">You are using more than 200% of your allowed storage space!</span>
<p>
We have started deleting your files to free up space. If you do
not want to lose any more files please upgrade to a storage plan
which supports the volume of storage which you need:
<a class="button button_highlight" href="https://www.patreon.com/join/pixeldrain">
Upgrade options
</a>
We have started deleting your files to free up space. If you do not
want to lose any more files please upgrade to a subscription which
supports the volume of storage which you need.
</p>
<a class="button button_highlight" href="/#pro">
<i class="icon">bolt</i> Upgrade options
</a>
</div>
{:else if frac > 0.99}
{:else if frac > 1.0}
<div class="highlight_red">
<p>
You have used all of your storage space. You won't be able to
upload new files anymore. Please upgrade to a higher support
tier to continue uploading files:
<a class="button button_highlight" href="https://www.patreon.com/join/pixeldrain">
Upgrade options
</a>
tier to continue uploading files.
</p>
<a class="button button_highlight" href="/#pro">
<i class="icon">bolt</i> Upgrade options
</a>
<p>
Your files will not be deleted any sooner than normal at this
moment. When your storage usage is over 200% we will start
@@ -48,11 +48,11 @@ out of
You have used {(frac*100).toFixed(0)}% of your
storage space. If your storage space runs out you won't be able
to upload new files anymore. Please upgrade to a higher support
tier to continue uploading files:
<a class="button button_highlight" href="https://www.patreon.com/join/pixeldrain">
Upgrade options
</a>
tier to continue uploading files.
</p>
<a class="button button_highlight" href="/#pro">
<i class="icon">bolt</i> Upgrade options
</a>
</div>
{/if}