Components
Footer
Guide for Footer.svelte component
This component will hold additional links and an email capture form.
Location: src/components/Footer.svelte
Setup
Email Capture
1
Go to Supabase
Head over to Supabase and navigate to your project’s dashboard.
2
Create email_list table
Using the SQL Editor, create a table using the following SQL code:
SQL Editor
create table
public.email_list (
created_at timestamp with time zone not null default now(),
email text not null,
id uuid not null default gen_random_uuid (),
constraint email_list_pkey primary key (id)
) tablespace pg_default;
alter table public.blogs enable row level security;
3
Create RLS policy
Add a new RLS policy that enables insert access to the public (all users).
Links
There are two link sets that you can edit:
Footer.svelte
<script lang="ts>
...
const linksOne = [
{ name: 'Link One', href: '#linkOne', scroll: true },
...
]
const linksTwo = [
{ name: 'Link One', href: '/link-one', scroll: false },
]
...
</script>
If
scroll: true
the link will scroll to the DOM element with the id that corresponds to the listed href. Otherwise the page will navigate to the link.