I am trying to make a responsive navbar in react-bootstrap. Once I get down to h4, i want to start normal word wrapping, but no matter what, the h4 text goes outside the div container on the right when I try to test it's responsiveness in chrome. The nav-bar hovers above a dynamic map which is why the z-value is 2.
Here is the js file:
import React from 'react';
import { BrowserRouter as Router, Switch, Route, Link } from "react-router-dom";
import { Navbar, Nav, NavItem, NavDropdown, ToggleButton, ToggleButtonGroup } from 'react-bootstrap';
export default function Routing(props) {
return (
<>
<Router>
<Navbar collapseOnSelect className="navbar">
<div className="h-box">
<Navbar.Brand>
<h4>Portland Watershed Data Dashboard</h4>
</Navbar.Brand>
</div>
<Navbar.Collapse id="basic-navbar-nav">
<Nav className="ml-auto align-items-center">
<Nav.Link>
<Link to="/"><h5 className="tiny link">Home</h5></Link>
</Nav.Link>
<Nav.Link>
<Link to="/page"><h5 className="tiny link">Gradient</h5></Link>
</Nav.Link>
</Nav>
</Navbar.Collapse>
</Navbar>
<Switch>
<>
<Route exact path="/">
<Home />
</Route>
<Route exact path="/page">
<Page />
</Route>
</>
</Switch>
</Map>
</Router>
</>
)
And here is the css for these elements, I have removed all the text color, background color, and shadowing for readability.
body {
margin: 0px;
padding: 0px;
}
.header {
height: 45px;
position: fixed;
top: 0;
}
.navbar {
left: 0;
position: fixed;
top: 0;
z-index: 2;
width: 100%;
display: block;
}
.h-box {
border: solid black;
padding-top: 0.5vh;
padding-bottom: 0.5vh;
padding-left: 2vh;
padding-right: 1vh;
text-align: center;
}
.tiny, .h-box h4 {
display: block;
}
.link {
margin-right: 2vh;
}
add this className to h4:
<h4 className="text-wrap">Example Headline Here</h4>
should take care of your problem
Related
So I am creating an application with a sidebar and topbar where the content on the right side changes and the sidebar and topbar are fixed. Now I want to create a page where I can put a horizontal carousel / slider for cards, but this gets pushed down for some rease. I don't think it has anything to do with the cards, but only with the slider since one card gets displayed correctly.
Page with slider]1 and Page with 1 card, ideally the slider should be on the same space where the card is displayed. I think it has something to do maybe with the react-bootstrap Col but I am not sure.
Page.js
const array = [...Array(50).keys()];
return (
<Container fluid className="justify-content-between align-content-between mt-0 mt-lg-4">
<Row>
<Col lg="9" m="4" className="mt-4 mt-lg-0">
<div>
<Slider items={array} />
</div>
</Col>
</Container>
)
Slider.js
return (
<div className="slider">
{ items.map((item, index) => (
<div key={index} className="slider-card-wrapper">
{/*<div>lol</div>*/}
<ProductCard />
</div>
)) }
</div>
)
Slider.css
.slider {
display : -webkit-box;
overflow-x : scroll;
overflow-y : hidden;
border-radius : 5px;
}
.slider-card-wrapper {
margin-left : 10px;
margin-right : 10px;
}
ProductCard.js
return (
<Card className="product-card">
{ isIMG &&
<div className="product-card-img">
<Card.Img variant="top" className="product-card-img" src="" />
<div className="product-card-img-overlay"/>
<div className="product-card-img-text">
text
</div>
</div>
}
<Card.Body className="product-card-body">
body
body
<br/>
body
</Card.Body>
<div className="product-card-divider" />
<Card.Footer className="product-card-footer">
<Link className="product-card-footer-link" to="/dashboard/product">
VIEW ITEM
</Link>
</Card.Footer>
</Card>
)
ProductCard.css
.product-card {
max-height : 400px;
max-width : 250px;
border-radius : 10px 10px 5px 5px;
border : 0;
-webkit-box-shadow: 0 0 14px #e7e7e7;
box-shadow: 0 0 14px #e7e7e7;
word-wrap : break-word;
}
.product-card-img {
position : relative;
border-radius : inherit;
border-color : transparent;
}
.product-card-img-actual {
display : block;
overflow : hidden;
border-radius : inherit;
}
.product-card-img-overlay {
position : absolute;
text-align : left;
left : 0;
right : 0;
top : 0;
bottom : 0;
border-radius : inherit;
background : #1f1f1fff;
opacity : 0.15;
}
.product-card-img-text {
margin-left : 10px;
margin-bottom : 10px;
}
.product-card-body {
text-align : center;
}
.product-card-footer {
text-align : center;
justify-content : center;
border-top-width : 3px;
border-color : #e0e0e0;
background : transparent;
}
.product-card-footer-link {
color : #008d74;
text-decoration : None;
font-weight : bold;
margin-top : 2px;
margin-bottom : 2px;
}
Sidebar.js
return (
<div className={classNames("sidebar", {"open" : isSidebarOpen})}>
<ChevronDoubleLeftIcon
className={classNames("sidebar-toggle", {"closed" : !isSidebarOpen})}
onClick={onSideBarOpen}
/>
<Nav className="flex-column">
{ routes.map((route, index) => (
route.sub_routes ?
<SidebarMenu
key={index}
data={route}
/>
:
<SidebarItem
key={index}
text={route.name}
icon={route.icon}
path={route.path}
/>
)) }
</Nav>
</div>
)
Sidebar.css
.sidebar {
min-width: 230px;
max-width: 240px;
height : 100vh;
margin-left: -200px;
background: #f7f9fb;
transition: all .5s;
}
.sidebar.open {
margin-left: -10px;
transform: scale(1);
transition: .5s;
}
.sidebar-item {
display: inline-flex;
margin-top: 1em;
color: #000000;
font-weight: bold;
}
.sidebar-item:hover {
background-color: #f2f4f7;
}
.sidebar-menu {
color: #000000;
font-weight: bold;
margin-top: 1em;
}
.sidebar-menu-item {
color: #000000;
font-weight: bold;
margin-top: 0.75em;
margin-left: 1.75em;
}
.sidebar-menu-item:hover {
background-color: #f2f4f7;
}
.sidebar-menu-icon {
color: #000000;
}
.sidebar-toggle {
position: relative;
height: 1.25em;
width: 1.25em;
top: 10px;
left: 0px;
z-index: 999;
float: right;
background-color: #f7f9fb;
color: #000000;
cursor: pointer;
border-radius: 0px .25em .25em 0px;
transition: transform .5s ease-in-out;
}
.sidebar-toggle.closed {
transform-origin: center;
transform: translateX(-0px) rotate(180deg) ;
}
.nav-item {
color: #000000;
font-weight: bold;
}
.nav-link {
color: #000000;
font-weight: 600;
max-width: 190px;
overflow: hidden;
text-overflow: ellipsis;
}
.sidebar-icon {
color: #000000;
width: 1.25em;
height: 1.25em;
margin-right: 0.75em;
}
Topbar.js
return (
<Navbar bg="light" expand="lg" sticky="top">
<Container fluid>
<Navbar.Brand href="#">PPDB</Navbar.Brand>
<Navbar.Toggle aria-controls="navbarScroll"/>
<Navbar.Collapse id="navbarScroll">
<Nav
className="me-auto my-2 my-lg-0 justify-content-center"
style={{maxHeight: '100px'}}
navbarScroll
>
<Nav.Link href="Dashboard">Home</Nav.Link>
</Nav>
<Form className="d-flex">
<FormControl
type="search"
placeholder="Search"
className="me-2"
aria-label="Search"
/>
</Form>
</Navbar.Collapse>
</Container>
</Navbar>
)
Layout.js
return (
<div>
<Container fluid className={"h-100"} style={{paddingLeft : "0px", paddingRight : "0px"}}>
<Topbar />
<Row className={"h-100"}>
<Sidebar />
<Col>
<Suspense fallback={<Spinner animation="border" role="status" />}>
<Routes>
<Route path='/' element={<h1> BASE </h1>} />
{ routes.map((route, index) => (
route.sub_routes ?
route.sub_routes.map((sub_route, i) => (
<Route
path={sub_route.path}
key={i}
element={<sub_route.component />}
/>
))
:
<Route
path={route.path}
key={index}
element={<route.component />}
/>
)) }
</Routes>
</Suspense>
</Col>
</Row>
</Container>
</div>
)
You overuse Grid there (like many other people do), as you do not have a real two-dimensional layout. I would strongly recommend to stick to flexbox as much as possible. There is a component for it in react-bootstrap called Stack. Using only Stack you will come very far. In your case I would layout application only with this component:
Look into following sandbox: https://codesandbox.io/s/clever-elion-frb220. I have provided colors, ids, names and some padding, so you can see how this layout is structured:
Upper Stack is vertical, for stacking top appbar/navbar and the rest of your application
Lower Stack is horizontal, for stacking sidebar(probably with fixed width) and the content section
Regarding your problem: In your Layout component you define a Row, but do not define Cols everywhere - the imported Sidebar component is not a Col.
Grid is for example useful when:
You have table like structure (two-dimensional)
You want to define responsive design with different layout on some breakpoints
You want to work with offsets, so things are aligned consistently.
I have a problem with aligning elements to the right of the page as I did use several methods such as float, flex, but none of them work. For easier to understand, I included the picture so that it can describe what I mean. I don't know is there any wrong with my code so can someone help me to solve the problem? Thank you for your help
Home.js:
import React from 'react';
import "./homeStyle.css";
import { Navbar, NavItem, NavDropdown, MenuItem, Nav, Form, FormControl, Button } from 'react-bootstrap';
import "./components/containers/Menu.css";
import "./homeScript";
import { Widget } from '#typeform/embed-react'
import logo from "./components/img/logo.png";
export default function Home() {
return(
<div>
<div className='App tc f3'>
<Navbar bg='dark' expand='lg'>
<Navbar.Brand href="">
<img src={logo}/>
</Navbar.Brand>
<Navbar.Toggle aria-controls="basic-navbar-nav" />
<Navbar.Collapse id="basic-navbar-nav">
<Nav className='ml-auto'>
<Nav.Link href="#home"><button type="button">Login</button></Nav.Link>
</Nav>
</Navbar.Collapse>
</Navbar>
</div>
<section id="home">
<div className="inner-width">
<div className="content">
<h1 />
<div className="buttons">
<button>Not Prepare to Part Yet? Click to Learn More</button>
</div>
</div>
</div>
</section>
</div>
)
}
CSS:
*{
margin: 0;
padding:0;
text-decoration: none;
font-family: 'Montserrat', sans-serif;
box-sizing: border-box;
}
#home .inner-width {
display: flex;
align-items: center;
justify-content: right;
height: 100%;
text-align: center;
}
#home .content {
width: 100%;
color: white;
float: right;
}
#home .content h1 {
font-size: 60px;
margin-bottom: 60px;
}
#home .content h1::after {
content: " Family ";
animation: textAnim 10s linear infinite;
}
#keyframes textAnim {
25% {
content: " If not Now, When ? ";
}
50% {
content: " Just in case. ";
}
75% {
content: " For your loved one.";
}
}
Try using css properties position: relative and position: absolute for aligning item.
Short explanation. Position relative is assigned to parent, in this case you can assign to section home. Then, position absolute is assigned to child that want to be aligned. After that, for child element you can use positioning properties like right, top, bottom and left to adjust the positioning.
For example
#home {
position: relative;
width: 100%;
height: 90vh;
}
.content {
position: absolute;
top: 50%;
right: 0;
transform: translateY(-50%);
-webkit-transform: translateY(-50%);
}
This is what the site is like when in desktop mode:
Now in mobile mode:
You can see that there is now extra space on the bottom. I make sure to erase margins everywhere but the space still remained there.
Pertinent css code:
.grid-container{
display: grid;
grid-template-areas:
"header"
"main"
"footer";
grid-template-columns: 1fr;
grid-template-rows: 5rem 1fr 3rem;
height: 100%;
}
.main {
grid-area: main;
background-image: url("res/background_min.jpg");
overflow: hidden
}
/*Home Screen*/
.home{
display: flex;
}
.menu-list{
display: flex;
justify-content: center;
align-items: center;
flex-wrap: wrap;
height: 100%;
}
.menu-list a {
padding: 0rem;
flex: 0 1 50rem;
margin: 1.5rem;
height: 100%;
width: 100%;
display: flex;
text-decoration: none;
color: white;
}
.menu-list li
{
display: flex;
list-style-type: none;
text-decoration: none;
align-items: center;
justify-content: center;
width: 100%;
height: 10%;
}
.menu-list p {
font-size: 2vw;
}
.section a {
color: #ffffff;
font-weight: bold;
font-size: 2vw;
text-decoration: none;
}
.about {
background-image: linear-gradient(to right, cyan, magenta);
}
.contacts {
background-image: linear-gradient(to right, fuchsia, turquoise);
}
.projects{
background-image: linear-gradient(to right, turquoise, fuchsia);
}
.question-box {
background-image: linear-gradient(to right, magenta, aqua);
}
.home-main-image{
display: flex;
justify-content: center;
align-items: center;
flex-wrap: wrap;
max-width: 45%;
}
.home-main-image img{
max-width: 99%;
}
.fade-in {
animation: fadeIn ease 2s;
}
.button{
background-image: linear-gradient(to right, cyan, magenta);
border: none;
text-align: center;
color: white;
text-decoration: none;
font-size: 1vw;
padding: .5rem;
}
Menu list is the vertical column of buttons that should occupy most of the screen on the left, and home-main-image is the giant terminal logo plastered on the right.
Note that the issue happens with a real mobile device too.
Edit: For clarification, this is the extra space:
Edit: added react html:
App.js
function App() {
const [lang, setLang] = useLanguage();
const handleLanguageChange = () => {
if (lang.lang === 'eng'){
setLang('fr')
} else {
setLang('en')
}
}
return (
<BrowserRouter>
<div className="grid-container">
<header className="header">
<div className="brand">
<Link to="/" >
Eduardo Breton
</Link>
</div>
<div className="header-side">
{lang.subtitle}
</div>
<div className="header-right">
<button className="button" onClick={() => handleLanguageChange()}>{lang.traduction} </button>
</div>
<div>
</div>
</header>
<main className="main">
<div className="content">
<Route path="/" exact={true} component={HomeScreen} />
<Route path="/about" component={AboutScreen}/>
<Route path="/contact" component={ContactScreen}/>
<Route path="/project" component={ProjectScreen}/>
<Route path="/question" component={QuestionScreen}/>
</div>
</main>
<footer className="footer">
© 2020 Eduardo Breton
</footer>
</div>
</BrowserRouter>
);
}
HomeScreen.js:
const { Link } = require("react-router-dom");
function HomeScreen() {
const [lang, setLang] = useLanguage();
return <div className="home">
<ul className="menu-list">
<Link to="/about">
<li className="fade-in section about" >
{lang.about}
</li>
</Link>
<Link to="/contact">
<li className="fade-in section about" >
{lang.contact}
</li>
</Link>
<Link to="/project">
<li className="fade-in section about" >
{lang.projects}
</li>
</Link>
<Link to="/question">
<li className="fade-in section about" >
{lang.question}
</li>
</Link>
</ul>
<div className="home-main-image fade-in">
<img src={terminalImage} />
</div>
</div>
}
export default HomeScreen;
Checked answer with the discussion has fixed the issue, changing flex-direction to column on a media screen on main has allowed me to center correctly the contents:
the first thing you need to do is add a meta description for mobile view in the head. These in particular
<meta content="width=device-width, initial-scale=1" name="viewport" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
Next you need to make your site responsive by adding media queries so that the home main image and your buttons become responsive. You should increase the size of the menu buttons and set them to
#media screen and (max-width:650px) {
.menu-list li {
flex-direction:column;
}
}
That way your buttons will be bigger, aligned in the center, AND in a column (this will look better on mobile). You should also change the flex direction of the main image. Also, try adding some padding between the buttons in mobile view, this should also help in taking up the space.
I've been building the UI for a chat room app in React. Everything was going fine until suddenly, it refreshes and the UI "broke". Basically, I have 2 components, a Sidebar component and a Chat component. I use flex to position them. Here is my code:
Sidebar.js
<div className="sidebar">
<Card className="sidebar_card left">
<Icon icon="mountain" iconSize={40} />
<div>
<Button icon="search" minimal fill large />
</div>
<div>
<Button icon="plus" minimal fill large />
</div>
</Card>
<Card className="sidebar_card right">
<div>
<h2 className="bp3-heading">Smart Labs</h2>
<Popover content={popupMenu}>
<Button icon="chevron-down" minimal />
</Popover>
</div>
<CreateRoom />
<Menu>
{rooms.map(room => (
<SelectRoom text={room.name} id={room.id} />
))}
</Menu>
<div></div>
<Button text="People" icon="new-person" minimal outlined />
<Menu>
<MenuItem text="Tony Quach" />
</Menu>
</Card>
</div>
Chat.js:
<div className="chat">
<Card className="chat_card">
<div className="chat_header">
<h2 className="bp3-heading">{roomDetails?.name}</h2>
<Divider />
</div>
<div className="chat_body">
{roomMessages.map(({ message, timestamp, user, userImage }) => (
<Message
message={message}
timestamp={timestamp}
user={user}
userImage={userImage}
/>
))}
</div>
<ChatInput roomName={roomDetails?.name} roomId={roomId} workspaceId={workspaceId} />
</Card>
</div>
Sidebar.css:
.sidebar {
display: flex;
flex: 0.2;
height: 100vh;
}
.sidebar_card {
border-radius: 0;
margin: 0;
}
.sidebar_card > div {
display: flex;
justify-content: space-between;
}
.left > div {
margin: 10px 0 0;
}
.right > div {
margin: 0 0 20px;
}
Chat.css:
.chat {
display: flex;
flex: 0.7;
height: 100vh;
}
.chat_card {
width: 100%;
border-radius: 0;
margin: 0;
}
.chat_header {
margin: 0 20px 0;
}
.chat_body {
margin: 20px 20px 0;
}
And in App.js I just do:
<div class="app">
<Sidebar />
<Chat />
</div>
App.css:
app {
display: flex;
}
I use Blueprint.js
I used border: 1px solid red to try to debug it, it seems that the Sidebar component, while only has a flex: 0.3 somehow takes up the whole width of the page and pushes Chat component down (so they stack on each other instead of align next to each other).
Any suggestions? Thank you.
I fixed it by adding position: absolute; left: 0 to Sidebar component and position: absolute; right: 0 to Chat component.
I have created a navbar in my React.js website using bootstrap for react. The navbar currently collapses at a certain point however my menu button does not appear. Please could someone check through the code below and let me know what I'm missing/need to do?
I have tried to add in the toggle using an example on a bootstrap tutorial site however it doesn't seem to work, I'm assuming that something is missing? Or i'm doing something wrong?
EDIT: I have fixed the original issue however all the alignment has been thrown off, I have changed the code below to the new code.
I need everything on the navbar desktop view to be aligned right except the logo which should remain where it is.
In tablet view, the navbar is automatically toggled on so always viewable? I don't want this.
In the mobile view, I need the logo to remain where it is and the button to be aligned vertically central and to the right.
Thanks in advance!
Navbar.js:
import Navbar from 'react-bootstrap/Navbar';
import Nav from 'react-bootstrap/Nav';
import Button from 'react-bootstrap/Button';
import {
Link
} from 'react-router-dom';
class NavBar extends React.Component {
render() {
return (
<Navbar collapseOnSelect expand="lg" className="custom-nav-bg fixed-top">
<Navbar.Brand href="#home">
<Link to="/home"><img className="custom-nav-logo"
src="logohero.png"
alt="StatHero Logo"
width="105px"
height="50px"
/></Link>
</Navbar.Brand>
<Navbar.Toggle aria-controls="responsive-navbar-nav" className="navbar-toggler-css" />
<Navbar.Collapse id="responsive-navbar-nav">
<Nav className="align-nav">
<Nav.Link className="custom-nav-text" href="#about">
<Link to="/about">ABOUT</Link>
</Nav.Link>
<Nav.Link className="custom-nav-text" href="#stats">
<Link to="/stats">STATS</Link>
</Nav.Link>
<Nav.Link className="custom-nav-text" href="#faqs">
<Link to="/faq">FAQS</Link>
</Nav.Link>
<Nav.Link className="custom-nav-text" href="#contact">
<Link to="/contact">CONTACT</Link>
</Nav.Link>
<Nav.Link className="custom-nav-text" href="#signup">
<Link to="/signup"><Button className="custom-nav-button">SIGN UP</Button></Link>
</Nav.Link>
<Nav.Link className="custom-nav-text" href="#login">
<Link to="/login">LOGIN</Link>
</Nav.Link>
</Nav>
</Navbar.Collapse>
</Navbar>
)
}
}
export default NavBar;
Navbar CSS (For some context):
background-color: red ! important;
display: flex;
align-items: flex-end;
}
.align-nav {
display: flex;
align-content: flex-end;
}
.custom-nav-bg {
max-width: 100%;
padding-right: 50px;
padding-left: 60px;
border-radius: 0px;
background-color: #132A42;
}
.custom-nav-logo {
height: 100%;
}
a.custom-nav-text:hover {
color: #00DF8D ! important;
font-family: 'Assistant', sans-serif ! important;
}
a.custom-nav-button:hover {
color: #00DF8D ! important;
font-family: 'Assistant', sans-serif ! important;
}
.custom-nav-text {
max-width: 100%;
padding-top:10px ! important;
padding-right:20px ! important;
padding-bottom:10px ! important;
padding-left:20px ! important;
color: white ! important;
font-family: 'Assistant', sans-serif;
font-size: 20px;
font-weight: 600;
}
.custom-nav-button {
padding-right: 15px;
padding-left: 15px;
border-color: #00DF8D;
border-radius: 10px;
background-color: #00DF8D;
font-size: 20px;
font-weight: 600;
}
#media only screen and (max-width: 768px) {
.custom-nav-text {
max-width: 100%;
padding-top:10px ! important;
padding-right:10px ! important;
padding-bottom:10px ! important;
padding-left:10px ! important;
font-size: 15px;
}
.custom-nav-logo {
align-items: flex-start;
justify-content: flex-start;
}
.custom-nav-bg {
padding-left: 0px;
padding-right: 0px;
display: block;
}
}
#media only screen and (max-width: 768px) {
.custom-nav-button {
padding-right: 10px;
padding-left: 10px;
border-color: #00DF8D;
border-radius: 5px;
background-color: #00DF8D;
font-size: 15px;
}
}
This is the example from react-boostrap
import React from "react";
import{ Navbar, Nav, Button, NavDropdown} from "react-bootstrap";
class NavBar extends React.Component {
render() {
return (
<Navbar collapseOnSelect expand="lg" bg="dark" variant="dark">
<Navbar.Brand href="#home">React-Bootstrap</Navbar.Brand>
<Navbar.Toggle aria-controls="responsive-navbar-nav" />
<Navbar.Collapse id="responsive-navbar-nav">
<Nav className="mr-auto">
<Nav.Link href="#features">Features</Nav.Link>
<Nav.Link href="#pricing">Pricing</Nav.Link>
<NavDropdown title="Dropdown" id="collasible-nav-dropdown">
<NavDropdown.Item href="#action/3.1">Action</NavDropdown.Item>
<NavDropdown.Item href="#action/3.2">Another action</NavDropdown.Item>
<NavDropdown.Item href="#action/3.3">Something</NavDropdown.Item>
<NavDropdown.Divider />
<NavDropdown.Item href="#action/3.4">Separated link</NavDropdown.Item>
</NavDropdown>
</Nav>
<Nav>
<Nav.Link href="#deets">More deets</Nav.Link>
<Nav.Link eventKey={2} href="#memes">
Dank memes
</Nav.Link>
</Nav>
</Navbar.Collapse>
</Navbar>
);
}
}
export default NavBar;
check also the doc of react-boostrap for the responsive behaviours
https://react-bootstrap.github.io/components/navbar/#navbars-mobile-friendly
I would recommend you to keep align with bootstrap classes for alignment, without touching directly the css (you can do that, but try to use as much as possible their alignments). Have a look in the docs on how to position things.
I'm new to the web , but maybe so like this for the desktop version
import {Navbar,Nav} from 'react-bootstrap';
import '../styless/topBar.css';
import 'bootstrap/dist/css/bootstrap.min.css';
import logo from '../assets/logo.svg';
const Header = () => {
return(
<>
<Navbar collapseOnSelect variant='dark' expand="lg" >
<Navbar.Brand className='logo-app' >
<div class="container-fluid">
<img
src={logo}
width='30'
height='30'
className='d-inline-block align-top'
alt='logo'
/>
</div>
</Navbar.Brand>
<Navbar.Brand className='brand ' href='/'>
Header
</Navbar.Brand>
<Navbar.Toggle aria-controls="responsive-navbar-nav" className="navbar-toggler-css"/>
<Navbar.Collapse id="responsive-navbar-nav" className = "justify-content-end">
<Nav >
<Nav.Link href='/'>Home</Nav.Link>
<Nav.Link href='/articles'>Article</Nav.Link>
<Nav.Link href ='/about'>About Us</Nav.Link>
<span >
<a className="btn btn_nav btn-dark " href="/login">login</a>
</span>
</Nav>
</Navbar.Collapse>
</Navbar>
</>
)}
export default Header;
'''