Skip to content

feat: landing page improvements #913

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 68 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
8638b86
fix: layout
jorgepiloto Apr 10, 2025
8c5566a
fix: projects page
jorgepiloto Apr 11, 2025
2613958
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Apr 11, 2025
1254e5b
fix: projects sidebar filenames
jorgepiloto Apr 14, 2025
67852d6
wip: latest changes
jorgepiloto Apr 30, 2025
a1fc5d7
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Apr 30, 2025
98eadc1
fix: add title
Revathyvenugopal162 Apr 30, 2025
382a0c7
feat: add get started button
Revathyvenugopal162 Apr 30, 2025
74fdd11
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Apr 30, 2025
776aef9
Merge branch 'main' into feat/landing-page
Revathyvenugopal162 May 2, 2025
fecb79a
fix: add feature block
Revathyvenugopal162 May 5, 2025
a5aa16d
Merge branch 'feat/landing-page' of https://github.com/ansys/pyansys …
Revathyvenugopal162 May 5, 2025
34a27af
Merge branch 'main' into feat/landing-page
Revathyvenugopal162 May 5, 2025
a0b800a
Merge branch 'feat/landing-page' of https://github.com/ansys/pyansys …
Revathyvenugopal162 May 5, 2025
6783f0c
fix: add aditional layout
Revathyvenugopal162 May 5, 2025
f053bb1
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 5, 2025
310d7f5
doc(index): add home page
jorgepiloto May 5, 2025
20c1f15
feat: update the css
Revathyvenugopal162 May 5, 2025
5f0a607
Merge branch 'feat/landing-page' of https://github.com/ansys/pyansys …
Revathyvenugopal162 May 5, 2025
3d6cdfb
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 5, 2025
c3e78c5
Merge branch 'main' into feat/landing-page
Revathyvenugopal162 May 6, 2025
e01bc77
wip: landing page
jorgepiloto May 9, 2025
ef4621a
Merge branch 'main' into feat/landing-page
jorgepiloto May 9, 2025
1953e37
Merge branch 'feat/landing-page' of https://github.com/ansys/pyansys …
Revathyvenugopal162 May 9, 2025
1e595a8
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 9, 2025
4742192
Merge branch 'feat/landing-page' of https://github.com/ansys/pyansys …
Revathyvenugopal162 May 9, 2025
17e0ab5
feat: add activated tab to install
Revathyvenugopal162 May 9, 2025
9282ab4
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 9, 2025
ba25aa4
feat: add testimonials
Revathyvenugopal162 May 9, 2025
dade6e5
Merge branch 'feat/landing-page' of https://github.com/ansys/pyansys …
Revathyvenugopal162 May 9, 2025
529cf0a
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 9, 2025
de21aa4
feat: card carosal fix
Revathyvenugopal162 May 12, 2025
4e3e2c4
Merge branch 'feat/landing-page' of https://github.com/ansys/pyansys …
Revathyvenugopal162 May 12, 2025
16732e8
Merge branch 'main' into feat/landing-page
Revathyvenugopal162 May 13, 2025
b64192b
test: add blogpost
Revathyvenugopal162 May 14, 2025
204af12
fix: test 2 blogs
Revathyvenugopal162 May 16, 2025
e9078be
feat: blog container
Revathyvenugopal162 May 19, 2025
f437808
fix: add blogs sidebar
Revathyvenugopal162 May 19, 2025
28ee0d1
fix: add blogs sidebar
Revathyvenugopal162 May 19, 2025
a614f58
fix: add blogs sidebar
Revathyvenugopal162 May 19, 2025
f8a450d
fix: add blogs sidebar
Revathyvenugopal162 May 19, 2025
d7dcf51
Merge branch 'feat/landing-page' of https://github.com/ansys/pyansys …
Revathyvenugopal162 May 19, 2025
62fb60a
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 19, 2025
cefd2d5
fix: update the tag and product filter
Revathyvenugopal162 May 20, 2025
c87bdc9
Merge branch 'feat/landing-page' of https://github.com/ansys/pyansys …
Revathyvenugopal162 May 20, 2025
7eeca7d
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 20, 2025
5faa027
feat: update the tags
Revathyvenugopal162 May 20, 2025
466d6a8
Merge branch 'feat/landing-page' of https://github.com/ansys/pyansys …
Revathyvenugopal162 May 20, 2025
35d5a57
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 20, 2025
131a4eb
fix: update the filters
Revathyvenugopal162 May 21, 2025
8492c04
Merge branch 'feat/landing-page' of https://github.com/ansys/pyansys …
Revathyvenugopal162 May 21, 2025
c82870a
feat(carousel): as hero section
jorgepiloto May 21, 2025
7c0a612
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 21, 2025
95c71d5
Merge branch 'main' into feat/landing-page
Revathyvenugopal162 May 21, 2025
bb8398d
Merge branch 'main' into feat/landing-page
jorgepiloto May 23, 2025
9c90cd3
feat(landing-page): update HTML and CSS
jorgepiloto Jun 4, 2025
883f5cf
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jun 4, 2025
5190119
fix(landing-page): remove assets
jorgepiloto Jun 4, 2025
d23ec5b
fix(landing-page): remove assets
jorgepiloto Jun 4, 2025
5eefc4c
fix(landing-page): organize CSS files
jorgepiloto Jun 4, 2025
88c7de7
fix(landing-page): remove assets
jorgepiloto Jun 4, 2025
513e54e
fix(landing-page): add missing CSS for testimonials
jorgepiloto Jun 4, 2025
8f21d35
fix(landing-page): add missing JS for testimonials
jorgepiloto Jun 4, 2025
9546d4c
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jun 4, 2025
6b1507b
fix(landing-page): fix location for testimonials file
jorgepiloto Jun 4, 2025
c949ade
fix(landing-page): fix location for testimonials file
jorgepiloto Jun 4, 2025
0907b85
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jun 4, 2025
d404c6f
doc(landing-page): enable vtksz files
jorgepiloto Jun 5, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ html {
overflow-y: scroll !important;
}

