Switch to Google Adsense

This commit is contained in:
Geometrically 2021-01-17 20:14:10 -07:00
parent f21f758591
commit 0cced44491
No known key found for this signature in database
GPG Key ID: 90C056FDC8FC9FF0
12 changed files with 145 additions and 165 deletions

View File

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

View File

@ -47,7 +47,6 @@ export default {
},
{ hid: 'twitter:card', name: 'twitter:card', content: 'summary' },
{ hid: 'twitter:site', name: 'twitter:site', content: '@modrinth' },
{ name: 'propeller', content: '9542802736cdc223303e7a97b071550c' },
],
link: [
{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' },
@ -64,15 +63,6 @@ export default {
async: 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',
'nuxt-clipboard2',
'@nuxtjs/style-resources',
'@nuxtjs/google-adsense',
],
robots: {
Sitemap: 'https://modrinth.com/sitemap.xml',
@ -158,6 +149,9 @@ export default {
},
},
},
'google-adsense': {
id: 'ca-pub-4615302805870170',
},
dayjs: {
locales: ['en'],
defaultLocale: 'en',

73
package-lock.json generated
View File

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

View File

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

View File

@ -15,6 +15,53 @@
Privacy Policy, do not hesitate to contact us.
</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>
<p>
@ -46,26 +93,19 @@
>.
</p>
<h2>Our Advertising Partners</h2>
<h2>Google DoubleClick DART Cookie</h2>
<p>
Some of advertisers on our site may use cookies and web beacons. Our
advertising partners are listed below. Each of our advertising partners
has their own Privacy Policy for their policies on user data. For easier
access, we hyperlinked to their Privacy Policies below.
Google is a third-party vendor on our site. It also uses cookies, known
as DART cookies, to serve ads to our site visitors based upon their
visit to www.website.com and other sites on the internet. However,
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>
<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>
<P

View File

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

View File

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

View File

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

View File

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

1
static/ads.txt Normal file
View File

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