Skip to content

Commit cc67a6a

Browse files
committed
Issue #60: Improvements to FooterOS: links, icons, layout, and responsive design
1 parent e8b907e commit cc67a6a

File tree

7 files changed

+52
-208
lines changed

7 files changed

+52
-208
lines changed

src/components/blockopensource/FooterBlockOS.astro

Lines changed: 25 additions & 183 deletions
Original file line numberDiff line numberDiff line change
@@ -11,33 +11,40 @@ const currentYear = new Date().getFullYear();
1111
const copyrightText = footerBlockOSData.copyright || `© ${currentYear} ${footerBlockOSData.companyName}. All rights reserved.`;
1212
---
1313

14-
<footer class="site-footer variant-default">
15-
<div class="container mx-auto px-6">
16-
<div class="footer-main">
17-
<div class="footer-brand-section">
14+
<footer class="bg-background border-t border-border mt-auto py-16 md:py-12 sm:py-8 pb-8 md:pb-6 sm:pb-6">
15+
<div class="container mx-4 sm:mx-6 md:mx-2 lg:mx-auto" style="max-width: min(100%, 100ch);">
16+
<div class="flex flex-col lg:flex-row lg:items-start gap-8 lg:gap-0 mb-12 md:mb-8">
17+
<!-- Block Logo and Name - Left Side -->
18+
<div class="flex-shrink-0 lg:pl-0">
1819
{footerBlockOSData.logo && (
19-
<div class="footer-logo w-16 h-16">
20-
<Icon name={footerBlockOSData.logo}/>
21-
<div class="mx-2.5">{footerBlockOSData.companyName}</div>
20+
<div class="flex items-center gap-2.5">
21+
<div class="w-24 h-24">
22+
<Icon name={footerBlockOSData.logo}/>
23+
</div>
24+
<div class="text-xl font-semibold text-foreground">{footerBlockOSData.companyName}</div>
2225
</div>
2326
)}
2427
</div>
2528

