Compare commits

..

5 Commits

Author SHA1 Message Date
wellá
f203fbbd15 Merge branch 'dev' into features/tracking 2019-11-28 16:51:35 +01:00
lostdesign
9953056c0c add better tracking 2019-11-28 16:49:11 +01:00
wellá
e7f3452cc9 Merge pull request #212 from omfgtora/csb-1573794665868
Add CodeSandbox and Postwoman to Utilities
2019-11-15 17:34:15 +01:00
Ethan Roberts
cbb34c5777 Add Codesandbox and Postwoman to Utilities 2019-11-14 21:11:05 -08:00
wellá
f441c9243a Merge pull request #201 from webgems/dev
🔀 dev into master
2019-10-25 12:26:27 +02:00
11 changed files with 87 additions and 72 deletions

View File

@@ -1,3 +1,5 @@
{ {
"editor.formatOnSave": false "editor.formatOnSave": false,
"vue-i18n-ally.localesPaths": "locales",
"i18n-ally.localesPaths": "locales"
} }

View File

@@ -2,25 +2,6 @@
<html {{ HTML_ATTRS }}> <html {{ HTML_ATTRS }}>
<head {{ HEAD_ATTRS }}> <head {{ HEAD_ATTRS }}>
{{ HEAD }} {{ HEAD }}
<!-- Matomo -->
<script type="text/javascript">
var _paq = window._paq || [];
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
_paq.push(["setDocumentTitle", document.domain + "/" + document.title]);
_paq.push(["setCookieDomain", "*.webgems.io"]);
_paq.push(["setDomains", ["*.webgems.io"]]);
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="//stats.lost.services/";
_paq.push(['setTrackerUrl', u+'matomo.php']);
_paq.push(['setSiteId', '1']);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
})();
</script>
<noscript><p><img src="//stats.lost.services/matomo.php?idsite=1&amp;rec=1" style="border:0;" alt="" /></p></noscript>
<!-- End Matomo Code -->
</head> </head>
<body {{ BODY_ATTRS }}> <body {{ BODY_ATTRS }}>
{{ APP }} {{ APP }}

View File

@@ -1,13 +0,0 @@
<template lang="pug">
.cards
Card(v-for='resource in resources' :resource='resource' :key='resource.title' :createCopyUrl="createCopyUrl" :isActive='activeCard === resource.cleanTitle')
</template>
<script>
import Card from './Card'
export default {
components: { Card },
props: ['resources', 'createCopyUrl', 'activeCard'],
}
</script>

View File

@@ -1,13 +0,0 @@
<template lang="pug">
table
TableRow(v-for='resource in resources' :resource='resource' :key='resource.title' :createCopyUrl="createCopyUrl" :isActive='activeCard === resource.cleanTitle')
</template>
<script>
import TableRow from '../components/TableRow'
export default {
components: { TableRow },
props: ['resources', 'createCopyUrl', 'activeCard'],
}
</script>

View File

