From d5f478b3c6b6c6c2b3f33f40bb2681e18f64dc38 Mon Sep 17 00:00:00 2001 From: Danila Fedorin Date: Mon, 23 Aug 2021 18:41:46 -0700 Subject: [PATCH] Add donations --- assets/scss/donate.scss | 36 ++++++++++++++++++++++++ content/about.md | 13 +++++++++ layouts/shortcodes/donate_css.html | 2 ++ layouts/shortcodes/donation_method.html | 4 +++ layouts/shortcodes/donation_methods.html | 3 ++ 5 files changed, 58 insertions(+) create mode 100644 assets/scss/donate.scss create mode 100644 layouts/shortcodes/donate_css.html create mode 100644 layouts/shortcodes/donation_method.html create mode 100644 layouts/shortcodes/donation_methods.html diff --git a/assets/scss/donate.scss b/assets/scss/donate.scss new file mode 100644 index 0000000..ce16703 --- /dev/null +++ b/assets/scss/donate.scss @@ -0,0 +1,36 @@ +@import "../../themes/vanilla/assets/scss/mixins.scss"; + +.donation-methods { + padding: 0; + border: none; + border-spacing: 0 0.5rem; + + td { + padding: 0; + overflow: hidden; + + &:first-child { + @include bordered-block; + text-align: right; + border-right: none; + border-top-right-radius: 0; + border-bottom-right-radius: 0; + padding-left: 0.5em; + padding-right: 0.5rem; + } + + &:last-child { + @include bordered-block; + border-top-left-radius: 0; + border-bottom-left-radius: 0; + } + } + + code { + width: 100%; + box-sizing: border-box; + border: none; + display: inline-block; + padding: 0.25rem; + } +} diff --git a/content/about.md b/content/about.md index 595915b..78e4fed 100644 --- a/content/about.md +++ b/content/about.md @@ -1,6 +1,8 @@ --- title: About --- +{{< donate_css >}} + I'm Daniel, a Computer Science student currently working towards my Master's Degree at Oregon State University. Due to my initial interest in calculators and compilers, I got involved in the Programming Language Theory research group, gaining same experience in formal verification, domain specific language, and explainable computing. @@ -28,3 +30,14 @@ without any CSS. * __Source code__: This blog is open source, but not on GitHub. Instead, you can find the code on my [Gitea instance](https://dev.danilafe.com/Web-Projects/blog-static). If you use this code for your own site, I would prefer that you don't copy the theme. + +### Donate +I don't run ads, nor do I profit from writing anything on here. I have no trouble paying for hosting, +and I write my articles voluntarily, for my own enjoyment. However, if you found something particularly +helpful on here, and would like to buy me a cup of coffee or help host the site, you can donate using +the method(s) below. + +{{< donation_methods >}} +{{< donation_method "Bitcoin" "1BbXPZhdzv4xHq5LYhme3xBiUsHw5fmafd" >}} +{{< donation_method "Ethereum" "0xd111E49344bEC80570e68EE0A00b87B1EFcb5D56" >}} +{{< /donation_methods >}} diff --git a/layouts/shortcodes/donate_css.html b/layouts/shortcodes/donate_css.html new file mode 100644 index 0000000..157d639 --- /dev/null +++ b/layouts/shortcodes/donate_css.html @@ -0,0 +1,2 @@ +{{ $style := resources.Get "scss/donate.scss" | resources.ToCSS | resources.Minify }} + diff --git a/layouts/shortcodes/donation_method.html b/layouts/shortcodes/donation_method.html new file mode 100644 index 0000000..00d82f3 --- /dev/null +++ b/layouts/shortcodes/donation_method.html @@ -0,0 +1,4 @@ + + {{ .Get 0 }} + {{ .Get 1 }} + diff --git a/layouts/shortcodes/donation_methods.html b/layouts/shortcodes/donation_methods.html new file mode 100644 index 0000000..fefd506 --- /dev/null +++ b/layouts/shortcodes/donation_methods.html @@ -0,0 +1,3 @@ + + {{ .Inner }} +