add news to menu, fix responsivity

This commit is contained in:
tree🌴 2024-02-12 16:13:13 +01:00
parent 67fc203919
commit 23d1fe3710
2 changed files with 5 additions and 4 deletions

View file

@ -17,6 +17,8 @@ header:
# url: /leaderboard # url: /leaderboard
- name: Explorer - name: Explorer
link: explorer link: explorer
- name: News
link: news
- name: Docs - name: Docs
link: docs link: docs
#- name: Manifesto #- name: Manifesto

View file

@ -1,5 +1,5 @@
--- ---
import { ViewTransitions } from 'astro:transitions'; //import { ViewTransitions } from 'astro:transitions';
import * as config from '../config.yaml'; import * as config from '../config.yaml';
import core from '../core.json'; import core from '../core.json';
@ -22,7 +22,6 @@ function genHeading(str) {
<meta name="description" content={description} /> <meta name="description" content={description} />
<title>{title ? title + ' | ' + config.title : config.title}</title> <title>{title ? title + ' | ' + config.title : config.title}</title>
<ViewTransitions />
<link <link
rel="preload" rel="preload"
href="/fonts/archivo-regular-latin-ext.woff2" href="/fonts/archivo-regular-latin-ext.woff2"
@ -50,7 +49,7 @@ function genHeading(str) {
<div class="w-full"> <div class="w-full">
{config.header.menu.map((menuItem) => ( {config.header.menu.map((menuItem) => (
<div class="uppercase w-full"> <div class="uppercase w-full">
<a href={core.links[menuItem.link] || menuItem.url} class="inline-block hover:underline px-4 py-2" class:list={[menuItem.url?.match(/^http/) ? "external" : "", Astro.url.pathname === menuItem.url ? "text-white" : ""]}>{menuItem.name}</a> <a href={core.links[menuItem.link] || menuItem.url} class="inline-block hover:underline px-4 py-2" class:list={[menuItem.url?.match(/^http/) ? "external" : ""]}>{menuItem.name}</a>
</div> </div>
))} ))}
</div> </div>