Skip to content

Commit

Permalink
fix(website): fix font issue and forms
Browse files Browse the repository at this point in the history
  • Loading branch information
CaioRolla committed May 17, 2023
1 parent 86ca259 commit bf9c869
Show file tree
Hide file tree
Showing 27 changed files with 82 additions and 13 deletions.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added apps/website/public/fonts/AvenirNextLTPro-Cn.otf
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added apps/website/public/fonts/AvenirNextLTPro-It.otf
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
19 changes: 16 additions & 3 deletions apps/website/src/components/sections/contact/contact.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,28 @@ export default component$(() => {
};

const handleSubmit = $((event: QwikSubmitEvent<HTMLFormElement>) => {
const form = event.target as any;
const formData = new FormData(form);

if (!formData.get('companyEmail')) {
return;
}

if (!formData.get('name')) {
return;
}

if (!formData.get('howCanWeHelp')) {
return;
}

loading.value = true;
success.value = false;
const form = event.target as any;
const formData = new FormData(form) as any;

fetch('/docs', {
method: 'POST',
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
body: new URLSearchParams(formData).toString(),
body: new URLSearchParams(formData as any).toString(),
})
.then(() => {
success.value = true;
Expand Down
21 changes: 16 additions & 5 deletions apps/website/src/components/sections/subscribe/subscribe.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,20 @@ export default component$(() => {
const success = useSignal(false);

const handleSubmit = $((event: QwikSubmitEvent<HTMLFormElement>) => {
const form = event.target as any;
const formData = new FormData(form);

if (!formData.get('email')) {
return;
}

loading.value = true;
success.value = false;
const form = event.target as any;
const formData = new FormData(form) as any;

fetch('/docs', {
method: 'POST',
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
body: new URLSearchParams(formData).toString(),
body: new URLSearchParams(formData as any).toString(),
})
.then(() => {
success.value = true;
Expand Down Expand Up @@ -97,8 +102,14 @@ export default component$(() => {
</div>

<div q:slot="background-no-overlay">
<Line showEnd={false} class="absolute w-12 md:w-1/4 top-[25%] md:top-[60%] right-0" />
<Line showStart={false} class="absolute w-24 md:w-52 top-0 left-[12%] md:left-[14%] rotate-90 origin-left -translate-y-1/2" />
<Line
showEnd={false}
class="absolute w-12 md:w-1/4 top-[25%] md:top-[60%] right-0"
/>
<Line
showStart={false}
class="absolute w-24 md:w-52 top-0 left-[12%] md:left-[14%] rotate-90 origin-left -translate-y-1/2"
/>
</div>
</Section>
);
Expand Down
55 changes: 50 additions & 5 deletions apps/website/src/global.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,56 @@
@tailwind base;
@tailwind utilities;

/* Fonts! */
@font-face {
font-family: "Avenir Local";
font-style: normal;
font-weight: 100;
src: url("/fonts/AvenirNextLTPro-UltLt.otf") format("woff");
}

@font-face {
font-family: "Avenir Local";
font-style: normal;
font-weight: 400;
src: url("/fonts/AvenirNextLTPro-Regular.otf") format("woff");
}

@font-face {
font-family: "Avenir Local";
font-style: normal;
font-weight: 500;
src: url("/fonts/AvenirNextLTPro-Medium.otf") format("woff");
}

@font-face {
font-family: "Avenir Local";
font-style: normal;
font-weight: 600;
src: url("/fonts/AvenirNextLTPro-Demi.otf") format("woff");
}

@font-face {
font-family: "Avenir Local";
font-style: normal;
font-weight: 700;
src: url("/fonts/AvenirNextLTPro-Bold.otf") format("woff");
}

@font-face {
font-family: "Avenir Local";
font-style: normal;
font-weight: 800;
src: url("/fonts/AvenirNextLTPro-Heavy.otf") format("woff");
}

@layer base {
html {
font-family: 'Avenir Next';
font-family: 'Avenir Next', 'Avenir Local';
}
}

/* Common article styling */
.article {
@apply text-blue-gray-900;
}
Expand All @@ -16,14 +60,15 @@
@apply mb-6 text-3xl font-semibold;
}

.article p, .article ul {
@apply mb-6
.article p,
.article ul {
@apply mb-6;
}

.article ul li {
@apply list-disc list-inside mb-4 pl-2
@apply list-disc list-inside mb-4 pl-2;
}

.article a {
@apply text-ui-blue
@apply text-ui-blue;
}

0 comments on commit bf9c869

Please sign in to comment.