Skip to content

Commit

Permalink
Fix home page link references. (#128)
Browse files Browse the repository at this point in the history
* Fix home page link references.

* Fix template reference.

---------

Co-authored-by: Kailas Nadh U <[email protected]>
  • Loading branch information
bstopp and kailasnadh790 authored Jan 24, 2024
1 parent d1158d7 commit 71a2fa5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ Please always provide the [GitHub issue(s)](../issues) your PR is for, as well a
Fix #<gh-issue-id>

Test URLs:
- Before: https://main--famous-smoke-cigaradvisor--hlxsites.hlx.page/cigaradvisor/
- After: https://<branch>--famous-smoke-cigaradvisor--hlxsites.hlx.page/cigaradvisor/
- Before: https://main--famous-smoke-cigaradvisor--hlxsites.hlx.page/cigaradvisor
- After: https://<branch>--famous-smoke-cigaradvisor--hlxsites.hlx.page/cigaradvisor
8 changes: 4 additions & 4 deletions cigaradvisor/blocks/header/header.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,13 @@ export default async function decorate(block) {
mobilePrimaryNav.append(hamburger);
const mobileLogo = document.createElement('a');
mobileLogo.className = 'mobile-logo';
mobileLogo.setAttribute('href', '/cigaradvisor/');
mobileLogo.setAttribute('href', '/cigaradvisor');
mobileLogo.setAttribute('title', 'Cigar Advisor Homepage');
mobileLogo.innerHTML = '<img src="/cigaradvisor/images/header/mobile-logo.png" alt="Cigar Advisor Logo">';
mobilePrimaryNav.append(mobileLogo);
const search = document.createElement('a');
search.className = 'search';
search.setAttribute('href', '/cigaradvisor/?s=');
search.setAttribute('href', '/cigaradvisor?s=');
search.setAttribute('title', 'Search');
search.innerHTML = '<span class="icon icon-magnifying-glass"></span>';
mobilePrimaryNav.append(search);
Expand All @@ -71,7 +71,7 @@ export default async function decorate(block) {
topNavLeft.classList.add('top-nav-left');
topNavContent.append(topNavLeft);
const brand = document.createElement('div');
brand.innerHTML = `<a href="/cigaradvisor/" rel="home" class="layout__logo lg-andUp" title="Cigar Advisor Homepage">
brand.innerHTML = `<a href="/cigaradvisor" rel="home" class="layout__logo lg-andUp" title="Cigar Advisor Homepage">
<img src="/cigaradvisor/images/header/desktop-logo.png" alt="Cigar Advisor Logo">
</a>`;
brand.className = 'brand-logo';
Expand Down Expand Up @@ -154,7 +154,7 @@ export default async function decorate(block) {
searchButton.setAttribute('aria-expanded', 'false');
const searchBox = document.createElement('div');
searchBox.className = 'secondary-nav-box search-box';
searchBox.innerHTML = `<form action="/cigaradvisor/" class="search search--header lg-andUp">
searchBox.innerHTML = `<form action="/cigaradvisor" class="search search--header lg-andUp">
<label class="sr-only" for="header-search-term">Search</label>
<input type="search" class="search__input predictiveSearch" id="header-search-term" maxlength="255" placeholder="Search here" name="s" autocomplete="off">
<button type="submit" class="search__submit" value="Submit" title="Submit">Submit</button>
Expand Down

0 comments on commit 71a2fa5

Please sign in to comment.