Skip to content

Instantly share code, notes, and snippets.

View zeshhaan's full-sized avatar
🎯
Focusing

Mohammed Zeeshan zeshhaan

🎯
Focusing
View GitHub Profile
{
"template": {
"scope": "vue",
"prefix": "template",
"body": ["<template>", " $1", "</template>"],
"description": "Create <template> block"
},
"script setup": {
"scope": "vue",
"prefix": "script setup",
@zeshhaan
zeshhaan / date-time-improved.js
Last active March 13, 2023 10:29
Custom Date Time in Webflow
var Webflow = Webflow || [];
Webflow.push(function() {
let timeFormatPT = new Date('{{wf {&quot;path&quot;:&quot;added-date&quot;,&quot;transformers&quot;:[{&quot;name&quot;:&quot;date&quot;,&quot;arguments&quot;:[&quot;YYYY-MM-DD hh:mm a&quot;]\}],&quot;type&quot;:&quot;Date&quot;\} }} PDT'.replace(/-/g, "/"))
// Automate Day Light Savings
const DLS = timeFormatPT.getTimezoneOffset()/60 === 7 ? 'PST' : 'PDT';
timeFormatPT = new Date(`{{wf {&quot;path&quot;:&quot;added-date&quot;,&quot;transformers&quot;:[{&quot;name&quot;:&quot;date&quot;,&quot;arguments&quot;:[&quot;YYYY-MM-DD hh:mm a&quot;]\}],&quot;type&quot;:&quot;Date&quot;\} }} ${DLS}`.replace(/-/g, "/"))
.button-shine {
position: relative;
border: 0;
padding: 0.8rem 1.3rem;
border-radius: 4px;
cursor: pointer;
overflow: hidden;
outline: none;
box-shadow: 0 8px 32px rgba(0,0,0,0.2);
transition: all 0.2s ease;