Remove link
article thumbnail

A New Way To Reduce Font Loading Impact: CSS Font Descriptors

Smashing Magazine

Smashing Magazine, like most publishers, makes use of web fonts and the below screenshot shows the difference between the initial render (with the fallback fonts), and the final render (with the web fonts): Smashing Magazine article with fallback font and with full web fonts. Large preview ). Large preview ).

article thumbnail

How To Protect Your API Key In Production With Next.js API Route

Smashing Magazine

It saves you the stress of hard hard-coding your independent routes. function MyApp({ Component, pageProps }) { return ( <React.Fragment> <Head> <meta name="theme-color" content="#73e2a7" /> <link rel="icon" type="image/ico" href="" /> </Head> <Component {.pageProps} index.js.

Servers 131
Insiders

Sign Up for our Newsletter

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Trending Sources

article thumbnail

Creating A Magento PWA: Customizing Themes vs. Coding From Scratch

Smashing Magazine

Creating A Magento PWA: Customizing Themes vs. Coding From Scratch. Creating A Magento PWA: Customizing Themes vs. Coding From Scratch. One of the reasons for that is because a PWA has the same code base. So unlike the case with native applications, the progressive web app needs to be coded only once. Alex Husar.

Code 75
article thumbnail

Next.js Wildcard Subdomains

Smashing Magazine

In code, that looks like this: export async function getServerSideProps(context) { let wildcard = context.req.headers.host.split(".")[0]; Here’s how that code looks like: // useEffect and useState must be imported from 'react' const [wildcard, setWildcard] = useState("") useEffect(() => { setWildcard(window.location.hostname.split(".")[0])

Servers 85
article thumbnail

Implementing A Reset Password Feature With Next.js Dynamic Routes

Smashing Magazine

A lot of people even dread the “reset-password” page because, come to think of it, after spending a lot of time trying to guess their passwords — all to no avail — they’re either frustrated or angry as they land on this particular page. They click on the “password-reset” link, and they’re redirected to the corresponding page.

article thumbnail

40+ Best Web Development Blogs of 2018

KeyCDN

It also includes a handy CSS reference, a web development experiment playground, tutorials, blueprints to get started from and Collective - a digital design magazine that makes it easy to keep up with trends. Check out the Almanac for CSS property and selector-specific insights, or dive straight into the Snippets to grab some reusable code.

article thumbnail

Gone Floating Labels And Green Lighthouse Scores

Smashing Magazine

We then adjusted our build to generate base64-strings for AVIF files automatically during the build time (if author images are available as AVIF images). With wonderful attendees from all over the world coming together to learn together, so many ideas have been brought to life — especially in the live design and coding sessions.

Mobile 141