Skip to content

Commit eb44bd9

Browse files
authored
Merge pull request #223 from ctfguide-tech/dev
Feature Release: CTFGuide Learn
2 parents da6f5fe + fe5a56f commit eb44bd9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+5606
-4074
lines changed

next.config.js

+19-12
Original file line numberDiff line numberDiff line change
@@ -6,25 +6,32 @@ const withPWA = require('next-pwa')({
66

77
/** @type {import('next').NextConfig} */
88
const nextConfig = {
9-
webpack: (config, { dev }) => {
10-
if (!dev) {
11-
config.plugins = config.plugins.filter(
12-
(plugin) => plugin.constructor.name !== 'ESLintWebpackPlugin'
13-
);
14-
}
15-
16-
return config;
17-
},
189
reactStrictMode: false,
1910
eslint: {
2011
ignoreDuringBuilds: true,
2112
},
2213
experimental: {
2314
scrollRestoration: true,
24-
esmExternals: true, // Add this to ensure esmExternals is true
15+
esmExternals: 'loose',
16+
},
17+
transpilePackages: ['@uiw/react-md-editor', '@uiw/react-markdown-preview'],
18+
async headers() {
19+
return [
20+
{
21+
source: '/:path*',
22+
headers: [
23+
{
24+
key: 'Cross-Origin-Embedder-Policy',
25+
value: 'require-corp',
26+
},
27+
{
28+
key: 'Cross-Origin-Opener-Policy',
29+
value: 'same-origin',
30+
},
31+
],
32+
},
33+
];
2534
},
26-
ignoreDuringBuilds: true,
27-
transpilePackages: ['react-md-editor']
2835
};
2936

3037
module.exports = withPWA(removeImports(nextConfig));

package.json

+10-4
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,18 @@
1919
"@fortawesome/react-fontawesome": "^0.2.0",
2020
"@headlessui/react": "^1.7.2",
2121
"@heroicons/react": "^2.0.13",
22+
"@monaco-editor/react": "^4.6.0",
2223
"@mui/material": "^5.15.2",
2324
"@mui/x-charts": "^6.18.4",
2425
"@react-oauth/google": "^0.12.1",
2526
"@stripe/stripe-js": "^2.1.7",
2627
"@tailwindcss/forms": "^0.5.3",
2728
"@tremor/react": "^1.8.1",
2829
"@uiw/react-markdown-editor": "^6.1.1",
29-
"@uiw/react-md-editor": "3.6.0",
30+
"@uiw/react-markdown-preview": "^5.1.3",
31+
"@uiw/react-md-editor": "^4.0.5",
3032
"@vercel/analytics": "^1.3.1",
33+
"@webcontainer/api": "^1.5.1-internal.5",
3134
"asciinema-player": "3.6.3",
3235
"autoprefixer": "^10.4.12",
3336
"babel-plugin-macros": "^3.1.0",
@@ -39,7 +42,7 @@
3942
"easymde": "^2.18.0",
4043
"enable": "^3.4.0",
4144
"focus-visible": "^5.2.0",
42-
"framer-motion": "^10.2.4",
45+
"framer-motion": "^11.15.0",
4346
"heroicons": "^2.0.13",
4447
"jwt-decode": "^4.0.0",
4548
"lucide-react": "^0.456.0",
@@ -53,10 +56,11 @@
5356
"puppeteer": "^22.0.0",
5457
"react": "18.2.0",
5558
"react-activity-calendar": "^2.2.11",
59+
"react-beautiful-dnd": "^13.1.1",
5660
"react-chartjs-2": "^5.2.0",
5761
"react-circular-progressbar": "^2.1.0",
5862
"react-collapsible": "^2.10.0",
59-
"react-confetti": "^6.1.0",
63+
"react-confetti": "^6.2.2",
6064
"react-dnd": "^16.0.1",
6165
"react-dnd-html5-backend": "^16.0.1",
6266
"react-dom": "18.2.0",
@@ -81,6 +85,7 @@
8185
"react-tooltip": "^5.25.1",
8286
"react-top-loading-bar": "^2.3.1",
8387
"react-transition-group": "^4.4.5",
88+
"react-use": "^17.6.0",
8489
"react-visibility-sensor": "^5.1.1",
8590
"reactjs-popup": "^2.0.5",
8691
"reactour": "^1.19.4",
@@ -92,7 +97,8 @@
9297
"tailwind-merge": "^2.3.0",
9398
"tailwindcss": "^3.2.1",
9499
"tailwindcss-animate": "^1.0.7",
95-
"xterm": "^5.3.0"
100+
"xterm": "^5.3.0",
101+
"xterm-addon-fit": "^0.8.0"
96102
},
97103
"devDependencies": {
98104
"eslint": "8.26.0",

public/loader.webp

182 KB
Binary file not shown.

public/whereami.jpeg

294 KB
Loading

src/components/StandardNav.jsx

+17
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,16 @@ export function StandardNav({ guestAllowed, alignCenter = true }) {
314314
</Link>
315315
</div>
316316
<div className=" vertical-align md:ml-6 md:flex ">
317+
<Link
318+
href="/learn/modules"
319+
className={
320+
linkClass('/learn/modules') + ' hidden lg:inline-flex'
321+
}
322+
>
323+
Learn
324+
325+
<span className="bg-blue-600 text-xs ml-2 text-white px-2 rounded-full">New!</span>
326+
</Link>
317327
<Link
318328
href="/practice"
319329
className={
@@ -648,6 +658,13 @@ export function StandardNav({ guestAllowed, alignCenter = true }) {
648658
>
649659
Dashboard
650660
</Disclosure.Button>
661+
<Disclosure.Button
662+
as="a"
663+
href="../practice"
664+
className="block border-l-4 border-transparent py-2 pl-3 pr-4 text-base font-medium text-gray-300 hover:border-gray-300 hover:text-gray-100 sm:pl-5 sm:pr-6"
665+
>
666+
Learn
667+
</Disclosure.Button>
651668
<Disclosure.Button
652669
as="a"
653670
href="../practice"

src/components/learn/CompletionSound.jsx

Whitespace-only changes.

src/components/learn/GithubMarkdown.jsx

-17
This file was deleted.

src/components/learn/LearnNav.jsx

-114
This file was deleted.

src/components/learn/LearningModule.jsx

-99
This file was deleted.

0 commit comments

Comments
 (0)