Skip to content

Commit

Permalink
feat(server/web): add a donation buttion
Browse files Browse the repository at this point in the history
  • Loading branch information
lukewhrit committed Jul 6, 2024
1 parent be01023 commit f9d5afd
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 2 deletions.
9 changes: 9 additions & 0 deletions internal/server/web/document.html
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,15 @@
<path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path>
</svg>
</button>

<p id="donate-long">
Keep Spacebin free of ads by
<a id="donate-link" href="https://github.com/sponsors/lukewhrit" aria-label="Donate to Spacebin" target="_blank">donating.</a>
💕
</p>
<p id="donate-short">
<a id="short-donate-link" href="https://github.com/sponsors/lukewhrit" aria-label="Donate to Spacebin" target="_blank">Donate 💕</a>
</p>
</header>

<main>
Expand Down
13 changes: 11 additions & 2 deletions internal/server/web/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,21 +35,30 @@
</svg>
</button>

<a id="github" href="https://github.com/orca-group/spirit" aria-label="Spacebin Github">
<a id="github" href="https://github.com/lukewhrit/spacebin" aria-label="Spacebin Github" target="_blank">
<svg fill="none" height="24" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"
stroke-width="2" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
<path
d="M9 19c-5 1.5-5-2.5-7-3m14 6v-3.87a3.37 3.37 0 0 0-.94-2.61c3.14-.35 6.44-1.54 6.44-7A5.44 5.44 0 0 0 20 4.77 5.07 5.07 0 0 0 19.91 1S18.73.65 16 2.48a13.38 13.38 0 0 0-7 0C6.27.65 5.09 1 5.09 1A5.07 5.07 0 0 0 5 4.77a5.44 5.44 0 0 0-1.5 3.78c0 5.42 3.3 6.61 6.44 7A3.37 3.37 0 0 0 9 18.13V22" />
</svg>
</a>

<a id="wiki" href="https://github.com/orca-group/spirit/blob/main/README.md/#-spirit" aria-label="Spacebin Documentation">
<a id="wiki" href="https://github.com/lukewhrit/spacebin/blob/main/README.md/#-spirit" aria-label="Spacebin Documentation" target="_blank">
<svg fill="none" height="24" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"
stroke-width="2" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
<path d="M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z" />
<path d="M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z" />
</svg>
</a>

<p id="donate-long">
Keep Spacebin free of ads by
<a id="donate-link" href="https://github.com/sponsors/lukewhrit" aria-label="Donate to Spacebin" target="_blank">donating.</a>
💕
</p>
<p id="donate-short">
<a id="short-donate-link" href="https://github.com/sponsors/lukewhrit" aria-label="Donate to Spacebin" target="_blank">Donate 💕</a>
</p>
</header>

<main>
Expand Down
22 changes: 22 additions & 0 deletions internal/server/web/static/global.css
Original file line number Diff line number Diff line change
Expand Up @@ -122,3 +122,25 @@ h1 {
#warning {
color: #F97583;
}

#donate-long, #donate-short {
margin: 0 0 0 auto;
}

#donate-link:hover, #short-donate-link:hover {
text-decoration: underline;
}

#donate-short {
display: none;
}

@media screen and (max-width: 600px) {
#donate-long {
display: none;
}

#donate-short {
display: block;
}
}

0 comments on commit f9d5afd

Please sign in to comment.