expandable sections

mic_level
Matthew Huntington 3 years ago
parent 226b2c506e
commit d295eb45ca

@ -5,3 +5,6 @@ td,th {
th {
background:lightgrey;
}
h2 {
display:inline;
}

@ -23,40 +23,42 @@
</script>
<template>
<h2>Show Category</h2>
<select @change="change">
<option v-for="category in categories" v-bind:value="category.id">
{{category.instrument}}
:
{{category.category}}
</option>
</select>
<table>
<thead>
<tr>
<th>id</th>
<th>description</th>
<th>seconds</th>
<th>comments</th>
<th>created at</th>
<th>category id</th>
<th>category</th>
<th>instrument</th>
</tr>
</thead>
<tbody>
<tr v-for="session in categorySessions">
<td>{{session.id}}</td>
<td>{{session.description}}</td>
<td>{{session.seconds}}</td>
<td>{{session.comments}}</td>
<td>{{session.created_at}}</td>
<td>{{session.category_id}}</td>
<td>{{session.category}}</td>
<td>{{session.instrument}}</td>
<details>
<summary><h2>Show Category</h2></summary>
<select @change="change">
<option v-for="category in categories" v-bind:value="category.id">
{{category.instrument}}
:
{{category.category}}
</option>
</select>
<table>
<thead>
<tr>
<th>id</th>
<th>description</th>
<th>seconds</th>
<th>comments</th>
<th>created at</th>
<th>category id</th>
<th>category</th>
<th>instrument</th>
</tr>
</tbody>
</table>
</thead>
<tbody>
<tr v-for="session in categorySessions">
<td>{{session.id}}</td>
<td>{{session.description}}</td>
<td>{{session.seconds}}</td>
<td>{{session.comments}}</td>
<td>{{session.created_at}}</td>
<td>{{session.category_id}}</td>
<td>{{session.category}}</td>
<td>{{session.instrument}}</td>
</tr>
</tbody>
</table>
</details>
</template>
<style scoped>

@ -16,27 +16,29 @@
</script>
<template>
<h2>Summary</h2>
<table>
<thead>
<tr>
<th>category id</th>
<th>category</th>
<th>chunks practiced</th>
<th>instrument</th>
<th>weight</th>
</tr>
</thead>
<tbody>
<tr v-for="category in categories">
<td>{{category.category_id}}</td>
<td>{{category.category}}</td>
<td>{{category.chunks_practiced}}</td>
<td>{{category.instrument}}</td>
<td>{{category.weight}}</td>
</tr>
</tbody>
</table>
<details>
<summary><h2>Summary</h2></summary>
<table>
<thead>
<tr>
<th>category id</th>
<th>category</th>
<th>chunks practiced</th>
<th>instrument</th>
<th>weight</th>
</tr>
</thead>
<tbody>
<tr v-for="category in categories">
<td>{{category.category_id}}</td>
<td>{{category.category}}</td>
<td>{{category.chunks_practiced}}</td>
<td>{{category.instrument}}</td>
<td>{{category.weight}}</td>
</tr>
</tbody>
</table>
</details>
</template>
<style scoped>

Loading…
Cancel
Save