Fix minimal details
This commit is contained in:
@ -23,6 +23,7 @@ import { SITE } from '~/config.mjs';
|
||||
}
|
||||
|
||||
function attachEvent(selector, event, fn) {
|
||||
console.log(selector);
|
||||
const matches = typeof selector === 'string' ? document.querySelectorAll(selector) : selector;
|
||||
if (matches && matches.length) {
|
||||
matches.forEach((elem) => {
|
||||
@ -35,7 +36,7 @@ import { SITE } from '~/config.mjs';
|
||||
let lastKnownScrollPosition = 0;
|
||||
let ticking = false;
|
||||
|
||||
attachEvent('[data-aw-toggle-menu]', 'click', function (elem) {
|
||||
attachEvent('[data-aw-toggle-menu]', 'click', function (_, elem) {
|
||||
elem.classList.toggle('expanded');
|
||||
document.body.classList.toggle('overflow-hidden');
|
||||
document.getElementById('header')?.classList.toggle('h-screen');
|
||||
@ -50,7 +51,7 @@ import { SITE } from '~/config.mjs';
|
||||
localStorage.theme = document.documentElement.classList.contains('dark') ? 'dark' : 'light';
|
||||
});
|
||||
|
||||
attachEvent('[data-aw-social-share]', 'click', function (elem) {
|
||||
attachEvent('[data-aw-social-share]', 'click', function (_, elem) {
|
||||
const network = elem.getAttribute('data-aw-social-share');
|
||||
const url = encodeURIComponent(elem.getAttribute('data-aw-url'));
|
||||
const text = encodeURIComponent(elem.getAttribute('data-aw-text'));
|
||||
|
@ -7,23 +7,6 @@ import ToggleMenu from '~/components/common/ToggleMenu.astro';
|
||||
import { getHomePermalink, getBlogPermalink, getPermalink } from '~/utils/permalinks';
|
||||
|
||||
const links = [
|
||||
{
|
||||
text: 'Landing Pages',
|
||||
links: [
|
||||
{
|
||||
text: 'Startup',
|
||||
href: getPermalink('/landing/startup'),
|
||||
},
|
||||
{
|
||||
text: 'Saas',
|
||||
href: getPermalink('/landing/saas'),
|
||||
},
|
||||
{
|
||||
text: 'Mobile App',
|
||||
href: getPermalink('/landing/mobile-app'),
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
text: 'Pages',
|
||||
links: [
|
||||
@ -111,8 +94,7 @@ const links = [
|
||||
>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<div class="md:self-center flex items-center md:mb-0">
|
||||
<div class="md:self-center flex items-center md:mb-0 ml-4">
|
||||
<div class="hidden items-center md:flex">
|
||||
<ToggleTheme iconClass="w-5 h-5" />
|
||||
<a
|
||||
@ -128,5 +110,6 @@ const links = [
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
</header>
|
||||
|
Reference in New Issue
Block a user