11---
22import navigation from ' ../navigation.json'
33
4- let segments = Astro .url .pathname .match (/ \/ ([0-9 ] * \. x)\/ ([a-z\-\_ ] * )\/ ([a-z\-\_ ] * )\/ ([a-z\-\_ ] * )/ ) || [" /3 .x/panels/installation /" , " 3 .x" , " panels " , " installation " ];
4+ let segments = Astro .url .pathname .match (/ \/ ([0-9 ] * \. x)\/ ([a-z\-\_ ] * )\/ ([a-z\-\_ ] * )\/ ([a-z\-\_ ] * )/ ) || [" /4 .x/introduction/overview /" , " 4 .x" , " introduction " , " overview " ];
55let currentVersion = segments [1 ].replaceAll (" /" , " " );
66let currentSection = segments [2 ].replaceAll (" /" , " " );
77let currentPage = (segments [3 ] ?? null )?.replaceAll (" /" , " " );
@@ -46,7 +46,7 @@ const versions = navigation.map((version) => {
4646 aria-label =" Open version options"
4747 >
4848 <span class =" hidden sm:block" >Version </span >
49- <span id =" current-version" class =" font-bold" >{ currentVersion } { ( currentVersion === ' 4.x ' ) ? ' beta ' : ' ' } </span >
49+ <span id =" current-version" class =" font-bold" >{ currentVersion } </span >
5050 </button >
5151
5252 <div
@@ -59,7 +59,7 @@ const versions = navigation.map((version) => {
5959 { versions .map ((version ) => (
6060 <a
6161 href = { version .href }
62- class = " flex justify-start items-center rounded-[0.5rem] py-1 px-3 w-full hover:bg-gray-100 hover:dark:bg-gray-900/40 transition duration-200"
62+ class = " flex justify-center items-center rounded-[0.5rem] py-1 px-3 w-full hover:bg-gray-100 hover:dark:bg-gray-900/40 transition duration-200"
6363 class :list = { [
6464 {
6565 ' text-primary-500 hover:text-primary-500 hover:dark:text-primary-500' : version .version === currentVersion ,
@@ -70,7 +70,7 @@ const versions = navigation.map((version) => {
7070 ]}
7171 >
7272 <span >Version </span >
73- <span >{ version .version } { ( version . version === ' 4.x ' ) ? ' beta ' : ' ' } </span >
73+ <span >{ version .version } </span >
7474 </a >
7575 ))}
7676 </div >
0 commit comments