Fix minimal details
This commit is contained in:
@ -23,6 +23,7 @@ import { SITE } from '~/config.mjs';
|
|||||||
}
|
}
|
||||||
|
|
||||||
function attachEvent(selector, event, fn) {
|
function attachEvent(selector, event, fn) {
|
||||||
|
console.log(selector);
|
||||||
const matches = typeof selector === 'string' ? document.querySelectorAll(selector) : selector;
|
const matches = typeof selector === 'string' ? document.querySelectorAll(selector) : selector;
|
||||||
if (matches && matches.length) {
|
if (matches && matches.length) {
|
||||||
matches.forEach((elem) => {
|
matches.forEach((elem) => {
|
||||||
@ -35,7 +36,7 @@ import { SITE } from '~/config.mjs';
|
|||||||
let lastKnownScrollPosition = 0;
|
let lastKnownScrollPosition = 0;
|
||||||
let ticking = false;
|
let ticking = false;
|
||||||
|
|
||||||
attachEvent('[data-aw-toggle-menu]', 'click', function (elem) {
|
attachEvent('[data-aw-toggle-menu]', 'click', function (_, elem) {
|
||||||
elem.classList.toggle('expanded');
|
elem.classList.toggle('expanded');
|
||||||
document.body.classList.toggle('overflow-hidden');
|
document.body.classList.toggle('overflow-hidden');
|
||||||
document.getElementById('header')?.classList.toggle('h-screen');
|
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';
|
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 network = elem.getAttribute('data-aw-social-share');
|
||||||
const url = encodeURIComponent(elem.getAttribute('data-aw-url'));
|
const url = encodeURIComponent(elem.getAttribute('data-aw-url'));
|
||||||
const text = encodeURIComponent(elem.getAttribute('data-aw-text'));
|
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';
|
import { getHomePermalink, getBlogPermalink, getPermalink } from '~/utils/permalinks';
|
||||||
|
|
||||||
const links = [
|
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',
|
text: 'Pages',
|
||||||
links: [
|
links: [
|
||||||
@ -111,22 +94,22 @@ const links = [
|
|||||||
>
|
>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
<div class="md:self-center flex items-center md:mb-0 ml-4">
|
||||||
<div class="md:self-center flex items-center md:mb-0">
|
<div class="hidden items-center md:flex">
|
||||||
<div class="hidden items-center md:flex">
|
<ToggleTheme iconClass="w-5 h-5" />
|
||||||
<ToggleTheme iconClass="w-5 h-5" />
|
<a
|
||||||
<a
|
class="text-gray-500 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-700 focus:outline-none focus:ring-4 focus:ring-gray-200 dark:focus:ring-gray-700 rounded-lg text-sm p-2.5 inline-flex items-center"
|
||||||
class="text-gray-500 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-700 focus:outline-none focus:ring-4 focus:ring-gray-200 dark:focus:ring-gray-700 rounded-lg text-sm p-2.5 inline-flex items-center"
|
aria-label="RSS Feed"
|
||||||
aria-label="RSS Feed"
|
href={getPermalink('/rss.xml')}
|
||||||
href={getPermalink('/rss.xml')}
|
>
|
||||||
>
|
<Icon name="tabler:rss" class="w-5 h-5" />
|
||||||
<Icon name="tabler:rss" class="w-5 h-5" />
|
</a>
|
||||||
</a>
|
<a
|
||||||
<a
|
class="btn w-full ml-3 py-2.5 px-6 font-medium text-gray-600 shadow-none"
|
||||||
class="btn w-full ml-3 py-2.5 px-6 font-medium text-gray-600 shadow-none"
|
href="https://github.com/onwidget/astrowind">Download</a
|
||||||
href="https://github.com/onwidget/astrowind">Download</a
|
>
|
||||||
>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</nav>
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
|
Reference in New Issue
Block a user