I was looking for a SSR and scoped styles ready solution to implement inline SVG with Nuxt
You need svg-inline-loader and xmldom to be installed.
| router.beforeEach((to, from, next) => { | |
| const requiresAuth = to.matched.some(record => { | |
| return record.meta.requiresAuth | |
| }) | |
| if (requiresAuth && !store.$data.isRegistered) { | |
| next('/login') | |
| } else { | |
| next() | |
| } | |
| }) |
| function check (DELAY_MINUTE = 1, RESPONSE_CODE = 200) { | |
| var req = new XMLHttpRequest() | |
| req.addEventListener('load', onLoad) | |
| function open () { | |
| req.open('HEAD', location.href, true) | |
| req.send() | |
| } | |
| function onLoad () { | |
| req.status === RESPONSE_CODE ? notify() : setTimeout(open, DELAY_MINUTE * 60 * 1000) | |
| } |
| module.exports = { | |
| build: { | |
| // Remove hash from build files | |
| filenames: { | |
| css: 'common.css', | |
| manifest: 'manifest.js', | |
| vendor: 'common.js', | |
| app: 'app.js', | |
| chunk: '[name].js' |
| import SubfolderComponents from './subfolder' | |
| export default { | |
| components: { | |
| // This will add all components in subfolder | |
| ...SubfolderComponents | |
| } | |
| } |
| module.exports = (string) => { | |
| return string.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase() | |
| } |
I was looking for a SSR and scoped styles ready solution to implement inline SVG with Nuxt
You need svg-inline-loader and xmldom to be installed.
| azertyuiopqsdfghjklmwxcvbnAZERTYUIOPQSDFGHJKLMWXCVBN<>,?!;.:/=+*$€£1234567890-_@#&'""`%()[]<>éèêçàùÉÈÊÇÀÙ |
| #301 Redirects for .htaccess | |
| #Redirect a single page: | |
| Redirect 301 /pagename.php http://www.domain.com/pagename.html | |
| #Redirect an entire site: | |
| Redirect 301 / http://www.domain.com/ | |
| #Redirect an entire site to a sub folder | |
| Redirect 301 / http://www.domain.com/subfolder/ |
I hereby claim:
To claim this, I am signing this object:
| var cushion = .5; | |
| var length = 50; | |
| var dx = point.x - mouse.x; | |
| var dy = point.y - mouse.y; | |
| var da = Math.sqrt(dx * dx + dy * dy); | |
| // Tend à ramener la distance entre les segments à length | |
| var ox = dx / da * length - dx; | |
| var oy = dy / da * length - dy; |