Skip to content

Commit 7c6327e

Browse files
committed
feat: add vague to fezminal
1 parent 05cc7ae commit 7c6327e

File tree

1 file changed

+96
-10
lines changed

1 file changed

+96
-10
lines changed

src/pages/RetroTerminalPage.jsx

Lines changed: 96 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ import remarkGfm from 'remark-gfm';
66
import remarkMath from 'remark-math';
77
import rehypeKatex from 'rehype-katex';
88
import { vocabulary } from '../data/vocabulary';
9+
import Seo from '../components/Seo';
10+
import piml from 'piml';
911
import {
1012
ArrowLeft,
1113
FloppyDisk,
@@ -592,6 +594,7 @@ const Workstation = ({
592594
const [selectedFile, setSelectedFile] = useState(null);
593595
const [searchQuery, setSearchQuery] = useState('');
594596
const [aboutContent, setAboutContent] = useState('');
597+
const [vagueIssues, setVagueIssues] = useState([]);
595598

596599
// Terminal State
597600
const [terminalHistory, setTerminalHistory] = useState([
@@ -668,6 +671,15 @@ const Workstation = ({
668671
.then((res) => res.text())
669672
.then((text) => setAboutContent(text))
670673
.catch((err) => console.error(err));
674+
675+
// Fetch Vague Issues
676+
fetch('/the_vague/issues.piml')
677+
.then((res) => res.text())
678+
.then((text) => {
679+
const parsed = piml.parse(text);
680+
setVagueIssues(parsed.issues || []);
681+
})
682+
.catch((err) => console.error(err));
671683
}, []);
672684

673685
const handleScroll = (direction) => {
@@ -696,6 +708,12 @@ const Workstation = ({
696708
v.title.toLowerCase().includes(searchQuery.toLowerCase()),
697709
)
698710
: vocabList;
711+
if (activeTab === 'vague')
712+
return searchQuery
713+
? vagueIssues.filter((v) =>
714+
v.title.toLowerCase().includes(searchQuery.toLowerCase()),
715+
)
716+
: vagueIssues;
699717
return [];
700718
};
701719

@@ -733,6 +751,7 @@ const Workstation = ({
733751
BLOG : Switch to Handbook directory
734752
VOCAB : Switch to Knowledge directory
735753
ABOUT : View Personnel File
754+
VAGUE : Switch to The Vague Archives
736755
SYSTEM : Switch to System Config directory
737756
CLEAR : Clear terminal history
738757
EXIT : Return to standard homepage`;
@@ -855,6 +874,9 @@ const Workstation = ({
855874
} else if (command === 'about' || command === 'cd about') {
856875
handleTabChange('about');
857876
addLog(cmd, 'DIRECTORY CHANGED: PERSONNEL FILE');
877+
} else if (command === 'vague' || command === 'cd vague') {
878+
handleTabChange('vague');
879+
addLog(cmd, 'DIRECTORY CHANGED: THE VAGUE ARCHIVES');
858880
} else if (command === 'system' || command === 'cd system') {
859881
handleTabChange('system');
860882
addLog(cmd, 'DIRECTORY CHANGED: SYSTEM CONFIG');
@@ -1064,6 +1086,51 @@ const Workstation = ({
10641086
);
10651087
}
10661088

1089+
if (activeTab === 'vague') {
1090+
return (
1091+
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4 p-6 pb-20">
1092+
{filteredData.map((issue, idx) => (
1093+
<button
1094+
key={idx}
1095+
onClick={() => {
1096+
if (issue.link && issue.link.endsWith('.pdf')) {
1097+
window.open(`${issue.link}`, '_blank');
1098+
playClick();
1099+
} else if (issue.link) {
1100+
window.open(issue.link, '_blank');
1101+
playClick();
1102+
}
1103+
}}
1104+
className="group text-left border border-[#005f6b] bg-[#00252b] p-4 hover:border-[#4fffa8] hover:bg-[#00333b] transition-all relative overflow-hidden flex flex-col h-full"
1105+
>
1106+
<div className="absolute top-0 right-0 p-1 opacity-20 group-hover:opacity-100 transition-opacity font-mono text-2xl font-bold">
1107+
{String(filteredData.length - idx).padStart(2, '0')}
1108+
</div>
1109+
<h3 className="font-bold text-[#e8f7f7] uppercase tracking-wide truncate pr-6 mb-2">
1110+
{issue.title}
1111+
</h3>
1112+
<p className="text-[10px] text-[#80a0a0] line-clamp-2 mb-4">
1113+
{issue.description}
1114+
</p>
1115+
<div className="mt-auto pt-2 border-t border-[#005f6b]/30 flex justify-between items-center">
1116+
<span className="text-[9px] uppercase tracking-widest text-[#4fffa8]/60">
1117+
{issue.date}
1118+
</span>
1119+
<span className="text-[9px] font-bold text-[#4fffa8]">
1120+
[Access Publication]
1121+
</span>
1122+
</div>
1123+
</button>
1124+
))}
1125+
{filteredData.length === 0 && (
1126+
<div className="col-span-full text-[#005f6b] text-center py-12 uppercase tracking-widest">
1127+
No archives found matching query.
1128+
</div>
1129+
)}
1130+
</div>
1131+
);
1132+
}
1133+
10671134
return (
10681135
<div className="p-12 flex flex-col items-center justify-center h-full text-center">
10691136
<FloppyDisk size={48} className="mb-6 text-[#005f6b]" />
@@ -1150,6 +1217,16 @@ const Workstation = ({
11501217
/>
11511218
Personnel (About)
11521219
</button>
1220+
<button
1221+
onClick={() => handleTabChange('vague')}
1222+
className={`w-full text-left px-6 py-3 text-xs uppercase tracking-widest font-bold border-l-2 transition-colors flex items-center gap-3 ${activeTab === 'vague' ? 'border-[#4fffa8] bg-[#00252b] text-white' : 'border-transparent text-[#80a0a0] hover:text-white hover:bg-[#001a1f]'}`}
1223+
>
1224+
<Globe
1225+
size={18}
1226+
weight={activeTab === 'vague' ? 'fill' : 'regular'}
1227+
/>
1228+
The Vague (Archives)
1229+
</button>
11531230
<button
11541231
onClick={() => handleTabChange('system')}
11551232
className={`w-full text-left px-6 py-3 text-xs uppercase tracking-widest font-bold border-l-2 transition-colors flex items-center gap-3 ${activeTab === 'system' ? 'border-[#4fffa8] bg-[#00252b] text-white' : 'border-transparent text-[#80a0a0] hover:text-white hover:bg-[#001a1f]'}`}
@@ -1330,16 +1407,25 @@ const RetroTerminalPage = () => {
13301407
const [booted, setBooted] = useState(false);
13311408
const audio = useRetroAudio();
13321409

1333-
return booted ? (
1334-
<Workstation {...audio} />
1335-
) : (
1336-
<BootScreen
1337-
onComplete={() => {
1338-
setBooted(true);
1339-
audio.playBoot();
1340-
}}
1341-
initAudio={audio.initAudio}
1342-
/>
1410+
return (
1411+
<>
1412+
<Seo
1413+
title="Fezminal OS v2.0.26 | Restricted Access"
1414+
description="Low-level architectural interface for Fezcodex archives."
1415+
keywords={['terminal', 'retro', 'os', 'cyberpunk', 'archives']}
1416+
/>
1417+
{booted ? (
1418+
<Workstation {...audio} />
1419+
) : (
1420+
<BootScreen
1421+
onComplete={() => {
1422+
setBooted(true);
1423+
audio.playBoot();
1424+
}}
1425+
initAudio={audio.initAudio}
1426+
/>
1427+
)}
1428+
</>
13431429
);
13441430
};
13451431

0 commit comments

Comments
 (0)