mirror of
https://github.com/NotXia/notxia.github.io.git
synced 2025-12-14 19:01:51 +01:00
Update navbar
This commit is contained in:
@ -1,17 +1,15 @@
|
||||
<template>
|
||||
<nav class="bg-white border-gray-200 dark:bg-gray-900 px-2 sm:px-4 py-2.5 ">
|
||||
<div class="container flex flex-wrap items-center justify-between md:justify-start mx-auto">
|
||||
<div></div>
|
||||
|
||||
<div class="block md:flex">
|
||||
<div class="flex justify-end items-center order-2">
|
||||
<nav class="bg-white border-gray-200 dark:bg-gray-900 py-2.5">
|
||||
<div class="container flex flex-wrap items-center justify-end md:justify-start mx-auto">
|
||||
<div class="block md:flex w-full">
|
||||
<div class="flex justify-end items-center order-2 md:w-1/2">
|
||||
<a href="https://github.com/NotXia" class="rounded-full p-1 mx-1 hover:bg-slate-200 dark:hover:bg-slate-700">
|
||||
<img :src="github_icon" alt="Github" class="h-5 dark:invert" />
|
||||
</a>
|
||||
<ThemeSwitch class="mx-1" />
|
||||
<LanguageSelector class="mx-1" />
|
||||
|
||||
<button class="inline-flex items-center p-2 ml-3 text-sm text-gray-500 md:hidden dark:text-gray-400"
|
||||
<button class="inline-flex items-center mx-3 text-sm text-gray-500 md:hidden dark:text-gray-400"
|
||||
data-collapse-toggle="navbar-main" type="button" aria-controls="navbar-main" aria-expanded="false">
|
||||
<span class="sr-only">{{ t("open nav") }}</span>
|
||||
<svg class="w-6 h-6" aria-hidden="true" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
|
||||
@ -20,7 +18,7 @@
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="flex items-center order-1">
|
||||
<div class="flex items-center order-1 md:w-1/2">
|
||||
<div class="hidden w-full md:block md:w-auto" id="navbar-main">
|
||||
<ul class="flex flex-col py-4 pr-4 mt-0 md:flex-row md:space-x-8 md:text-sm md:font-medium bg-transparent">
|
||||
<NavLink to="/" :label="t('home')"/>
|
||||
|
||||
@ -1,24 +1,26 @@
|
||||
<template>
|
||||
<button id="button-dropdown-locales" data-dropdown-toggle="dropdown-locales" type="button"
|
||||
class="rounded-full p-1 hover:bg-slate-200 dark:hover:bg-slate-700">
|
||||
<div class="w-5 h-5 flex items-center justify-center">
|
||||
<img :src="globe_icon" alt="Language" class="h-full w-full dark:invert" />
|
||||
<div>
|
||||
<button id="button-dropdown-locales" data-dropdown-toggle="dropdown-locales" type="button"
|
||||
class="rounded-full p-1 hover:bg-slate-200 dark:hover:bg-slate-700">
|
||||
<div class="w-5 h-5 flex items-center justify-center">
|
||||
<img :src="globe_icon" alt="Language" class="h-full w-full dark:invert" />
|
||||
</div>
|
||||
</button>
|
||||
|
||||
<div id="dropdown-locales" class="z-10 hidden bg-white divide-y divide-gray-100 rounded shadow dark:bg-gray-700 dark:divide-gray-600">
|
||||
<ul class="p-3 space-y-1 text-sm text-gray-700 dark:text-gray-200" aria-labelledby="button-dropdown-locales">
|
||||
|
||||
<li v-for="locale in $i18n.availableLocales" :key="`locale-${locale}`">
|
||||
<input :id="`radio-locale-${locale}`" type="radio" :value="locale" name="locale" class="hidden" v-model="$i18n.locale" :onChange="changeLocale">
|
||||
<label :for="`radio-locale-${locale}`" class="text-sm font-medium uppercase text-gray-900 rounded dark:text-gray-300 ">
|
||||
<div class="flex items-center p-2 px-5 rounded hover:bg-gray-100 dark:hover:bg-gray-600">
|
||||
{{ locale }}
|
||||
</div>
|
||||
</label>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</button>
|
||||
|
||||
<div id="dropdown-locales" class="z-10 hidden bg-white divide-y divide-gray-100 rounded shadow dark:bg-gray-700 dark:divide-gray-600">
|
||||
<ul class="p-3 space-y-1 text-sm text-gray-700 dark:text-gray-200" aria-labelledby="button-dropdown-locales">
|
||||
|
||||
<li v-for="locale in $i18n.availableLocales" :key="`locale-${locale}`">
|
||||
<input :id="`radio-locale-${locale}`" type="radio" :value="locale" name="locale" class="hidden" v-model="$i18n.locale" :onChange="changeLocale">
|
||||
<label :for="`radio-locale-${locale}`" class="text-sm font-medium uppercase text-gray-900 rounded dark:text-gray-300 ">
|
||||
<div class="flex items-center p-2 px-5 rounded hover:bg-gray-100 dark:hover:bg-gray-600">
|
||||
{{ locale }}
|
||||
</div>
|
||||
</label>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user