-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
551ad9d
commit 7b21f33
Showing
94 changed files
with
6,418 additions
and
39,984 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"extends": "next/core-web-vitals", | ||
"rules": { | ||
"semi": [ | ||
"error", | ||
"always" | ||
], | ||
"quotes": [ | ||
"error", | ||
"double" | ||
], | ||
"react/no-unknown-property": [ | ||
1, | ||
{ | ||
"ignore": [ | ||
"bar-id" | ||
] | ||
} | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,4 +23,6 @@ yarn-debug.log* | |
yarn-error.log* | ||
|
||
*.prettierrc | ||
*.cargo-ok | ||
*.cargo-ok | ||
|
||
*.next |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"compilerOptions": { | ||
"baseUrl": ".", | ||
"paths": { | ||
"challenges/*": [ | ||
"./*" | ||
] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
import { Component, createRef } from "react"; | ||
import css from "challenges/styles/header.module.scss"; | ||
|
||
import Link from "next/link"; | ||
import Logo from "challenges/assets/logo.svg"; | ||
|
||
export class Header extends Component { | ||
constructor() { | ||
super(); | ||
|
||
this.header = createRef(null); | ||
} | ||
|
||
|
||
render() { | ||
|
||
return <nav className={css.header} id="header" ref={this.header}> | ||
|
||
<Link href="/" > | ||
<p>Challenge Tracker</p> | ||
</Link> | ||
|
||
<div className={css.scrollSection}> | ||
|
||
<Link href="/"> | ||
<i className="fa-solid fa-house"></i> | ||
<p>Home</p> | ||
</Link> | ||
|
||
<Link href="/challe nges"> | ||
<i className="fa-solid fa-compass"></i> | ||
<p>Challenges</p> | ||
</Link> | ||
|
||
<Link href="/"> | ||
<i className="fa-solid fa-ranking-star"></i> | ||
<p>Leaderboards</p> | ||
</Link> | ||
|
||
<Link href="/"> | ||
<i className="fa-solid fa-award"></i> | ||
<p>Titles</p> | ||
</Link> | ||
|
||
<Link href="/"> | ||
<i className="fa-solid fa-user-group"></i> | ||
<p>Communities</p> | ||
</Link> | ||
|
||
<Link href="/"> | ||
<i className="fa-solid fa-gear"></i> | ||
<p>Settings</p> | ||
</Link> | ||
|
||
</div> | ||
|
||
<div className={css.footer}> | ||
|
||
<button type="button"> | ||
<i className="fa-solid fa-chevron-left"></i> | ||
<p>Collapse</p> | ||
</button> | ||
|
||
</div> | ||
|
||
</nav>; | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import { Header } from "./Header"; | ||
import css from "challenges/styles/layout.module.scss"; | ||
|
||
export default function Layout(props) { | ||
|
||
let attributes = {}; | ||
|
||
for (const attribute in props) { | ||
if (Object.hasOwnProperty.call(props, attribute)) { | ||
|
||
if (attribute !== "children") { | ||
attributes[attribute] = props[attribute]; | ||
} | ||
|
||
} | ||
} | ||
|
||
return <section {...props} className={css.wrapper}> | ||
|
||
<Header> | ||
</Header> | ||
|
||
<section className={css.contentWrapper}> | ||
{props.children} | ||
</section> | ||
|
||
</section>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
const path = require("path"); | ||
const loaderUtils = require("loader-utils"); | ||
|
||
const hashOnlyIdent = (context, _, exportName) => | ||
loaderUtils | ||
.getHashDigest( | ||
Buffer.from( | ||
`filePath:${path | ||
.relative(context.rootContext, context.resourcePath) | ||
.replace(/\\+/g, "/")}#className:${exportName}`, | ||
), | ||
"md4", | ||
"base64", | ||
6, | ||
) | ||
.replace(/[^a-zA-Z0-9-_]/g, "_") | ||
.replace(/^(-?\d|--)/, "_$1"); | ||
|
||
|
||
/** @type {import('next').NextConfig} */ | ||
const nextConfig = { | ||
reactStrictMode: true, | ||
webpack(config, { dev }) { | ||
const rules = config.module.rules | ||
.find((rule) => typeof rule.oneOf === "object") | ||
.oneOf.filter((rule) => Array.isArray(rule.use)); | ||
|
||
if (!dev) | ||
rules.forEach((rule) => { | ||
rule.use.forEach((moduleLoader) => { | ||
if ( | ||
moduleLoader.loader?.includes("css-loader") && | ||
!moduleLoader.loader?.includes("postcss-loader") | ||
) | ||
moduleLoader.options.modules.getLocalIdent = hashOnlyIdent; | ||
|
||
// earlier below statements were sufficient: | ||
// delete moduleLoader.options.modules.getLocalIdent; | ||
// moduleLoader.options.modules.localIdentName = '[hash:base64:6]'; | ||
}); | ||
}); | ||
|
||
return config; | ||
}, | ||
} | ||
|
||
module.exports = nextConfig |
Oops, something went wrong.
7b21f33
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
challenges – ./
challenges-darkintaqt.vercel.app
challenges-beta.darkintaqt.com
challenges-git-next-darkintaqt.vercel.app