From 3a7872b88bb81451e8cdf114c8b58cba6f0a6506 Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Mon, 11 Nov 2024 19:00:39 +0530 Subject: [PATCH] Add dropdown menu in navbar --- docusaurus.config.js | 34 ++++++++++++++++++++++++++++------ src/css/custom.css | 22 ++++++++++++++++++++++ 2 files changed, 50 insertions(+), 6 deletions(-) diff --git a/docusaurus.config.js b/docusaurus.config.js index 1ae9d9a..89fb55b 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -102,11 +102,6 @@ const config = { position: 'left', label: 'Download Windows / Office', }, - { - to: '/hwid', - position: 'left', - label: 'Docs', - }, { to: '/news', position: 'left', @@ -117,6 +112,33 @@ const config = { position: 'left', label: 'Credits', }, + { + type: 'dropdown', + label: 'More', + position: 'left', + items: [ + { + label: 'Docs', + to: '/hwid', + }, + { + label: 'Guides', + to: '/guide_links', + }, + { + label: 'MAS Changelog', + to: '/changelog', + }, + { + label: 'Unsupported Products Activation', + to: '/unsupported_products_activation', + }, + { + label: 'Our Non-Piracy Site', + to: '/our_non-piracy_site', + }, + ], + }, { to: '/blog', label: 'Blog', position: 'right' }, { to: '/contactus', @@ -124,7 +146,7 @@ const config = { label: 'Contact Us', }, { - href: 'https://discord.gg/tVFN4N84PP', + href: 'https://discord.gg/j2yFsV5ZVC', className: 'discord-button', position: 'right', label: 'Discord', diff --git a/src/css/custom.css b/src/css/custom.css index d0ce72f..0ef6710 100644 --- a/src/css/custom.css +++ b/src/css/custom.css @@ -99,3 +99,25 @@ table { --ifm-h1-font-size: 2.2rem; } +/* Dropdown menu container */ +.navbar__item.dropdown:hover .dropdown__menu { + background-color: #94357f; /* Background color for the dropdown menu */ +} + +/* Dropdown menu items */ +.dropdown__menu .dropdown__link { + color: #ffffff; /* Text color for dropdown items */ + padding: 8px 12px; /* Add padding for better click area */ +} + +/* Hover effect for dropdown menu items */ +.dropdown__menu .dropdown__link:hover { + background-color: #732963; /* Background color on hover */ + color: #ffffff; /* Text color on hover */ +} + +/* Specific style for disabled items, if needed */ +.dropdown__menu .dropdown__link--disabled { + color: #ffffffa0; /* Lighter text color for disabled items */ +} +