Skip to content

Commit 605d9f5

Browse files
committed
Layout and style updates wip
1 parent 5448c51 commit 605d9f5

File tree

13 files changed

+61
-54
lines changed

13 files changed

+61
-54
lines changed

src/components/Canvas/Canvas.vue

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<div>
2+
<div class="bg-gray-100">
33
<div
44
v-if="!config"
55
style="height: calc(100vh - 63px);"
@@ -10,7 +10,7 @@
1010
p-16
1111
max-w-sm
1212
rounded-lg
13-
border-2 border-dashed border-bg-gray-200"
13+
border-2 border-dashed border-bg-gray-200 bg-white"
1414
>
1515
<p class="mb-3 text-gray-600 text-center font-bold">Upload your Tailwind config file</p>
1616
<input
@@ -19,23 +19,22 @@
1919
name="file"
2020
class="absolute opacity-0 w-0 h-0 overflow-hidden"
2121
@change="fileSelected">
22-
<label for="file" class="inline-block p-4 bg-blue-400 hover:bg-blue-500 rounded cursor-pointer text-center text-white">Upload Tailwind Config</label>
22+
<label for="file" class="inline-block p-4 bg-teal-500 hover:bg-teal-600 rounded cursor-pointer text-center text-white">Upload Tailwind Config</label>
2323
</form>
2424
</div>
2525
<template v-if="config">
2626
<div class="pt-8 flex">
27-
<nav class="w-56 flex-none px-3 h-full top-0 sticky">
28-
<h2 class="font-bold text-lg">Sections</h2>
27+
<nav class="w-56 flex-none pt-12 px-3 h-full top-0 sticky">
2928
<a
3029
v-for="section in configTransformed"
3130
:key="section.title"
3231
:href="`#${section.title}`"
33-
class="block py-2 px-3 text-gray-600 hover:text-gray-900 hover:bg-gray-200 text-lg rounded-sm"
32+
class="block py-2 px-3 text-gray-600 hover:text-teal-600 hover:bg-teal-200 hover:opacity-25 text-base rounded-sm"
3433
>
3534
{{ section.title }}
3635
</a>
3736
</nav>
38-
<div>
37+
<div class="pr-4">
3938
<CanvasSection v-for="section in configTransformed" :key="section.title" :title="section.title" :id="section.title">
4039
<component :is="sectionComponent(section.component)" :data="section.data" />
4140
</CanvasSection>

src/components/Canvas/CanvasSection.vue

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
<template>
2-
<section class="mb-16">
3-
<h1 class="mb-6 border-b text-4xl text-gray-800">{{ title }}</h1>
4-
<slot />
2+
<section class="mb-16 max-w-full">
3+
<h1 class="mb-2 text-4xl text-gray-800">{{ title }}</h1>
4+
<div class="bg-white p-6 rounded shadow-xl">
5+
<slot />
6+
</div>
57
</section>
68
</template>
79

src/components/Canvas/Sections/BorderRadius.vue

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,9 @@
22
<div class="flex">
33
<div
44
v-for="(value, prop) in data"
5-
class="mr-4"
5+
class="mr-4 bg-gray-400"
66
:key="prop"
77
:style="{
8-
backgroundColor: '#ccc',
98
width: '100px',
109
height: '100px',
1110
borderRadius: value

src/components/Canvas/Sections/BorderWidth.vue

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,11 @@
33
<div
44
v-for="(value, prop) in data"
55
:key="prop"
6-
class="mr-2"
6+
class="mr-2 bg-gray-400 border-gray-600"
77
:style="{
8-
backgroundColor: '#ccc',
98
height: '100px',
109
width: '100px',
11-
borderBottomWidth: value,
12-
borderColor: '#666'
10+
borderWidth: value
1311
}">
1412
{{ prop }}
1513
</div>

src/components/Canvas/Sections/FontSizes.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
<div class="">
33
<div
44
v-for="(value, prop) in data"
5-
class="mb-3"
5+
class="mb-4 leading-none"
66
:key="prop"
77
:style="{
88
fontSize: value
99
}">
10-
<div class="text-sm">text-{{ prop }}</div>
10+
<div class="text-sm mb-2">text-{{ prop }}</div>
1111
<p>The quick brown fox jumped over the lazy dog.</p>
1212
</div>
1313
</div>

src/components/Canvas/Sections/Height.vue

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,18 @@
33
<div
44
v-for="(value, prop) in data"
55
:key="prop"
6-
class="mr-2"
6+
class="mr-4 mb-4"
77
>
8-
<div>{{ prop }}</div>
9-
<div :style="{
10-
backgroundColor: '#ccc',
11-
width: '100px',
12-
height: value
13-
}" />
8+
<div>h-{{ prop }}</div>
9+
<div class="bg-gray-200 h-full">
10+
<div
11+
class="bg-gray-400"
12+
:style="{
13+
width: '100px',
14+
height: value
15+
}"
16+
/>
17+
</div>
1418
</div>
1519
</div>
1620
</template>

src/components/Canvas/Sections/LetterSpacing.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
class="mb-3"
66
:key="prop"
77
>
8-
<div class="text-sm">{{ prop }}</div>
8+
<div class="text-sm">tracking-{{ prop }}</div>
99
<p
1010
class="text-xl"
1111
:style="{

src/components/Canvas/Sections/LineHeight.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
class="mb-3"
66
:key="prop"
77
>
8-
<div class="text-sm">{{ prop }}</div>
8+
<div class="text-sm">leading-{{ prop }}</div>
99
<div
1010
class="text-lg"
1111
:style="{

src/components/Canvas/Sections/Opacity.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@
66
class="mr-2"
77
>
88
<div>{{ prop }}</div>
9-
<div :style="{
10-
backgroundColor: '#ccc',
9+
<div
10+
class="bg-gray-400"
11+
:style="{
1112
width: '100px',
1213
height: '100px',
1314
opacity: value

src/components/Canvas/Sections/Screens.vue

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,8 @@
33
<div
44
v-for="(value, prop) in data"
55
:key="prop"
6-
class="mb-4"
6+
class="mb-4 bg-gray-400"
77
:style="{
8-
backgroundColor: '#ccc',
98
maxWidth: value,
109
height: '100px',
1110
}">

0 commit comments

Comments
 (0)