♻️ removes matomo, fixes linting errors, adds fathom

This commit is contained in:
lostdesign
2020-04-28 18:17:05 +02:00
parent 0122e5b8bd
commit 7ee963313d
12 changed files with 11177 additions and 214 deletions

View File

@@ -1,6 +1,13 @@
<!DOCTYPE html> <!DOCTYPE html>
<html {{ HTML_ATTRS }}> <html {{ HTML_ATTRS }}>
<head {{ HEAD_ATTRS }}> <head {{ HEAD_ATTRS }}>
<!-- Fathom - beautiful, simple website analytics -->
<script src="https://cdn.usefathom.com/3.js" site="OCSVINVR"></script>
<script>
window.fathom || document.write('<script src="https://starfish.taskflow.io/core.js"><\/script>');
</script>
<!-- / Fathom -->
{{ HEAD }} {{ HEAD }}
</head> </head>
<body {{ BODY_ATTRS }}> <body {{ BODY_ATTRS }}>

View File

@@ -1,3 +0,0 @@
<template lang="pug">
iframe(style="border: 0; width: 100%; border-radius: 3px; font-family:Poppins,-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,'Helvetica Neue',Arial,sans-serif;" src="https://stats.lost.services/index.php?module=CoreAdminHome&action=optOut&language=en&backgroundColor=08e5ff&fontColor=212121&fontSize=&fontFamily=Poppins")
</template>

View File

