This is an automated email from the ASF dual-hosted git repository.
piotr pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/iggy-website.git
The following commit(s) were added to refs/heads/main by this push:
new f3d75d80 Fix styling, update deps
f3d75d80 is described below
commit f3d75d80494dd12e8f43c4836dacb5fe78cc5056
Author: spetz <[email protected]>
AuthorDate: Thu Nov 20 12:03:29 2025 +0100
Fix styling, update deps
---
docusaurus.config.ts | 8 +-
package-lock.json | 12 +-
src/components/GitHubStars/index.tsx | 22 +++
src/css/blog.css | 276 ++++++++++++++++++++++++++++++++++-
src/theme/Root.tsx | 25 ++++
yarn.lock | 12 +-
6 files changed, 334 insertions(+), 21 deletions(-)
diff --git a/docusaurus.config.ts b/docusaurus.config.ts
index 38ac48a8..f2d675f3 100644
--- a/docusaurus.config.ts
+++ b/docusaurus.config.ts
@@ -10,15 +10,13 @@ async function getGitHubStars(): Promise<string> {
return stars >= 1000 ? `${(stars / 1000).toFixed(1)}K` : stars.toString();
} catch (error) {
console.error("Failed to fetch GitHub stars:", error);
- return "3.1K";
+ return "3.2K";
}
}
export default async function createConfig(): Promise<Config> {
const githubStars = await getGitHubStars();
- // This runs in Node.js - Don't use client-side code here (browser APIs,
JSX...)
-
const config: Config = {
title: "Hyper-Efficient Message Streaming at Laser Speed.",
tagline:
@@ -132,9 +130,9 @@ export default async function createConfig():
Promise<Config> {
position: "left",
},
{
- href: "https://github.com/apache/iggy",
- label: `GitHub ⭐ ${githubStars}`,
+ type: "html",
position: "right",
+ value: `<a href="https://github.com/apache/iggy" target="_blank"
rel="noopener noreferrer" class="navbar__link">GitHub ⭐ <span
id="github-stars">${githubStars}</span></a>`,
},
{
type: "dropdown",
diff --git a/package-lock.json b/package-lock.json
index 24a6a30f..65420ba0 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -8729,9 +8729,9 @@
}
},
"node_modules/gray-matter/node_modules/js-yaml": {
- "version": "3.14.1",
- "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz",
- "integrity":
"sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==",
+ "version": "3.14.2",
+ "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.2.tgz",
+ "integrity":
"sha512-PMSmkqxr106Xa156c2M265Z+FTrPl+oxd/rgOQy2tijQeK5TxQ43psO1ZCwhVOSdnn+RzkzlRz/eY4BgJBYVpg==",
"license": "MIT",
"dependencies": {
"argparse": "^1.0.7",
@@ -9880,9 +9880,9 @@
"license": "MIT"
},
"node_modules/js-yaml": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz",
- "integrity":
"sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==",
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.1.tgz",
+ "integrity":
"sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA==",
"license": "MIT",
"dependencies": {
"argparse": "^2.0.1"
diff --git a/src/components/GitHubStars/index.tsx
b/src/components/GitHubStars/index.tsx
new file mode 100644
index 00000000..e56bbaf1
--- /dev/null
+++ b/src/components/GitHubStars/index.tsx
@@ -0,0 +1,22 @@
+import React, { useEffect, useState } from 'react';
+
+export default function GitHubStars(): JSX.Element {
+ const [stars, setStars] = useState('3.2K'); // fallback
+
+ useEffect(() => {
+ fetch('https://api.github.com/repos/apache/iggy')
+ .then(res => res.json())
+ .then(data => {
+ const count = data.stargazers_count;
+ const formatted = count >= 1000
+ ? `${(count / 1000).toFixed(1)}K`
+ : count.toString();
+ setStars(formatted);
+ })
+ .catch(() => {
+ // Keep fallback value on error
+ });
+ }, []);
+
+ return <>{stars}</>;
+}
diff --git a/src/css/blog.css b/src/css/blog.css
index f1ba9f4a..ccfe5ac6 100644
--- a/src/css/blog.css
+++ b/src/css/blog.css
@@ -267,6 +267,8 @@ BLOG POST PAGE .blog-post-page {
background-color: #0d0d0d !important;
font-size: 1rem !important;
padding: 1.5rem !important;
+ overflow-x: auto !important;
+ max-width: 100% !important;
}
.blog-post-page .markdown pre code {
@@ -437,24 +439,135 @@ RESPONSIVE @media screen and (max-width: 1400px) {
.blog-post-page .container,
.blog-tags-post-list-page .container,
.blog-tags-list-page .container {
- padding: 2rem 1rem;
+ padding: 1.5rem 1rem !important;
}
.blog-list-page h1 {
- font-size: 2.5rem !important;
+ font-size: 2rem !important;
+ margin-bottom: 2rem !important;
}
.blog-list-page article h2 {
- font-size: 1.75rem !important;
+ font-size: 1.5rem !important;
+ }
+
+ .blog-list-page article h2 a,
+ h2.title_f1Hy a {
+ font-size: 1.5rem !important;
}
.blog-post-page article h1 {
- font-size: 2.5rem !important;
+ font-size: 2rem !important;
}
.blog-post-page .markdown {
+ font-size: 1rem !important;
+ }
+
+ .blog-post-page .markdown h2 {
+ font-size: 1.5rem !important;
+ }
+
+ .blog-post-page .markdown h3 {
+ font-size: 1.25rem !important;
+ }
+
+ .blog-post-page .markdown h4 {
font-size: 1.1rem !important;
}
+
+ .blog-list-page article time,
+ .blog-list-page article .margin-vert--md,
+ .blog-list-page article .margin-vert--md * {
+ font-size: 0.95rem !important;
+ }
+
+ .blog-list-page article .markdown {
+ font-size: 1rem !important;
+ }
+
+ .blog-post-page .markdown li,
+ .blog-list-page article .markdown li {
+ font-size: 1rem !important;
+ }
+}
+
+@media screen and (max-width: 480px) {
+ .blog-list-page .container,
+ .blog-post-page .container,
+ .blog-tags-post-list-page .container,
+ .blog-tags-list-page .container {
+ padding: 1rem 0.75rem !important;
+ }
+
+ .blog-list-page h1 {
+ font-size: 1.75rem !important;
+ margin-bottom: 1.5rem !important;
+ }
+
+ .blog-list-page article {
+ padding: 2rem 0 !important;
+ }
+
+ .blog-list-page article h2,
+ .blog-list-page article h2 a,
+ h2.title_f1Hy,
+ h2.title_f1Hy a {
+ font-size: 1.35rem !important;
+ }
+
+ .blog-post-page article h1 {
+ font-size: 1.75rem !important;
+ }
+
+ .blog-post-page article header {
+ margin-bottom: 2rem !important;
+ }
+
+ .blog-post-page .markdown {
+ font-size: 0.95rem !important;
+ }
+
+ .blog-post-page .markdown h2 {
+ font-size: 1.35rem !important;
+ margin-top: 2rem !important;
+ }
+
+ .blog-post-page .markdown h3 {
+ font-size: 1.15rem !important;
+ }
+
+ .blog-post-page .markdown pre {
+ margin: 1.5rem -0.75rem !important;
+ border-radius: 0 !important;
+ font-size: 0.85rem !important;
+ }
+
+ .blog-post-page .markdown pre code {
+ font-size: 0.85rem !important;
+ }
+
+ .blog-post-page .markdown ul,
+ .blog-post-page .markdown ol {
+ padding-left: 1.5rem !important;
+ }
+
+ .blog-post-page .markdown table {
+ font-size: 0.85rem !important;
+ }
+
+ .blog-post-page .markdown th,
+ .blog-post-page .markdown td {
+ padding: 0.75rem 0.5rem !important;
+ }
+
+ .pagination-nav__link {
+ padding: 1.5rem 1rem !important;
+ }
+
+ .pagination-nav__label {
+ font-size: 1rem !important;
+ }
}
html {
@@ -650,6 +763,8 @@ DOCS PAGES .docs-wrapper,
background-color: #0d0d0d !important;
font-size: 1rem !important;
padding: 1.5rem !important;
+ overflow-x: auto !important;
+ max-width: 100% !important;
}
.theme-doc-markdown pre code {
@@ -1042,6 +1157,157 @@ main.docMainContainer_TBSr {
padding-right: 8rem !important;
}
+@media screen and (max-width: 996px) {
+ .container.padding-top--md.padding-bottom--lg {
+ padding-left: 2rem !important;
+ padding-right: 2rem !important;
+ }
+
+ .theme-doc-markdown article,
+ .docs-wrapper .container {
+ padding: 2rem 2rem !important;
+ }
+}
+
+@media screen and (max-width: 768px) {
+ .container.padding-top--md.padding-bottom--lg {
+ padding-left: 1rem !important;
+ padding-right: 1rem !important;
+ }
+
+ .theme-doc-markdown article,
+ .docs-wrapper .container {
+ padding: 1.5rem 1rem !important;
+ }
+
+ .theme-doc-markdown h1 {
+ font-size: 2rem !important;
+ }
+
+ .theme-doc-markdown h2 {
+ font-size: 1.5rem !important;
+ margin-top: 2rem !important;
+ }
+
+ .theme-doc-markdown h3 {
+ font-size: 1.25rem !important;
+ margin-top: 1.5rem !important;
+ }
+
+ .theme-doc-markdown h4 {
+ font-size: 1.1rem !important;
+ }
+
+ .theme-doc-markdown,
+ .theme-doc-markdown article {
+ font-size: 1rem !important;
+ }
+
+ .theme-doc-markdown li {
+ font-size: 1rem !important;
+ }
+
+ .theme-doc-markdown pre {
+ font-size: 0.9rem !important;
+ }
+
+ .theme-doc-markdown pre code {
+ font-size: 0.85rem !important;
+ }
+}
+
+@media screen and (max-width: 480px) {
+ .container.padding-top--md.padding-bottom--lg {
+ padding-left: 0.75rem !important;
+ padding-right: 0.75rem !important;
+ }
+
+ .theme-doc-markdown article,
+ .docs-wrapper .container {
+ padding: 1rem 0.75rem !important;
+ }
+
+ .theme-doc-markdown h1 {
+ font-size: 1.75rem !important;
+ margin-bottom: 1.5rem !important;
+ }
+
+ .theme-doc-markdown h2 {
+ font-size: 1.35rem !important;
+ margin-top: 2rem !important;
+ padding-bottom: 0.5rem !important;
+ }
+
+ .theme-doc-markdown h3 {
+ font-size: 1.15rem !important;
+ margin-top: 1.5rem !important;
+ }
+
+ .theme-doc-markdown h4 {
+ font-size: 1rem !important;
+ }
+
+ .theme-doc-markdown,
+ .theme-doc-markdown article,
+ .theme-doc-markdown p,
+ .theme-doc-markdown li {
+ font-size: 0.95rem !important;
+ line-height: 1.6 !important;
+ }
+
+ .theme-doc-markdown ul,
+ .theme-doc-markdown ol {
+ padding-left: 1.5rem !important;
+ }
+
+ .theme-doc-markdown pre {
+ margin: 1.5rem -0.75rem !important;
+ border-radius: 0 !important;
+ font-size: 0.85rem !important;
+ padding: 1rem !important;
+ }
+
+ .theme-doc-markdown pre code {
+ font-size: 0.8rem !important;
+ }
+
+ .theme-doc-markdown table {
+ font-size: 0.85rem !important;
+ display: block !important;
+ overflow-x: auto !important;
+ -webkit-overflow-scrolling: touch !important;
+ }
+
+ .theme-doc-markdown th,
+ .theme-doc-markdown td {
+ padding: 0.75rem 0.5rem !important;
+ font-size: 0.85rem !important;
+ }
+
+ .theme-doc-markdown blockquote {
+ margin: 1.5rem -0.5rem !important;
+ padding: 1rem 1.25rem !important;
+ }
+
+ .theme-doc-markdown img {
+ margin: 2rem -0.75rem !important;
+ border-radius: 4px !important;
+ }
+
+ .menu__link {
+ font-size: 0.9rem !important;
+ padding: 0.4rem 0.75rem !important;
+ }
+
+ .pagination-nav__link {
+ padding: 1rem 0.75rem !important;
+ }
+
+ .pagination-nav__label {
+ font-size: 0.95rem !important;
+ }
+}
+
.blog-list-page hr,
.blog-list-page article hr {
display: none !important;
@@ -1151,6 +1417,8 @@ pre {
background-color: #0d0d0d !important;
font-size: 1rem !important;
padding: 1.5rem !important;
+ overflow-x: auto !important;
+ max-width: 100% !important;
}
.markdown pre code,
diff --git a/src/theme/Root.tsx b/src/theme/Root.tsx
new file mode 100644
index 00000000..1fbe7b4d
--- /dev/null
+++ b/src/theme/Root.tsx
@@ -0,0 +1,25 @@
+import React, { useEffect } from 'react';
+
+export default function Root({ children }) {
+ useEffect(() => {
+ // Fetch GitHub stars on client side
+ fetch('https://api.github.com/repos/apache/iggy')
+ .then(res => res.json())
+ .then(data => {
+ const count = data.stargazers_count;
+ const formatted = count >= 1000
+ ? `${(count / 1000).toFixed(1)}K`
+ : count.toString();
+
+ const starElement = document.getElementById('github-stars');
+ if (starElement) {
+ starElement.textContent = formatted;
+ }
+ })
+ .catch(() => {
+ // Keep default value on error
+ });
+ }, []);
+
+ return <>{children}</>;
+}
diff --git a/yarn.lock b/yarn.lock
index e8a554f8..e9d92a55 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -5377,17 +5377,17 @@ joi@^17.9.2:
integrity
sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==
js-yaml@^3.13.1:
- version "3.14.1"
- resolved "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz"
- integrity
sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==
+ version "3.14.2"
+ resolved "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.2.tgz"
+ integrity
sha512-PMSmkqxr106Xa156c2M265Z+FTrPl+oxd/rgOQy2tijQeK5TxQ43psO1ZCwhVOSdnn+RzkzlRz/eY4BgJBYVpg==
dependencies:
argparse "^1.0.7"
esprima "^4.0.0"
js-yaml@^4.1.0:
- version "4.1.0"
- resolved "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz"
- integrity
sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==
+ version "4.1.1"
+ resolved "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.1.tgz"
+ integrity
sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA==
dependencies:
argparse "^2.0.1"