Skip to content

Commit ce18dc4

Browse files
author
tkokhing
committed
Build up notes, gobuster and rustscan, page.tsx hence updated & Given unique attention to toggle-frame, opening to more details within, ++1
1 parent 598108e commit ce18dc4

2 files changed

Lines changed: 27 additions & 4 deletions

File tree

src/app/_components/preference/toggle-frame.tsx

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,22 +25,44 @@ export function ToggleFrame({ label, children, defaultOpen = false }: Props) {
2525
}
2626
}, [isOpen]);
2727

28+
const scrollToTopAndClose = () => {
29+
ref.current?.scrollIntoView({ behavior: "smooth", block: "start" });
30+
setTimeout(() => setIsOpen(false), 150);
31+
};
32+
2833
return (
29-
<div ref={ref} className="shadow-sm hover:shadow-sm hover:shadow-blue-900/85 dark:shadow-sky-900/50 hover:dark:shadow-yellow-100/85 hover:dark:shadow-sm py-3 px-4">
34+
<div
35+
ref={ref}
36+
className="shadow-sm hover:shadow-sm hover:shadow-blue-900/85 dark:shadow-sky-900/50 hover:dark:shadow-yellow-100/85 py-3 px-4"
37+
>
3038
<hr className="my-0 w-full border-zinc-200 dark:border-zinc-800" />
39+
40+
{/* TOP TOGGLE */}
3141
<button
3242
type="button"
3343
onClick={handleToggle}
34-
className="text-left text-xs font-semibold underline text-blue-800 dark:text-blue-300 hover:text-tkokhing-blue hover:dark:text-tkokhing-dark transition"
44+
className="text-left text-xs font-semibold underline text-blue-800 dark:text-blue-300 hover:text-tkokhing-blue hover:dark:text-tkokhing-dark transition"
3545
>
36-
{label}&nbsp;{isOpen ? "▼" : "▶"}
46+
{label}&nbsp;{isOpen ? "▼" : "▶"}
3747
</button>
3848

3949
{isOpen && (
4050
<div className="mt-4">
4151
{children}
52+
53+
{/* BOTTOM TOGGLE */}
54+
<div className="mt-6 text-right">
55+
<button
56+
type="button"
57+
onClick={scrollToTopAndClose}
58+
className="text-xs font-semibold underline text-blue-800 dark:text-blue-300 hover:text-tkokhing-blue hover:dark:text-tkokhing-dark transition"
59+
>
60+
Collapse ▲
61+
</button>
62+
</div>
4263
</div>
4364
)}
65+
4466
<hr className="my-0 w-full border-zinc-200 dark:border-zinc-800" />
4567
</div>
4668
);

src/app/heptagoning/kill-chain/recon/[slug]/page.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { PostBody } from "@/app/_components/post_gen/post-body";
77
import { getPostBySlug } from "@/lib/share/api";
88
import { generatePageMetadata } from "@/lib/share/generatePageMetadata";
99
import { generatePageStaticParams } from "@/lib/share/generatePageStaticParams";
10-
import { NMAP_Overview, NMAP_Vuln_Scan, NMAP_SMB_Enum, NMAP_TCP_vs_UDP, RUSTSCAN_Overview, GOBUSTER_Overview, GOBUSTER_Outsmart_301,GOBUSTER_Advanced } from "@/lib/_data_exporter/data_kiil-chain/kill-chain_exporter";
10+
import { NMAP_Overview, NMAP_Vuln_Scan, NMAP_SMB_Enum, NMAP_TCP_vs_UDP, RUSTSCAN_Overview, GOBUSTER_Overview, GOBUSTER_Outsmart_301,GOBUSTER_Advanced, SQLI_Overview } from "@/lib/_data_exporter/data_kiil-chain/kill-chain_exporter";
1111
import Alert from "@/app/_components/blog_frame/alert";
1212
import Note from "@/app/_components/blog_frame/note";
1313
import Tip from "@/app/_components/blog_frame/tip";
@@ -36,6 +36,7 @@ export default async function Post(props: Params) {
3636
GOBUSTER_Overview,
3737
GOBUSTER_Outsmart_301,
3838
GOBUSTER_Advanced,
39+
SQLI_Overview,
3940
};
4041
const post = getPostBySlug(params.slug, MDX_FOLDER);
4142
if (!post || post.subPath != 'heptagoning/kill-chain/recon') return notFound();

0 commit comments

Comments
 (0)