|
1 | 1 | import { Menu, Transition } from '@headlessui/react' |
2 | | -import { ChevronDownIcon,MenuIcon } from '@heroicons/react/solid' |
| 2 | +import { ChevronDownIcon, MenuIcon } from '@heroicons/react/solid' |
3 | 3 | import { Fragment } from 'react' |
| 4 | +import Link from 'next/link' |
4 | 5 |
|
5 | 6 | function classNames(...classes) { |
6 | 7 | return classes.filter(Boolean).join(' ') |
@@ -30,89 +31,95 @@ export default function MenuButton() { |
30 | 31 | <div className="py-1"> |
31 | 32 | <Menu.Item> |
32 | 33 | {({ active }) => ( |
33 | | - <a |
34 | | - href="/docs" |
35 | | - className={classNames( |
36 | | - active ? 'bg-gray-100 dark:bg-gray-700 text-gray-900 dark:text-white' : 'text-gray-700 dark:text-gray-200', |
37 | | - 'block px-4 py-2 text-base sm:hidden' |
38 | | - )} |
39 | | - > |
40 | | - Documentation |
41 | | - </a> |
| 34 | + <Link href="/docs"> |
| 35 | + <a |
| 36 | + className={classNames( |
| 37 | + active ? 'bg-gray-100 dark:bg-gray-700 text-gray-900 dark:text-white' : 'text-gray-700 dark:text-gray-200', |
| 38 | + 'block px-4 py-2 text-base sm:hidden' |
| 39 | + )} |
| 40 | + > |
| 41 | + Documentation |
| 42 | + </a> |
| 43 | + </Link> |
42 | 44 | )} |
43 | 45 | </Menu.Item> |
44 | 46 | <Menu.Item> |
45 | 47 | {({ active }) => ( |
46 | | - <a |
47 | | - href="#" |
48 | | - className={classNames( |
49 | | - active ? 'bg-gray-100 dark:bg-gray-700 text-gray-900 dark:text-white' : 'text-gray-700 dark:text-gray-200', |
50 | | - 'block px-4 py-2 text-base' |
51 | | - )} |
52 | | - > |
53 | | - About |
54 | | - </a> |
| 48 | + <Link href="#"> |
| 49 | + <a |
| 50 | + className={classNames( |
| 51 | + active ? 'bg-gray-100 dark:bg-gray-700 text-gray-900 dark:text-white' : 'text-gray-700 dark:text-gray-200', |
| 52 | + 'block px-4 py-2 text-base' |
| 53 | + )} |
| 54 | + > |
| 55 | + About |
| 56 | + </a> |
| 57 | + </Link> |
55 | 58 | )} |
56 | 59 | </Menu.Item> |
57 | 60 | <Menu.Item> |
58 | 61 | {({ active }) => ( |
59 | | - <a |
60 | | - href="/sponsors" |
61 | | - className={classNames( |
62 | | - active ? 'bg-gray-100 dark:bg-gray-700 text-gray-900 dark:text-white' : 'text-gray-700 dark:text-gray-200', |
63 | | - 'block px-4 py-2 text-base' |
64 | | - )} |
65 | | - > |
66 | | - Sponsors |
67 | | - </a> |
| 62 | + <Link href="/sponsors"> |
| 63 | + <a |
| 64 | + className={classNames( |
| 65 | + active ? 'bg-gray-100 dark:bg-gray-700 text-gray-900 dark:text-white' : 'text-gray-700 dark:text-gray-200', |
| 66 | + 'block px-4 py-2 text-base' |
| 67 | + )} |
| 68 | + > |
| 69 | + Sponsors |
| 70 | + </a> |
| 71 | + </Link> |
68 | 72 | )} |
69 | 73 | </Menu.Item> |
70 | 74 | <Menu.Item> |
71 | 75 | {({ active }) => ( |
72 | | - <a |
73 | | - href="/license" |
74 | | - className={classNames( |
75 | | - active ? 'bg-gray-100 dark:bg-gray-700 text-gray-900 dark:text-white' : 'text-gray-700 dark:text-gray-200', |
76 | | - 'block px-4 py-2 text-base' |
77 | | - )} |
78 | | - > |
79 | | - License |
80 | | - </a> |
| 76 | + <Link href="/license"> |
| 77 | + <a |
| 78 | + className={classNames( |
| 79 | + active ? 'bg-gray-100 dark:bg-gray-700 text-gray-900 dark:text-white' : 'text-gray-700 dark:text-gray-200', |
| 80 | + 'block px-4 py-2 text-base' |
| 81 | + )} |
| 82 | + > |
| 83 | + License |
| 84 | + </a> |
| 85 | + </Link> |
81 | 86 | )} |
82 | 87 | </Menu.Item> |
83 | 88 | <Menu.Item> |
84 | 89 | {({ active }) => ( |
85 | | - <a |
86 | | - href="/changelog" |
87 | | - className={classNames( |
88 | | - active ? 'bg-gray-100 dark:bg-gray-700 text-gray-900 dark:text-white' : 'text-gray-700 dark:text-gray-200', |
89 | | - 'block w-full text-left px-4 py-2 text-base' |
90 | | - )} |
91 | | - > |
92 | | - Change Log |
93 | | - </a> |
| 90 | + <Link href="/changelog"> |
| 91 | + <a |
| 92 | + className={classNames( |
| 93 | + active ? 'bg-gray-100 dark:bg-gray-700 text-gray-900 dark:text-white' : 'text-gray-700 dark:text-gray-200', |
| 94 | + 'block w-full text-left px-4 py-2 text-base' |
| 95 | + )} |
| 96 | + > |
| 97 | + Change Log |
| 98 | + </a> |
| 99 | + </Link> |
94 | 100 | )} |
95 | 101 | </Menu.Item> |
96 | 102 | <Menu.Item> |
97 | 103 | {({ active }) => ( |
98 | | - <a |
99 | | - href="https://github.com/javaistic/javaistic" |
100 | | - className={classNames( |
101 | | - active ? 'bg-gray-100 dark:bg-gray-700 text-gray-900 dark:text-white' : 'text-gray-700 dark:text-gray-200', |
102 | | - 'block px-4 py-2 text-base sm:hidden' |
103 | | - )} |
104 | | - > |
105 | | - <div className="flex"> |
106 | | - <span className="sr-only">Javaistic on GitHub</span> |
107 | | - <svg className="w-6 h-6 mr-2" viewBox="0 0 16 16" fill="currentColor"> |
108 | | - <path |
109 | | - fillRule="evenodd" |
110 | | - d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z" |
111 | | - /> |
112 | | - </svg> |
113 | | - GitHub |
114 | | - </div> |
115 | | - </a> |
| 104 | + <Link href="https://github.com/javaistic/javaistic"> |
| 105 | + <a |
| 106 | + className={classNames( |
| 107 | + active ? 'bg-gray-100 dark:bg-gray-700 text-gray-900 dark:text-white' : 'text-gray-700 dark:text-gray-200', |
| 108 | + 'block px-4 py-2 text-base sm:hidden' |
| 109 | + )} |
| 110 | + > |
| 111 | + <div className="flex"> |
| 112 | + <span className="sr-only">Javaistic on GitHub</span> |
| 113 | + <svg className="w-6 h-6 mr-2" viewBox="0 0 16 16" fill="currentColor"> |
| 114 | + <path |
| 115 | + fillRule="evenodd" |
| 116 | + d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z" |
| 117 | + /> |
| 118 | + </svg> |
| 119 | + GitHub |
| 120 | + </div> |
| 121 | + </a> |
| 122 | + </Link> |
116 | 123 | )} |
117 | 124 | </Menu.Item> |
118 | 125 |
|
|
0 commit comments