Skip to content

Commit ad4c7f7

Browse files
committed
style head
1 parent e5af48a commit ad4c7f7

File tree

2 files changed

+40
-18
lines changed

2 files changed

+40
-18
lines changed

src/WorkScreen.vue

Lines changed: 38 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,36 @@
11
<template>
2-
<div class="grid app-grid-template h-screen">
3-
<div style="grid-area: head; background-color: red">
4-
<h1>
5-
Gist User Script Manager
6-
</h1>
7-
<AutoLogin/>
2+
<div class="app-grid-template h-screen max-h-full overflow-y-hidden">
3+
<div style="grid-area: head;" class="header-grid-template">
4+
<div style="grid-area: content;" class="flex flex-col">
5+
<h1>
6+
Gist User Script Manager
7+
</h1>
8+
<div class="self-end">
9+
<AutoLogin/>
10+
</div>
11+
</div>
12+
<div style="grid-area: divider;">
13+
<div class="w-full h-px border-gray-400 border-t border-solid">&nbsp;</div>
14+
</div>
815
</div>
9-
<div style="grid-area: nav;" class="nav-grid-template">
10-
<button @click="listQuery" class="w-full mt-2 flex mr-3">
16+
<div style="grid-area: nav;" class="nav-grid-template h-full">
17+
<button @click="listQuery" class="mt-2 flex mr-3" style="width: calc(100% - 8px)">
1118
<fa type="fab" icon="github" class="h-4 mr-2"/>
1219
refresh
1320
</button>
14-
<input type="text" v-model="filter" class="form-input w-full mt-2 mr-3"/>
21+
<div class="flex" style="width: calc(100% - 8px)">
22+
<input type="text" v-model="filter" class="form-input mt-2 mr-3 flex-grow w-full"/>
23+
<fa icon="filter" class="h-4 self-center"/>
24+
</div>
1525
<div class="overflow-y-auto w-full mt-2 h-full h-full">
16-
<div v-for="entry in gistEntries" :key="entry.id" class="flex flex-wrap w-full mt-2">
26+
<div v-for="entry in filteredGistEntries" :key="entry.id" class="flex flex-wrap w-full mt-2">
1727
<a @click="code = entry.code" class="w-full cursor-pointer mr-2">{{ entry.name }}</a>
1828
<div class="w-full h-px border-gray-400 border-t border-solid mt-1 mr-2">&nbsp;</div>
1929
</div>
2030
</div>
2131
</div>
2232
<div style="grid-area: main; background-color: yellow">
23-
<MonacoEditor :code="code" style="height: calc(100% - 50px)"/>
33+
<MonacoEditor :code="code" class="h-full"/>
2434
</div>
2535
</div>
2636
</template>
@@ -29,7 +39,8 @@
2939
import {List} from "@/__gen_gql/List";
3040
import listGql from "@/List.gql";
3141
import {useGraphQlClient} from "@/useGraphQlClient";
32-
import {onMounted, ref} from "vue";
42+
import {onMounted, ref, computed} from "vue";
43+
3344
export {default as AutoLogin} from './AutoLogin';
3445
export {default as MonacoEditor} from './MonacoEditor';
3546
@@ -54,6 +65,8 @@ export const code = ref<string>("");
5465
5566
export const filter = ref<string>("");
5667
68+
export const filteredGistEntries = computed(() => gistEntries.value.filter(({name}) => filter.value === '' || name.toLowerCase().includes(filter.value.toLowerCase())));
69+
5770
onMounted(() => {
5871
listQuery();
5972
});
@@ -62,23 +75,32 @@ onMounted(() => {
6275

6376
<style scoped>
6477
.app-grid-template {
78+
display: grid;
6579
grid-template-areas:
6680
"head head head"
6781
". nav main";
6882
grid-template-rows: 70px minmax(0, 1fr);
6983
grid-template-columns: 8px 160px 1fr;
70-
height: 100vh;
71-
max-height: 100%;
72-
overflow-y: hidden;
7384
}
85+
86+
.header-grid-template {
87+
display: grid;
88+
grid-template-areas:
89+
". . ."
90+
". content ."
91+
". . ."
92+
"divider divider divider";
93+
grid-template-columns: 8px 1fr 8px;
94+
grid-template-rows: 8px auto 1fr 1px;
95+
}
96+
7497
.nav-grid-template {
7598
display: grid;
7699
grid-template-areas:
77100
"button"
78101
"filter"
79102
"result";
80103
grid-template-rows: auto auto 1fr;
81-
height: 100%;
82104
}
83105
</style>
84106

tailwind.config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ module.exports = {
1818
default: {
1919
input: {
2020
'&:focus': {
21-
borderColor: theme('colors.orange.500'),
22-
boxShadow: `0 0 0 3px ${theme('colors.orange.400')}`
21+
borderColor: theme('colors.blue.500'),
22+
boxShadow: `0 0 0 3px ${theme('colors.blue.400')}`
2323
}
2424
}
2525
},

0 commit comments

Comments
 (0)