Skip to content
Snippets Groups Projects
Commit bd4e87e7 authored by Clayton, Brandon Scott's avatar Clayton, Brandon Scott
Browse files

cleanup

parent c571d38a
No related branches found
No related tags found
1 merge request!95Add lib directory
<html>
<head>
<link
rel="stylesheet"
href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">
<link rel="stylesheet" href="reports.css">
</head>
<body class="center">
<script src="https://d3js.org/d3.v4.min.js" charset="utf-8"></script>
<script type="module">
import { Reports } from './reports.js';
const links = [
{
text: 'Spotbugs Reports - src',
href: 'src'
},
{
text: 'Spotbugs Reports - test',
href: 'test'
}
];
Reports.createCard(links);
</script>
</body>
</html>
<html>
<head>
<link
rel="stylesheet"
href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">
<link rel="stylesheet" href="reports.css">
</head>
<body class="center">
<script src="https://d3js.org/d3.v4.min.js" charset="utf-8"></script>
<script type="module">
import { Reports } from './reports.js';
const links = [
{
text: 'Code Coverage Reports',
href: 'coverage'
},
{
text: 'Code Quality Reports',
href: 'quality'
},
{
text: 'Tests Reports',
href: 'tests'
}
];
Reports.createCard(links);
</script>
</body>
</html>
\ No newline at end of file
.center {
position: absolute;
top: 50%;
width: 100%;
transform: translate(0, -50%);
}
.card-margin {
margin: 20px;
}
.card {
background-color: #f0f0f0;
font-weight: bold;
}
export class Reports {
static createCard(links) {
d3.select('body')
.selectAll('div')
.data(links)
.enter()
.append('div')
.attr('class', 'card-margin')
.append('div')
.attr('class', 'card offset-4 col-4')
.append('a')
.attr('class', 'card-body text-decoration-none text-reset')
.attr('href', link => link.href)
.text(link => link.text);
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment