~scrumplex/website

207e6d3c780c505c2a96ab08b61bfc6dfe96cea4 — Sefa Eyeoglu 2 months ago da46d39
refactor: don't use JSON to generate contact list
1 files changed, 14 insertions(+), 47 deletions(-)

M src/include/contact.pug
M src/include/contact.pug => src/include/contact.pug +14 -47
@@ 1,58 1,25 @@
-
    const contacts = [
        {
            icon: "phone",
            title: "Phone",
            content: "Ring me a call at <b>+49 (0) 15678 614-220</b> for inquiries.",
            href: "tel:+4915678614220",
            button_text: "Call me"
        },
        {
            icon: "mail",
            title: "Email",
            content: "Write me an email at <b>contact@scrumplex.net</b> for questions or help.",
            href: "mailto:contact@scrumplex.net",
            button_text: "Write an email"
        },
        {
            icon: "matrix",
            title: "Matrix",
            content: "Contact me on Matrix via <b>@scrumplex:duckhub.io</b> and have a personal conversation with me.",
            href: "https://matrix.to/#/@scrumplex:duckhub.io",
            button_text: "Message me on Matrix"
        },
        {
            icon: "telegram",
            title: "Telegram",
            content: "Contact me on Telegram at <b>@Scrumplex</b> and have a personal conversation with me.",
            href: "https://telegram.me/Scrumplex",
            button_text: "Message me on Telegram"
        },
        {
            icon: "teamspeak",
            title: "TeamSpeak 3",
            content: "Join my TeamSpeak 3 Server via the address <b>scrumplex.net</b> to talk with me.",
            href: "ts3server://scrumplex.net",
            button_text: "Join TeamSpeak 3 Server"
        }
    ]

mixin contact(contact)
mixin contact(icon, title, href, button_text)
    div.col-med-6
        h3.text-center
            i(class=`icon-${contact.icon}`)
            i(class=`icon-${icon}`)
            |
            |
            =contact.title
            =title

        p!= contact.content
        +link(true, false)(href=contact.href).btn.btn-primary
            =contact.button_text
        p: block
        +link(true, false)(href=href).btn.btn-primary
            =button_text

div.row
    div.col
        h2 Contact
        p You can find and contact me on many platforms. Choose the one you like below.

    each contact in contacts
        +contact(contact)
\ No newline at end of file
    +contact("phone", "Phone", "tel:+4915678614220", "Call me")
        | Ring me a call at #[b +49 (0) 15678 614-220] for inquiries.
    +contact("mail", "Email", "mailto:contact@scrumplex.net", "Write an email")
        | Write me an email at #[b contact@scrumplex.net] for questions or help.
    +contact("matrix", "Matrix", "https://matrix.to/#/@scrumplex:duckhub.io", "Message me on Matrix")
        | Contact me on Matrix via @scrumplex:duckhub.io] and have a conversation with me.
    +contact("telegram", "Telegram", "https://telegram.me/Scrumplex", "Message me on Telegram")
        | Contact me on Telegram at #[b @Scrumplex] and have a conversation with me.