Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve expand button and styling #56

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 28 additions & 11 deletions fairtally/data/index.html.template
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,18 @@
<link href="https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900|Material+Icons" rel="stylesheet"
type="text/css">
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/quasar.prod.css" rel="stylesheet" type="text/css">
<style>
.q-table tbody td {
text-align: center;
font-size: x-large;
}
.q-table th {
font-size: large;
}
.q-table__sort-icon {
opacity: 1;
}
</style>
</head>

<body>
Expand All @@ -35,7 +47,6 @@

<template v-slot:header="props">
<q-tr :props="props">
<q-th auto-width></q-th>
<q-th
v-for="col in props.cols"
:key="col.name"
Expand All @@ -47,11 +58,8 @@
</template>

<template v-slot:body="props">
<q-tr :props="props">
<q-td auto-width>
<q-btn size="sm" color="accent" round dense @click="props.expand = !props.expand" :icon="props.expand ? 'remove' : 'add'"></q-btn>
</q-td>
<q-td>
<q-tr :props="props" style="text-align:middle;">
<q-td style="text-align: left; font-size: medium;">
<a :href="props.row.url" target="_blank">{{ props.row.url }}</a>
</q-td>
<q-td>
Expand All @@ -69,21 +77,24 @@
<q-td>
<compliance :status="props.row.checklist" />
</q-td>
<q-td>
<q-td style="font-size: medium;">
<span>{{ props.row.count }}</span>
</q-td>
<q-td>
<img :src="props.row.badge" alt="FAIR software badge"/>
</q-td>
<q-td v-show="props.row.stdout || props.row.stderr">
<q-btn size="sm" color="accent" round dense @click="props.expand = !props.expand" :icon="props.expand ? 'remove' : 'add'"></q-btn>
</q-td>
</q-tr>
<q-tr v-show="props.expand" :props="props">
<q-td colspan="100%">
<q-tr v-show="props.expand && (props.row.stdout || props.row.stderr)" :props="props">
<q-td colspan="100%" style="font-size: small;">
<div class="text-left">
<div>
<div v-show="props.row.stdout">
<span>Standard output:</span>
<pre>{{ props.row.stdout }}</pre>
</div>
<div>
<div v-show="props.row.stderr">
<span>Standard error:</span>
<pre>{{ props.row.stderr }}</pre>
</div>
Expand Down Expand Up @@ -159,6 +170,12 @@
label: 'badge',
field: 'badge',
align: 'center'
}, {
name: 'expand',
required: true,
label: '',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can log be used as text inside the header?

field: 'expand',
fdiblen marked this conversation as resolved.
Show resolved Hide resolved
align: 'center'
},
];
const rows = {{python inserts the data here}};
Expand Down