Skip to content

Commit

Permalink
changes made to ascii art
Browse files Browse the repository at this point in the history
  • Loading branch information
tusharsinghbisht committed Oct 29, 2024
1 parent 383669c commit 6f0de4f
Show file tree
Hide file tree
Showing 4 changed files with 71 additions and 45 deletions.
19 changes: 10 additions & 9 deletions public/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
{
"id": 8,
"name": "Tarush",
"position": "Hacker",
"position": "Coordinator",
"username": "anonimbus",
"ascii_art": " _ _ _ ___ _ _ ___ __ __ ___ _ _ ___ \n /_\\ | \\| |/ _ \\| \\| |_ _| \\/ | _ ) | | / __|\n / _ \\| .` | (_) | .` || || |\\/| | _ \\ |_| \\__ \\ \n /_/ \\_\\_|\\_|\\___/|_|\\_|___|_| |_|___/\\___/|___/",
"link": "",
Expand All @@ -21,16 +21,16 @@
{
"id": 9,
"name": "Akshat Jain",
"position": "Hacker",
"username": "bedstrom",
"ascii_art": " ___ ___ ___ ___ _____ ___ ___ __ __ \n | _ ) __| \\/ __|_ _| _ \\/ _ \\| \\/ |\n | _ \\ _|| |) \\__ \\ | | | / (_) | |\\/| |\n |___/___|___/|___/ |_| |_|_\\____/|_| |_|",
"position": "Coordinator",
"username": "bedstorm",
"ascii_art": " ___ ___ ___ ___ _____ ___ ___ __ __ \n | _ ) __| \\/ __|_ _/ _ \\| _ \\ \\/ |\n | _ \\ _|| |) \\__ \\ | || (_) | / |\\/| |\n |___/___|___/|___/ |_| \\___/|_|_\\_| |_|",
"link": "",
"about": ""
},
{
"id": 10,
"name": "Satvik Saksena",
"position": "Hacker",
"position": "Coordinator",
"username": "trickastley",
"ascii_art": " _____ ___ ___ ___ _ __ _ ___ _____ _ _____ __\n |_ _| _ \\_ _/ __| |/ / /_\\ / __|_ _| | | __\\ \\ / /\n | | | /| | (__| ' < / _ \\\\__ \\ | | | |__| _| \\ V / \n |_| |_|_\\___\\___|_|\\_\\/_/ \\_\\___/ |_| |____|___| |_| ",
"link": "",
Expand All @@ -39,7 +39,7 @@
{
"id": 11,
"name": "Kartik Vats",
"position": "Hacker",
"position": "Coordinator",
"username": "CyC",
"ascii_art": " _____ _____ \n / __\\ \\ / / __|\n | (__ \\ V / (__ \n \\___| |_| \\___|",
"link": "",
Expand Down Expand Up @@ -67,7 +67,7 @@
"id": 14,
"name": "Mayank Jangid",
"position": "Hacker",
"username": "moon_guy",
"username": "the_moon_guy",
"ascii_art": " __ __ ___ ___ _ _ ___ _ ___ __\n | \\/ |/ _ \\ / _ \\| \\| | / __| | | \\ \\ / /\n | |\\/| | (_) | (_) | .` | | (_ | |_| |\\ V / \n |_| |_|\\___/ \\___/|_|\\_| \\___|\\___/ |_| ",
"link": "",
"about": ""
Expand All @@ -86,7 +86,7 @@
"name": "Arsh Abbas",
"position": "Hacker",
"username": "cha0s",
"ascii_art": " ___ _ _ __ ___ \n / __| || |/ \\/ __|\n | (__| __ | () \\__ \\\n \\___|_||_|\\__/|___/",
"ascii_art": " ___ _ _ _ __ ___ \n / __| || | /_\\ / \\/ __|\n | (__| __ |/ _ \\ () \\__ \\\n \\___|_||_/_/ \\_\\__/|___/",
"link": "",
"about": ""
},
Expand All @@ -106,7 +106,8 @@
"username": "benzo",
"ascii_art": " ___ ___ _ _ _______ \n| _ ) __| \\| |_ / _ \\ \n| _ \\ _|| .` |/ / (_) |\n|___/___|_|\\_/___\\___/ ",
"link": "https://tusharr.xyz/",
"about": "Hey, myself Tushar!\nHacker at EHAX.\n"
"linkText": "Website",
"about": "First year EE Student\nHacker at EHAX.\n\n`Ye site mene banayi hai`"
}
]
}
85 changes: 51 additions & 34 deletions src/app/components/Tab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import styles from "./Tab.module.css";
import TabData from "../interface/TabData";
import { AppContext } from "../context/AppContext";
import Button from "./Button";