.landing-page-sidebar {
.projects-page-sidebar {
margin-top: 2rem;
display: flex;
flex-direction: column;
padding: 0rem 2rem;
}
.landing-page-sidebar-section {
.projects-page-sidebar-section {
margin-bottom: 2rem;
font-weight: 700;
display: flex;
Expand All @@ -20,7 +20,7 @@ html {
margin-top: 1rem;
}

.landing-page-sidebar-section span {
.projects-page-sidebar-section span {
font-size: 0.85rem;
}

Expand Down Expand Up @@ -112,7 +112,7 @@ html {
grid-template-columns: 1fr;
}

.landing-page-sidebar {
.projects-page-sidebar {
padding: 1rem;
}

Expand Down
58 changes: 58 additions & 0 deletions doc/source/_static/css/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
/* Remove breadcrumbs */
.bd-header-article {
display: none !important;
}

/* Maximize the width of the content area */
.bd-main .bd-content {
display: flex !important;
height: 100% !important;
justify-content: center !important;
}

.bd-main .bd-content .bd-article-container {
width: 100% !important;
}

.center {
margin: 0 auto !important;
}

#hero-image {
transition: opacity 0.5s ease-in-out;
opacity: 1;
}

.fade-out {
opacity: 0;
}

.fade-in {
opacity: 1;
}

.section-divider {
display: flex;
align-items: center;
text-align: center;
margin: 40px 0;
}

.section-divider::before,
.section-divider::after {
content: "";
flex: 1;
height: 1px;
background: linear-gradient(to right, transparent, #000);
}

.section-divider::after {
background: linear-gradient(to left, transparent, #000);
}

.section-title {
padding: 0 20px;
font-size: 2.5rem;
font-weight: bold;
white-space: nowrap;
}
253 changes: 253 additions & 0 deletions doc/source/_static/js/blogs_sidebar.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,253 @@
document.addEventListener("DOMContentLoaded", () => {
const state = {
products: new Set(),
industries: new Set(),
tags: new Set(),
};
const blogContainer = document.getElementById("blog-container");
let allPosts = {};

function createCheckbox(name, containerId, type) {
const id = `${type}-${name}`;

const wrapper = document.createElement("div");
wrapper.className = "checkbox-wrapper";

const input = document.createElement("input");
input.type = "checkbox";
input.id = id;
input.value = name;
input.style.marginRight = "5px";

const label = document.createElement("label");
label.setAttribute("for", id);
label.textContent = name;
label.style.cursor = "pointer";

input.addEventListener("change", () => {
if (input.checked) {
state[type].add(name);
} else {
state[type].delete(name);
}
updateVisiblePosts();
updateTagFilter();
// updateProductFilter();
updateIndustryFilter();
});

wrapper.appendChild(input);
wrapper.appendChild(label);

const container = document.querySelector(
`#${containerId} .collapsible-content`,
);
if (container) container.appendChild(wrapper);
}

function generateFilters(data) {
const products = new Set();
const industries = new Set();
const tags = new Set();

for (const key in data) {
const post = data[key];

(post.products || "")
.split(",")
.map((p) => p.trim())
.filter(Boolean)
.forEach((p) => products.add(p));
(post.industries || "")
.split(",")
.map((c) => c.trim())
.filter(Boolean)
.forEach((c) => industries.add(c));
(post.tags || "")
.split(",")
.map((t) => t.trim())
.filter(Boolean)
.forEach((t) => tags.add(t));
}

[...products]
.sort()
.forEach((p) => createCheckbox(p, "product-filters", "products"));
[...industries]
.sort()
.forEach((i) => createCheckbox(i, "industry-filters", "industries"));
[...tags].sort().forEach((t) => createCheckbox(t, "tag-filters", "tags"));
}

function updateTagFilter() {
const selectedProducts = [...state.products];
const selectedIndustries = [...state.industries];

for (const label of document.querySelectorAll("#tag-filters label")) {
const checkbox = label.querySelector("input[type=checkbox]");
const value = checkbox.value;

let isVisible = false;

for (const key in allPosts) {
const post = allPosts[key];
const postTags = (post.tags || "").split(",").map((t) => t.trim());
const postProducts = (post.products || "")
.split(",")
.map((p) => p.trim());
const postIndustries = (post.industries || "")
.split(",")
.map((c) => c.trim());

const matchProduct =
selectedProducts.length === 0 ||
postProducts.some((p) => selectedProducts.includes(p));
const matchIndustry =
selectedIndustries.length === 0 ||
postIndustries.some((c) => selectedIndustries.includes(c));
const matchTag = postTags.includes(value);

if (matchProduct && matchIndustry && matchTag) {
isVisible = true;
break;
}
}

label.style.display = isVisible ? "block" : "none";
}
}

// function updateProductFilter() {
// const selectedTags = [...state.tags];
// const selectedIndustries = [...state.industries];
// const productSet = new Set();

// for (const key in allPosts) {
// const post = allPosts[key];
// const postProducts = (post.products || "").split(",").map(p => p.trim());
// const postIndustries = (post.industries || "").split(",").map(c => c.trim());
// const matchTag = selectedTags.length === 0 || (post.tags || "").split(",").map(t => t.trim()).some(t => selectedTags.includes(t));
// const matchIndustry = selectedIndustries.length === 0 || postIndustries.some(c => selectedIndustries.includes(c));

// if (matchTag && matchIndustry) {
// postProducts.filter(Boolean).forEach(p => productSet.add(p));
// }
// }

// const container = document.querySelector("#product-filters .collapsible-content");
// if (!container) return;

// container.innerHTML = "";
// [...productSet].sort().forEach(p => createCheckbox(p, "product-filters", "products"));
// }

function updateIndustryFilter() {
const selectedTags = [...state.tags];
const selectedProducts = [...state.products];
const industrySet = new Set();

for (const key in allPosts) {
const post = allPosts[key];
const postIndustries = (post.industries || "")
.split(",")
.map((c) => c.trim());
const postProducts = (post.products || "")
.split(",")
.map((p) => p.trim());
const matchTag =
selectedTags.length === 0 ||
(post.tags || "")
.split(",")
.map((t) => t.trim())
.some((t) => selectedTags.includes(t));
const matchProduct =
selectedProducts.length === 0 ||
postProducts.some((p) => selectedProducts.includes(p));

if (matchTag && matchProduct) {
postIndustries.filter(Boolean).forEach((c) => industrySet.add(c));
}
}

const container = document.querySelector(
"#industry-filters .collapsible-content",
);
if (!container) return;

container.innerHTML = "";
[...industrySet]
.sort()
.forEach((c) => createCheckbox(c, "industry-filters", "industries"));
}

function updateVisiblePosts() {
if (!blogContainer) return;
blogContainer.innerHTML = "";

for (const key in allPosts) {
const post = allPosts[key];
const postProducts = (post.products || "")
.split(",")
.map((p) => p.trim());
const postIndustries = (post.industries || "")
.split(",")
.map((c) => c.trim());
const postTags = (post.tags || "").split(",").map((t) => t.trim());

const matchProduct =
state.products.size === 0 ||
postProducts.some((p) => state.products.has(p));
const matchIndustry =
state.industries.size === 0 ||
postIndustries.some((c) => state.industries.has(c));
const matchTag =
state.tags.size === 0 || postTags.some((t) => state.tags.has(t));

if (matchProduct && matchIndustry && matchTag) {
const postCard = document.createElement("div");
postCard.className = "project-card sd-card sd-shadow-sm sd-card-hover";
postCard.onclick = () => (window.location.href = `${key}.html`);

const description = post.description || "";
const shortDescription =
description.length > 100
? description.slice(0, 100) + "..."
: description;

postCard.innerHTML = `
${post.image ? `<img class="project-thumbnail" src="/_static/${post.image}" alt="${post.title || key}">` : ""}
<div class="sd-card-body">
<p class="sd-card-title sd-font-weight-bold">${post.title || key}</p>
<p class="sd-card-body-text">${shortDescription}</p>
<p class="sd-card-text">
<i class="fa fa-user"></i> ${post.author || "PyAnsys Team"}<br/>
<i class="fa fa-calendar"></i> ${post.date || "Unknown Date"}
</p>
<a class="sd-btn sd-btn-outline-primary" href="${key}.html">Read More</a>
</div>
`;
blogContainer.appendChild(postCard);
}
}
}

function setupCollapsibles() {
document.querySelectorAll(".collapsible").forEach((button) => {
button.addEventListener("click", function () {
this.classList.toggle("active");
const content = this.nextElementSibling;
content.style.display =
content.style.display === "block" ? "none" : "block";
});
});
}

fetch("/_static/blog_metadata.json")
.then((res) => res.json())
.then((data) => {
allPosts = data;
setupCollapsibles();
generateFilters(data);
updateVisiblePosts();
});
});
Loading
Loading