Skip to content

Instantly share code, notes, and snippets.

View BhargzShukla's full-sized avatar
🎯
Focusing

Bhargav Shukla BhargzShukla

🎯
Focusing
View GitHub Profile
<form
name="contact-form"
action="/message"
method="post"
netlify
netlify-honeypot="bot-field"
>
<input type="hidden" name="bot-field" />
<input name="name" type="text" required />
<input name="email" type="email" required />
<form
name="contact-form"
action="/message"
method="post"
netlify
netlify-honeypot="bot-field"
>
<input type="hidden" name="form-name" value="contact-form" />
<!-- Rest of the form remains the same -->
</form>
@BhargzShukla
BhargzShukla / _theme.scss
Created March 31, 2020 19:40
Theme definition for dynamic toggling
:root {
$color__primary: #bc865a;
--color__primary: #{$color__primary};
--color__primary--muted: #{scale-color(
$color__primary,
$lightness: -70%,
$alpha: -75%
)};
--color__primary--lighter: #{scale-color($color__primary, $lightness: 95%)};
@BhargzShukla
BhargzShukla / ThemeToggle.vue
Created March 31, 2020 19:42
Vue code to toggle theme based on data-* attributes
<template>
<button @click="toggleTheme"><!-- Sun/Moon Icon --></button>
</template>
<script>
export default {
data() {
return {
theme: 'light' // default theme to use when the site is first loaded
}
},