Skip to content

Commit

Permalink
Update Footer.astro
Browse files Browse the repository at this point in the history
  • Loading branch information
babaohuang committed Dec 25, 2023
1 parent bd3eb5a commit 42cde14
Showing 1 changed file with 36 additions and 43 deletions.
79 changes: 36 additions & 43 deletions src/components/Footer.astro
Original file line number Diff line number Diff line change
@@ -1,50 +1,43 @@
<footer>
<div class="max-w-[80vw] mx-auto flex justify-center flex-wrap mb-[1em]">
<nav class="w-full text-center">
<ul class="flex flex-wrap justify-center items-center text-xs op-30">
<!-- Static links -->
<li><a b-slate-link href="https://geminiprochat.com" target="_blank">Gemini Pro Chat</a></li>
<li><span class="px-1">|</span></li>
<li><a b-slate-link href="https://github.com/babaohuang/GeminiProChat" target="_blank">Source Code</a></li>
<div class="max-w-[80vw] mx-auto flex flex-col items-center justify-center mb-[1em]">
<!-- First row for Blog, Source Code, and Partner Links -->
<div class="flex flex-wrap justify-center items-center text-xs op-30 my-2">
<a b-slate-link href="https://github.com/babaohuang/GeminiProChat" target="_blank">Source Code</a>

<!-- Dynamic links for tos, privacy, blog -->
{import.meta.env.TOS_LINK && (
<>
<li><span class="px-1">|</span></li>
<li><a b-slate-link href={import.meta.env.TOS_LINK} target="_blank">Terms of Service</a></li>
</>
)}
{import.meta.env.PRIVACY_POLICY_LINK && (
<>
<li><span class="px-1">|</span></li>
<li><a b-slate-link href={import.meta.env.PRIVACY_POLICY_LINK} target="_blank">Privacy Policy</a></li>
</>
)}
{import.meta.env.BLOG_LINK && (
<>
<li><span class="px-1">|</span></li>
<li><a b-slate-link href={import.meta.env.BLOG_LINK} target="_blank">Blog</a></li>
</>
)}
{import.meta.env.BLOG_LINK && (
<>
<span class="px-1">|</span>
<a b-slate-link href={import.meta.env.BLOG_LINK} target="_blank">Blog</a>
</>
)}

<!-- Dynamic links from environment variables for partner links -->
{import.meta.env.PARTNER_LINK1 && import.meta.env.PARTNER_LINK_TITLE1 && (
<>
<li><span class="px-1">|</span></li>
<li><a b-slate-link href={import.meta.env.PARTNER_LINK1} target="_blank">{import.meta.env.PARTNER_LINK_TITLE1}</a></li>
</>
)}
{import.meta.env.PARTNER_LINK2 && import.meta.env.PARTNER_LINK_TITLE2 && (
<>
<li><span class="px-1">|</span></li>
<li><a b-slate-link href={import.meta.env.PARTNER_LINK2} target="_blank">{import.meta.env.PARTNER_LINK_TITLE2}</a></li>
</>
)}
</ul>
</nav>
{import.meta.env.PARTNER_LINK1 && import.meta.env.PARTNER_LINK_TITLE1 && (
<>
<span class="px-1">|</span>
<a b-slate-link href={import.meta.env.PARTNER_LINK1} target="_blank">{import.meta.env.PARTNER_LINK_TITLE1}</a>
</>
)}

<p class="mt-8 text-xs op-30 text-center">
Copyright 2023 © Gemini Pro Chat. All rights reserved.
{import.meta.env.PARTNER_LINK2 && import.meta.env.PARTNER_LINK_TITLE2 && (
<>
<span class="px-1">|</span>
<a b-slate-link href={import.meta.env.PARTNER_LINK2} target="_blank">{import.meta.env.PARTNER_LINK_TITLE2}</a>
</>
)}
</div>

<!-- Copyright information with Privacy Policy and Terms of Service -->
<p class="text-xs op-30 text-center mt-4">
© 2023 <a href="https://geminiprochat.com" target="_blank">Gemini Pro Chat</a>. All rights reserved.
{import.meta.env.PRIVACY_POLICY_LINK && (
<a href={import.meta.env.PRIVACY_POLICY_LINK} target="_blank">Privacy Policy</a>
)}
{import.meta.env.TOS_LINK && (
<>
<span class="px-1">|</span>
<a href={import.meta.env.TOS_LINK} target="_blank">Terms of Service</a>
</>
)}
</p>
</div>
</footer>

0 comments on commit 42cde14

Please sign in to comment.