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
// ************************************************************************* | |
// Server-side hot reload check by Michael Kennedy (https://mkennedy.codes). | |
// Released under the MIT open source license, 2023. | |
// | |
// Usage: Include this file in your "application shell" layout template | |
// or directly into any page you'd like to check. | |
// | |
// Set the checkIntervalInMs time to the frequency you need. Usually 1 sec | |
// should be fine, but if a page is slow maybe increase the delay. | |
// |
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
/* hides everything inside the status wrapper */ | |
.item-list>article:has(.media-gallery__item img:not([alt])) .status__wrapper .status *{ | |
display: none; | |
} | |
/* lets you know it hid something */ | |
.item-list>article:has(.media-gallery__item img:not([alt])) .status__wrapper .status:after{ | |
content:"Post hidden for lack of alt text" | |
} |
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
<script> | |
import AvatarPixels from "./AvatarPixels"; | |
import AvatarBauhaus from "./AvatarBauhaus"; | |
import AvatarMarble from "./AvatarMarble"; | |
import AvatarRing from "./AvatarRing"; | |
import AvatarSunset from "./AvatarSunset"; | |
import AvatarBeam from "./AvatarBeam"; | |
const VARIANTS = ["pixels", "bauhaus", "ring", "beam", "sunset", "marble"]; | |
export default { | |
components: { |
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
export default function constantMixin(constants={}){ | |
const computed = {}; | |
Object.keys(constants).forEach((key)=>{ | |
computed[key] = ()=>constants[key]; | |
}); | |
return { computed }; | |
} |
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
var render = function () { | |
var _vm=this; | |
var _h=_vm.$createElement; | |
var _c=_vm._self._c||_h; | |
return _c( | |
'v-btn', | |
{on:{"click":_vm.clicked}}, | |
[_vm._t("default")], | |
2 | |
); |
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 doesThing(thing) { | |
if (thing.length >= 10 || | |
thing.length === 0) | |
{ | |
doTheThing() | |
} | |
} |
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 ListOfXML = []; | |
// https://webpack.js.org/guides/dependency-management/#require-context | |
const requireComponent = require.context( | |
// Look for files in a directory | |
'/path/to/xml/files', | |
// Do not look in subdirectories | |
false, | |
// Only include ".xml" files | |
/.*\.xml$/ |