diff --git a/css/main.scss b/css/main.scss index 63957b8f..1702a965 100644 --- a/css/main.scss +++ b/css/main.scss @@ -2173,4 +2173,12 @@ input[type=radio] { .col-6 { width: 49%; +} + +.faq-question { + padding-top: 50px; +} + +.faq-answer { + padding-left: 20px; } \ No newline at end of file diff --git a/faq.html b/faq.html new file mode 100644 index 00000000..56cabacc --- /dev/null +++ b/faq.html @@ -0,0 +1,10 @@ +--- +layout: default +title: FAQ +--- + +
+ + + + diff --git a/js/faq.js b/js/faq.js new file mode 100644 index 00000000..d46f7970 --- /dev/null +++ b/js/faq.js @@ -0,0 +1,40 @@ +document.addEventListener("DOMContentLoaded", () => { + const v = new Vue({ + el: "#app", + data() { + return { + faqs: [], + } + }, + template: ` +
+

Frequently Asked Questions

+ +
+ `, + methods: { + parseMd(text) { + return marked.parse( + text + .replace(/in <#[^]+>/, "on our [Discord](https://discord.gg/sN9YRQbBv7)") // removes channel links + .replace(/<[^]+>/, "") // removes pings + .replace("()", ""), // removes stray parentheses left by removing pings) + ) + }, + }, + created() { + axios + .get( + "https://raw.githubusercontent.com/Faithful-Resource-Pack/CompliBot/main/json/faq.json", + ) + .then((res) => { + this.faqs = res.data + }) + }, + }) +})