import { FaLink } from "react-icons/fa";

interface TabWindowProps {
curr: TabData;
Expand All @@ -20,7 +20,6 @@ const TabWindow = ({ curr, tabs, setTabs }: TabWindowProps) => {
const [isDragging, setIsDragging] = useState(false); // Whether the window is being dragged
const [offset, setOffset] = useState({ x: 0, y: 0 }); // Offset of the mouse relative to the window


const handleMouseDown = (e: React.MouseEvent<HTMLDivElement, MouseEvent>) => {
const tabs_without_current: TabData[] = [];
tabs.forEach((t) => {
Expand Down Expand Up @@ -62,61 +61,79 @@ const TabWindow = ({ curr, tabs, setTabs }: TabWindowProps) => {

return (
<div
style={window.innerWidth > 700 ? {
top: `${position.y}px`,
left: `${position.x}px`,
} : {}}
style={
window.innerWidth > 700
? {
top: `${position.y}px`,
left: `${position.x}px`,
}
: {}
}
onMouseLeave={() => setIsDragging(false)}
className={styles.tab}
onMouseMove={handleMouseMove}
onMouseDown={handleMouseDown}
onMouseUp={handleMouseUp}
>
<div
className={styles.tabTop}
>
<div className={styles.tabTop}>
<h3 className={styles.tabHead}>{curr.title}</h3>
<span className={styles.tabClose} onClick={closeTab}>
x
</span>
</div>

<div className={styles.tabContent}>
{
curr.content ? curr.content : (
curr.member ? (
<>
<pre style={{ fontSize: "14px" }}>
<code>
{curr.member.ascii_art}
</code>
</pre>
{curr.content ? (
curr.content
) : curr.member ? (
<>
<pre style={{ fontSize: "14px" }}>
<code>
{curr.member.ascii_art}
<br />
<p style={{ fontSize: "20px", fontWeight: "bold" }}>{`>>> ${curr.member.name}`}</p><br />
<p style={{ fontSize: "17px"}}>{`Position: ${curr.member.position}`}</p>
<br />
<p
style={{
fontSize: "18px",
fontWeight: "bold",
marginBottom: "5px",
}}
>{`>>> ${curr.member.name}`}</p>
<p
style={{ fontSize: "14px" }}
>{`Position: ${curr.member.position}`}</p>
<br />
<p>{curr.member.about}</p>
<br />
<br />
<br />
{
curr.member.link && (
<a href={curr.member.link} target="__blank"><Button style={{ fontSize: "15px" }}>Know More</Button></a>
)
}
</>
) : ""
)
}
<p style={{ fontSize: "15px" }}>{curr.member.about}</p>
</code>
</pre>
<br />
<br />
{curr.member.link && (
<a href={curr.member.link} target="__blank" style={{ textDecoration: "none" }}>
<Button
style={{
fontSize: "15px",
display: "flex",
alignItems: "center",
justifyContent: "space-between"
}}
>
<FaLink size={18} style={{ marginRight: "5px" }} /> <span>{curr.member.linkText}</span>
</Button>
</a>
)}
</>
) : (
""
)}
</div>
</div>
);
};

const TabManager = () => {

const { tabs, setTabs } = useContext(AppContext)
const { tabs, setTabs } = useContext(AppContext);

return (
<>
Expand Down
1 change: 1 addition & 0 deletions src/app/interface/AppContextInterface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export interface MemberData {
username: string;
about: string;
link: string;
linkText: string;
ascii_art: string;
position: string;
}
Expand Down
11 changes: 9 additions & 2 deletions src/app/page.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,24 @@
font-weight: bold;
/* animation: glow 3s infinite; */
text-shadow: 2px 2px 30px var(--text);
/* text-shadow: 0px 0px 30px var(--background); */
}
@media only screen and (max-width: 600px) {
.header {
text-shadow: 0px 0px 30px var(--background);
}
}
@keyframes glow {
0% {
text-shadow: 2px 2px 30px var(--text);
}
95% {
text-shadow: none;
text-shadow: none;
}
}
.desc {
font-size: 20px;
text-shadow: 0px 0px 10px var(--background);
}
.content {
height: 90vh;
Expand Down Expand Up @@ -65,4 +72,4 @@
}
.discordlink {
text-decoration: none;
}
}

0 comments on commit 6f0de4f

Please sign in to comment.