Compare commits
No commits in common. "cda4cba1bfe76ae4e8521cd4628391caf9fac02f" and "8b5d8c047b533714e5830abee6f4423394537336" have entirely different histories.
cda4cba1bf
...
8b5d8c047b
|
@ -1,3 +1,107 @@
|
||||||
.direnv/
|
# Logs
|
||||||
|
logs
|
||||||
|
*.log
|
||||||
|
npm-debug.log*
|
||||||
|
yarn-debug.log*
|
||||||
|
yarn-error.log*
|
||||||
|
lerna-debug.log*
|
||||||
|
|
||||||
|
# Diagnostic reports (https://nodejs.org/api/report.html)
|
||||||
|
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
|
||||||
|
|
||||||
|
# Runtime data
|
||||||
|
pids
|
||||||
|
*.pid
|
||||||
|
*.seed
|
||||||
|
*.pid.lock
|
||||||
|
|
||||||
|
# Directory for instrumented libs generated by jscoverage/JSCover
|
||||||
|
lib-cov
|
||||||
|
|
||||||
|
# Coverage directory used by tools like istanbul
|
||||||
|
coverage
|
||||||
|
*.lcov
|
||||||
|
|
||||||
|
# nyc test coverage
|
||||||
|
.nyc_output
|
||||||
|
|
||||||
|
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
|
||||||
|
.grunt
|
||||||
|
|
||||||
|
# Bower dependency directory (https://bower.io/)
|
||||||
|
bower_components
|
||||||
|
|
||||||
|
# node-waf configuration
|
||||||
|
.lock-wscript
|
||||||
|
|
||||||
|
# Compiled binary addons (https://nodejs.org/api/addons.html)
|
||||||
|
build/Release
|
||||||
|
|
||||||
|
# Dependency directories
|
||||||
node_modules/
|
node_modules/
|
||||||
public/
|
jspm_packages/
|
||||||
|
|
||||||
|
# TypeScript v1 declaration files
|
||||||
|
typings/
|
||||||
|
|
||||||
|
# TypeScript cache
|
||||||
|
*.tsbuildinfo
|
||||||
|
|
||||||
|
# Optional npm cache directory
|
||||||
|
.npm
|
||||||
|
|
||||||
|
# Optional eslint cache
|
||||||
|
.eslintcache
|
||||||
|
|
||||||
|
# Microbundle cache
|
||||||
|
.rpt2_cache/
|
||||||
|
.rts2_cache_cjs/
|
||||||
|
.rts2_cache_es/
|
||||||
|
.rts2_cache_umd/
|
||||||
|
|
||||||
|
# Optional REPL history
|
||||||
|
.node_repl_history
|
||||||
|
|
||||||
|
# Output of 'npm pack'
|
||||||
|
*.tgz
|
||||||
|
|
||||||
|
# Yarn Integrity file
|
||||||
|
.yarn-integrity
|
||||||
|
|
||||||
|
# dotenv environment variables file
|
||||||
|
.env
|
||||||
|
.env.test
|
||||||
|
|
||||||
|
# parcel-bundler cache (https://parceljs.org/)
|
||||||
|
.cache
|
||||||
|
|
||||||
|
# Next.js build output
|
||||||
|
.next
|
||||||
|
|
||||||
|
# Nuxt.js build / generate output
|
||||||
|
.nuxt
|
||||||
|
dist
|
||||||
|
|
||||||
|
# Gatsby files
|
||||||
|
.cache/
|
||||||
|
# Comment in the public line in if your project uses Gatsby and *not* Next.js
|
||||||
|
# https://nextjs.org/blog/next-9-1#public-directory-support
|
||||||
|
# public
|
||||||
|
|
||||||
|
# vuepress build output
|
||||||
|
.vuepress/dist
|
||||||
|
|
||||||
|
# Serverless directories
|
||||||
|
.serverless/
|
||||||
|
|
||||||
|
# FuseBox cache
|
||||||
|
.fusebox/
|
||||||
|
|
||||||
|
# DynamoDB Local files
|
||||||
|
.dynamodb/
|
||||||
|
|
||||||
|
# TernJS port file
|
||||||
|
.tern-port
|
||||||
|
|
||||||
|
# Site output directory
|
||||||
|
/public/
|
||||||
|
|
59
flake.lock
59
flake.lock
|
@ -1,59 +0,0 @@
|
||||||
{
|
|
||||||
"nodes": {
|
|
||||||
"flake-utils": {
|
|
||||||
"inputs": {
|
|
||||||
"systems": "systems"
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1705309234,
|
|
||||||
"narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=",
|
|
||||||
"owner": "numtide",
|
|
||||||
"repo": "flake-utils",
|
|
||||||
"rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "numtide",
|
|
||||||
"repo": "flake-utils",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1705883077,
|
|
||||||
"narHash": "sha256-ByzHHX3KxpU1+V0erFy8jpujTufimh6KaS/Iv3AciHk=",
|
|
||||||
"owner": "NixOS",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "5f5210aa20e343b7e35f40c033000db0ef80d7b9",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"id": "nixpkgs",
|
|
||||||
"type": "indirect"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"root": {
|
|
||||||
"inputs": {
|
|
||||||
"flake-utils": "flake-utils",
|
|
||||||
"nixpkgs": "nixpkgs"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"systems": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1681028828,
|
|
||||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
|
||||||
"owner": "nix-systems",
|
|
||||||
"repo": "default",
|
|
||||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nix-systems",
|
|
||||||
"repo": "default",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"root": "root",
|
|
||||||
"version": 7
|
|
||||||
}
|
|
13
flake.nix
13
flake.nix
|
@ -1,13 +0,0 @@
|
||||||
{
|
|
||||||
inputs.flake-utils.url = "github:numtide/flake-utils";
|
|
||||||
|
|
||||||
outputs = { self, nixpkgs, flake-utils }:
|
|
||||||
flake-utils.lib.eachDefaultSystem (system:
|
|
||||||
let
|
|
||||||
pkgs = nixpkgs.legacyPackages.${system};
|
|
||||||
in
|
|
||||||
{
|
|
||||||
devShells.default = import ./shell.nix { inherit pkgs; };
|
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
|
32
package.json
32
package.json
|
@ -13,34 +13,36 @@
|
||||||
"deploy:netlify": "netlify deploy --prod -d 'public' -s 'href.plus'"
|
"deploy:netlify": "netlify deploy --prod -d 'public' -s 'href.plus'"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@fontsource/inter": "^5.0.16",
|
"@fontsource/inter": "^4.5.12",
|
||||||
"htm": "^3.1.1",
|
"htm": "^3.1.1",
|
||||||
"modern-normalize": "^2.0.0",
|
"modern-normalize": "^1.1.0",
|
||||||
"preact": "^10.19.3",
|
"preact": "^10.11.0",
|
||||||
"preact-router": "^4.1.2"
|
"preact-router": "^4.1.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/node": "^20.11.5",
|
"@types/node": "^18.7.23",
|
||||||
"netlify-cli": "^17.15.1",
|
"netlify-cli": "^14.2.1",
|
||||||
"postcss": "^8.4.33",
|
"postcss": "^8.4.16",
|
||||||
"sass": "^1.70.0",
|
"sass": "^1.55.0",
|
||||||
"stylelint": "^16.2.0",
|
"stylelint": "^14.13.0",
|
||||||
"stylelint-config-standard-scss": "^13.0.0",
|
"stylelint-config-standard-scss": "^5.0.0",
|
||||||
"typescript": "^5.3.3",
|
"typescript": "^4.8.4",
|
||||||
"vite": "^5.0.12",
|
"vite": "^3.1.4",
|
||||||
"xo": "^0.56.0"
|
"xo": "^0.52.3"
|
||||||
},
|
},
|
||||||
"stylelint": {
|
"stylelint": {
|
||||||
"extends": [
|
"extends": [
|
||||||
"stylelint-config-standard-scss"
|
"stylelint-config-standard-scss"
|
||||||
]
|
],
|
||||||
|
"rules": {
|
||||||
|
"string-quotes": "single"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"xo": {
|
"xo": {
|
||||||
"prettier": true,
|
"prettier": true,
|
||||||
"rules": {
|
"rules": {
|
||||||
"@typescript-eslint/consistent-type-definitions": "off",
|
"@typescript-eslint/consistent-type-definitions": "off",
|
||||||
"@typescript-eslint/consistent-type-imports": "off",
|
"@typescript-eslint/consistent-type-imports": "off",
|
||||||
"@typescript-eslint/no-unsafe-declaration-merging": "off",
|
|
||||||
"n/file-extension-in-import": "off"
|
"n/file-extension-in-import": "off"
|
||||||
},
|
},
|
||||||
"space": true
|
"space": true
|
||||||
|
|
8860
pnpm-lock.yaml
8860
pnpm-lock.yaml
File diff suppressed because it is too large
Load Diff
|
@ -1,7 +0,0 @@
|
||||||
{ pkgs ? import <nixpkgs> { } }:
|
|
||||||
|
|
||||||
with pkgs;
|
|
||||||
|
|
||||||
mkShell rec {
|
|
||||||
packages = [ cargo-make nodejs nodePackages.pnpm ];
|
|
||||||
}
|
|
|
@ -1,4 +1,5 @@
|
||||||
import {Component, html} from 'htm/preact';
|
import {Component, html} from 'htm/preact';
|
||||||
|
|
||||||
import debounce from '../utilities/debounce.js';
|
import debounce from '../utilities/debounce.js';
|
||||||
import searchReleases, {
|
import searchReleases, {
|
||||||
searchLimit,
|
searchLimit,
|
||||||
|
@ -73,14 +74,16 @@ export default class SearchBar extends Component<Props, State> {
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
|
||||||
results.push(html`
|
results.push(
|
||||||
|
html`
|
||||||
<li>
|
<li>
|
||||||
<a class="search-result" href="/release/${result.id}">
|
<a class="search-result" href="/release/${result.id}">
|
||||||
<span class="display">${result.artist} - ${result.title}</span>
|
<span class="display">${result.artist} - ${result.title}</span>
|
||||||
${disambiguation}
|
${disambiguation}
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
`);
|
`,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
const isLoading = this.state.searchState === 'searching';
|
const isLoading = this.state.searchState === 'searching';
|
||||||
|
@ -98,13 +101,15 @@ export default class SearchBar extends Component<Props, State> {
|
||||||
|
|
||||||
const resultAmount = this.state.searchResults.length;
|
const resultAmount = this.state.searchResults.length;
|
||||||
if (resultAmount > 0 && resultAmount % searchLimit === 0) {
|
if (resultAmount > 0 && resultAmount % searchLimit === 0) {
|
||||||
results.push(html`
|
results.push(
|
||||||
|
html`
|
||||||
<li class="search-state">
|
<li class="search-state">
|
||||||
<button class="load-more" onClick=${this.searchMore}>
|
<button class="load-more" onClick=${this.searchMore}>
|
||||||
Load more…
|
Load more…
|
||||||
</button>
|
</button>
|
||||||
</li>
|
</li>
|
||||||
`);
|
`,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return html`
|
return html`
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import {Component, html} from 'htm/preact';
|
import {Component, html} from 'htm/preact';
|
||||||
|
|
||||||
import ExternalAnchor from './external-anchor.js';
|
import ExternalAnchor from './external-anchor.js';
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import {Component, html} from 'htm/preact';
|
import {Component, html} from 'htm/preact';
|
||||||
|
|
||||||
import ExternalAnchor from '../components/external-anchor.js';
|
import ExternalAnchor from '../components/external-anchor.js';
|
||||||
import SearchBar from '../components/search-bar.js';
|
import SearchBar from '../components/search-bar.js';
|
||||||
import SharedFooter from '../components/shared-footer.js';
|
import SharedFooter from '../components/shared-footer.js';
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import {Component, html} from 'htm/preact';
|
import {Component, html} from 'htm/preact';
|
||||||
|
|
||||||
import SharedFooter from '../components/shared-footer.js';
|
import SharedFooter from '../components/shared-footer.js';
|
||||||
|
|
||||||
export default class NotFoundPage extends Component {
|
export default class NotFoundPage extends Component {
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import {Component, html} from 'htm/preact';
|
import {Component, html} from 'htm/preact';
|
||||||
|
|
||||||
import ExternalAnchor from '../components/external-anchor.js';
|
import ExternalAnchor from '../components/external-anchor.js';
|
||||||
import Release from '../utilities/release.js';
|
import Release from '../utilities/release.js';
|
||||||
|
|
||||||
|
@ -93,14 +94,16 @@ export default class ReleasePage extends Component<Props, State> {
|
||||||
const releaseUrl = `https://musicbrainz.org/release/${mbid}`;
|
const releaseUrl = `https://musicbrainz.org/release/${mbid}`;
|
||||||
if (urls.length === 0) {
|
if (urls.length === 0) {
|
||||||
const editUrl = `${releaseUrl}/edit`;
|
const editUrl = `${releaseUrl}/edit`;
|
||||||
urls.push(html`
|
urls.push(
|
||||||
|
html`
|
||||||
<li class="no-links">
|
<li class="no-links">
|
||||||
<p>
|
<p>
|
||||||
There are no links for this release yet, consider${' '}
|
There are no links for this release yet, consider${' '}
|
||||||
<${ExternalAnchor} url="${editUrl}" text="adding some" />?
|
<${ExternalAnchor} url="${editUrl}" text="adding some" />?
|
||||||
</p>
|
</p>
|
||||||
</li>
|
</li>
|
||||||
`);
|
`,
|
||||||
|
);
|
||||||
} else {
|
} else {
|
||||||
urls.push(
|
urls.push(
|
||||||
html`<li class="divider"></li>`,
|
html`<li class="divider"></li>`,
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import {Component, html} from 'htm/preact';
|
import {Component, html} from 'htm/preact';
|
||||||
|
|
||||||
import ExternalAnchor from '../components/external-anchor.js';
|
import ExternalAnchor from '../components/external-anchor.js';
|
||||||
import SharedFooter from '../components/shared-footer.js';
|
import SharedFooter from '../components/shared-footer.js';
|
||||||
import {isDebugEnabled} from '../utilities/debug.js';
|
import {isDebugEnabled} from '../utilities/debug.js';
|
||||||
|
|
|
@ -2,8 +2,10 @@
|
||||||
// import 'preact/debug';
|
// import 'preact/debug';
|
||||||
|
|
||||||
import '@fontsource/inter/latin.css';
|
import '@fontsource/inter/latin.css';
|
||||||
|
|
||||||
import {html, render} from 'htm/preact';
|
import {html, render} from 'htm/preact';
|
||||||
import {Router} from 'preact-router';
|
import {Router} from 'preact-router';
|
||||||
|
|
||||||
import HomePage from './pages/home.js';
|
import HomePage from './pages/home.js';
|
||||||
import NotFoundPage from './pages/not-found.js';
|
import NotFoundPage from './pages/not-found.js';
|
||||||
import ReleasePage from './pages/release.js';
|
import ReleasePage from './pages/release.js';
|
||||||
|
|
Loading…
Reference in New Issue