Zakum
Explore posts from serversCDCloudflare Developers
•Created by Zakum on 6/15/2024 in #pages-help
Subdomain as alias w/ Cloudflare Pages
Hi, I'm trying to use Cloudflare Pages/Rules/DNS to create a site that supports multiple subdomains and multiple localized paths for each subdomain.
https://luk.gg (hosted at https://subdomain-test-5h2.pages.dev)
When not specified with a subdomain (
something.luk.gg
), publisher
defaults to ags
.
When not specified with a localization path (luk.gg/de
), lang
defaults to en
.
These are set up in my site code.
I wish to add the following behavior:
luk.gg/ags
routes to ags.luk.gg
luk.gg/ags/de
routes to ags.luk.gg/de
luk.gg/ags/ja
routes to ags.luk.gg/ja
luk.gg/bno
routes to bno.luk.gg
luk.gg/bno/de
routes to bno.luk.gg/de
luk.gg/bno/ja
routes to bno.luk.gg/ja
and paths beyond the /de
should work normally: luk.gg/de/guides/7
etc.
I tried adding CNAME records with Name: ags
and Content: subdomain-test-5h2.pages.dev/ags
however this doesn't seem to connect the CNAME to Cloudflare Pages. Pages appears to require you go to the Custom Domains tab and set it up through there. Afterwards, checking the DNS record says:
..but I can't point it as an alias to a specific subroute such as /ags
.
As the site will be identical for all subdomains and routes, I don't want to set up a monorepo or maintain duplicate projects..
Any idea of how to accomplish this?1 replies
KPCKevin Powell - Community
•Created by Zakum on 1/4/2023 in #front-end
Sliding sidenav (pushes main content)
Hey friends, I have a left-side navigation pane that on smaller screens should slide out from left to right like a drawer and push the main content to the right.
Are there any tutorials on this kind of side nav? I've tried a few times but can never get this effect to work flawlessly using grid.
4 replies
KPCKevin Powell - Community
•Created by Zakum on 10/16/2022 in #front-end
Any alternative to repeatedly importing your SASS color palette?
Hi everyone, I'm working on a svelte project with sass.
I have a partial
_colors.scss
that has a general palette used in multiple components.
As the project grows, the number of @use colors
will increase.
For testing, I added @use colors/typography/themes
to a component that doesn't need any of them.
In Chrome DevTools: Coverage tab I noticed that this increases the resultant css file, as well as the unused CSS percentage.
So I assume it's bad practice to repeatedly import a partial such as _colors.scss
into multiple components. Is the best alternative using css var()
instead? I do like the brevity of a simple $gray
over custom properties.6 replies