Layout active tab highlight, textarea styling

This commit is contained in:
MrFry 2020-03-15 11:42:09 +01:00
parent c5d6518ceb
commit dd0ad7731b
5 changed files with 15 additions and 5 deletions

View file

@ -3,9 +3,8 @@ import Link from 'next/link'
import tabs from '../data/tabs.json'
import constants from '../constants.json'
// TODO: activelink prop to set link to active
export default function Layout (props) {
const href = '' // TODO
const { route } = props
return (
<div>
@ -25,7 +24,7 @@ export default function Layout (props) {
return (
<Link href={item.href} key={key} >
<a
className={href.includes(key) ? 'active' : ''}
className={route.includes(key) ? 'active' : ''}
>{item.text}</a>
</Link>
)

View file

@ -3,6 +3,10 @@
"href": "install",
"text": "Install"
},
"allqr": {
"href": "allqr.txt",
"text": "Összes kérdés TXT"
},
"data": {
"href": "data.json",
"text": "Összes kérdés JSON"

View file

@ -15,6 +15,12 @@ body {
font-size: 20px;
}
.feedbackArea {
color: var(--text-color);
background-color: var(--background-color);
font-size: 20px;
}
.sidebarLink {
color: var(--text-color);
text-decoration: none;

View file

@ -3,9 +3,9 @@
import '../defaultStyles.css'
import Layout from '../components/layout'
function MyApp ({ Component, pageProps }) {
function MyApp ({ Component, pageProps, router }) {
return (
<Layout>
<Layout route={router.route}>
<Component {...pageProps} />
</Layout>
)

View file

@ -8,6 +8,7 @@ export default function Feedback (props) {
<form action={constants.serverUrl + 'postfeedback'} method='post'>
<div>Észrevételek: (közeledő teszt miatti kérdés-karbantartás, bug, feature vagy egyéb dolog, ami nyomja a lelked)</div>
<textarea
className='feedbackArea'
type='text'
name='message_field'
style={{