reactstrap#Jumbotron JavaScript Examples
The following examples show how to use
reactstrap#Jumbotron.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: Home.js From HexactaLabs-NetCore_React-Initial with Apache License 2.0 | 6 votes |
Home = () => {
return (
<Jumbotron fluid>
<Container fluid>
<h1 className="display-3">Bienvenidos!</h1>
<p className="lead">Esta es la página de HOME</p>
</Container>
</Jumbotron>
);
}
Example #2
Source File: index.js From hackchat-client with Do What The F*ck You Want To Public License | 6 votes |
export function NotFoundPage({ history }) {
return (
<div>
<Jumbotron fluid className="bg-dark text-center">
<Container fluid>
<h1 className="display-3">
<FormattedMessage
id={messages.header.id}
defaultMessage={messages.header.defaultMessage}
/>
</h1>
<p className="lead">¯\_(ツ)_/¯</p>
<Button onClick={() => history.push('/')} color="secondary">
<MdHome />
</Button>
</Container>
</Jumbotron>
</div>
);
}
Example #3
Source File: applicants.page.js From hiring-system with GNU General Public License v3.0 | 5 votes |
ApplicantsPage = () => {
return (
<div className="container mt-4 mb-4">
<Jumbotron fluid className="border-bottom rounded-top">
<Container fluid>
<h1 className="display-5">Applicants</h1>
<p className="lead float-right font-weight-bold">
<strong>Position</strong>: Senior Developer
</p>
</Container>
</Jumbotron>
<div>
<Row>
{/* Map through all the data */}
{listOfApplicants.map((applicant) => (
<Col sm="6 mt-4" key={applicant.id}>
<Card body>
<CardTitle>
<h3>{applicant.name}</h3>
<hr />
</CardTitle>
<CardText>
<Row className="mt-2">
<Col sm="6">
<strong>Email:</strong>
</Col>
<Col>{applicant.email}</Col>
</Row>
<Row className="mt-2">
<Col sm="6">
<strong>Contact:</strong>
</Col>
<Col>7{applicant.contact}</Col>
</Row>
<Row className="mt-2">
<Col sm="6">
<strong>Time Zone</strong>
</Col>
<Col>{applicant.timeZone}</Col>
</Row>
<Row className="mt-2">
<Col sm="6">
<strong>Availibility</strong>
</Col>
<Col>{applicant.availability}</Col>
</Row>
</CardText>
<ButtonToggle color="primary">View Resume</ButtonToggle>
</Card>
</Col>
))}
{/* end of data mapping */}
</Row>
</div>
</div>
);
}
Example #4
Source File: AddRoom.js From react-js-chat-webapp-example with MIT License | 5 votes |
function AddRoom() {
const history = useHistory();
const [room, setRoom] = useState({ roomname: '' });
const [showLoading, setShowLoading] = useState(false);
const ref = firebase.database().ref('rooms/');
const save = (e) => {
e.preventDefault();
setShowLoading(true);
ref.orderByChild('roomname').equalTo(room.roomname).once('value', snapshot => {
if (snapshot.exists()) {
return (
<div>
<Alert color="primary">
Room name already exist!
</Alert>
</div>
);
} else {
const newRoom = firebase.database().ref('rooms/').push();
newRoom.set(room);
history.goBack();
setShowLoading(false);
}
});
};
const onChange = (e) => {
e.persist();
setRoom({...room, [e.target.name]: e.target.value});
}
return (
<div>
{showLoading &&
<Spinner color="primary" />
}
<Jumbotron>
<h2>Please enter new Room</h2>
<Form onSubmit={save}>
<FormGroup>
<Label>Room Name</Label>
<Input type="text" name="roomname" id="roomname" placeholder="Enter Room Name" value={room.roomname} onChange={onChange} />
</FormGroup>
<Button variant="primary" type="submit">
Add
</Button>
</Form>
</Jumbotron>
</div>
);
}
Example #5
Source File: Login.js From react-js-chat-webapp-example with MIT License | 5 votes |
function Login() {
const history = useHistory();
const [creds, setCreds] = useState({ nickname: '' });
const [showLoading, setShowLoading] = useState(false);
const ref = firebase.database().ref('users/');
const login = (e) => {
e.preventDefault();
setShowLoading(true);
ref.orderByChild('nickname').equalTo(creds.nickname).once('value', snapshot => {
if (snapshot.exists()) {
localStorage.setItem('nickname', creds.nickname);
history.push('/roomlist');
setShowLoading(false);
} else {
const newUser = firebase.database().ref('users/').push();
newUser.set(creds);
localStorage.setItem('nickname', creds.nickname);
history.push('/roomlist');
setShowLoading(false);
}
});
};
const onChange = (e) => {
e.persist();
setCreds({...creds, [e.target.name]: e.target.value});
}
return (
<div>
{showLoading &&
<Spinner color="primary" />
}
<Jumbotron>
<Form onSubmit={login}>
<FormGroup>
<Label>Nickname</Label>
<Input type="text" name="nickname" id="nickname" placeholder="Enter Your Nickname" value={creds.nickname} onChange={onChange} />
</FormGroup>
<Button variant="primary" type="submit">
Login
</Button>
</Form>
</Jumbotron>
</div>
);
}
Example #6
Source File: index.js From gobench with Apache License 2.0 | 5 votes |
render() {
return (
<div>
<h5 className="mb-4">
<strong>Default Jumbotron</strong>
</h5>
<div className="mb-5">
<Jumbotron>
<h1 className="font-size-70">
<strong>Hello, world!</strong>
</h1>
<p className="lead">
This is a simple hero unit, a simple Jumbotron-style component for calling extra
attention to featured content or information.
</p>
<hr className="my-2" />
<p>
It uses utility classes for typography and spacing to space content out within the
larger container.
</p>
<p className="lead">
<Button color="primary">Learn More</Button>
</p>
</Jumbotron>
</div>
<h5 className="mb-4">
<strong>Fluid Jumbotron</strong>
</h5>
<Jumbotron fluid>
<Container fluid>
<h1 className="font-size-70">
<strong>Fluid jumbotron</strong>
</h1>
<p className="lead">
This is a modified jumbotron that occupies the entire horizontal space of its parent.
</p>
</Container>
</Jumbotron>
</div>
)
}
Example #7
Source File: Jumbotrons.js From id.co.moonlay-eworkplace-admin-web with MIT License | 5 votes |
render() {
return (
<div className="animated fadeIn">
<Row>
<Col>
<Card>
<CardHeader>
<i className="fa fa-align-justify"></i><strong>Jumbotron</strong>
<div className="card-header-actions">
<a href="https://reactstrap.github.io/components/jumbotron/" rel="noreferrer noopener" target="_blank" className="card-header-action">
<small className="text-muted">docs</small>
</a>
</div>
</CardHeader>
<CardBody>
<Jumbotron>
<h1 className="display-3">Hello, world!</h1>
<p className="lead">This is a simple hero unit, a simple Jumbotron-style component for calling extra
attention to featured content or information.</p>
<hr className="my-2" />
<p>It uses utility classes for typgraphy and spacing to space content out within the larger container.</p>
<p className="lead">
<Button color="primary">Learn More</Button>
</p>
</Jumbotron>
</CardBody>
</Card>
</Col>
<Col>
<Card>
<CardHeader>
<i className="fa fa-align-justify"></i><strong>Jumbotron</strong>
<small> fluid</small>
</CardHeader>
<CardBody>
<Jumbotron fluid>
<Container fluid>
<h1 className="display-3">Fluid jumbotron</h1>
<p className="lead">This is a modified jumbotron that occupies the entire horizontal space of its parent.</p>
</Container>
</Jumbotron>
</CardBody>
</Card>
</Col>
</Row>
</div>
);
}
Example #8
Source File: help.js From hivemind with Apache License 2.0 | 4 votes |
Page = () => (
<Row>
<Col
xs="auto"
md={3}
tabIndex="1"
style={{ height: '90vh', overflowY: 'scroll' }}
>
<h3>Navigation</h3>
<Nav vertical id={'nav'} className={'navbar-light bg-light'}>
<NavLink href="#intro">Introduction</NavLink>
<NavLink href="#at-a-glance">At a Glance</NavLink>
<Nav vertical>
<NavLink href="#key-points" className={'ml-3'}>
Key Points
</NavLink>
</Nav>
<NavLink href="#quick-start">Quick Start</NavLink>
<Nav vertical>
<NavLink href="#logging-in" className={'ml-3'}>
Logging In
</NavLink>
<NavLink href="#create-mind-map" className={'ml-3'}>
Creating a mind map
</NavLink>
<NavLink href="#create-child-node" className={'ml-3'}>
Creating a (child) node
</NavLink>
<NavLink href="#delete-node" className={'ml-3'}>
Deleting a node
</NavLink>
<NavLink href="#edit-node" className={'ml-3'}>
Editing a node
</NavLink>
<NavLink href="#view-node" className={'ml-3'}>
Viewing a node
</NavLink>
<NavLink href="#hide-node" className={'ml-3'}>
Hiding a node
</NavLink>
<NavLink href="#reveal-node" className={'ml-3'}>
Revealing (Un-hiding) a node (sub-tree)
</NavLink>
<NavLink href="#time-travel" className={'ml-3'}>
Time travel
</NavLink>
<Nav vertical>
<NavLink href="#timeline" className={'ml-5'}>
Using the Timeline
</NavLink>
<NavLink href="#playback" className={'ml-5'}>
Using the Playback Buttons
</NavLink>
</Nav>
<NavLink href="#search" className={'ml-3'}>
Searching
</NavLink>
<NavLink href="#rename" className={'ml-3'}>
Renaming a mind map
</NavLink>
<NavLink href="#fit" className={'ml-3'}>
Fit on canvas
</NavLink>
<NavLink href="#show-all" className={'ml-3'}>
Show All
</NavLink>
</Nav>
</Nav>
</Col>
<Col
xs="auto"
md={9}
tabIndex="0"
style={{ height: '90vh', overflowY: 'scroll' }}
>
<Jumbotron>
<h1 id={'intro'}>Introduction</h1>
<p>
Hivemind is a free tool that lets you create mind maps in your
browser. It supports time-travel (through the change history of the
mind map), tagging specific time points (
<Badge color="secondary">Planned</Badge>) and collaborative editing (
<Badge color="secondary">Planned</Badge>).
</p>
<h1 id={'at-a-glance'}>At a Glance</h1>
<p>
Each mind map is modelled as a tree, ie. it has a single root node,
and all other nodes are descendants of this root node through a single
hierarchy. There are no cases of multiple parents, cycles, loops
(self-joining edges), parallel edges or orphaned nodes.
</p>
<CollapsibleExample>
<Card className={'mb-4'}>
<CardImg
top
width="100%"
src="/img/help/Screenshot_2021-03-28 Hivemind.png"
alt="Example Mind Map"
/>
<CardBody>
<CardTitle tag="h5">An example mind map</CardTitle>
<CardSubtitle tag="h6" className="mb-2 text-muted">
Tree structure with a single root node.
</CardSubtitle>
<CardText>
This tree is 3 levels deep. Each node can have one or more
children, but exactly one parent (except the root node, which
has none). The timeline at the bottom shows at what points this
mind map was modified.
</CardText>
</CardBody>
</Card>
</CollapsibleExample>
<p>
Each node in the mindmap is a container for information. There is a
title, a summary and a content field. This node is connected to
exactly one parent by an edge (except when it is the root node), and
can optionally have one or mode child nodes. The edges themselves do
not carry any information at present, other than which nodes they
connect.
</p>
<CollapsibleExample>
<Card className={'mb-4'}>
<CardImg
top
width="100%"
src="/img/help/Screenshot_2021-03-28-1 Hivemind.png"
alt="Node Details"
/>
<CardBody>
<CardTitle tag="h5">Expanded view of a node</CardTitle>
<CardSubtitle tag="h6" className="mb-2 text-muted">
Accessed by a context menu upon clicking the node.
</CardSubtitle>
<CardText>
Apart from the title, summary and content, a few other bits of
information are displayed, like who created/last updated the
node, and where the node sits in the overall hierarchy.
</CardText>
</CardBody>
</Card>
</CollapsibleExample>
<h2 id={'key-points'}>Key Points</h2>
<p>
Every write operation that is performed on a node
(create/update/delete) is recorded permanently in a time-travelling
database, allowing for point-in-time lookups of any historic version
of a single node or the graph as a whole.
</p>
<ol>
<li>
The root node is special - it cannot be deleted, and is the only
node without a parent.
</li>
<li className={'text-danger'}>
Whenever a node is deleted, the entire subtree under it is also
deleted in order to ensure there are no orphaned nodes.
</li>
<li>
Only users with edit or admin access can perform write operations on
the tree.
</li>
<li>
<Badge color="secondary">Planned</Badge> A user with admin access
can additionally share the mindmap with other users (by
granting/revoking read/write/admin access) or make it publicly
(in)visible (read-only).
</li>
<li>
<Badge color="secondary">Planned</Badge> Only an admin user can
delete a mind map.
</li>
<li className={'text-danger'}>
Access control is <strong>NOT</strong> modelled temporally, ie. if
your access to a mind map is revoked, you lose access to ALL its
history, not just from the time of revocation. Conversely, if you
are granted access to a mind map, you gain access to its{' '}
<strong>ENTIRE</strong> history, not just from now onwards.
</li>
</ol>
<h1 id={'quick-start'}>Quick Start</h1>
<h2 id={'logging-in'}>Logging in</h2>
<CollapsibleExample>
<Card className={'mb-4'}>
<CardImg
top
width="100%"
src="/img/help/Screenshot_2021-03-28-2 Hivemind.png"
alt="Login Prompt"
/>
<CardBody>
<CardTitle tag="h5">Login Prompt</CardTitle>
<CardSubtitle tag="h6" className="mb-2 text-muted">
Login via email or an external authentication provider.
</CardSubtitle>
<CardText>
Anonymous users must first login to start creating mind maps.
</CardText>
</CardBody>
</Card>
</CollapsibleExample>
<ul>
<li>
Go the the Hivemind{' '}
<Link href={'/'}>
<a>home</a>
</Link>{' '}
page.
</li>
<li>
If you're not logged in, you'll see a login prompt as shown in the
example above.
</li>
<li>
Use an email (that you own) or one of the other providers (currently
Google, GitHub) to sign in.
</li>
<li>
If you're signing in for the first time, you'll have to perform a
few extra steps, either to set your password, or to authorize
Hivemind with the external provider.
</li>
<li>
Once you've signed in, you'll be redirected to the list of mind maps
that you own.
</li>
</ul>
<h2 id={'create-mind-map'}>Creating a mind map</h2>
<CollapsibleExample>
<Card className={'mb-4'}>
<CardImg
top
width="100%"
src="/img/help/Screenshot_2021-03-28-3 Hivemind.png"
alt="Login Prompt"
/>
<CardBody>
<CardTitle tag="h5">Create a Mind Map</CardTitle>
<CardSubtitle tag="h6" className="mb-2 text-muted">
Accessed from the mind maps{' '}
<Link href={'/mmaps'}>
<a>list</a>
</Link>{' '}
page.
</CardSubtitle>
<CardText>
Click on the{' '}
<Button color="success" size="sm" id="create">
<Plus /> Create
</Button>{' '}
button. Then just type a name and hit ⏎.
</CardText>
</CardBody>
</Card>
</CollapsibleExample>
<ul>
<li>
Go to the mind maps{' '}
<Link href={'/mmaps'}>
<a>list</a>
</Link>{' '}
page.
</li>
<li>
Click on the{' '}
<Button color="success" size="sm" id="create">
<Plus /> Create
</Button>{' '}
button.
</li>
<li>Type a name and hit ⏎ (<Enter>).</li>
<li>
<strong>
The first node in the mind map will inherit its title from the
mind map's name.
</strong>
</li>
</ul>
<h2 id={'create-child-node'}>Creating a (child) node</h2>
<p>
Each node (except the root node) is a child of exactly one other node.
While the root node is automatically created for you when you create
the mind map, every other node must be created as a descendant of the
root node by accessing a context menu within the mind map canvas (the
black area). This context menu is available on all nodes, but its
contents could vary depending on a number of factors. The ‘create
child’ option is available, provided:
</p>
<ol>
<li>The user has ‘admin’ or ‘write’ access to the mind map, and</li>
<li>
The mind map is being viewed in ‘write’ mode (i.e., not in ‘lookback
mode’ - to be discussed later).
</li>
</ol>
<CollapsibleExample>
<CreateChildCarousel />
</CollapsibleExample>
<ul>
<li>Click on the node under which you wish to create the child.</li>
<li>
Select the ‘<Plus /> Child’ option.
</li>
<li>Type a name and hit ⏎ (<Enter>).</li>
<li>The new node will show up under the node selected above.</li>
</ul>
<h2 id={'delete-node'}>Deleting a node</h2>
<p>
All nodes (except the root node) can be deleted. Upon deletion, the
entire sub-tree under the deleted node is also deleted. The ‘delete
node’ option is available, provided:
</p>
<ol>
<li>The user has ‘admin’ or ‘write’ access to the mind map,</li>
<li>
The mind map is being viewed in ‘write’ mode (i.e., not in ‘lookback
mode’ - to be discussed later), and
</li>
<li>The node is not the root node.</li>
</ol>
<CollapsibleExample>
<Card className={'mb-4'}>
<CardImg
top
width="100%"
src="/img/help/Screenshot_2021-03-28-6 Hivemind.png"
alt="Delete a node"
/>
<CardBody>
<CardTitle tag="h5">Delete a Node</CardTitle>
<CardSubtitle tag="h6" className="mb-2 text-muted">
Accessed by clicking on the ‘<Trash2 /> Del’ option from the
context menu.
</CardSubtitle>
<CardText>
Confirm delete operation to get rid of the node (and all of its
descendants, if present).
</CardText>
</CardBody>
</Card>
</CollapsibleExample>
<ul>
<li>Click on the node that you would like to remove.</li>
<li>
Select the ‘<Trash2 /> Del’ option.
</li>
<li>
Confirm that you want to delete the node by clicking the{' '}
<Button size="sm" color="danger">
<Trash2 /> Delete
</Button>{' '}
button.
</li>
</ul>
<h2 id={'edit-node'}>Editing a node</h2>
<p>
All nodes can be edited. The ‘edit node’ option is available,
provided:
</p>
<ol>
<li>The user has ‘admin’ or ‘write’ access to the mind map, and</li>
<li>
The mind map is being viewed in ‘write’ mode (i.e., not in ‘lookback
mode’ - to be discussed later).
</li>
</ol>
<CollapsibleExample>
<Card className={'mb-4'}>
<CardImg
top
width="100%"
src="/img/help/Screenshot_2021-03-28-7 Hivemind.png"
alt="Edit a node"
/>
<CardBody>
<CardTitle tag="h5">Edit a Node</CardTitle>
<CardSubtitle tag="h6" className="mb-2 text-muted">
Accessed by clicking on the ‘<Edit3 /> Edit’ option from the
context menu.
</CardSubtitle>
<CardText>
Edit one or more of the ‘title’, ‘summary’ and ‘content’ fields,
and click the{' '}
<Button color="primary" size="sm">
<Save /> Save
</Button>{' '}
button.
</CardText>
</CardBody>
</Card>
</CollapsibleExample>
<ul>
<li>Click on the node that you would like to edit.</li>
<li>
Select the ‘<Edit3 /> Edit’ option.
</li>
<li>
The popup screen will appear with a title, summary and content of
the node.
</li>
<li>
Modify one or more of the attributes as required as click on
<Button color="primary" size="sm">
<Save /> Save
</Button>
.
</li>
</ul>
<h2 id={'view-node'}>Viewing a node</h2>
<CollapsibleExample>
<Card className={'mb-4'}>
<CardImg
top
width="100%"
src="/img/help/Screenshot_2021-03-28-1 Hivemind.png"
alt="View a node"
/>
<CardBody>
<CardTitle tag="h5">View a Node</CardTitle>
<CardSubtitle tag="h6" className="mb-2 text-muted">
Accessed by clicking on the ‘<Eye /> View’ option from the
context menu.
</CardSubtitle>
<CardText>
View the title, summary and content of the node. Also shows its
position in the hierarchy and who created/last updated it.
</CardText>
</CardBody>
</Card>
</CollapsibleExample>
<ul>
<li>Click on the node that you would like to view.</li>
<li>
Select the ‘<Eye /> View’ option.
</li>
<li>
The popup screen will appear with a title, summary and content of
the node.
</li>
</ul>
<h2 id={'hide-node'}>Hiding a node</h2>
<p>
Each node (except the root node) has an option to be hidden from
display on the canvas. This can be useful to temporarily remove
clutter when a large number of nodes are on display. Upon hiding, the
entire sub-tree under the node is also hidden. To indicate that a node
was hidden, its parent is marked in a grey/black shaded background.
The hidden node (and all its descendants) can be revealed using a menu
option under its parent.
</p>
<CollapsibleExample>
<HideCarousel />
</CollapsibleExample>
<ul>
<li>Click on the node which you wish to hide.</li>
<li>
Select the ‘<EyeOff /> Hide’ option.
</li>
<li>
Hides the entire sub-tree under this node (as well as the node
itself).
</li>
<li>Shades the parent to indicate hidden children.</li>
</ul>
<h2 id={'reveal-node'}>Revealing (Un-hiding) a node (sub-tree)</h2>
<p>
A hidden node (and its descendants) is indicated by a shaded
background on its parent. To reveal its sub-tree and render them back
onto the canvas, a menu option is added to the parent (only for
parents with hidden children). Clicking on this reveals (un-hides) the{' '}
<strong>entire sub-tree under the parent</strong>.
</p>
<CollapsibleExample>
<RevealCarousel />
</CollapsibleExample>
<ul>
<li>Click on the (shaded) node whose children you wish to reveal.</li>
<li>
Select the ‘<Eye /><ArrowDownRight /> Reveal’ option.
</li>
<li>
Reveals the <strong>entire sub-tree under this node</strong>.
</li>
<li>Un-shades the node to indicate no hidden children.</li>
</ul>
<h2 id={'time-travel'}>Time travel</h2>
<p>
Hivemind can <strong>time-travel</strong>. What this means is, as you
keep changing the mindmap through create/edit/delete operations,
Hivemind keeps track of all these changes and retains a history of all
the revisions of the mind map as a whole. This gives users of Hivemind
the unique ability to rewind back to any point in time through the
history of the mind map, and view it as it was at that time. This is
achieved either by using the timeline component (below the canvas) or
the playback buttons (in the menu bar above the canvas). See the image
below.
</p>
<CollapsibleExample>
<Card className={'mb-4'}>
<CardImg
top
width="100%"
src="/img/help/Screenshot_2021-03-28-10 Hivemind.png"
alt="Time Travel Controls"
/>
<CardBody>
<CardTitle tag="h5">Time Travel</CardTitle>
<CardSubtitle tag="h6" className="mb-2 text-muted">
Use the playback buttons or the timeline.
</CardSubtitle>
<CardText>
Travel back/forth through the history of changes to the mind
map, and view it as it was at any point in time through its
lifecycle.
</CardText>
</CardBody>
</Card>
</CollapsibleExample>
<p>
Whenever the user travels through time to look back at a historical
version of the mind map, it is said to be in{' '}
<strong>‘lookback mode’</strong>, and all modifications are disabled
(since its history is treated as immutable). This is indicated in
three ways:
</p>
<ol>
<li>
A <code>timestamp</code> query parameter in the URL, which also
serves as a permalink to this point-in-time version of the mind map,
</li>
<li>
A button at the top right of the menu bar, which shows a{' '}
<span className={'text-secondary'}>
<Lock />
</span>{' '}
symbol (otherwise showing a{' '}
<span className={'text-danger'}>
<Unlock />
</span>{' '}
symbol when in ‘write mode’),
</li>
<li>
A grey border around the canvas (which is otherwise red in ‘write
mode’).
</li>
</ol>
<p>
<strong>
While the mind map is in ‘lookback mode’, it cannot be edited.
</strong>
</p>
<h3 id={'timeline'}>Using the Timeline</h3>
<p>
The timeline is the component displayed at the bottom of the mind map
canvas, that shows a time series of write events that took place on
the mind map, in chronological order. It has the following properties:
</p>
<ol>
<li>
The timeline can zoom in and out. This is manually achieved by
scrolling while the cursor is on the timeline (or using pinch zoom
on a touchscreen).
</li>
<li>
When fully zoomed out, the timeline fits all events of the mind map.
It cannot be zoomed out beyond the boundaries defined by the first
and the last events of the mind map.
</li>
<li>When fully zoomed in, it has a resolution of 1 minute.</li>
<li>
Events are color-coded to depict their type. A ‘create’ event is{' '}
<span className={'text-success'}>green</span>, an ‘update’ event is{' '}
<span className={'text-primary'}>blue</span> and a ‘delete’ event is{' '}
<span className={'text-danger'}>red</span>.
</li>
<li>
When two or more events get too close together on the timeline to be
clearly rendered (ie. they start overlapping), they are clubbed
together in a ‘cluster’, with a number showing the number of events
in that cluster.
</li>
<li>
A cluster can be expanded to fill the timeline by double-clicking on
it.
</li>
<li>
Double-clicking an empty portion of the timeline will cause it to
zoom out fully.
</li>
</ol>
<p>
Open the example below for a step-by-step guide how to use the
timeline.
</p>
<p>
<strong>
Any jump triggered on the timeline automatically puts the mind map
in ‘lookback mode’.
</strong>
It can be put back into ‘write mode’ by clicking on the{' '}
<Button outline color="secondary" size={'sm'}>
<Lock />
</Button>{' '}
button at the top right in the menu bar.
</p>
<CollapsibleExample>
<TimelineCarousel />
</CollapsibleExample>
<h3 id={'playback'}>Using the Playback Buttons</h3>
<p>
The playback buttons at the top menu bar should be fairly easy to
understand and use. They look and work similar to an audio player -
only that in this case, the buttons are used to jump between events on
the timeline, rather than between items in a playlist.
</p>
<ol>
<li>
The{' '}
<Button outline color="secondary" size={'sm'}>
<SkipBack />
</Button>{' '}
button takes you directly to the first event of the timeline.
</li>
<li>
The{' '}
<Button outline color="secondary" size={'sm'}>
<Rewind />
</Button>{' '}
button takes you to the previous event from the current event on the
timeline. If you are currently in ‘write mode’ then this takes you
to the last event.
</li>
<li>
The{' '}
<Button outline color="secondary" size={'sm'}>
<FastForward />
</Button>{' '}
button takes you to the next event from the current event on the
timeline. If you are currently in ‘write mode’ then this takes you
to the last event.
</li>
<li>
The{' '}
<Button outline color="secondary" size={'sm'}>
<SkipForward />
</Button>{' '}
button takes you directly to the last event of the timeline.
</li>
</ol>
<p>
<strong>
Any action on the playback buttons automatically puts the mind map
in ‘lookback mode’.
</strong>
It can be put back into ‘write mode’ by clicking on the{' '}
<Button outline color="secondary" size={'sm'}>
<Lock />
</Button>{' '}
button at the top right in the menu bar.
</p>
<h2 id={'search'}>Searching</h2>
<CollapsibleExample>
<Card className={'mb-4'}>
<CardImg
top
width="100%"
src="/img/help/Screenshot_2021-03-28-16 Hivemind.png"
alt="Search"
/>
<CardBody>
<CardTitle tag="h5">Search</CardTitle>
<CardSubtitle tag="h6" className="mb-2 text-muted">
Search for nodes on canvas.
</CardSubtitle>
<CardText>
Use one or more filters/sort to locate a particular node of your
interest. Clicking on a row will make the canvas zoom in one the
node corresponding to that row.
</CardText>
</CardBody>
</Card>
</CollapsibleExample>
<ul>
<li>
Click on the{' '}
<Button outline color="secondary" size={'sm'}>
<Search />
</Button>{' '}
button in the top menu bar.
</li>
<li>
Enter your filter criteria or sort the columns in
ascending/descending order.
</li>
<li>
If a node that matches all filter critera exists, you should see it
in the list.
</li>
<li>
Click on the node if you would like to navigate to it in the canvas.
</li>
</ul>
<h2 id={'rename'}>Renaming a mind map</h2>
<p>
The mind map can be renamed when in ‘write mode’. This is true when:
</p>
<ol>
<li>The user has ‘admin’ or ‘write’ access to the mind map, and</li>
<li>
The mind map is being viewed in ‘write’ mode (i.e., not in ‘lookback
mode’ - as discussed earlier).
</li>
</ol>
<CollapsibleExample>
<Card className={'mb-4'}>
<CardImg
top
width="100%"
src="/img/help/Screenshot_2021-03-28-17 Hivemind.png"
alt="Rename"
/>
<CardBody>
<CardTitle tag="h5">Rename</CardTitle>
<CardSubtitle tag="h6" className="mb-2 text-muted">
Rename the mind map.
</CardSubtitle>
<CardText>
Click on the{' '}
<Button outline color="primary" size={'sm'}>
<Edit3 />
</Button>{' '}
button. Enter the new name and hit{' '}
<Button color="primary" size="sm">
<Save /> Save
</Button>
.
</CardText>
</CardBody>
</Card>
</CollapsibleExample>
<ul>
<li>
Click on the{' '}
<Button outline color="primary" size={'sm'}>
<Edit3 />
</Button>{' '}
button.
</li>
<li>This button can be found in the menu bar.</li>
<li>Modify the name as required and hit ⏎ (<Enter>).</li>
</ul>
<h2 id={'fit'}>Fit on canvas</h2>
<p>
If the mind map does not optimally fit in the canvas, either because
you played around with the canvas zoom or moved a few nodes around, or
just hid/revealed a bunch of nodes, you can force them to optimally
fit by clicking on the{' '}
<Button outline color="secondary" size={'sm'}>
<Maximize />
</Button>{' '}
button in the top menu bar.
</p>
<CollapsibleExample>
<FitCarousel />
</CollapsibleExample>
<h2 id={'show-all'}>Show All</h2>
<p>
If several sub-trees were hidden on the canvas, it can get tedious to
reveal them all by navigating to their parents one-by-one. For such
cases a quick shortcut is to click on the{' '}
<Button outline color="secondary" size={'sm'}>
<Eye />
</Button>{' '}
button in the top menu bar. This causes the canvas to immediately
reveal all hidden sub-trees and also re-run the layout if necessary.
</p>
<CollapsibleExample>
<ShowCarousel />
</CollapsibleExample>
</Jumbotron>
</Col>
</Row>
)
Example #9
Source File: RoomList.js From react-js-chat-webapp-example with MIT License | 4 votes |
function RoomList() {
const [room, setRoom] = useState([]);
const [showLoading, setShowLoading] = useState(true);
const [nickname, setNickname] = useState('');
const history = useHistory();
useEffect(() => {
const fetchData = async () => {
setNickname(localStorage.getItem('nickname'));
firebase.database().ref('rooms/').on('value', resp => {
setRoom([]);
setRoom(snapshotToArray(resp));
setShowLoading(false);
});
};
fetchData();
}, []);
const snapshotToArray = (snapshot) => {
const returnArr = [];
snapshot.forEach((childSnapshot) => {
const item = childSnapshot.val();
item.key = childSnapshot.key;
returnArr.push(item);
});
return returnArr;
}
const enterChatRoom = (roomname) => {
const chat = { roomname: '', nickname: '', message: '', date: '', type: '' };
chat.roomname = roomname;
chat.nickname = nickname;
chat.date = Moment(new Date()).format('DD/MM/YYYY HH:mm:ss');
chat.message = `${nickname} enter the room`;
chat.type = 'join';
const newMessage = firebase.database().ref('chats/').push();
newMessage.set(chat);
firebase.database().ref('roomusers/').orderByChild('roomname').equalTo(roomname).on('value', (resp) => {
let roomuser = [];
roomuser = snapshotToArray(resp);
const user = roomuser.find(x => x.nickname === nickname);
if (user !== undefined) {
const userRef = firebase.database().ref('roomusers/' + user.key);
userRef.update({status: 'online'});
} else {
const newroomuser = { roomname: '', nickname: '', status: '' };
newroomuser.roomname = roomname;
newroomuser.nickname = nickname;
newroomuser.status = 'online';
const newRoomUser = firebase.database().ref('roomusers/').push();
newRoomUser.set(newroomuser);
}
});
history.push('/chatroom/' + roomname);
}
const logout = () => {
localStorage.removeItem('nickname');
history.push('/login');
}
return (
<div>
{showLoading &&
<Spinner color="primary" />
}
<Jumbotron>
<h3>{nickname} <Button onClick={() => { logout() }}>Logout</Button></h3>
<h2>Room List</h2>
<div>
<Link to="/addroom">Add Room</Link>
</div>
<ListGroup>
{room.map((item, idx) => (
<ListGroupItem key={idx} action onClick={() => { enterChatRoom(item.roomname) }}>{item.roomname}</ListGroupItem>
))}
</ListGroup>
</Jumbotron>
</div>
);
}