Skip to content

Commit 080fe3f

Browse files
committed
first setup for donations
1 parent e41e0ac commit 080fe3f

File tree

8 files changed

+54
-2
lines changed

8 files changed

+54
-2
lines changed

content/english/donation.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
title: Donation
3+
subtitle: >
4+
Algorithm Audit is dedicated to upholding digital practices that respect
5+
individual rights. This commitment extends to our webiste.
6+
image: /images/svg-illustrations/faq.svg
7+
---
8+
9+
{{< donate title="sad" >}}

layouts/partials/footer.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,9 @@ <h3 style="color:#005aa7;">{{$newsletter}}</h3>
6767
</div>
6868
<!-- /form -->
6969

70+
<!-- Donation -->
71+
<a href={{ "/donation" | relURL }}>Donate</a>
72+
<!-- /Donation -->
7073
</div>
7174
</div>
7275
<!-- /desktop version -->

layouts/shortcodes/donate.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{{ $_hugo_config := `{ "version": 1 }` }}
2+
3+
<script src=https://donorbox.org/widget.js paypalExpress="false"></script><iframe src="https://donorbox.org/embed/open-source-ai-auditing-tools?language=en" name="donorbox" allowpaymentrequest="allowpaymentrequest" seamless="seamless" frameborder="0" scrolling="no" height="900px" width="100%" style="max-width: 500px; min-width: 250px; max-height:none!important" allow="payment"></iframe>

tina/collections/pages/donation.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
/**
2+
* @type {import('tinacms').Collection}
3+
*/
4+
import building_blocks from "../shared/page/building_blocks";
5+
6+
export default {
7+
name: "Donation",
8+
label: "Donation",
9+
path: "content/",
10+
match: {
11+
include: '*/donation',
12+
},
13+
fields: building_blocks,
14+
};

tina/collections/shared/page/building_blocks.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import ai_policy_observatory from "../templates/ai_policy_observatory";
1515
import button from "../templates/button";
1616
import container_open from "../templates/container_open";
1717
import container_close from "../templates/container_close";
18+
import donation from "../templates/donation";
1819
import form1 from "../templates/form1";
1920
import form2 from "../templates/form2";
2021
import pdf_frame from "../templates/pdf_frame";
@@ -48,6 +49,7 @@ let building_blocks: TinaField[] = [
4849
button,
4950
container_open,
5051
container_close,
52+
donation,
5153
form1,
5254
form2,
5355
template_image,
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import { RichTextTemplate } from "@tinacms/schema-tools/dist/types/index"
2+
let template : RichTextTemplate = {
3+
name: 'donate',
4+
label: 'Donation box',
5+
match: {
6+
start: '{{<',
7+
end: '>}}'
8+
},
9+
fields: [
10+
{
11+
name: 'title',
12+
label: 'DONT USE',
13+
type: 'string',
14+
description: 'Use top level template (only available in about AA)',
15+
required: false,
16+
}
17+
]
18+
};
19+
export default template;

tina/config.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import about_teams from "./collections/pages/about_teams";
1818
import about_boards from "./collections/pages/about_boards";
1919
import about_vacancies from "./collections/pages/about_vacancies";
2020
import privacy_policy from "./collections/pages/privacy_policy";
21+
import donation from "./collections/pages/donation";
2122
// Your hosting provider likely exposes this as an environment variable
2223
const branch = process.env.HEAD || process.env.VERCEL_GIT_COMMIT_REF || "master";
2324

@@ -57,7 +58,8 @@ export default defineConfig({
5758
about_teams,
5859
about_boards,
5960
about_vacancies,
60-
privacy_policy
61+
privacy_policy,
62+
donation
6163
],
6264
},
6365
});

tina/tina-lock.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)