Skip to content

Commit

Permalink
add new maps
Browse files Browse the repository at this point in the history
  • Loading branch information
SurvivorNo1 committed Nov 24, 2024
1 parent 7ad73bc commit d9c5475
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 14 deletions.
14 changes: 8 additions & 6 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
<script
type="text/javascript"
src="//rf.revolvermaps.com/0/0/3.js?i=50o47yq88l6&amp;b=0&amp;s=40&amp;m=2&amp;cl=ffffff&amp;co=010020&amp;cd=aa0000&amp;v0=60&amp;v1=60&amp;r=1"
async="async"
></script>
</body>
<div id="clustrmaps-container" style="width: 30px; height: 30px; overflow: hidden;">
<script
type="text/javascript"
id="clstr_globe"
src="//clustrmaps.com/globe.js?d=pNfNuTdqd7cPrzYWgZ5h5o24AVXGEO0rUVmlQQmUgMY"
></script>
</div>
</body>
</html>
39 changes: 31 additions & 8 deletions src/pages/Layout.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,22 @@
import React from 'react';
import { useEffect, useState } from 'react';
import { Link, Outlet } from 'react-router-dom';
const Layout: React.FC = () => {
const your_own_domain = "https://survivorno1.xyz";

const textShadowStyle = {
textShadow: '3px 3px 3px rgba(0, 0, 0, 0.4)',
};
const [currentUrl, setCurrentUrl] = useState("");

useEffect(() => {
setCurrentUrl(window.location.href);
}, []);
// you can change the domain to your own domain
const isCurrentSite = currentUrl === your_own_domain;

return (
<div className="flex flex-col min-h-screen">
{/* 页眉 */}
<header className="flex-col bg-white text-bold text-black p-4 md:sticky md:top-0 mb-0 ">
<h1
className="text-center text-2xl mb-4 text-shadow"
Expand Down Expand Up @@ -51,12 +60,16 @@ const Layout: React.FC = () => {
Email
</a>
<a
href="https://survivorno1.xyz"
href={
isCurrentSite
? "https://survivorno1.github.io/"
: "https://survivorno1.xyz"
}
target="_blank"
rel="noopener noreferrer"
className="text-blue-600 hover:underline"
>
Website
{isCurrentSite ? "Gh-pages" : "Website"}
</a>
<a
href="https://scholar.google.es/citations?user=uHzBHUsAAAAJ&hl=en"
Expand All @@ -69,9 +82,7 @@ const Layout: React.FC = () => {
</nav>
</header>

{/* 主体部分:侧边栏和内容 */}
<div className=" flex flex-col flex-1 h-screen md:flex-row justify-center">
{/* 头像和自我介绍 */}
<div className="flex flex-col items-center p-4 md:sticky md:top-1/4 md:w-1/4 h-1/4">
<img
src="/jay.png"
Expand All @@ -83,17 +94,29 @@ const Layout: React.FC = () => {
<p className="mt-2 text-black text-sm">A Master Student @ NUDT</p>
<p className="text-black mt-2 text-sm">Location: Changsha, China</p>
</div>
{/* 内容部分 */}
<div className="p-4 md:w-3/5">
<main className="h-full">
<Outlet />
</main>
</div>
</div>
{/* 页脚 */}
<footer className="text-center py-4 text">
<footer className="flex justify-center items-center py-4 space-x-4">
<a
href="https://github.com/SurvivorNo1/SurvivorNo1.github.io"
target="_blank"
rel="noopener noreferrer"
className="hover:opacity-80"
>
<img
src="https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png"
alt="GitHub Logo"
className="w-6 h-6"
/>
</a>
<p>© 2024 SurvivorNo1. All rights reserved.</p>

</footer>

</div>
);
};
Expand Down

0 comments on commit d9c5475

Please sign in to comment.