@@ -13,20 +13,6 @@ export default {
searchPath: '/search', searchPath: '/search',
} }
}, },
methods: {
// isTag :: String -> Bool
isTag: R.startsWith('#'),
// removeFirstChar :: String -> String
removeFirstChar: R.compose(
R.join(''),
R.adjust(0, () => '')
),
onEnter() {
const searchParams = new URLSearchParams({ ...this.$route.query, enter: true })
this.$router.push(this.searchPath + '?' + searchParams.toString())
},
},
watch: { watch: {
searchInput(input) { searchInput(input) {
const words = R.filter(isNotEmpty, R.split(' ', input)) const words = R.filter(isNotEmpty, R.split(' ', input))
@@ -51,6 +37,20 @@ export default {
this.searchInput = `${tags} ${keywords}`.trim() this.searchInput = `${tags} ${keywords}`.trim()
}, },
methods: {
// isTag :: String -> Bool
isTag: R.startsWith('#'),
// removeFirstChar :: String -> String
removeFirstChar: R.compose(
R.join(''),
R.adjust(0, () => ''),
),
onEnter() {
const searchParams = new URLSearchParams({ ...this.$route.query, enter: true })
this.$router.push(this.searchPath + '?' + searchParams.toString())
},
},
} }
</script> </script>

View File

@@ -5,9 +5,7 @@
//- nuxt-link(:to='$i18n.path(category.slug)') {{ category.title }} //- nuxt-link(:to='$i18n.path(category.slug)') {{ category.title }}
nuxt-link(:to='category.slug') {{ category.title }} nuxt-link(:to='category.slug') {{ category.title }}
hr hr
nuxt-link(to='/privacy-policy') Privacy Policy nuxt-link(to='/legal-notice') Legal Notice
nuxt-link(to='/cookie-policy') Cookie Policy
nuxt-link(to='/imprint') Imprint
hr hr
div(class="toggleWrapper" @click="toggleCardsVisible") div(class="toggleWrapper" @click="toggleCardsVisible")
div(class="viewToggle" :class="{active: areCardsVisible}") Cards div(class="viewToggle" :class="{active: areCardsVisible}") Cards

View File

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

View File

@@ -18,8 +18,7 @@
"nuxt": "^2.4.0", "nuxt": "^2.4.0",
"nuxt-clipboard2": "^0.2.1", "nuxt-clipboard2": "^0.2.1",
"vue-i18n": "^8.11.2", "vue-i18n": "^8.11.2",
"ramda": "^0.26.1", "ramda": "^0.26.1"
"vue-matomo": "^3.12.0-5"
}, },
"devDependencies": { "devDependencies": {
"@babel/core": "^7.6.4", "@babel/core": "^7.6.4",

View File

@@ -1,56 +0,0 @@
<template lang="pug">
main
h1 Our Cookie Policy
p We believe in being transparent about how we collect and use data. This policy provides information about how and when we use cookies for these purposes. Capitalized terms used in this policy but not defined have the meaning set forth in our&nbsp;
nuxt-link.highlighted(to="privacy-policy") Privacy Policy
| &nbsp;which also includes additional details about the collection and use of information at webgems.
h2 What Is A Cookie?
p Cookies are small text files sent by us to your computer or mobile device, which enables webgems features and functionality. They are unique to your account or your browser. Session-based cookies last only while your browser is open and are automatically deleted when you close your browser. Persistent cookies last until you or your browser delete them or until they expire.
p To find out more about cookies, visit&nbsp;
a.highlighted(href="https://www.allaboutcookies.org/") this
| &nbsp;site.
h2 Does Webgems Use Cookies?
p Yes, unless your browser has "Do Not Track" enabled. Matomo creates a persistent cookie inside your browser which contains a Session ID. This Session ID is being used to analyze the usage of our website. No further cookies are created by webgems.
h2 How Can You Get Rid Of Cookies?
p Browser manufacturers provide help pages relating to cookie management in their products. Please see below for more information.
ul
li
a(href="https://support.google.com/chrome/answer/95647?hl=en-GB", title="Google Chrome") Google Chrome
li
a(href="https://support.apple.com/en-us/guide/safari/manage-cookies-and-website-data-sfri11471/mac", title="Google Chrome") Safari Desktop
li
a(href="https://support.apple.com/en-us/HT201265", title="Google Chrome") Safari Mobile
li
a(href="https://support.mozilla.org/en-US/kb/cookies-information-websites-store-on-your-computer", title="Google Chrome") Mozilla Firefox
li
a(href="http://support.google.com/ics/nexus/bin/answer.py?hl=en&answer=2425067", title="Google Chrome") Android
li
a(href="https://support.microsoft.com/en-us/kb/260971", title="Google Chrome") Internet Explorer
h2 Opt Out From Tracking
OptOutIframe
</template>
<script>
import OptOutIframe from '@/components/OptOutIframe.vue'
export default {
components: {
OptOutIframe,
},
}
</script>
<style lang="scss" scoped>
h2 {
margin-top: 2rem;
margin-bottom: 0.5rem;
}
p {
margin-top: 0;
}
</style>

View File

@@ -1,6 +1,6 @@
<template lang="pug"> <template lang="pug">
div div
h1 Imprint h1 Legal Notice
p Webgems.io is a project of&nbsp; p Webgems.io is a project of&nbsp;
a.highlighted(href="https://lost.design", title="Visit lost.design") www.lost.design a.highlighted(href="https://lost.design", title="Visit lost.design") www.lost.design

View File

@@ -1,93 +0,0 @@
<template lang="pug">
main
h1 Our Privacy Policy
p This Privacy Policy describes how webgems collects, uses and discloses information, and what choices you have with respect to the information. We respect the Browser's "Do Not Track" feature, you won't be affected by this policy if enabled.
h2 Information We Collect
p This website uses the web analysis service software Matomo (www.matomo.org), a service of the provider InnoCraft Ltd., 150 Willis St, 6011 Wellington, New Zealand, (Matomo) to collect and store data based on our legitimate interest in the statistical analysis of the user behavior for optimization and marketing purposes as per article 6(1) lit. f GDPR.
p This data can be used to create and evaluate pseudonymized usage profiles for the same purpose. For this purpose, cookies may be used. The data collected with the Matomo technology (including its pseudonymized IP address) is processed on servers, which are hosted by Contabo GmbH.
p Contabo GmbH does not have access to the servers nor the data that is processed (§ 6 Server-administration, Contabo's Terms & Conditions). For more information visit&nbsp;
a.highlighted(href="https://contabo.com/agb.html") Contabo's Terms & Conditions.
p The information generated by the cookie in the pseudonymous user profile will not be used to personally identify the visitor to this website and will not be combined with personal data about the bearer of the pseudonym.
h2 Proccessed Data
p The following information is processed when visiting webgems:
ol(type="I")
li
strong Cookie Information.&nbsp;
| Webgems uses cookies on this website that are necessary for Matomo's analytics. The Websites and Services we provide, do not include cookies and similar tracking technologies of third parties. For more details about how we use these technologies, please see our&nbsp;
nuxt-link.highlighted(to="cookie-policy") Cookie Policy.
li
strong Log data.&nbsp;
| As with most websites and technology services delivered over the Internet, our servers automatically collect information when you access or use our Websites or Services and record it in log files. This log data may include the Internet Protocol (IP) address, the address of the web page visited before using the Website or Services, browser type and settings, the date and time the Services were used, information about browser configuration and plugins, language preferences and cookie data.
li
strong Device information.&nbsp;
| Matomo collects information about devices accessing the Services, including type of device, what operating system is used, device settings, application IDs, unique device identifiers and crash data. Whether we collect some or all of this Other Information often depends on the type of device used and its settings.
li
strong IP information.&nbsp;
| Your IP address will be pseudonymized by 2 byte(s) before any further processing of your data, e.g. 192.168.xxx.xxx.
li
strong Location information.&nbsp;
| Matomo uses your pseudonymized IP address in order to approximate determine your location by country.
h2 Data Retention
p All data that is being processed, will be automatically deleted after 180 days.
h2 How We Disclose and Share Information
p The analytics for this project will not be shared with third parties at any given point. Long time contributors of the project may have access to view analytics interface while not being able to alter the data itself.
h2 Opt Out From Tracking
p If you do not agree to this data from your visit being stored and evaluated, then you can object to the storage and use at any time by clicking below. In this case, an opt-out cookie will be placed in your browser, which means that Matomo does not collect any session data. Please note that the complete deletion of your cookies means that the opt-out cookie will be deleted too and you may need to activate it again.
OptOutIframe
h2 Re-Enable Cookie Banner
p Click&nbsp;
a.highlighted(@click.preventDefault="restoreCookieNotice") here!
h2 Contact Us
p For any data privacy related enquiries, such as requesting a copy of your information or complete deletion, please contact us via mail at&nbsp;
a(href="mailto:dataprivacy@webgems.io") dataprivacy@webgems.io
</template>
<script>
import OptOutIframe from '@/components/OptOutIframe.vue'
export default {
components: {
OptOutIframe,
},
data() {
return {
}
},
methods: {
restoreCookieNotice() {
if(typeof(Storage) !== 'undefined'){
localStorage.removeItem('cookieNoticeHidden')
location.reload()
}
},
checkCookieNoticeRestore() {
if(typeof(Storage) !== 'undefined'){
let cookieNotice = localStorage.getItem('cookieNoticeRestore')
if(cookieNotice === true) {
this.showRestore = true
console.log('as', this.showRestore)
} else {
this.showRestore = false
}
}
},
},
}
</script>
<style lang="scss" scoped>
h2 {
margin-top: 2rem;
margin-bottom: 0.5rem;
}
p {
margin-top: 0;
}
</style>

View File

@@ -1,34 +0,0 @@
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

@@ -21,7 +21,7 @@ export const getters = {
findCategory: state => categoryTitle => { findCategory: state => categoryTitle => {
// equalsCategoryTitle :: Category -> Bool // equalsCategoryTitle :: Category -> Bool
const equalsCategoryTitle = R.compose( const equalsCategoryTitle = R.compose(
R.equals(cleanString(categoryTitle)), cleanString, R.prop('title') R.equals(cleanString(categoryTitle)), cleanString, R.prop('title'),
) )
// findCategory :: [Category] -> Category // findCategory :: [Category] -> Category
const findCategory = R.find(equalsCategoryTitle) const findCategory = R.find(equalsCategoryTitle)
@@ -31,8 +31,8 @@ export const getters = {
const cleaned = R.map(cleanString, names) const cleaned = R.map(cleanString, names)
// [Resource] -> [Resource] // [Resource] -> [Resource]
const appearsInResource = R.filter(({ cleanTitle, url, desc }) => const appearsInResource = R.filter(({ cleanTitle, url, desc }) =>
partiallyIncludesElOf([cleanTitle, url, desc], cleaned) partiallyIncludesElOf([cleanTitle, url, desc], cleaned),
) )
// [Category] -> [Resource] // [Category] -> [Resource]
const getDesiredResources = R.compose(appearsInResource, getAllResources) const getDesiredResources = R.compose(appearsInResource, getAllResources)
@@ -78,6 +78,6 @@ const compareTitles = (x, y) => {
} }
} }
const equalResources = (a, b) => const equalResources = (a, b) =>
a.title === b.title && a.title === b.title &&
a.cleanTitle == b.cleanTitle a.cleanTitle == b.cleanTitle

11149
yarn.lock Normal file

File diff suppressed because it is too large Load Diff