29+
<!-- Flex spacer to push navigation to the right -->
30+
<div class="hidden lg:flex lg:flex-1"></div>
31+
32+
<!-- Navigation Sections - Better responsive layout -->
2633
{footerBlockOSData.sections.length > 0 && (
27-
<div class="footer-sections">
34+
<div class="grid grid-cols-1 sm:grid-cols-3 gap-8 sm:gap-6 lg:flex lg:gap-6 lg:flex-row ml-28 sm:ml-28 lg:ml-0">
2835
{footerBlockOSData.sections.map((section) => (
29-
<div class="footer-section">
30-
<h4 class="section-title">{section.title}</h4>
31-
<ul class="section-links">
36+
<div class="flex flex-col gap-4 lg:max-w-32 lg:flex-shrink lg:flex-grow-0">
37+
<h4 class="text-sm font-semibold text-foreground m-0 whitespace-nowrap">{section.title}</h4>
38+
<ul class="list-none p-0 m-0 flex flex-col gap-3">
3239
{section.links.map((link) => (
3340
<li>
3441
<a
3542
href={link.href}
3643
{...(link.external && { target: '_blank', rel: 'noopener noreferrer' })}
37-
class="footer-link"
44+
class="text-sm text-muted-foreground no-underline transition-colors duration-200 flex items-center gap-2 hover:text-foreground whitespace-nowrap"
3845
>
3946
{link.icon && (
40-
<Icon name={link.icon} class="footer-link-icon" />
47+
<Icon name={link.icon} class="w-5 h-5 flex-shrink-0" />
4148
)}
4249
<span>{link.title}</span>
4350
</a>
@@ -51,178 +58,13 @@ const copyrightText = footerBlockOSData.copyright || `© ${currentYear} ${footer
5158
</div>
5259

5360
<!-- Footer Bottom -->
54-
<div class="footer-bottom">
55-
<div class="footer-separator"></div>
56-
<div class="footer-bottom-content">
57-
<div class="copyright">
61+
<div class="mt-8">
62+
<div class="h-px bg-border mb-8"></div>
63+
<div class="flex justify-between items-center gap-4 md:flex-col md:text-center md:gap-6">
64+
<div class="text-sm text-muted-foreground">
5865
{copyrightText}
5966
</div>
6067
</div>
6168
</div>
6269
</div>
63-
</footer>
64-
65-
<style>
66-
.site-footer {
67-
background: hsl(var(--background));
68-
border-top: 1px solid hsl(var(--border));
69-
margin-top: auto;
70-
}
71-
72-
.site-footer.variant-default {
73-
padding: 4rem 0 2rem;
74-
}
75-
76-
/* Main Footer Content */
77-
.footer-main {
78-
display: grid;
79-
grid-template-columns: 1fr 2fr;
80-
gap: 4rem;
81-
margin-bottom: 3rem;
82-
}
83-
84-
/* Company Section */
85-
.footer-brand-section {
86-
display: flex;
87-
flex-direction: column;
88-
gap: 1.5rem;
89-
}
90-
91-
.footer-logo img {
92-
height: 96px;
93-
width: 96px;
94-
}
95-
96-
.company-name {
97-
font-size: 1.25rem;
98-
font-weight: 600;
99-
color: hsl(var(--foreground));
100-
margin: 0;
101-
}
102-
103-
.company-description {
104-
font-size: 0.875rem;
105-
color: hsl(var(--muted-foreground));
106-
line-height: 1.5;
107-
margin: 0;
108-
}
109-
110-
/* Navigation Sections */
111-
.footer-sections {
112-
display: grid;
113-
grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
114-
gap: 2rem;
115-
}
116-
117-
.footer-section {
118-
display: flex;
119-
flex-direction: column;
120-
gap: 1rem;
121-
}
122-
123-
.section-title {
124-
font-size: 0.875rem;
125-
font-weight: 600;
126-
color: hsl(var(--foreground));
127-
margin: 0;
128-
}
129-
130-
.section-links {
131-
list-style: none;
132-
padding: 0;
133-
margin: 0;
134-
display: flex;
135-
flex-direction: column;
136-
gap: 0.75rem;
137-
}
138-
139-
.footer-link {
140-
font-size: 0.875rem;
141-
color: hsl(var(--muted-foreground));
142-
text-decoration: none;
143-
transition: color 0.2s ease;
144-
display: flex;
145-
align-items: center;
146-
gap: 0.5rem;
147-
}
148-
149-
.footer-link:hover {
150-
color: hsl(var(--foreground));
151-
}
152-
153-
.footer-link-icon {
154-
width: 1.25rem;
155-
height: 1.25rem;
156-
flex-shrink: 0;
157-
}
158-
159-
/* Footer Bottom */
160-
.footer-bottom {
161-
margin-top: 2rem;
162-
}
163-
164-
.footer-separator {
165-
height: 1px;
166-
background: hsl(var(--border));
167-
margin-bottom: 2rem;
168-
}
169-
170-
.footer-bottom-content {
171-
display: flex;
172-
justify-content: space-between;
173-
align-items: center;
174-
gap: 1rem;
175-
}
176-
177-
.copyright {
178-
font-size: 0.875rem;
179-
color: hsl(var(--muted-foreground));
180-
}
181-
182-
/* Responsive Design */
183-
@media (max-width: 1024px) {
184-
.footer-main {
185-
grid-template-columns: 1fr;
186-
gap: 3rem;
187-
}
188-
189-
.footer-sections {
190-
grid-template-columns: repeat(2, 1fr);
191-
}
192-
}
193-
194-
@media (max-width: 768px) {
195-
.site-footer.variant-default {
196-
padding: 3rem 0 1.5rem;
197-
}
198-
199-
.footer-main {
200-
gap: 2rem;
201-
margin-bottom: 2rem;
202-
}
203-
204-
.footer-sections {
205-
grid-template-columns: 1fr;
206-
gap: 1.5rem;
207-
}
208-
209-
.footer-bottom-content {
210-
flex-direction: column;
211-
text-align: center;
212-
gap: 1.5rem;
213-
}
214-
215-
216-
}
217-
218-
@media (max-width: 640px) {
219-
.container {
220-
padding-left: 1rem;
221-
padding-right: 1rem;
222-
}
223-
224-
.footer-brand-section {
225-
text-align: center;
226-
}
227-
}
228-
</style>
70+
</footer>

src/components/blockopensource/footer-blockos.ts

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -26,32 +26,33 @@ export const footerBlockOSData: FooterBlockOSData = {
2626
{
2727
title: "Company",
2828
links: [
29-
{ title: "News", href: "https://block.xyz/news" },
30-
{ title: "Careers", href: "https://block.xyz/careers/jobs" },
31-
{ title: "Open Source", href: "https://block.xyz/open-source" },
32-
{ title: "Investors", href: "https://investors.block.xyz/overview/default.aspx?_gl=1*1ho038u*_ga*MTcxNDUxMjk5Ni4xNzU1NjI2MzM1*_ga_EM11G73CS9*czE3NTU2NDU2MTAkbzMkZzEkdDE3NTU2NDU4NDYkajYwJGwwJGgw"},
33-
{ title: "Media Kit", href: "https://block.xyz/mediakit"},
34-
{ title: "Legal", href: "https://block.xyz/legal"},
35-
{ title: "Privacy", href: "https://block.xyz/legal/privacy-notice"},
29+
{ title: "News", external: true, href: "https://block.xyz/news" },
30+
{ title: "Careers", external: true, href: "https://block.xyz/careers/jobs" },
31+
{ title: "Open Source", external: true, href: "https://block.xyz/open-source" },
32+
{ title: "Investors", external: true, href: "https://investors.block.xyz/overview/default.aspx?_gl=1*1ho038u*_ga*MTcxNDUxMjk5Ni4xNzU1NjI2MzM1*_ga_EM11G73CS9*czE3NTU2NDU2MTAkbzMkZzEkdDE3NTU2NDU4NDYkajYwJGwwJGgw"},
33+
{ title: "Media Kit", external: true, href: "https://block.xyz/mediakit"},
34+
{ title: "Legal", external: true, href: "https://block.xyz/legal"},
35+
{ title: "Privacy", external: true, href: "https://block.xyz/legal/privacy-notice"},
3636
]
3737
},
3838
{
3939
title: "Brands",
4040
links: [
41-
{ title: "Square", href: "javascript:void(null);", icon: "block-open-source/brands/square" },
42-
{ title: "Cash App", href: "javascript:void(null);", icon: "block-open-source/brands/cash-app" },
43-
{ title: "Afterpay", href: "javascript:void(null);", icon: "block-open-source/brands/afterpay" },
44-
{ title: "Tidal", href: "javascript:void(null);", icon: "block-open-source/brands/tidal" },
45-
{ title: "Bitkey", href: "javascript:void(null);", icon: "block-open-source/brands/bitkey" },
46-
{ title: "Proto", href: "javascript:void(null);", icon: "block-open-source/proto" },
41+
{ title: "Square", href: "https://squareup.com/", external: true, icon: "block-open-source/brands/square" },
42+
{ title: "Cash App", href: "https://cash.app/", external: true, icon: "block-open-source/brands/cash-app" },
43+
{ title: "Afterpay", href: "https://afterpay.com/", external: true, icon: "block-open-source/brands/afterpay" },
44+
{ title: "Tidal", href: "https://tidal.com/", external: true, icon: "block-open-source/brands/tidal" },
45+
{ title: "Bitkey", href: "https://bitkey.world/", external: true, icon: "block-open-source/brands/bitkey" },
46+
{ title: "Proto", href: "https://proto.xyz/", external: true, icon: "block-open-source/brands/proto" },
4747
]
4848
},
4949
{
5050
title: "Social",
5151
links: [
52-
{ title: "X (Twitter)", href: "https://twitter.com/block", external: true, icon: "block-open-source/x-twitter" },
52+
{ title: "X (Twitter)", href: "https://x.com/blockopensource", external: true, icon: "x-twitter" },
5353
{ title: "GitHub", href: "https://github.com/block", external: true, icon: "octicon-github" },
54-
{ title: "LinkedIn", href: "https://linkedin.com/company/block", external: true, icon: "block-open-source/linkedin" },
54+
{ title: "LinkedIn", href: "https://www.linkedin.com/company/block-opensource", external: true, icon: "linkedin" },
55+
{ title: "Discord", href: "https://discord.gg/block-opensource", external: true, icon: "discord" },
5556
]
5657
}
5758
],
Lines changed: 9 additions & 0 deletions
Loading

src/icons/block-open-source/brands/tbd.svg

Lines changed: 0 additions & 3 deletions
This file was deleted.
Lines changed: 1 addition & 2 deletions
Loading

src/layouts/ContentPageLayout.astro

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@
2121
2222
2323
import BaseLayout from "./BaseLayout.astro";
24-
import ContentSectionOpen from "@/components/block/ContentSectionOpen.astro";
25-
import ContentSectionClose from "@/components/block/ContentSectionClose.astro";
2624
import type { MarkdownHeading } from 'astro';
2725
import TableOfContents from "@/components/docs/TableOfContents.astro";
2826
import { Breadcrumbs } from "astro-breadcrumbs";
@@ -73,7 +71,7 @@ const { title, description, headings, showTitleAsH1 = true, showBreadcrumbs = tr
7371
)}
7472

7573
<main class="min-w-0 py-8 px-10 xl:px-6 lg:px-6 md:px-4">
76-
<div class="prose prose-slate dark:prose-invert mx-auto"style="max-width: min(100%, 100ch);">
74+
<div id="mainContent" class="prose prose-slate dark:prose-invert mx-auto" style="max-width: min(100%, 100ch);">
7775

7876
{/** Breadcrumbs */}
7977
{showBreadcrumbs && (

src/pages/block-open-source/index.astro

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ import FeaturedProjects from "@/components/blockopensource/FeaturedProjects.astr
88
import OpenSourceContributions from "@/components/blockopensource/OpenSourceContributions.astro";
99
import GovernanceAndStandards from "@/components/blockopensource/GovernanceAndStandards.astro";
1010
import Participate from "@/components/blockopensource/Participate.astro";
11-
import FooterBlockOS from "@/components/blockopensource/FooterBlockOS.astro";
12-
1311
1412
const pageTitle = "Block - Open Source";
1513
const title = "Our Vision for Open Source";

0 commit comments

Comments
 (0)