Skip to content

Commit 44ea304

Browse files
committed
fix: major css layout fixes
1 parent aa7520d commit 44ea304

File tree

5 files changed

+19
-8
lines changed

5 files changed

+19
-8
lines changed

components/Toast.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<div class="relative mt-24">
2+
<div class="absolute right-[20px] top-24" id="toast">
33
<div
44
class="
55
absolute
@@ -11,6 +11,7 @@
1111
rounded-md
1212
shadow-md
1313
z-2
14+
w-72
1415
"
1516
v-bind:class="{
1617
'-translate-y-screen': !toastState.show,

components/navbar.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<header class="fixed top-0 left-0 right-0 bg-white shadow-lg">
2+
<header class="fixed top-0 left-0 right-0 bg-white shadow-lg z-100">
33
<div class="container flex items-center h-full py-4 m-auto">
44
<div v-if="showBackButton" class="mr-4">
55
<NuxtLink to="/">

pages/diff/_diff.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<div class="contents">
2+
<div class="flow-root h-full">
33
<Navbar show-back-button="true">
44
<template v-slot:right>
55
<button
@@ -48,7 +48,7 @@
4848
</button>
4949
</template>
5050
</Navbar>
51-
<main class="h-full xl:container">
51+
<main class="h-full mt-24 xl:container">
5252
<div class="flex gap-4 mt-5">
5353
<div
5454
class="relative flex-1 px-4 py-2 overflow-y-auto border-2 rounded-sm max-h-screen--nav line-numbers min-h-80"

pages/index.vue

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
11
<template>
2-
<div class="contents">
2+
<div class="flow-root h-full page-root">
33
<Navbar />
4-
<main class="flex flex-wrap h-full -mt-3 xl:container">
5-
<p class="w-full mb-2 text-xl text-center">Compare any text for diff</p>
4+
<main class="flex flex-wrap h-full mt-20 xl:container">
5+
<h1 class="w-full mb-2 text-xl text-center">
6+
Find difference in any two text blocks and get easy sharable link
7+
</h1>
8+
<h2 class="w-full mb-2 text-center text-md">
9+
Dont worry, We dont store any of your data
10+
</h2>
611
<form @submit="checkForm" class="w-full h-full">
712
<div class="flex flex-wrap w-full h-full gap-4">
813
<textarea
@@ -105,3 +110,8 @@ export default Vue.extend({
105110
},
106111
})
107112
</script>
113+
<style>
114+
.page-root {
115+
max-height: calc(100% - 14rem);
116+
}
117+
</style>

static/global.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ main {
88
}
99
html,
1010
body {
11-
height: calc(100% - 6rem);
11+
height: 100%;
1212
}
1313
#__nuxt,
1414
#__layout,

0 commit comments

Comments
 (0)