Add theme toggle to landing page nav#1259
Open
PARNITA-SINGH wants to merge 1 commit into
Open
Conversation
|
@PARNITA-SINGH is attempting to deploy a commit to the komalsony234-1530's projects Team on Vercel. A member of the Team first needs to authorize it. |
Author
|
@komalharshita Hey, The PR is ready and it resolves a very Important issue please merge the PR and do give if any reviews |
Owner
|
Thanks for the contribution! The feature itself looks useful, but I have a couple of requests before this can be merged.
Once the conflicts are resolved and the scope is clarified, I'd be happy to review it again. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary [required]
The light/dark mode toggle button was only visible on the individual project detail page . It was completely absent from the main landing/search page and any other pages, making the theme preference inaccessible to users who haven't navigated into a specific project and so this pull request resolves the issue and now the light/dark toggle button is visible on the landing/search page.
Related Issue #1227
Closes #1227
Type of Change
What Was Changed [required]
The Issue was in the Index.html present in the src/templates folder, the actual fix is adds the toggle button + wraps it in a .nav-links div (matching project.html's pattern), so it inherits the same flex spacing from style.css.
was closed with instead of since it adjacent and touches the same lines too.One more bug was present in the file the
src/templates/index.html{% include 'partials/theme_toggle.html' %}inside a new.nav-linksdiv in the desktop nav, so the toggle renders on the landing page (matchingproject.html's pattern)src/templates/index.html<form>was incorrectly closed with</div>instead of</form>How to Test This PR
git checkout your-branch-namepip install -r requirements.txtpython app.pypython tests/test_basic.pyExpected test output:
Test Results
FAIL test_projects_json_loads: name '_URL_RE' is not defined
PASS test_duplicate_ids_detected
PASS test_duplicate_titles_detected
PASS test_empty_title_detected
PASS test_missing_required_field_detected
PASS test_each_project_has_required_fields
PASS test_find_project_by_id_found
PASS test_find_project_by_id_missing
PASS test_parse_skills_basic
PASS test_parse_skills_empty_string
PASS test_parse_skills_single_entry
PASS test_parse_skills_valid_json_array
PASS test_parse_skills_malformed_json_handling
PASS test_parse_skills_legacy_fallback
PASS test_parse_skills_containing_commas
PASS test_score_single_project_full_match
PASS test_score_single_project_partial_skill_coverage
FAIL test_score_coverage_ratio_exact_values: test_score_coverage_ratio_exact_values() missing 1 required positional argument: 'monkeypatch'
PASS test_score_no_project_skills_does_not_crash
PASS test_score_three_skills_partial_coverage
PASS test_score_single_project_no_match
PASS test_score_single_project_alias_matching
PASS test_get_recommendations_returns_results
PASS test_get_recommendations_max_three
PASS test_get_recommendations_no_match_returns_empty
PASS test_get_recommendations_result_format
PASS test_case_insensitive_recommendations_identical
PASS test_whitespace_stripped_in_skills
PASS test_validate_all_valid
PASS test_validate_missing_skills
PASS test_validate_missing_level
PASS test_validate_missing_interest
PASS test_validate_missing_time
PASS test_validate_all_missing
PASS test_home_route
PASS test_security_headers_present
PASS test_recommend_api_valid
PASS test_recommend_api_interest_not_available
PASS test_recommend_api_missing_field
PASS test_recommend_api_null_field
PASS test_recommend_api_non_string_field
PASS test_recommend_api_empty_body
PASS test_project_detail_found
[2026-07-03 22:52:59] ERROR devpath.errors status=404 id=3614e8d9 type=NotFound context='page_not_found'
Traceback (most recent call last):
File "C:\Users\asus\AppData\Roaming\Python\Python314\site-packages\flask\app.py", line 880, in full_dispatch_request
rv = self.dispatch_request()
File "C:\Users\asus\AppData\Roaming\Python\Python314\site-packages\flask\app.py", line 865, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
File "C:\Users\asus\Desktop\dev\DevPath-Parnita-Singh\src\routes\main_routes.py", line 209, in project_detail
abort(404)
~~~~~^^^^^
File "C:\Users\asus\AppData\Roaming\Python\Python314\site-packages\flask\helpers.py", line 272, in abort
current_app.aborter(code, *args, **kwargs)
~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\asus\AppData\Roaming\Python\Python314\site-packages\werkzeug\exceptions.py", line 887, in call
raise self.mapping[code](*args, **kwargs)
werkzeug.exceptions.NotFound: 404 Not Found: The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.
PASS test_project_detail_not_found
[2026-07-03 22:52:59] ERROR devpath.errors status=500 id=fef602af type=Exception context='internal_server_error'
Exception: Test error
PASS test_internal_server_error_page
PASS test_view_code_found
PASS test_download_code_found
PASS test_view_code_nested_path
PASS test_download_code_nested_path
PASS test_resolve_starter_file_path_traversal
PASS test_health_check
PASS test_scoring_weights_has_all_keys
PASS test_search_api_returns_results
PASS test_search_api_empty_query
PASS test_home_route_with_share_params
PASS test_share_banner_element_exists
PASS test_share_params_partial_loads_ok
PASS test_share_params_invalid_level_not_reflected
PASS test_share_params_xss_not_reflected
PASS test_share_params_excessive_skills_loads_ok
PASS test_api_recommend_invalid_level_no_crash
PASS test_sitemap_returns_200
PASS test_sitemap_content_type
PASS test_sitemap_contains_homepage
PASS test_sitemap_contains_all_project_ids
PASS test_robots_txt_returns_200
PASS test_robots_txt_references_sitemap
PASS test_project_links_have_noopener
PASS test_career_roadmaps_load
PASS test_compare_roadmaps_finds_overlap
PASS test_compare_same_roadmap_returns_error
PASS test_compare_invalid_roadmap_returns_none
PASS test_compare_page_route
PASS test_list_roadmaps_api
PASS test_compare_api
PASS test_compare_api_missing_params
PASS test_compare_api_not_found
PASS test_sitemap_includes_compare
76 passed, 2 failed out of 78 tests
Screenshots
AFTER

BEFORE

Self-Review Checklist
feat/,fix/,docs/,data/,style/,test/python tests/test_basic.pyand all 27 tests passflake8 .locally and there are no errors (pre-existing lint issues in unrelated .py files — none introduced by this PR, which only touches index.html)print()orconsole.log()debug statementsNotes for Reviewer
Running
flake8 .on the full repo surfaces a large number of pre-existing lint warnings across.pyfiles (routes, utils, tests, scripts) — these are unrelated to this PR, which only modifiessrc/templates/index.html. Happy to open a separate cleanup issue for these if useful.-
python tests/test_basic.pyshows 76 passed, 2 failed. Both failures are pre-existing bugs unrelated to this change (an undefined_URL_REname inurl_validator.py, and a test missing amonkeypatchargument). This PR only touchessrc/templates/index.html.