Switch to Google Adsense

This commit is contained in:
Geometrically
2021-01-17 20:14:10 -07:00
parent f21f758591
commit 0cced44491
12 changed files with 145 additions and 165 deletions

View File

@@ -26,9 +26,6 @@
Settings Settings
</nuxt-link> </nuxt-link>
</div> </div>
<client-only>
<EthicalAd type="image" ad-id="dashboard" />
</client-only>
<m-footer class="footer" /> <m-footer class="footer" />
</div> </div>
<div class="content"> <div class="content">

View File

@@ -1,82 +0,0 @@
<template>
<div>
<div
v-if="!showAlt"
:id="adId"
class="ethical-ad"
data-ea-publisher="modrinth-com"
:data-ea-type="type"
data-ea-manual="true"
/>
<div v-else class="alt">
<p>
A privacy-focused ad used to fund this site would've been here. Please
disable your content blocker to support Modrinth and it's authors.
</p>
</div>
</div>
</template>
<script>
export default {
name: 'EthicalAd',
props: {
type: {
type: String,
default: 'text',
},
adId: {
type: String,
default: 'none',
},
},
data() {
return {
showAlt: false,
}
},
mounted() {
try {
// eslint-disable-next-line no-undef
if (typeof ethicalads === 'undefined') {
this.$notify({
group: 'ads',
title: 'Please disable your Content Blocker',
text:
'Modrinth uses privacy-focused ads, from EthicalAds. Ads are the only way that our site is able to pay modders and support itself. Our ads are non-intrusive and minimal, and we only have one per page. We can assure you that none of your data is sold or used for tracking purposes.',
type: 'error',
})
this.showAlt = true
} else {
const element = document.getElementsByClassName('ethical-ad')[0]
element.className = 'ethical-ad'
element.innerHTML = ''
// eslint-disable-next-line no-undef
ethicalads.load()
element.className = 'ethical-ad loaded ' + this.$colorMode.preference
}
} catch (err) {
// eslint-disable-next-line no-console
console.error(err)
}
},
}
</script>
<style lang="scss" scoped>
[data-ea-type='text'] {
min-height: 70px;
}
[data-ea-type='image'] {
margin: auto 10px;
min-height: 260px;
}
.alt {
font-size: 14px;
border-radius: var(--size-rounded-sm);
background-color: var(--color-raised-bg);
box-shadow: 0 2px 3px rgba(0, 0, 0, 0.15);
padding: 0.7em 1em;
margin: 1em 0 2em 0;
}
</style>

View File

