diff --git a/src/components/Nav.vue b/src/components/Nav.vue index cef0653..e1041f1 100644 --- a/src/components/Nav.vue +++ b/src/components/Nav.vue @@ -1,32 +1,43 @@ @@ -36,6 +47,7 @@ import {reactive} from "vue"; import {useStore} from 'vuex' import {sanitize} from 'string-sanitizer' import router from "../router"; +import {GoToLink} from '../utils' export default { name: 'Nav', @@ -81,7 +93,7 @@ export default { } return { - data, parseSearch + data, parseSearch, GoToLink } } } @@ -93,6 +105,29 @@ nav { height: 70px; width: 100vw; background: rgba(16, 18, 26, 1); + z-index: 2; + + ul { + display: flex; + + li { + font-size: 1.5rem; + font-weight: lighter; + margin: 15px 5px 0 5px; + cursor: pointer; + transition: 100ms ease-in-out; + + &:first-child { + font-size: 1.5rem; + font-weight: bold; + } + + &:hover { + color: var(--bs-info); + transition: 100ms ease-in-out; + } + } + } .text-up { font-size: 40%; @@ -127,9 +162,37 @@ nav { @media screen and (max-width: 768px) { nav { - input[type="search"] { - min-width: 100%; - max-width: 100%; + .navbar-collapse { + background: var(--bs-secondary); + } + + ul { + display: flex; + flex-direction: column; + text-align: center; + width: 100%; + + li { + line-height: 1; + padding: 0 0 20px 0; + border-bottom: 1px solid rgba(255, 255, 255, .1); + } + } + + form { + label { + display: none; + } + + input[type="search"] { + margin-bottom: 15px; + width: 100%; + } + + button { + display: block; + margin-top: -15px; + } } } } diff --git a/src/utils/GoTo.js b/src/utils/GoTo.js index 43425d6..e32ac8d 100644 --- a/src/utils/GoTo.js +++ b/src/utils/GoTo.js @@ -6,4 +6,8 @@ export const GoToMatch = (id) => { export const GoToPlayer = (id) => { router.push(`/player/${id}`) +} + +export const GoToLink = (link) => { + router.push(`${link}`) } \ No newline at end of file diff --git a/src/utils/index.js b/src/utils/index.js index a805929..d6c66c1 100644 --- a/src/utils/index.js +++ b/src/utils/index.js @@ -1,12 +1,12 @@ import {FormatDate, FormatDuration, FormatFullDate, FormatFullDuration} from "./DateTime"; -import {GoToMatch, GoToPlayer} from "./GoTo"; +import {GoToMatch, GoToPlayer, GoToLink} from "./GoTo"; import {SaveLastVisitedToLocalStorage} from "./LocalStorage"; import {GetHLTV_1} from "./HLTV"; import {DisplayRank} from "./Display"; export { FormatDate, FormatFullDuration, FormatFullDate, FormatDuration, - GoToMatch, GoToPlayer, + GoToMatch, GoToPlayer, GoToLink, SaveLastVisitedToLocalStorage, GetHLTV_1, DisplayRank