Skip to content

Commit 2d44bd4

Browse files
authored
Merge pull request #184 from ctfguide-tech/dev
fix: update missing categories
2 parents ae19414 + b730f1b commit 2d44bd4

File tree

5 files changed

+14
-5
lines changed

5 files changed

+14
-5
lines changed

src/components/practice/community.jsx

+2
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ function getCategoryIcon(category) {
2020
return 'fas fa-skull-crossbones';
2121
case 'steganography':
2222
return 'fas fa-image';
23+
case 'other':
24+
return 'fas fa-question';
2325
case 'basic':
2426
return 'fas fa-graduation-cap';
2527
case 'easy':

src/pages/create/edit.jsx

+1
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ function CategorySelect({ category, setCategory }) {
7070
{ name: 'Forensics', value: 'forensics' },
7171
{ name: 'Cryptography', value: 'cryptography' },
7272
{ name: 'Web', value: 'web' },
73+
{ name: 'Steganography', value: 'steganography' },
7374
{ name: 'Reverse Engineering', value: 'reverse engineering' },
7475
{ name: 'Programming', value: 'programming' },
7576
{ name: 'Pwn', value: 'pwn' },

src/pages/create/new.jsx

+1
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ function CategorySelect({ category, setCategory }) {
6666
const categories = [
6767
{ name: 'Forensics', value: 'forensics' },
6868
{ name: 'Cryptography', value: 'cryptography' },
69+
{ name: 'Steganography', value: 'steganography' },
6970
{ name: 'Web', value: 'web' },
7071
{ name: 'Reverse Engineering', value: 'reverse engineering' },
7172
{ name: 'Programming', value: 'programming' },

src/pages/users/[user].jsx

+5-5
Original file line numberDiff line numberDiff line change
@@ -550,7 +550,7 @@ export default function Create() {
550550
<>
551551
{user && (
552552
<div style={{ maxHeight: '200px', overflowY: 'auto' }}>
553-
<MarkdownViewer content={currentUsersBio} />
553+
<MarkdownViewer content={currentUsersBio} style={{ maxHeight: '200px', overflowY: 'auto', important: true }} />
554554
</div>
555555
)}
556556
</>
@@ -1117,14 +1117,14 @@ export default function Create() {
11171117
<p className="text-neutral-400">
11181118
{bioViewCheck()
11191119
? renderUsersBio()
1120-
: user && <MarkdownViewer content={user.bio || "Nothing to see here..."} />}
1120+
: user && <MarkdownViewer content={user.bio || "Nothing to see here..."} style={{ maxHeight: '200px', overflowY: 'auto', important: true }} />}
11211121
</p>
11221122
) : (
11231123
<p className="text-neutral-400">
11241124
{bioViewCheck()
11251125
? renderUsersBio()
11261126
: user && (
1127-
<MarkdownViewer content="Nothing to see here..." />
1127+
<MarkdownViewer content="Nothing to see here..." style={{ maxHeight: '200px', overflowY: 'auto', important: true }} />
11281128
)}
11291129
</p>
11301130
)}
@@ -1250,14 +1250,14 @@ export default function Create() {
12501250
<p className="text-neutral-400">
12511251
{bioViewCheck()
12521252
? renderUsersBio()
1253-
: user && <MarkdownViewer content={user.bio || "Nothing to see here..."} />}
1253+
: user && <MarkdownViewer content={user.bio || "Nothing to see here..."} style={{ maxHeight: '200px', overflowY: 'auto', important: true }} />}
12541254
</p>
12551255
) : (
12561256
<p className="text-neutral-400">
12571257
{bioViewCheck()
12581258
? renderUsersBio()
12591259
: user && (
1260-
<MarkdownViewer content="Nothing to see here..." />
1260+
<MarkdownViewer content="Nothing to see here..." style={{ maxHeight: '200px', overflowY: 'auto', important: true }} />
12611261
)}
12621262
</p>
12631263
)}

src/styles/tailwind.css

+5
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@
1010
overflow: hidden;
1111
border: 2px solid;
1212
}
13+
/* styles.css */
14+
.custom-markdown-viewer {
15+
max-height: 200px !important;
16+
overflow-y: auto !important;
17+
}
1318
.loader::before {
1419
content: "";
1520
position: absolute;

0 commit comments

Comments
 (0)