@@ -62,6 +62,10 @@ export default {
plugins: [ plugins: [
'~/plugins/i18n.js', '~/plugins/i18n.js',
{
src: '~/plugins/vue-matomo.js',
ssr: false,
},
], ],
/* /*
** Nuxt.js modules ** Nuxt.js modules

7
package-lock.json generated
View File

@@ -1,5 +1,5 @@
{ {
"name": "webgems", "name": "webgems.io",
"version": "1.0.0", "version": "1.0.0",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
@@ -13651,6 +13651,11 @@
"vue-style-loader": "^4.1.0" "vue-style-loader": "^4.1.0"
} }
}, },
"vue-matomo": {
"version": "3.12.0-5",
"resolved": "https://registry.npmjs.org/vue-matomo/-/vue-matomo-3.12.0-5.tgz",
"integrity": "sha512-n69Nmry7Eg0vooGlEMViaAbjsMGM5Hfno0G9C0o8q5aNIShzez5h2JCLRdHktC1ZdI7p4Wtg0csm++zIO+tWCQ=="
},
"vue-meta": { "vue-meta": {
"version": "1.6.0", "version": "1.6.0",
"resolved": "https://registry.npmjs.org/vue-meta/-/vue-meta-1.6.0.tgz", "resolved": "https://registry.npmjs.org/vue-meta/-/vue-meta-1.6.0.tgz",

View File

@@ -17,8 +17,9 @@
"cross-env": "^5.2.0", "cross-env": "^5.2.0",
"nuxt": "^2.4.0", "nuxt": "^2.4.0",
"nuxt-clipboard2": "^0.2.1", "nuxt-clipboard2": "^0.2.1",
"vue-i18n": "^8.11.2",
"ramda": "^0.26.1", "ramda": "^0.26.1",
"vue-i18n": "^8.11.2" "vue-matomo": "^3.12.0-5"
}, },
"devDependencies": { "devDependencies": {
"@babel/core": "^7.6.4", "@babel/core": "^7.6.4",

View File

@@ -3,21 +3,21 @@
transition(name="fade-title" @after-enter="afterEnter") transition(name="fade-title" @after-enter="afterEnter")
h1(v-if="showTitle") {{ category.title }} h1(v-if="showTitle") {{ category.title }}
transition(name="fade-card") transition(name="fade-card")
div(v-if="showCards") .cards(v-if="areCardsVisible && showCards")
component( template(v-for='resource in category.resources' )
:is="areCardsVisible ? 'CardsView' : 'TableView'" Card(:resource='resource' :key='resource.title' :createCopyUrl="createCopyUrl" :isActive='activeCard === resource.cleanTitle')
:resources="category.resources" transition(name="fade-card")
:createCopyUrl="createCopyUrl" table(v-if="!areCardsVisible && showCards")
:activeCard='activeCard' template(v-for='resource in category.resources' )
) TableRow(:resource='resource' :key='resource.title' :createCopyUrl="createCopyUrl" :isActive='activeCard === resource.cleanTitle')
</template> </template>
<script> <script>
import CardsView from '../components/CardsView' import Card from '../components/Card'
import TableView from '../components/TableView' import TableRow from '../components/TableRow'
export default { export default {
components: { CardsView, TableView }, components: { Card, TableRow },
data() { data() {
return { return {
categoryRouteTitle: this.$route.params.category, categoryRouteTitle: this.$route.params.category,

View File

@@ -3,24 +3,26 @@
transition(name="fade-title" @after-enter="afterEnter") transition(name="fade-title" @after-enter="afterEnter")
h1(v-if="showTitle") Search h1(v-if="showTitle") Search
transition(name="fade-card") transition(name="fade-card")
div(showCards) .cards(v-if="areCardsVisible && showCards")
component( template(v-if="resources.length")
v-if="resources.length" template(v-for='resource in resources' )
:is="areCardsVisible ? 'CardsView' : 'TableView'" Card(:resource='resource' :key='resource.title' :createCopyUrl="createCopyUrl" :isActive='activeCard === resource.cleanTitle')
:createCopyUrl="createCopyUrl" p(v-else) No results
:activeCard="activeCard" transition(name="fade-card")
:resources="resources" table(v-if="!areCardsVisible && showCards")
) template(v-if="resources.length")
template(v-for='resource in resources' )
TableRow(:resource='resource' :key='resource.title' :createCopyUrl="createCopyUrl" :isActive='activeCard === resource.cleanTitle')
p(v-else) No results p(v-else) No results
</template> </template>
<script> <script>
import CardsView from '../components/CardsView' import Card from '../components/Card'
import TableView from '../components/TableView' import TableRow from '../components/TableRow'
import * as R from 'ramda' import * as R from 'ramda'
export default { export default {
components: { CardsView, TableView }, components: { Card, TableRow },
data() { data() {
return { return {
activeCard: '', activeCard: '',

34
plugins/vue-matomo.js Normal file
View File

@@ -0,0 +1,34 @@
import Vue from 'vue'
import VueMatomo from 'vue-matomo'
export default ({
app,
}) => {
Vue.use(VueMatomo, {
router: app.router,
// Configure your matomo server and site by providing
host: 'https://stats.lost.services',
siteId: 1,
// Changes the default .js and .php endpoint's filename
// Default: 'piwik'
trackerFileName: 'matomo',
// Enables link tracking on regular links. Note that this won't
// work for routing links (ie. internal Vue router links)
// Default: true
enableLinkTracking: true,
// Require consent before sending tracking information to matomo
// Default: false
requireConsent: false,
// Whether to track the initial page view
// Default: true
trackInitialView: true,
// Whether or not to log debug information
// Default: false
debug: false,
})
}

View File

@@ -175,6 +175,18 @@
"desc": "Messed up some of your commits? Make it undone", "desc": "Messed up some of your commits? Make it undone",
"url": "https://bokub.github.io/git-history-editor/", "url": "https://bokub.github.io/git-history-editor/",
"tags": ["import", "export", "author", "messages"] "tags": ["import", "export", "author", "messages"]
},
{
"title": "CodeSandbox.io",
"desc": "CodeSandbox is an online code editor with a focus on creating and sharing web application projects",
"url": "https://codesandbox.io/",
"tags": ["development", "ide","editor", "share", "testing"]
},
{
"title": "Postwoman.io",
"desc": "The Postwoman API request builder helps you create your requests faster, saving you precious time on your development.",
"url": "https://Postwoman.io/",
"tags": ["testing","api"]
} }
] ]
} }