Project Organization & Asset Cleanup#18
Project Organization & Asset Cleanup#18OmarAglan wants to merge 4 commits intohouselearning:mainfrom
Conversation
Move search styling out of JS into style.css and add richer UI/UX for the nav XML search. Introduces a formatUrlToTitle helper to produce human-friendly titles from URLs, shortens displayed URLs, increases result limit, trims input, shows a "no results" message, and closes results on Escape. Updates markup to include a search icon wrapper and updates styles (nav-xml-search, search-wrapper, nav-xml-results, item styling). Also adjusts header padding and gap in style.css.
Group navigation links and actions into .nav-links and .nav-actions in the header, rename "View on GitHub" to "GitHub", and adjust nav markup spacing. Update nav-xml-search.js to initialize the search on .nav-actions instead of the entire nav. Revise CSS for nav layout, gaps, alignment, button sizing, hover states, and nav-search dimensions, plus responsive/mobile tweaks to improve spacing and behavior.
Handle both .htm and .html suffixes when normalizing paths and replace unsafe innerHTML usage in search results with explicit DOM creation. The changes create a dedicated no-results element (clearing previous content first), build result anchor content using span elements with textContent (prevents HTML injection), and only set a.href for http(s) or root-relative URLs. Overall this improves correctness and reduces XSS risk in the search UI.
Reorganize static files into an assets/ hierarchy and update HTML references accordingly. CSS, JS and image files (favicons, manifests, images) were renamed/moved under assets/{css,js,images}. Added a new assets/js/cookiebanner.js (removed the root-level cookiebanner.js) and updated site.webmanifest paths. Updated pages (index, about, 404, partners, meta/*.html, dashboard, error, privacy, tos, sitemap, etc.) to use the new asset paths and include favicon/manifest links; minor markup/whitespace cleanups and content formatting adjustments.
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly refactors the project's file structure by centralizing all static assets into a dedicated Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request effectively reorganizes the project's assets into a structured /assets/ directory and updates all references to use root-relative paths, which is a great improvement for maintainability. My review includes a critical security finding regarding a hardcoded API key that needs to be addressed, along with a suggestion to modernize some JavaScript code.
Overview
This PR focuses on decluttering the project root and improving maintainability by organizing assets (CSS, JavaScript, Images) into a structured
/assets/directory. All references have been updated to use root-relative paths, ensuring the site remains fully functional across all pages.Key Changes
/assets/,/assets/css/,/assets/js/, and/assets/images/favicons/.style.cssto/assets/css/.nav.js,nav-xml-search.js,feedback.js, etc.) to/assets/js/./assets/images/favicons/.../style.css) with robust root-relative paths (e.g.,/assets/css/style.css).cookiebanner.js.site.webmanifestto reflect new icon locations.Impact
https://houselearning.org/aboutremain unchanged.