Fix duplicate version nums + etc (#831)

* Fix duplicate version nums + etc

* Update link info

* Remove useless loading conditions

* Update pages/legal/privacy.vue

Co-authored-by: triphora <emmaffle@modrinth.com>

* Update plugins/xss.js

Co-authored-by: triphora <emmaffle@modrinth.com>

Co-authored-by: triphora <emmaffle@modrinth.com>
This commit is contained in:
Geometrically
2023-01-03 19:06:30 -07:00
committed by GitHub
parent d2b1404907
commit b4236b9a95
21 changed files with 243 additions and 263 deletions

View File

@@ -6,7 +6,7 @@
<div class="ea-text"> <div class="ea-text">
<a <a
href="https://exaroton.com/?utm_source=modrinth&utm_medium=text&utm_campaign=host&utm_content=top" href="https://exaroton.com/?utm_source=modrinth&utm_medium=text&utm_campaign=host&utm_content=top"
rel="nofollow noopener" rel="noopener noreferrer nofollow sponsored"
target="_blank" target="_blank"
> >
<LightIcon <LightIcon
@@ -25,7 +25,11 @@
</div> </div>
</div> </div>
<div class="ea-callout"> <div class="ea-callout">
<a rel="nofollow noopener" target="_blank" href="https://adrinth.com"> <a
rel="noopener noreferrer nofollow sponsored"
target="_blank"
href="https://adrinth.com"
>
Ads via Adrinth Ads via Adrinth
</a> </a>
</div> </div>

View File

@@ -22,13 +22,6 @@
<div class="title"> <div class="title">
<nuxt-link :to="`/${$getProjectTypeForUrl(type, categories)}/${id}`"> <nuxt-link :to="`/${$getProjectTypeForUrl(type, categories)}/${id}`">
<h2 class="name"> <h2 class="name">
<IssuesIcon
v-if="hasModMessage"
v-tooltip="
'Project has a message from the moderators. View the project to see more.'
"
aria-label="Project has a message from the moderators. View the project to see more."
/>
{{ name }} {{ name }}
</h2> </h2>
</nuxt-link> </nuxt-link>
@@ -162,7 +155,6 @@ import InfoIcon from '~/assets/images/utils/info.svg?inline'
import ClientIcon from '~/assets/images/utils/client.svg?inline' import ClientIcon from '~/assets/images/utils/client.svg?inline'
import GlobeIcon from '~/assets/images/utils/globe.svg?inline' import GlobeIcon from '~/assets/images/utils/globe.svg?inline'
import ServerIcon from '~/assets/images/utils/server.svg?inline' import ServerIcon from '~/assets/images/utils/server.svg?inline'
import IssuesIcon from '~/assets/images/utils/issues.svg?inline'
import CalendarIcon from '~/assets/images/utils/calendar.svg?inline' import CalendarIcon from '~/assets/images/utils/calendar.svg?inline'
import EditIcon from '~/assets/images/utils/updated.svg?inline' import EditIcon from '~/assets/images/utils/updated.svg?inline'
import DownloadIcon from '~/assets/images/utils/download.svg?inline' import DownloadIcon from '~/assets/images/utils/download.svg?inline'
@@ -179,7 +171,6 @@ export default {
ClientIcon, ClientIcon,
ServerIcon, ServerIcon,
GlobeIcon, GlobeIcon,
IssuesIcon,
CalendarIcon, CalendarIcon,
EditIcon, EditIcon,
DownloadIcon, DownloadIcon,

View File

@@ -153,6 +153,7 @@
<a <a
:href="authUrl" :href="authUrl"
class="log-in-button header-button brand-button" class="log-in-button header-button brand-button"
rel="noopener noreferrer nofollow"
> >
<GitHubIcon aria-hidden="true" /> <GitHubIcon aria-hidden="true" />
Sign in with GitHub</a Sign in with GitHub</a
@@ -348,6 +349,7 @@
:target="$external()" :target="$external()"
href="https://github.com/modrinth" href="https://github.com/modrinth"
class="text-link" class="text-link"
rel="noopener noreferrer nofollow"
> >
open source</a open source</a
>. >.
@@ -357,6 +359,7 @@
:target="$external()" :target="$external()"
:href="'https://github.com/' + owner + '/' + slug + '/tree/' + hash" :href="'https://github.com/' + owner + '/' + slug + '/tree/' + hash"
class="text-link" class="text-link"
rel="noopener noreferrer nofollow"
>{{ hash.substring(0, 7) }}</a >{{ hash.substring(0, 7) }}</a
> >
</p> </p>
@@ -374,16 +377,41 @@
<a :target="$external()" href="https://blog.modrinth.com">Blog</a> <a :target="$external()" href="https://blog.modrinth.com">Blog</a>
<a :target="$external()" href="https://docs.modrinth.com">Docs</a> <a :target="$external()" href="https://docs.modrinth.com">Docs</a>
<a :target="$external()" href="https://status.modrinth.com">Status</a> <a :target="$external()" href="https://status.modrinth.com">Status</a>
<a :target="$external()" href="https://github.com/modrinth">GitHub</a> <a
rel="noopener noreferrer nofollow"
:target="$external()"
href="https://github.com/modrinth"
>GitHub</a
>
</div> </div>
<div class="links links-3" role="region" aria-label="Interact"> <div class="links links-3" role="region" aria-label="Interact">
<h4 aria-hidden="true">Interact</h4> <h4 aria-hidden="true">Interact</h4>
<a :target="$external()" href="https://discord.gg/EUHuJHt">Discord</a> <a
<a :target="$external()" href="https://twitter.com/modrinth">Twitter</a> rel="noopener noreferrer nofollow"
<a :target="$external()" rel="me" href="https://floss.social/@modrinth"> :target="$external()"
href="https://discord.gg/EUHuJHt"
>
Discord
</a>
<a
rel="noopener noreferrer nofollow"
:target="$external()"
href="https://twitter.com/modrinth"
>
Twitter
</a>
<a
rel="noopener noreferrer nofollow"
:target="$external()"
href="https://floss.social/@modrinth"
>
Mastodon Mastodon
</a> </a>
<a :target="$external()" href="https://crowdin.com/project/modrinth"> <a
rel="noopener noreferrer nofollow"
:target="$external()"
href="https://crowdin.com/project/modrinth"
>
Crowdin Crowdin
</a> </a>
</div> </div>

View File

@@ -11,6 +11,7 @@
<a <a
href="https://discord.gg/EUHuJHt" href="https://discord.gg/EUHuJHt"
class="iconified-button raised-button" class="iconified-button raised-button"
rel="noopener noreferrer nofollow"
> >
Get help on Discord Get help on Discord
</a> </a>

View File

@@ -196,6 +196,7 @@ export default {
'~/plugins/xss.js', '~/plugins/xss.js',
'~/plugins/vue-syntax.js', '~/plugins/vue-syntax.js',
'~/plugins/shorthands.js', '~/plugins/shorthands.js',
'~/plugins/markdown.js',
], ],
/* /*
** Auto import components ** Auto import components
@@ -218,9 +219,7 @@ export default {
// Doc: https://axios.nuxtjs.org/usage // Doc: https://axios.nuxtjs.org/usage
'@nuxtjs/dayjs', '@nuxtjs/dayjs',
'@nuxtjs/axios', '@nuxtjs/axios',
'@nuxtjs/robots',
'@nuxtjs/style-resources', '@nuxtjs/style-resources',
'@nuxtjs/markdownit',
'cookie-universal-nuxt', 'cookie-universal-nuxt',
], ],
ads: { ads: {
@@ -271,12 +270,6 @@ export default {
], ],
}, },
}, },
markdownit: {
preset: 'default',
html: true,
linkify: true,
breaks: false,
},
loading: { loading: {
color: '#1bd96a', color: '#1bd96a',
height: '2px', height: '2px',

135
package-lock.json generated
View File

@@ -11,14 +11,13 @@
"@iarna/toml": "^2.2.5", "@iarna/toml": "^2.2.5",
"@nuxtjs/axios": "^5.13.1", "@nuxtjs/axios": "^5.13.1",
"@nuxtjs/dayjs": "^1.2.0", "@nuxtjs/dayjs": "^1.2.0",
"@nuxtjs/markdownit": "^2.0.0",
"@nuxtjs/robots": "^2.4.2",
"@nuxtjs/style-resources": "^1.0.0", "@nuxtjs/style-resources": "^1.0.0",
"cookie-universal-nuxt": "^2.1.5", "cookie-universal-nuxt": "^2.1.5",
"core-js": "^3.9.1", "core-js": "^3.9.1",
"highlight.js": "^10.3.2", "highlight.js": "^10.3.2",
"js-yaml": "^4.1.0", "js-yaml": "^4.1.0",
"jszip": "^3.10.1", "jszip": "^3.10.1",
"markdown-it": "^13.0.1",
"nuxt": "^2.15.3", "nuxt": "^2.15.3",
"sass": "^1.32.12", "sass": "^1.32.12",
"v-tooltip": "^2.0.3", "v-tooltip": "^2.0.3",
@@ -2966,31 +2965,6 @@
"integrity": "sha512-t2MZGLf1V2rV4VBZbWIaXKdX/mUcYW0n2znQZoADBkGGxYL8EWqCuCZBmJPJ/Yy9fofJkyuuSuo5GSwo0XdEgw==", "integrity": "sha512-t2MZGLf1V2rV4VBZbWIaXKdX/mUcYW0n2znQZoADBkGGxYL8EWqCuCZBmJPJ/Yy9fofJkyuuSuo5GSwo0XdEgw==",
"dev": true "dev": true
}, },
"node_modules/@nuxtjs/markdownit": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/@nuxtjs/markdownit/-/markdownit-2.0.0.tgz",
"integrity": "sha512-YAEK/s0IzdWK1L74WKTQSMcvNhGgOW0xIWdu5VMxDo1NkNpm/0CbJZgSPt1JYAnT8r8r6wVQ5SY1v/1MZanPlQ==",
"dependencies": {
"@nuxtjs/markdownit-loader": "^1.1.1",
"defu": "^3.2.2",
"raw-loader": "^4.0.2"
}
},
"node_modules/@nuxtjs/markdownit-loader": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/@nuxtjs/markdownit-loader/-/markdownit-loader-1.2.0.tgz",
"integrity": "sha512-D6m4578NavamwD03nOU3H3NkS2zYfFJSMChUczlCGDx05DgAoenY4GdCmML1CnAEH/Cv6Bf230RIwDnD926oyQ==",
"dependencies": {
"highlight.js": "^10.5.0",
"loader-utils": "^1.1.0",
"markdown-it": "^8.3.1"
}
},
"node_modules/@nuxtjs/markdownit/node_modules/defu": {
"version": "3.2.2",
"resolved": "https://registry.npmjs.org/defu/-/defu-3.2.2.tgz",
"integrity": "sha512-8UWj5lNv7HD+kB0e9w77Z7TdQlbUYDVWqITLHNqFIn6khrNHv5WQo38Dcm1f6HeNyZf0U7UbPf6WeZDSdCzGDQ=="
},
"node_modules/@nuxtjs/proxy": { "node_modules/@nuxtjs/proxy": {
"version": "2.1.0", "version": "2.1.0",
"resolved": "https://registry.npmjs.org/@nuxtjs/proxy/-/proxy-2.1.0.tgz", "resolved": "https://registry.npmjs.org/@nuxtjs/proxy/-/proxy-2.1.0.tgz",
@@ -2999,11 +2973,6 @@
"http-proxy-middleware": "^1.0.6" "http-proxy-middleware": "^1.0.6"
} }
}, },
"node_modules/@nuxtjs/robots": {
"version": "2.5.0",
"resolved": "https://registry.npmjs.org/@nuxtjs/robots/-/robots-2.5.0.tgz",
"integrity": "sha512-z1F3HXb05NiZga8Cuq6k5bbowfJOScPtbSOakip0nege+1aI9pGoajzap8eR5s1qwLXAk9Ts+NcgetoUn5lwrQ=="
},
"node_modules/@nuxtjs/style-resources": { "node_modules/@nuxtjs/style-resources": {
"version": "1.2.1", "version": "1.2.1",
"resolved": "https://registry.npmjs.org/@nuxtjs/style-resources/-/style-resources-1.2.1.tgz", "resolved": "https://registry.npmjs.org/@nuxtjs/style-resources/-/style-resources-1.2.1.tgz",
@@ -6195,9 +6164,15 @@
} }
}, },
"node_modules/entities": { "node_modules/entities": {
"version": "1.1.2", "version": "3.0.1",
"resolved": "https://registry.npmjs.org/entities/-/entities-1.1.2.tgz", "resolved": "https://registry.npmjs.org/entities/-/entities-3.0.1.tgz",
"integrity": "sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w==" "integrity": "sha512-WiyBqoomrwMdFG1e0kqvASYfnlb0lp8M5o5Fw2OFq1hNZxxcNk8Ik0Xm7LxzBhuidnZB/UtBqVCgUz3kBOP51Q==",
"engines": {
"node": ">=0.12"
},
"funding": {
"url": "https://github.com/fb55/entities?sponsor=1"
}
}, },
"node_modules/errno": { "node_modules/errno": {
"version": "0.1.8", "version": "0.1.8",
@@ -9286,9 +9261,9 @@
"dev": true "dev": true
}, },
"node_modules/linkify-it": { "node_modules/linkify-it": {
"version": "2.2.0", "version": "4.0.1",
"resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-2.2.0.tgz", "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-4.0.1.tgz",
"integrity": "sha512-GnAl/knGn+i1U/wjBz3akz2stz+HrHLsxMwHQGofCDfPvlf+gDKN58UtfmUquTY4/MXeE2x7k19KQmeoZi94Iw==", "integrity": "sha512-C7bfi1UZmoj8+PQx22XyeXCuBlokoyWQL5pWSP+EI6nzRylyThouddufc2c1NDIcP9k5agmN9fLpA7VNJfIiqw==",
"dependencies": { "dependencies": {
"uc.micro": "^1.0.1" "uc.micro": "^1.0.1"
} }
@@ -9464,13 +9439,13 @@
} }
}, },
"node_modules/markdown-it": { "node_modules/markdown-it": {
"version": "8.4.2", "version": "13.0.1",
"resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-8.4.2.tgz", "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-13.0.1.tgz",
"integrity": "sha512-GcRz3AWTqSUphY3vsUqQSFMbgR38a4Lh3GWlHRh/7MRwz8mcu9n2IO7HOh+bXHrR9kOPDl5RNCaEsrneb+xhHQ==", "integrity": "sha512-lTlxriVoy2criHP0JKRhO2VDG9c2ypWCsT237eDiLqi09rmbKoUetyGHq2uOIRoRS//kfoJckS0eUzzkDR+k2Q==",
"dependencies": { "dependencies": {
"argparse": "^1.0.7", "argparse": "^2.0.1",
"entities": "~1.1.1", "entities": "~3.0.1",
"linkify-it": "^2.0.0", "linkify-it": "^4.0.1",
"mdurl": "^1.0.1", "mdurl": "^1.0.1",
"uc.micro": "^1.0.5" "uc.micro": "^1.0.5"
}, },
@@ -9478,6 +9453,11 @@
"markdown-it": "bin/markdown-it.js" "markdown-it": "bin/markdown-it.js"
} }
}, },
"node_modules/markdown-it/node_modules/argparse": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz",
"integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q=="
},
"node_modules/md5.js": { "node_modules/md5.js": {
"version": "1.3.5", "version": "1.3.5",
"resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz",
@@ -12194,6 +12174,7 @@
"version": "4.0.2", "version": "4.0.2",
"resolved": "https://registry.npmjs.org/raw-loader/-/raw-loader-4.0.2.tgz", "resolved": "https://registry.npmjs.org/raw-loader/-/raw-loader-4.0.2.tgz",
"integrity": "sha512-ZnScIV3ag9A4wPX/ZayxL/jZH+euYb6FcUinPcgiQW0+UBtEv0O6Q3lGd3cqJ+GHH+rksEv3Pj99oxJ3u3VIKA==", "integrity": "sha512-ZnScIV3ag9A4wPX/ZayxL/jZH+euYb6FcUinPcgiQW0+UBtEv0O6Q3lGd3cqJ+GHH+rksEv3Pj99oxJ3u3VIKA==",
"dev": true,
"dependencies": { "dependencies": {
"loader-utils": "^2.0.0", "loader-utils": "^2.0.0",
"schema-utils": "^3.0.0" "schema-utils": "^3.0.0"
@@ -12213,6 +12194,7 @@
"version": "2.0.2", "version": "2.0.2",
"resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.2.tgz", "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.2.tgz",
"integrity": "sha512-TM57VeHptv569d/GKh6TAYdzKblwDNiumOdkFnejjD0XwTH87K90w3O7AiJRqdQoXygvi1VQTJTLGhJl7WqA7A==", "integrity": "sha512-TM57VeHptv569d/GKh6TAYdzKblwDNiumOdkFnejjD0XwTH87K90w3O7AiJRqdQoXygvi1VQTJTLGhJl7WqA7A==",
"dev": true,
"dependencies": { "dependencies": {
"big.js": "^5.2.2", "big.js": "^5.2.2",
"emojis-list": "^3.0.0", "emojis-list": "^3.0.0",
@@ -18830,33 +18812,6 @@
} }
} }
}, },
"@nuxtjs/markdownit": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/@nuxtjs/markdownit/-/markdownit-2.0.0.tgz",
"integrity": "sha512-YAEK/s0IzdWK1L74WKTQSMcvNhGgOW0xIWdu5VMxDo1NkNpm/0CbJZgSPt1JYAnT8r8r6wVQ5SY1v/1MZanPlQ==",
"requires": {
"@nuxtjs/markdownit-loader": "^1.1.1",
"defu": "^3.2.2",
"raw-loader": "^4.0.2"
},
"dependencies": {
"defu": {
"version": "3.2.2",
"resolved": "https://registry.npmjs.org/defu/-/defu-3.2.2.tgz",
"integrity": "sha512-8UWj5lNv7HD+kB0e9w77Z7TdQlbUYDVWqITLHNqFIn6khrNHv5WQo38Dcm1f6HeNyZf0U7UbPf6WeZDSdCzGDQ=="
}
}
},
"@nuxtjs/markdownit-loader": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/@nuxtjs/markdownit-loader/-/markdownit-loader-1.2.0.tgz",
"integrity": "sha512-D6m4578NavamwD03nOU3H3NkS2zYfFJSMChUczlCGDx05DgAoenY4GdCmML1CnAEH/Cv6Bf230RIwDnD926oyQ==",
"requires": {
"highlight.js": "^10.5.0",
"loader-utils": "^1.1.0",
"markdown-it": "^8.3.1"
}
},
"@nuxtjs/proxy": { "@nuxtjs/proxy": {
"version": "2.1.0", "version": "2.1.0",
"resolved": "https://registry.npmjs.org/@nuxtjs/proxy/-/proxy-2.1.0.tgz", "resolved": "https://registry.npmjs.org/@nuxtjs/proxy/-/proxy-2.1.0.tgz",
@@ -18865,11 +18820,6 @@
"http-proxy-middleware": "^1.0.6" "http-proxy-middleware": "^1.0.6"
} }
}, },
"@nuxtjs/robots": {
"version": "2.5.0",
"resolved": "https://registry.npmjs.org/@nuxtjs/robots/-/robots-2.5.0.tgz",
"integrity": "sha512-z1F3HXb05NiZga8Cuq6k5bbowfJOScPtbSOakip0nege+1aI9pGoajzap8eR5s1qwLXAk9Ts+NcgetoUn5lwrQ=="
},
"@nuxtjs/style-resources": { "@nuxtjs/style-resources": {
"version": "1.2.1", "version": "1.2.1",
"resolved": "https://registry.npmjs.org/@nuxtjs/style-resources/-/style-resources-1.2.1.tgz", "resolved": "https://registry.npmjs.org/@nuxtjs/style-resources/-/style-resources-1.2.1.tgz",
@@ -21384,9 +21334,9 @@
} }
}, },
"entities": { "entities": {
"version": "1.1.2", "version": "3.0.1",
"resolved": "https://registry.npmjs.org/entities/-/entities-1.1.2.tgz", "resolved": "https://registry.npmjs.org/entities/-/entities-3.0.1.tgz",
"integrity": "sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w==" "integrity": "sha512-WiyBqoomrwMdFG1e0kqvASYfnlb0lp8M5o5Fw2OFq1hNZxxcNk8Ik0Xm7LxzBhuidnZB/UtBqVCgUz3kBOP51Q=="
}, },
"errno": { "errno": {
"version": "0.1.8", "version": "0.1.8",
@@ -23667,9 +23617,9 @@
"dev": true "dev": true
}, },
"linkify-it": { "linkify-it": {
"version": "2.2.0", "version": "4.0.1",
"resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-2.2.0.tgz", "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-4.0.1.tgz",
"integrity": "sha512-GnAl/knGn+i1U/wjBz3akz2stz+HrHLsxMwHQGofCDfPvlf+gDKN58UtfmUquTY4/MXeE2x7k19KQmeoZi94Iw==", "integrity": "sha512-C7bfi1UZmoj8+PQx22XyeXCuBlokoyWQL5pWSP+EI6nzRylyThouddufc2c1NDIcP9k5agmN9fLpA7VNJfIiqw==",
"requires": { "requires": {
"uc.micro": "^1.0.1" "uc.micro": "^1.0.1"
} }
@@ -23819,15 +23769,22 @@
} }
}, },
"markdown-it": { "markdown-it": {
"version": "8.4.2", "version": "13.0.1",
"resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-8.4.2.tgz", "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-13.0.1.tgz",
"integrity": "sha512-GcRz3AWTqSUphY3vsUqQSFMbgR38a4Lh3GWlHRh/7MRwz8mcu9n2IO7HOh+bXHrR9kOPDl5RNCaEsrneb+xhHQ==", "integrity": "sha512-lTlxriVoy2criHP0JKRhO2VDG9c2ypWCsT237eDiLqi09rmbKoUetyGHq2uOIRoRS//kfoJckS0eUzzkDR+k2Q==",
"requires": { "requires": {
"argparse": "^1.0.7", "argparse": "^2.0.1",
"entities": "~1.1.1", "entities": "~3.0.1",
"linkify-it": "^2.0.0", "linkify-it": "^4.0.1",
"mdurl": "^1.0.1", "mdurl": "^1.0.1",
"uc.micro": "^1.0.5" "uc.micro": "^1.0.5"
},
"dependencies": {
"argparse": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz",
"integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q=="
}
} }
}, },
"md5.js": { "md5.js": {
@@ -26005,6 +25962,7 @@
"version": "4.0.2", "version": "4.0.2",
"resolved": "https://registry.npmjs.org/raw-loader/-/raw-loader-4.0.2.tgz", "resolved": "https://registry.npmjs.org/raw-loader/-/raw-loader-4.0.2.tgz",
"integrity": "sha512-ZnScIV3ag9A4wPX/ZayxL/jZH+euYb6FcUinPcgiQW0+UBtEv0O6Q3lGd3cqJ+GHH+rksEv3Pj99oxJ3u3VIKA==", "integrity": "sha512-ZnScIV3ag9A4wPX/ZayxL/jZH+euYb6FcUinPcgiQW0+UBtEv0O6Q3lGd3cqJ+GHH+rksEv3Pj99oxJ3u3VIKA==",
"dev": true,
"requires": { "requires": {
"loader-utils": "^2.0.0", "loader-utils": "^2.0.0",
"schema-utils": "^3.0.0" "schema-utils": "^3.0.0"
@@ -26014,6 +25972,7 @@
"version": "2.0.2", "version": "2.0.2",
"resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.2.tgz", "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.2.tgz",
"integrity": "sha512-TM57VeHptv569d/GKh6TAYdzKblwDNiumOdkFnejjD0XwTH87K90w3O7AiJRqdQoXygvi1VQTJTLGhJl7WqA7A==", "integrity": "sha512-TM57VeHptv569d/GKh6TAYdzKblwDNiumOdkFnejjD0XwTH87K90w3O7AiJRqdQoXygvi1VQTJTLGhJl7WqA7A==",
"dev": true,
"requires": { "requires": {
"big.js": "^5.2.2", "big.js": "^5.2.2",
"emojis-list": "^3.0.0", "emojis-list": "^3.0.0",

View File

@@ -16,14 +16,13 @@
"@iarna/toml": "^2.2.5", "@iarna/toml": "^2.2.5",
"@nuxtjs/axios": "^5.13.1", "@nuxtjs/axios": "^5.13.1",
"@nuxtjs/dayjs": "^1.2.0", "@nuxtjs/dayjs": "^1.2.0",
"@nuxtjs/markdownit": "^2.0.0",
"@nuxtjs/robots": "^2.4.2",
"@nuxtjs/style-resources": "^1.0.0", "@nuxtjs/style-resources": "^1.0.0",
"cookie-universal-nuxt": "^2.1.5", "cookie-universal-nuxt": "^2.1.5",
"core-js": "^3.9.1", "core-js": "^3.9.1",
"highlight.js": "^10.3.2", "highlight.js": "^10.3.2",
"js-yaml": "^4.1.0", "js-yaml": "^4.1.0",
"jszip": "^3.10.1", "jszip": "^3.10.1",
"markdown-it": "^13.0.1",
"nuxt": "^2.15.3", "nuxt": "^2.15.3",
"sass": "^1.32.12", "sass": "^1.32.12",
"v-tooltip": "^2.0.3", "v-tooltip": "^2.0.3",

View File

@@ -165,11 +165,19 @@
</button> </button>
</template> </template>
<template v-else> <template v-else>
<a class="iconified-button" :href="authUrl"> <a
class="iconified-button"
:href="authUrl"
rel="noopener noreferrer nofollow"
>
<ReportIcon aria-hidden="true" /> <ReportIcon aria-hidden="true" />
Report Report
</a> </a>
<a class="iconified-button" :href="authUrl"> <a
class="iconified-button"
:href="authUrl"
rel="noopener noreferrer nofollow"
>
<HeartIcon aria-hidden="true" /> <HeartIcon aria-hidden="true" />
Follow Follow
</a> </a>
@@ -307,6 +315,7 @@
:href="project.issues_url" :href="project.issues_url"
class="title" class="title"
:target="$external()" :target="$external()"
rel="noopener noreferrer nofollow ugc"
> >
<IssuesIcon aria-hidden="true" /> <IssuesIcon aria-hidden="true" />
<span>Issues</span> <span>Issues</span>
@@ -316,6 +325,7 @@
:href="project.source_url" :href="project.source_url"
class="title" class="title"
:target="$external()" :target="$external()"
rel="noopener noreferrer nofollow ugc"
> >
<CodeIcon aria-hidden="true" /> <CodeIcon aria-hidden="true" />
<span>Source</span> <span>Source</span>
@@ -325,6 +335,7 @@
:href="project.wiki_url" :href="project.wiki_url"
class="title" class="title"
:target="$external()" :target="$external()"
rel="noopener noreferrer nofollow ugc"
> >
<WikiIcon aria-hidden="true" /> <WikiIcon aria-hidden="true" />
<span>Wiki</span> <span>Wiki</span>
@@ -333,6 +344,7 @@
v-if="project.discord_url" v-if="project.discord_url"
:href="project.discord_url" :href="project.discord_url"
:target="$external()" :target="$external()"
rel="noopener noreferrer nofollow ugc"
> >
<DiscordIcon class="shrink" aria-hidden="true" /> <DiscordIcon class="shrink" aria-hidden="true" />
<span>Discord</span> <span>Discord</span>
@@ -342,6 +354,7 @@
:key="index" :key="index"
:href="donation.url" :href="donation.url"
:target="$external()" :target="$external()"
rel="noopener noreferrer nofollow ugc"
> >
<BuyMeACoffeeLogo <BuyMeACoffeeLogo
v-if="donation.id === 'bmac'" v-if="donation.id === 'bmac'"
@@ -579,11 +592,24 @@
>our documentation</a >our documentation</a
> >
which provides instructions on using which provides instructions on using
<a href="https://atlauncher.com/about" :target="$external()"> <a
href="https://atlauncher.com/about"
:target="$external()"
rel="noopener noreferrer nofollow"
>
ATLauncher</a ATLauncher</a
>, <a href="https://multimc.org/" :target="$external()">MultiMC</a>, >,
and <a
<a href="https://prismlauncher.org" :target="$external()"> href="https://multimc.org/"
:target="$external()"
rel="noopener noreferrer nofollow"
>MultiMC</a
>, and
<a
href="https://prismlauncher.org"
:target="$external()"
rel="noopener noreferrer nofollow"
>
Prism Launcher</a Prism Launcher</a
>. >.
</div> </div>

View File

@@ -105,19 +105,6 @@ export default {
fetch() { fetch() {
if (this.$route.query.page) if (this.$route.query.page)
this.currentPage = parseInt(this.$route.query.page) this.currentPage = parseInt(this.$route.query.page)
this.filteredVersions = this.versions.map((version, index) => {
const nextVersion = this.versions[index + 1]
if (
nextVersion &&
version.changelog &&
nextVersion.changelog === version.changelog
) {
return { duplicate: true, ...version }
} else {
return { duplicate: false, ...version }
}
})
}, },
head() { head() {
const title = `${this.project.title} - Changelog` const title = `${this.project.title} - Changelog`

View File

@@ -16,7 +16,6 @@
<button <button
title="Save" title="Save"
class="iconified-button brand-button column" class="iconified-button brand-button column"
:disabled="!$nuxt.$loading"
@click="saveProject" @click="saveProject"
> >
<SaveIcon /> <SaveIcon />
@@ -275,7 +274,7 @@
class="text-link" class="text-link"
href="https://guides.github.com/features/mastering-markdown/" href="https://guides.github.com/features/mastering-markdown/"
target="_blank" target="_blank"
rel="noopener noreferrer" rel="noopener noreferrer nofollow"
>Markdown</a >Markdown</a
>. HTML can also be used inside your description, not including styles, >. HTML can also be used inside your description, not including styles,
scripts, and iframes (though YouTube iframes are allowed). scripts, and iframes (though YouTube iframes are allowed).
@@ -385,7 +384,7 @@
<a <a
href="https://spdx.org/licenses/" href="https://spdx.org/licenses/"
target="_blank" target="_blank"
rel="noopener noreferrer" rel="noopener noreferrer nofollow"
class="text-link" class="text-link"
>SPDX license identifier</a >SPDX license identifier</a
> >
@@ -399,7 +398,7 @@
<a <a
href="https://blog.modrinth.com/licensing-guide/" href="https://blog.modrinth.com/licensing-guide/"
target="_blank" target="_blank"
rel="noopener noreferrer" rel="noopener noreferrer nofollow"
class="text-link" class="text-link"
> >
licensing guide</a licensing guide</a

View File

@@ -104,7 +104,6 @@
<button <button
v-if="editIndex === -1" v-if="editIndex === -1"
class="iconified-button brand-button" class="iconified-button brand-button"
:disabled="!$nuxt.$loading"
@click="createGalleryItem" @click="createGalleryItem"
> >
<PlusIcon /> <PlusIcon />
@@ -113,7 +112,6 @@
<button <button
v-else v-else
class="iconified-button brand-button" class="iconified-button brand-button"
:disabled="!$nuxt.$loading"
@click="editGalleryItem" @click="editGalleryItem"
> >
<SaveIcon /> <SaveIcon />

View File

@@ -58,7 +58,6 @@
</button> </button>
<button <button
class="iconified-button brand-button" class="iconified-button brand-button"
:disabled="!$nuxt.$loading"
@click="createDataPackVersion" @click="createDataPackVersion"
> >
<RightArrowIcon /> <RightArrowIcon />
@@ -120,11 +119,7 @@
</ul> </ul>
</div> </div>
<div v-if="isCreating" class="input-group"> <div v-if="isCreating" class="input-group">
<button <button class="iconified-button brand-button" @click="createVersion">
class="iconified-button brand-button"
:disabled="!$nuxt.$loading"
@click="createVersion"
>
<PlusIcon aria-hidden="true" /> <PlusIcon aria-hidden="true" />
Create Create
</button> </button>
@@ -142,7 +137,6 @@
<div v-else-if="isEditing" class="input-group"> <div v-else-if="isEditing" class="input-group">
<button <button
class="iconified-button brand-button" class="iconified-button brand-button"
:disabled="!$nuxt.$loading"
@click="saveEditedVersion" @click="saveEditedVersion"
> >
<SaveIcon aria-hidden="true" /> <SaveIcon aria-hidden="true" />
@@ -249,7 +243,7 @@
class="text-link" class="text-link"
href="https://guides.github.com/features/mastering-markdown/" href="https://guides.github.com/features/mastering-markdown/"
target="_blank" target="_blank"
rel="noopener noreferrer" rel="noopener noreferrer nofollow"
>Markdown</a >Markdown</a
>. HTML can also be used inside your changelog, not including styles, >. HTML can also be used inside your changelog, not including styles,
scripts, and iframes. scripts, and iframes.
@@ -1081,6 +1075,22 @@ export default {
(x) => x.displayUrlEnding === this.$route.params.version (x) => x.displayUrlEnding === this.$route.params.version
) )
// LEGACY- to support old duplicate version URLs
const dashIndex = this.$route.params.version.indexOf('-')
if (!this.version && dashIndex !== -1) {
const version = this.versions.find(
(x) =>
x.displayUrlEnding ===
this.$route.params.version.substring(0, dashIndex)
)
this.$nuxt.context.redirect(
301,
`/${this.project.project_type}/${this.project.slug}/version/${version.version_number}`
)
return
}
if (!this.version) { if (!this.version) {
this.$nuxt.context.error({ this.$nuxt.context.error({
statusCode: 404, statusCode: 404,

View File

@@ -12,12 +12,18 @@
<h1>Discover, Play, and Create Minecraft content</h1> <h1>Discover, Play, and Create Minecraft content</h1>
<h3> <h3>
Find enjoyable, quality content through our Find enjoyable, quality content through our
<a href="https://github.com/modrinth" :target="$external()" <a
href="https://github.com/modrinth"
:target="$external()"
rel="noopener noreferrer nofollow"
>open-source</a >open-source</a
> >
modding platform built for the community. Create stuff, get paid, and modding platform built for the community. Create stuff, get paid, and
deploy your project with our deploy your project with our
<a href="https://docs.modrinth.com" :target="$external()" <a
href="https://docs.modrinth.com"
:target="$external()"
rel="noopener noreferrer nofollow"
>fully documented</a >fully documented</a
> >
API! API!
@@ -82,7 +88,11 @@
working on giving creators more analytics, adding new types of working on giving creators more analytics, adding new types of
projects, our launcher, and much more! If you have any more projects, our launcher, and much more! If you have any more
feature ideas, feel free to join our feature ideas, feel free to join our
<a href="https://discord.gg/EUHuJHt" :target="$external()"> <a
rel="noopener noreferrer nofollow"
href="https://discord.gg/EUHuJHt"
:target="$external()"
>
Discord</a Discord</a
>! >!
</p> </p>
@@ -90,7 +100,11 @@
<div class="feature completed"> <div class="feature completed">
<CheckIcon /> <CheckIcon />
<p> <p>
<a href="https://github.com/modrinth" :target="$external()"> <a
rel="noopener noreferrer nofollow"
href="https://github.com/modrinth"
:target="$external()"
>
100% open source 100% open source
</a> </a>
</p> </p>

View File

@@ -44,7 +44,9 @@
certain data protection rights. If you wish to be informed what Personal 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 Information we hold about you and if you want it to be removed from our
systems, please contact us by email at systems, please contact us by email at
<a href="mailto:gdpr@modrinth.com">gdpr@modrinth.com</a>. <a href="mailto:gdpr@modrinth.com" rel="noopener noreferrer nofollow">
gdpr@modrinth.com</a
>.
</p> </p>
<p> <p>

View File

@@ -240,10 +240,23 @@
>playing modpacks</a >playing modpacks</a
> >
with with
<a href="https://atlauncher.com/about" :target="$external()" <a
rel="noopener noreferrer nofollow"
href="https://atlauncher.com/about"
:target="$external()"
>ATLauncher</a >ATLauncher</a
>, <a href="https://multimc.org/" :target="$external()">MultiMC</a>, and >,
<a href="https://prismlauncher.org" :target="$external()"> <a
rel="noopener noreferrer nofollow"
href="https://multimc.org/"
:target="$external()"
>MultiMC</a
>, and
<a
rel="noopener noreferrer nofollow"
href="https://prismlauncher.org"
:target="$external()"
>
Prism Launcher</a Prism Launcher</a
>. Pack creators can reference our documentation on >. Pack creators can reference our documentation on
<a <a
@@ -251,7 +264,12 @@
:target="$external()" :target="$external()"
>creating modpacks</a >creating modpacks</a
>. Join us on >. Join us on
<a href="https://discord.gg/EUHuJHt" :target="$external()">Discord</a> <a
rel="noopener noreferrer nofollow"
href="https://discord.gg/EUHuJHt"
:target="$external()"
>Discord</a
>
for support. for support.
</div> </div>
<Advertisement type="banner" small-screen="square" /> <Advertisement type="banner" small-screen="square" />
@@ -365,7 +383,7 @@
:id="result.slug ? result.slug : result.project_id" :id="result.slug ? result.slug : result.project_id"
:key="result.project_id" :key="result.project_id"
:display="$cosmetics.searchDisplayMode[projectType.id]" :display="$cosmetics.searchDisplayMode[projectType.id]"
:gallery-images=" :featured-image="
result.featured_gallery result.featured_gallery
? result.featured_gallery ? result.featured_gallery
: result.gallery[0] : result.gallery[0]

View File

@@ -33,6 +33,7 @@
<a <a
href="https://github.com/settings/connections/applications/3acffb2e808d16d4b226" href="https://github.com/settings/connections/applications/3acffb2e808d16d4b226"
target="_blank" target="_blank"
rel="noopener noreferrer nofollow"
> >
Head to the Modrinth Application page on GitHub. Head to the Modrinth Application page on GitHub.
</a> </a>

View File

@@ -45,7 +45,12 @@
<ReportIcon aria-hidden="true" /> <ReportIcon aria-hidden="true" />
Report Report
</button> </button>
<a v-else class="iconified-button" :href="authUrl"> <a
v-else
class="iconified-button"
:href="authUrl"
rel="noopener noreferrer nofollow"
>
<ReportIcon aria-hidden="true" /> <ReportIcon aria-hidden="true" />
Report Report
</a> </a>
@@ -140,6 +145,7 @@
v-if="githubUrl" v-if="githubUrl"
:href="githubUrl" :href="githubUrl"
:target="$external()" :target="$external()"
rel="noopener noreferrer nofollow"
class="sidebar__item github-button iconified-button" class="sidebar__item github-button iconified-button"
> >
<GitHubIcon aria-hidden="true" /> <GitHubIcon aria-hidden="true" />
@@ -209,7 +215,7 @@
:key="project.id" :key="project.id"
:name="project.title" :name="project.title"
:display="$cosmetics.searchDisplayMode.user" :display="$cosmetics.searchDisplayMode.user"
:gallery-images=" :featured-image="
project.gallery project.gallery
.slice() .slice()
.sort((a, b) => b.featured - a.featured) .sort((a, b) => b.featured - a.featured)

23
plugins/markdown.js Normal file
View File

@@ -0,0 +1,23 @@
import MarkdownIt from 'markdown-it'
export default (ctx, inject) => {
const md = new MarkdownIt('default', {
html: true,
linkify: true,
breaks: false,
})
const defaultRender =
md.renderer.rules.link_open ||
function (tokens, idx, options, env, self) {
return self.renderToken(tokens, idx, options)
}
md.renderer.rules.link_open = function (tokens, idx, options, env, self) {
tokens[idx].attrJoin('rel', 'noopener noreferrer ugc')
return defaultRender(tokens, idx, options, env, self)
}
inject('md', md)
}

View File

@@ -32,116 +32,33 @@ export default (ctx, inject) => {
inject('formatCategory', formatCategory) inject('formatCategory', formatCategory)
inject('formatCategoryHeader', formatCategoryHeader) inject('formatCategoryHeader', formatCategoryHeader)
inject('computeVersions', (versions) => { inject('computeVersions', (versions) => {
const versionsMap = {} const visitedVersions = []
for (const version of versions.sort(
(a, b) => ctx.$dayjs(a.date_published) - ctx.$dayjs(b.date_published)
)) {
if (versionsMap[version.version_number]) {
versionsMap[version.version_number].push(version)
} else {
versionsMap[version.version_number] = [version]
}
}
const returnVersions = [] const returnVersions = []
for (const id in versionsMap) { for (const version of versions.reverse()) {
const versions = versionsMap[id] if (visitedVersions.includes(version.version_number)) {
visitedVersions.push(version.version_number)
if (versions.length === 1) { version.displayUrlEnding = version.id
versions[0].displayUrlEnding = versions[0].version_number
returnVersions.push(versions[0])
} else { } else {
const reservedNames = {} visitedVersions.push(version.version_number)
version.displayUrlEnding = version.version_number
const seenLoaders = {}
const duplicateLoaderIndexes = []
for (let i = 0; i < versions.length; i++) {
const version = versions[i]
const value = version.loaders.join('+')
if (seenLoaders[value]) {
duplicateLoaderIndexes.push(i)
} else {
if (i !== 0) {
version.displayUrlEnding = `${version.version_number}-${value}`
} else {
version.displayUrlEnding = version.version_number
}
reservedNames[version.displayUrlEnding] = true
version.displayName = version.loaders
.map((x) => x.charAt(0).toUpperCase() + x.slice(1))
.join(', ')
returnVersions.push(version)
seenLoaders[value] = true
}
}
const seenGameVersions = {}
const duplicateGameVersionIndexes = []
for (const i of duplicateLoaderIndexes) {
const version = versions[i]
const value = version.game_versions.join('+')
if (seenGameVersions[value]) {
duplicateGameVersionIndexes.push(i)
} else {
if (i !== 0) {
let setDisplayUrl = false
for (const gameVersion in version.game_versions) {
const displayUrlEnding = `${version.version_number}-${gameVersion}`
if (!reservedNames[version.version_number]) {
version.displayUrlEnding = displayUrlEnding
reservedNames[displayUrlEnding] = true
setDisplayUrl = true
break
}
}
if (!setDisplayUrl) {
version.displayUrlEnding = `${version.version_number}-${value}`
}
} else if (!reservedNames[version.version_number]) {
version.displayUrlEnding = version.version_number
reservedNames[version.version_number] = true
}
version.displayName = formatVersions(
version.game_versions,
ctx.store
)
returnVersions.push(version)
seenGameVersions[value] = true
}
}
for (const i in duplicateGameVersionIndexes) {
const version = versions[i]
version.displayUrlEnding = version.id
version.displayName = version.id
returnVersions.push(version)
}
} }
returnVersions.push(version)
} }
return returnVersions.sort( return returnVersions.reverse().map((version, index) => {
(a, b) => ctx.$dayjs(b.date_published) - ctx.$dayjs(a.date_published) const nextVersion = returnVersions[index + 1]
) if (
nextVersion &&
version.changelog &&
nextVersion.changelog === version.changelog
) {
return { duplicate: true, ...version }
} else {
return { duplicate: false, ...version }
}
})
}) })
inject('getProjectTypeForDisplay', (type, categories) => { inject('getProjectTypeForDisplay', (type, categories) => {
if (type === 'mod') { if (type === 'mod') {

View File

@@ -17,6 +17,7 @@ const options = {
input: ['checked', 'disabled', 'type'], input: ['checked', 'disabled', 'type'],
iframe: ['width', 'height', 'allowfullscreen', 'frameborder'], iframe: ['width', 'height', 'allowfullscreen', 'frameborder'],
img: [...xss.whiteList.img, 'style'], img: [...xss.whiteList.img, 'style'],
a: [...xss.whiteList.a, 'rel'],
}, },
css: { css: {
whiteList: { whiteList: {

3
static/robots.txt Normal file
View File

@@ -0,0 +1,3 @@
User-agent: *
Disallow:
Sitemap: https://modrinth.com/sitemap.xml