Skip to content

Instantly share code, notes, and snippets.

View jrah's full-sized avatar
🇬🇧
Working from home

James Home jrah

🇬🇧
Working from home
View GitHub Profile
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jrah
jrah / chat-heroicon.svg
Last active November 14, 2020 01:33
chat-heroicon
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import { LANGUAGES_MAP } from '../../plugins/i18n'
/* eslint-disable no-undef */
/* eslint-disable no-console */
export async function getPage(app, uid, pageType) {
// "custom type", ""
// console.log('fetching ', uid)
let languageDict = {}
const lang = app.router.history.pending
? app.router.history.pending.params.lang
@jrah
jrah / default.vue
Created February 20, 2020 16:23
Nuxt default template
<template>
<div class="site-canvas">
<a-top-fixed-nav v-if="hasRightSide === true" />
<div
id="header"
:class="[
{ pinHeader: !$store.state.header },
{ 'bg-cover': $store.state.header },
{ 'bg-center': $store.state.header },
{'fixedNav': hasRightSide}
<template>
<nav v-if="document.data" :class="{ isOpen: isOpen }" class="nav flex items-center justify-end">
<ul class="hidden list-reset ns:flex flex-wrap justify-between z-20 relative link-group">
<li v-for="(linkGroup, i) in document.data.body" :key="i" class="link-group-col">
<a
v-if="linkGroup.primary.nav_link.link_type === 'Web'"
:href="linkGroup.primary.nav_link.url"
class="primary-link no-underline mb-4 text-lg pb-1 border-transparent border-b-2 hover:border-blue"
>{{ linkGroup.primary.link_text }}</a>
<nuxt-link
@jrah
jrah / index.js
Created February 20, 2020 16:16
store/index.js
export const state = () => ({
navigation: null,
header: false,
header_images: {}
})
export const mutations = {
setNavigation(state, navigation) {
state.navigation = navigation
},
@jrah
jrah / settings.json
Created September 17, 2019 11:41
VS Config for VueJS/NuxtJS Projects
{
// "atomKeymap.promptV3Features": true,
"emmet.syntaxProfiles": {
"vue-html": "html",
"vue": "html"
},
"emmet.showAbbreviationSuggestions": true,
"emmet.showExpandedAbbreviation": "always",
"emmet.includeLanguages": {
"vue-html": "html",
code --install-extension editorconfig.editorconfig
code --install-extension dbaeumer.vscode-eslint
code --install-extension eamodio.gitlens
code --install-extension zhuangtongfa.material-theme