Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
E
ESAP GUI
Manage
Activity
Members
Labels
Plan
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ASTRON SDC
ESCAPE WP5
ESAP GUI
Commits
3caa6e02
Commit
3caa6e02
authored
4 years ago
by
Zheng Meyer
Browse files
Options
Downloads
Patches
Plain Diff
use container instead of cards for a different layout
parent
25c8c6fe
No related branches found
Branches containing commit
No related tags found
1 merge request
!5
Esap gui dev
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/components/archives/ArchiveCard.js
+12
-9
12 additions, 9 deletions
src/components/archives/ArchiveCard.js
src/components/archives/Archives.js
+6
-4
6 additions, 4 deletions
src/components/archives/Archives.js
with
18 additions
and
13 deletions
src/components/archives/ArchiveCard.js
+
12
−
9
View file @
3caa6e02
...
...
@@ -5,12 +5,10 @@ import { NavLink } from "react-router-dom";
// display a single archive on a card
export
default
function
ArchiveCard
({
archive
})
{
return
(
<
Card
className
=
"
card-description
"
>
<
Card
>
<
Card
.
Body
>
<
Card
.
Title
className
=
"
h2
"
>
{
archive
.
name
}
<
/Card.Title
>
<
Container
fluid
>
<
Row
>
<
Card
className
=
"
card-description
"
>
<
Card
className
=
"
card-description
"
>
<
Card
.
Body
>
<
Image
className
=
"
mx-auto d-block
"
...
...
@@ -21,19 +19,24 @@ export default function ArchiveCard({ archive }) {
<
Card
.
Title
className
=
"
h3 pt-3
"
>
{
archive
.
short_description
}
<
/Card.Title
>
<
Card
.
Text
className
=
"
text-justify
"
>
{
archive
.
long_description
}
<
/Card.Text
>
<
/Card.Body
>
<
/Card
>
{
/* <Container fluid>
<Row>
</Card>
</Row>
<Row className="p-2">
<
Button
className
=
"
mx-auto
"
</Row>
</Container> */
}
<
Button
className
=
"
mt-3
"
as
=
{
NavLink
}
variant
=
"
outline-info
"
to
=
{
`/archives/
${
archive
.
uri
}
`
}
>
Visit
{
archive
.
name
}
Archives
<
/Button
>
<
/Row
>
<
/Container
>
<
/Button
>
<
/Card.Body
>
<
/Card
>
);
...
...
This diff is collapsed.
Click to expand it.
src/components/archives/Archives.js
+
6
−
4
View file @
3caa6e02
import
React
,
{
useContext
}
from
"
react
"
;
import
{
C
ardColumns
}
from
"
react-bootstrap
"
;
import
{
C
ontainer
,
Row
,
Col
}
from
"
react-bootstrap
"
;
import
ArchiveCard
from
"
./ArchiveCard
"
;
import
{
GlobalContext
}
from
"
../../contexts/GlobalContext
"
;
...
...
@@ -9,11 +9,13 @@ export function Archives() {
console
.
log
(
"
archives:
"
,
{
archives
});
return
(
<
CardColumns
className
=
"
row-2
"
>
<
Container
fluid
>
<
Row
>
{
archives
.
map
((
archive
)
=>
{
let
key
=
"
archive-
"
+
archive
.
id
;
return
<
ArchiveCard
key
=
{
key
}
archive
=
{
archive
}
/>
;
return
<
Col
>
<
ArchiveCard
key
=
{
key
}
archive
=
{
archive
}
/>
</
Col
>
;
})}
<
/CardColumns
>
<
/Row
>
<
/Container
>
);
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment