This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if (have_posts()) { | |
while (have_posts()) { | |
the_post(); | |
if (get_post_mime_type() == 'application/pdf') { | |
// Customize how you display PDF files | |
echo '<a href="' . esc_url(get_permalink()) . '">' . esc_html(get_the_title()) . '</a>'; | |
} else { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// extend basic react component props | |
// simply replace the type and add your props' types | |
interface PersonCardProps extends React.ComponentProps<typeof PersonCard> { | |
name: string; | |
age: number; | |
isAdmin: boolean; | |
} | |
// in this example we're writing a component named PersonCard | |
// with props name, age, and isAdmin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*-------------------------------------------------*/ | |
/*----------------- LAZY.CSS v1.0 -----------------*/ | |
/*-------- Joshua Cerbito (@joshuacerbito) --------*/ | |
/*-------------------------------------------------*/ | |
/* RESET ALL CONTAINERS */ | |
html, body, div, table, tbody, tfoot, thead, tr, th, td, fieldset, form, label, legend, | |
section, article, aside, header, footer, hgroup, nav, audio, video, canvas, figure, figcaption, time, menu, details | |
{ | |
margin: 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Flywheel SSH Deploy | |
on: | |
push: | |
branches: [main] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: "shivammathur/setup-php@v2" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "https://openapi.vercel.sh/vercel.json", | |
"buildCommand": "npm run build-storybook", | |
"devCommand": "npm run storybook", | |
"installCommand": "npm install", | |
"framework": null, | |
"outputDirectory": "./storybook-static" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
E|--------------|------------------------|---------------------------------|-------------------------------|----------------------------------------------------------------| | |
B|--------------|------------------------|---------------------------------|-------------------------------|----------------12r11----11-12-14-12-11-12r11----11-------------| | |
G|-----4v-------|-6/8v-6-8v-6-8v-6h8/11v-|---------------------------------|---------------------------11v-|-13/15v-15v-15v-------13----------------------13----13-11----11-| | |
D|-4/6----6-4-6-|------------------------|-11v~~-13\11\9-11-11/13v-11-9----|-11/13-11-13v-11-13v-11-13-----|----------------------------------------------------------13----| | |
A|--------------|------------------------|------------------------------11-|-------------------------------|----------------------------------------------------------------| | |
E|--------------|------------------------|---------------------------------|-------------------------------|--------------------------------------------- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function ensure<T>(argument: T | undefined | null, message: string = 'This value was promised to be there.'): T { | |
if (argument === undefined || argument === null) { | |
throw new TypeError(message); | |
} | |
return argument; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
Allows shorthand notation for responsive styles | |
USAGE: | |
.element { | |
@include tw-respond( | |
text-px12 leading-px22 font-bold, // First argument is always unnamed, for mobile styles | |
$md: text-px14 leading-px24, // Succeeding arguments should be named with screen variable | |
$lg2: text-px16 leading-px26 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { getOptions } = require("loader-utils"); | |
const camelCased = s => s && s.replace(/-([a-z0-9])/g, g => g[1].toUpperCase()); | |
const localsMatcher = /exports\.locals\s=\s\{([\s\S]+)\};/g; | |
module.exports = function(source) { | |
// You can set the prefix used for the modifiers in the webpack config | |
const { modifierPrefix = "$" } = getOptions(this); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const getElementOffset = el => { | |
const rect = el.getBoundingClientRect(), | |
scrollLeft = window.scrollX || document.documentElement.scrollLeft, | |
scrollTop = window.scrollY || document.documentElement.scrollTop; | |
return { | |
top: rect.top + scrollTop, | |
left: rect.left + scrollLeft | |
} | |
} |
NewerOlder