@@ -20,9 +20,13 @@
</p> </p>
</div> </div>
</div> </div>
<client-only> <adsbygoogle
<EthicalAd :ad-id="mod.id" type="text" /> ad-slot="7510690716"
</client-only> :page-url="
'https://modrinth.com/mod/' + (mod.slug ? mod.slug : mod.id)
"
ad-format="horizontal"
/>
<div class="mod-navigation"> <div class="mod-navigation">
<div class="tabs"> <div class="tabs">
<nuxt-link <nuxt-link
@@ -75,6 +79,13 @@
</div> </div>
<div class="mod-content"> <div class="mod-content">
<slot /> <slot />
<adsbygoogle
ad-slot="7510690716"
:page-url="
'https://modrinth.com/mod/' + (mod.slug ? mod.slug : mod.id)
"
ad-format="horizontal"
/>
</div> </div>
</div> </div>
<section class="mod-info"> <section class="mod-info">
@@ -266,6 +277,14 @@
</a> </a>
</div> </div>
</div> </div>
<adsbygoogle
ad-slot="7510690716"
:ad-style="{
display: 'inline-block',
width: '100%',
height: '240px',
}"
/>
<m-footer class="footer" /> <m-footer class="footer" />
</section> </section>
</div> </div>
@@ -273,8 +292,6 @@
</template> </template>
<script> <script>
import EthicalAd from '@/components/EthicalAd'
import Categories from '@/components/Categories' import Categories from '@/components/Categories'
import MFooter from '@/components/MFooter' import MFooter from '@/components/MFooter'
@@ -298,7 +315,6 @@ export default {
components: { components: {
MFooter, MFooter,
Categories, Categories,
EthicalAd,
ExternalIcon, ExternalIcon,
ForgeIcon, ForgeIcon,
FabricIcon, FabricIcon,

View File

@@ -47,7 +47,6 @@ export default {
}, },
{ hid: 'twitter:card', name: 'twitter:card', content: 'summary' }, { hid: 'twitter:card', name: 'twitter:card', content: 'summary' },
{ hid: 'twitter:site', name: 'twitter:site', content: '@modrinth' }, { hid: 'twitter:site', name: 'twitter:site', content: '@modrinth' },
{ name: 'propeller', content: '9542802736cdc223303e7a97b071550c' },
], ],
link: [ link: [
{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }, { rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' },
@@ -64,15 +63,6 @@ export default {
async: true, async: true,
defer: true, defer: true,
}, },
{
src: 'https://media.ethicalads.io/media/client/ethicalads.min.js',
async: true,
},
{
src: 'https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js',
'data-ad-client': 'ca-pub-4615302805870170',
async: true,
},
], ],
}, },
@@ -126,6 +116,7 @@ export default {
'@nuxtjs/sitemap', '@nuxtjs/sitemap',
'nuxt-clipboard2', 'nuxt-clipboard2',
'@nuxtjs/style-resources', '@nuxtjs/style-resources',
'@nuxtjs/google-adsense',
], ],
robots: { robots: {
Sitemap: 'https://modrinth.com/sitemap.xml', Sitemap: 'https://modrinth.com/sitemap.xml',
@@ -158,6 +149,9 @@ export default {
}, },
}, },
}, },
'google-adsense': {
id: 'ca-pub-4615302805870170',
},
dayjs: { dayjs: {
locales: ['en'], locales: ['en'],
defaultLocale: 'en', defaultLocale: 'en',

73
package-lock.json generated
View File

@@ -2166,15 +2166,15 @@
} }
}, },
"@nuxtjs/axios": { "@nuxtjs/axios": {
"version": "5.12.2", "version": "5.12.5",
"resolved": "https://registry.npmjs.org/@nuxtjs/axios/-/axios-5.12.2.tgz", "resolved": "https://registry.npmjs.org/@nuxtjs/axios/-/axios-5.12.5.tgz",
"integrity": "sha512-MKSuwHRgLTw1tMS1mDf+7XIvQLvF8GlK3rtuJY4lNmZVxYiBYhG3Nd6OrtH07fljNmvL7/JIUzk+1o/tVS6Pkg==", "integrity": "sha512-KCZMLRZFYOKcGt9mKxJMH6UJMB6H6g+BF/YxXEYz3Urrf2U2XiNkj6rmBqgw0XLRY5XD9Wm8knTGp6955512fQ==",
"requires": { "requires": {
"@nuxtjs/proxy": "^2.0.1", "@nuxtjs/proxy": "^2.1.0",
"axios": "^0.20.0", "axios": "^0.21.1",
"axios-retry": "^3.1.8", "axios-retry": "^3.1.9",
"consola": "^2.15.0", "consola": "^2.15.0",
"defu": "^3.1.0" "defu": "^3.2.2"
}, },
"dependencies": { "dependencies": {
"consola": { "consola": {
@@ -2237,13 +2237,17 @@
"eslint-loader": "^4.0.2" "eslint-loader": "^4.0.2"
} }
}, },
"@nuxtjs/google-adsense": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/@nuxtjs/google-adsense/-/google-adsense-1.3.0.tgz",
"integrity": "sha512-4kBOhcID/fVGgIosG273Zpx0nnwcT06RuqcmjDQmR9g+u3K5MgQBdkzKYTHefvAHzraf5KBROrA7/9HPp6Js3Q=="
},
"@nuxtjs/proxy": { "@nuxtjs/proxy": {
"version": "2.0.1", "version": "2.1.0",
"resolved": "https://registry.npmjs.org/@nuxtjs/proxy/-/proxy-2.0.1.tgz", "resolved": "https://registry.npmjs.org/@nuxtjs/proxy/-/proxy-2.1.0.tgz",
"integrity": "sha512-RVZ6iYeAuWteot9oer3vTDCOEiTwg37Mqf6yy8vPD0QQaw4z3ykgM++MzfUl85jM14+qNnODZj5EATRoCY009Q==", "integrity": "sha512-/qtoeqXgZ4Mg6LRg/gDUZQrFpOlOdHrol/vQYMnKu3aN3bP90UfOUB3QSDghUUK7OISAJ0xp8Ld78aHyCTcKCQ==",
"requires": { "requires": {
"consola": "^2.11.3", "http-proxy-middleware": "^1.0.6"
"http-proxy-middleware": "^1.0.4"
} }
}, },
"@nuxtjs/robots": { "@nuxtjs/robots": {
@@ -2393,9 +2397,9 @@
"integrity": "sha512-giAlZwstKbmvMk1OO7WXSj4OZ0keXAcl2TQq4LWHiiPH2ByaH7WeUzng+Qej8UPxxv+8lRTuouo0iaNDBuzIBA==" "integrity": "sha512-giAlZwstKbmvMk1OO7WXSj4OZ0keXAcl2TQq4LWHiiPH2ByaH7WeUzng+Qej8UPxxv+8lRTuouo0iaNDBuzIBA=="
}, },
"@types/http-proxy": { "@types/http-proxy": {
"version": "1.17.4", "version": "1.17.5",
"resolved": "https://registry.npmjs.org/@types/http-proxy/-/http-proxy-1.17.4.tgz", "resolved": "https://registry.npmjs.org/@types/http-proxy/-/http-proxy-1.17.5.tgz",
"integrity": "sha512-IrSHl2u6AWXduUaDLqYpt45tLVCtYv7o4Z0s1KghBCDgIIS9oW5K1H8mZG/A2CfeLdEa7rTd1ACOiHBc1EMT2Q==", "integrity": "sha512-GNkDE7bTv6Sf8JbV2GksknKOsk7OznNYHSdrtvPJXO0qJ9odZig6IZKUi5RFGi6d1bf6dgIAe4uXi3DBc7069Q==",
"requires": { "requires": {
"@types/node": "*" "@types/node": "*"
} }
@@ -3266,17 +3270,17 @@
"dev": true "dev": true
}, },
"axios": { "axios": {
"version": "0.20.0", "version": "0.21.1",
"resolved": "https://registry.npmjs.org/axios/-/axios-0.20.0.tgz", "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.1.tgz",
"integrity": "sha512-ANA4rr2BDcmmAQLOKft2fufrtuvlqR+cXNNinUmvfeSNCOF98PZL+7M/v1zIdGo7OLjEA9J2gXJL+j4zGsl0bA==", "integrity": "sha512-dKQiRHxGD9PPRIUNIWvZhPTPpl1rf/OxTYKsqKUDjBwYylTvV7SjSHJb9ratfyzM6wCdLCOYLzs73qpg5c4iGA==",
"requires": { "requires": {
"follow-redirects": "^1.10.0" "follow-redirects": "^1.10.0"
} }
}, },
"axios-retry": { "axios-retry": {
"version": "3.1.8", "version": "3.1.9",
"resolved": "https://registry.npmjs.org/axios-retry/-/axios-retry-3.1.8.tgz", "resolved": "https://registry.npmjs.org/axios-retry/-/axios-retry-3.1.9.tgz",
"integrity": "sha512-yPw5Y4Bg6Dgmhm35KaJFtlh23s1TecW0HsUerK4/IS1UKl0gtN2aJqdEKtVomiOS/bDo5w4P3sqgki/M10eF8Q==", "integrity": "sha512-NFCoNIHq8lYkJa6ku4m+V1837TP6lCa7n79Iuf8/AqATAHYB0ISaAS1eyIenDOfHOLtym34W65Sjke2xjg2fsA==",
"requires": { "requires": {
"is-retry-allowed": "^1.1.0" "is-retry-allowed": "^1.1.0"
} }
@@ -4916,9 +4920,9 @@
} }
}, },
"defu": { "defu": {
"version": "3.1.0", "version": "3.2.2",
"resolved": "https://registry.npmjs.org/defu/-/defu-3.1.0.tgz", "resolved": "https://registry.npmjs.org/defu/-/defu-3.2.2.tgz",
"integrity": "sha512-pc7vS4wbYFtsRL+OaLHKD72VcpOz9eYgzZeoLz9pCs+R8htyPdZnD1CxKP9ttZuT90CLPYFTSaTyc3/7v4gG9A==" "integrity": "sha512-8UWj5lNv7HD+kB0e9w77Z7TdQlbUYDVWqITLHNqFIn6khrNHv5WQo38Dcm1f6HeNyZf0U7UbPf6WeZDSdCzGDQ=="
}, },
"delayed-stream": { "delayed-stream": {
"version": "1.0.0", "version": "1.0.0",
@@ -6428,9 +6432,9 @@
} }
}, },
"follow-redirects": { "follow-redirects": {
"version": "1.13.0", "version": "1.13.1",
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.13.0.tgz", "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.13.1.tgz",
"integrity": "sha512-aq6gF1BEKje4a9i9+5jimNFIpq4Q1WiwBToeRK5NvZBd/TRsmW8BsJfOEGkr76TbOyPVD3OVDN910EcUNtRYEA==" "integrity": "sha512-SSG5xmZh1mkPGyKzjZP8zLjltIfpW32Y5QpdNJyjcfGxK3qo3NDDkZOZSFiGn1A6SclQxY9GzEwAHQ3dmYRWpg=="
}, },
"for-in": { "for-in": {
"version": "1.0.2", "version": "1.0.2",
@@ -7320,15 +7324,22 @@
} }
}, },
"http-proxy-middleware": { "http-proxy-middleware": {
"version": "1.0.5", "version": "1.0.6",
"resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-1.0.5.tgz", "resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-1.0.6.tgz",
"integrity": "sha512-CKzML7u4RdGob8wuKI//H8Ein6wNTEQR7yjVEzPbhBLGdOfkfvgTnp2HLnniKBDP9QW4eG10/724iTWLBeER3g==", "integrity": "sha512-NyL6ZB6cVni7pl+/IT2W0ni5ME00xR0sN27AQZZrpKn1b+qRh+mLbBxIq9Cq1oGfmTc7BUq4HB77mxwCaxAYNg==",
"requires": { "requires": {
"@types/http-proxy": "^1.17.4", "@types/http-proxy": "^1.17.4",
"http-proxy": "^1.18.1", "http-proxy": "^1.18.1",
"is-glob": "^4.0.1", "is-glob": "^4.0.1",
"lodash": "^4.17.19", "lodash": "^4.17.20",
"micromatch": "^4.0.2" "micromatch": "^4.0.2"
},
"dependencies": {
"lodash": {
"version": "4.17.20",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz",
"integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA=="
}
} }
}, },
"http-signature": { "http-signature": {

View File

@@ -13,8 +13,9 @@
}, },
"dependencies": { "dependencies": {
"@nuxtjs/auth": "^4.9.1", "@nuxtjs/auth": "^4.9.1",
"@nuxtjs/axios": "^5.12.2", "@nuxtjs/axios": "^5.12.5",
"@nuxtjs/dayjs": "^1.2.0", "@nuxtjs/dayjs": "^1.2.0",
"@nuxtjs/google-adsense": "^1.3.0",
"@nuxtjs/robots": "^2.4.2", "@nuxtjs/robots": "^2.4.2",
"@nuxtjs/sitemap": "^2.4.0", "@nuxtjs/sitemap": "^2.4.0",
"@nuxtjs/style-resources": "^1.0.0", "@nuxtjs/style-resources": "^1.0.0",

View File

@@ -15,6 +15,53 @@
Privacy Policy, do not hesitate to contact us. Privacy Policy, do not hesitate to contact us.
</p> </p>
<h2>General Data Protection Regulation (GDPR)</h2>
<p>We are a Data Controller of your information.</p>
<p>
Guavy LLC legal basis for collecting and using the personal information
described in this Privacy Policy depends on the Personal Information we
collect and the specific context in which we collect the information:
</p>
<ul>
<li>Guavy LLC needs to perform a contract with you</li>
<li>You have given Guavy LLC permission to do so</li>
<li>
Processing your personal information is in Guavy LLC legitimate
interests
</li>
<li>Guavy LLC needs to comply with the law</li>
</ul>
<p>
Guavy LLC will retain your personal information only for as long as is
necessary for the purposes set out in this Privacy Policy. We will
retain and use your information to the extent necessary to comply with
our legal obligations, resolve disputes, and enforce our policies.
</p>
<p>
If you are a resident of the European Economic Area (EEA), you have
certain data protection rights. If you wish to be informed what Personal
Information we hold about you and if you want it to be removed from our
systems, please contact us.
</p>
<p>
In certain circumstances, you have the following data protection rights:
</p>
<ul>
<li>
The right to access, update or to delete the information we have on
you.
</li>
<li>The right of rectification.</li>
<li>The right to object.</li>
<li>The right of restriction.</li>
<li>The right to data portability</li>
<li>The right to withdraw consent</li>
</ul>
<h2>Log Files</h2> <h2>Log Files</h2>
<p> <p>
@@ -46,26 +93,19 @@
>. >.
</p> </p>
<h2>Our Advertising Partners</h2> <h2>Google DoubleClick DART Cookie</h2>
<p> <p>
Some of advertisers on our site may use cookies and web beacons. Our Google is a third-party vendor on our site. It also uses cookies, known
advertising partners are listed below. Each of our advertising partners as DART cookies, to serve ads to our site visitors based upon their
has their own Privacy Policy for their policies on user data. For easier visit to www.website.com and other sites on the internet. However,
access, we hyperlinked to their Privacy Policies below. visitors may choose to decline the use of DART cookies by visiting the
Google ad and content network Privacy Policy at the following URL
<a href="https://policies.google.com/technologies/ads"
>https://policies.google.com/technologies/ads</a
>
</p> </p>
<ul>
<li>
<p>EthicalAds</p>
<p>
<a href="https://www.ethicalads.io/privacy-policy/"
>https://www.ethicalads.io/privacy-policy/</a
>
</p>
</li>
</ul>
<h2>Privacy Policies</h2> <h2>Privacy Policies</h2>
<P <P

View File

@@ -27,7 +27,6 @@
Save Save
</button> </button>
</header> </header>
<EthicalAd class="advert" />
<section class="essentials"> <section class="essentials">
<h3>Name</h3> <h3>Name</h3>
<label> <label>
@@ -311,13 +310,11 @@ import Multiselect from 'vue-multiselect'
import MFooter from '@/components/MFooter' import MFooter from '@/components/MFooter'
import FileInput from '@/components/FileInput' import FileInput from '@/components/FileInput'
import EthicalAd from '@/components/EthicalAd'
export default { export default {
components: { components: {
MFooter, MFooter,
FileInput, FileInput,
EthicalAd,
Multiselect, Multiselect,
}, },
async asyncData(data) { async asyncData(data) {

View File

@@ -20,7 +20,6 @@
Create Create
</button> </button>
</header> </header>
<EthicalAd class="advert" />
<section class="essentials"> <section class="essentials">
<h3>Name</h3> <h3>Name</h3>
<label> <label>
@@ -504,7 +503,6 @@ import Multiselect from 'vue-multiselect'
import MFooter from '@/components/MFooter' import MFooter from '@/components/MFooter'
import FileInput from '@/components/FileInput' import FileInput from '@/components/FileInput'
import EthicalAd from '@/components/EthicalAd'
import ForgeIcon from '~/assets/images/categories/forge.svg?inline' import ForgeIcon from '~/assets/images/categories/forge.svg?inline'
import FabricIcon from '~/assets/images/categories/fabric.svg?inline' import FabricIcon from '~/assets/images/categories/fabric.svg?inline'
@@ -513,7 +511,6 @@ export default {
components: { components: {
MFooter, MFooter,
FileInput, FileInput,
EthicalAd,
Multiselect, Multiselect,
ForgeIcon, ForgeIcon,
FabricIcon, FabricIcon,

View File

@@ -63,9 +63,7 @@
></pagination> ></pagination>
</section> </section>
<div class="results column-grow-4"> <div class="results column-grow-4">
<client-only> <adsbygoogle ad-slot="7510690716" ad-format="horizontal" />
<EthicalAd type="text" ad-id="search" />
</client-only>
<SearchResult <SearchResult
v-for="(result, index) in results" v-for="(result, index) in results"
:id="result.slug ? result.slug : result.mod_id.split('-')[1]" :id="result.slug ? result.slug : result.mod_id.split('-')[1]"
@@ -257,6 +255,14 @@
@input="onSearchChange(1)" @input="onSearchChange(1)"
></multiselect> ></multiselect>
</div> </div>
<adsbygoogle
ad-slot="7510690716"
:ad-style="{
display: 'inline-block',
width: '100%',
height: '240px',
}"
/>
<m-footer class="footer" /> <m-footer class="footer" />
</section> </section>
</div> </div>
@@ -270,7 +276,6 @@ import SearchResult from '@/components/ProjectCard'
import Pagination from '@/components/Pagination' import Pagination from '@/components/Pagination'
import SearchFilter from '@/components/SearchFilter' import SearchFilter from '@/components/SearchFilter'
import EthicalAd from '@/components/EthicalAd'
import MFooter from '@/components/MFooter' import MFooter from '@/components/MFooter'
import TechCategory from '~/assets/images/categories/tech.svg?inline' import TechCategory from '~/assets/images/categories/tech.svg?inline'
import AdventureCategory from '~/assets/images/categories/adventure.svg?inline' import AdventureCategory from '~/assets/images/categories/adventure.svg?inline'
@@ -294,7 +299,6 @@ export default {
auth: false, auth: false,
components: { components: {
MFooter, MFooter,
EthicalAd,
SearchResult, SearchResult,
Pagination, Pagination,
Multiselect, Multiselect,

View File

@@ -45,12 +45,18 @@
</div> </div>
</div> </div>
</div> </div>
<adsbygoogle
ad-slot="7510690716"
:ad-style="{
display: 'inline-block',
width: '100%',
height: '240px',
}"
/>
<m-footer class="footer" /> <m-footer class="footer" />
</div> </div>
<div class="content"> <div class="content">
<client-only> <adsbygoogle ad-slot="7510690716" ad-format="horizontal" />
<EthicalAd ad-id="profile" />
</client-only>
<div class="mods"> <div class="mods">
<SearchResult <SearchResult
v-for="result in mods" v-for="result in mods"
@@ -75,7 +81,6 @@
<script> <script>
import axios from 'axios' import axios from 'axios'
import SearchResult from '@/components/ProjectCard' import SearchResult from '@/components/ProjectCard'
import EthicalAd from '@/components/EthicalAd'
import MFooter from '@/components/MFooter' import MFooter from '@/components/MFooter'
import CalendarIcon from '~/assets/images/utils/calendar.svg?inline' import CalendarIcon from '~/assets/images/utils/calendar.svg?inline'
@@ -84,7 +89,6 @@ import DownloadIcon from '~/assets/images/utils/download.svg?inline'
export default { export default {
auth: false, auth: false,
components: { components: {
EthicalAd,
SearchResult, SearchResult,
CalendarIcon, CalendarIcon,
DownloadIcon, DownloadIcon,

1
static/ads.txt Normal file
View File

@@ -0,0 +1 @@
google.com, pub-4615302805870170, DIRECT, f08c47fec0942fa0