From 606ae8cd91b91a4585596cd8a9a477cf86dbbea6 Mon Sep 17 00:00:00 2001 From: EINazare Date: Tue, 1 Sep 2020 19:24:30 +0300 Subject: [PATCH 01/90] refcator: try to make project start --- .gitignore | 2 + assets/styles/tailwind.css | 1575 ------------------------- components/Dropdowns/PagesDropdown.js | 130 +- components/Footers/Footer.js | 2 +- components/Navbars/AuthNavbar.js | 2 +- components/Sidebar/Sidebar.js | 262 ++-- index.js | 32 - package.json | 18 +- {views => pages}/404.js | 0 {views => pages}/_app.js | 0 {views => pages}/_document.js | 0 {views => pages}/_error.js | 0 {views => pages}/admin/dashboard.js | 0 {views => pages}/admin/maps.js | 0 {views => pages}/admin/settings.js | 0 {views => pages}/admin/tables.js | 0 {views => pages}/auth/login.js | 8 +- {views => pages}/auth/register.js | 0 {views => pages}/landing.js | 4 +- {views => pages}/profile.js | 0 20 files changed, 243 insertions(+), 1792 deletions(-) delete mode 100644 index.js rename {views => pages}/404.js (100%) rename {views => pages}/_app.js (100%) rename {views => pages}/_document.js (100%) rename {views => pages}/_error.js (100%) rename {views => pages}/admin/dashboard.js (100%) rename {views => pages}/admin/maps.js (100%) rename {views => pages}/admin/settings.js (100%) rename {views => pages}/admin/tables.js (100%) rename {views => pages}/auth/login.js (96%) rename {views => pages}/auth/register.js (100%) rename {views => pages}/landing.js (99%) rename {views => pages}/profile.js (100%) diff --git a/.gitignore b/.gitignore index 4d29575d..0bfb20f6 100644 --- a/.gitignore +++ b/.gitignore @@ -21,3 +21,5 @@ npm-debug.log* yarn-debug.log* yarn-error.log* + +.next/ diff --git a/assets/styles/tailwind.css b/assets/styles/tailwind.css index 9a939ac3..31afc1a7 100644 --- a/assets/styles/tailwind.css +++ b/assets/styles/tailwind.css @@ -1171,1268 +1171,6 @@ video { border-color: #63b3ed; } -.bg-transparent { - background-color: transparent; -} - -.bg-black { - --bg-opacity: 1; - background-color: #000; - background-color: rgba(0, 0, 0, var(--bg-opacity)); -} - -.bg-white { - --bg-opacity: 1; - background-color: #fff; - background-color: rgba(255, 255, 255, var(--bg-opacity)); -} - -.bg-gray-100 { - --bg-opacity: 1; - background-color: #f7fafc; - background-color: rgba(247, 250, 252, var(--bg-opacity)); -} - -.bg-gray-200 { - --bg-opacity: 1; - background-color: #edf2f7; - background-color: rgba(237, 242, 247, var(--bg-opacity)); -} - -.bg-gray-300 { - --bg-opacity: 1; - background-color: #e2e8f0; - background-color: rgba(226, 232, 240, var(--bg-opacity)); -} - -.bg-gray-800 { - --bg-opacity: 1; - background-color: #2d3748; - background-color: rgba(45, 55, 72, var(--bg-opacity)); -} - -.bg-gray-900 { - --bg-opacity: 1; - background-color: #1a202c; - background-color: rgba(26, 32, 44, var(--bg-opacity)); -} - -.bg-red-200 { - --bg-opacity: 1; - background-color: #fed7d7; - background-color: rgba(254, 215, 215, var(--bg-opacity)); -} - -.bg-red-400 { - --bg-opacity: 1; - background-color: #fc8181; - background-color: rgba(252, 129, 129, var(--bg-opacity)); -} - -.bg-red-500 { - --bg-opacity: 1; - background-color: #f56565; - background-color: rgba(245, 101, 101, var(--bg-opacity)); -} - -.bg-red-600 { - --bg-opacity: 1; - background-color: #e53e3e; - background-color: rgba(229, 62, 62, var(--bg-opacity)); -} - -.bg-orange-200 { - --bg-opacity: 1; - background-color: #feebc8; - background-color: rgba(254, 235, 200, var(--bg-opacity)); -} - -.bg-orange-500 { - --bg-opacity: 1; - background-color: #ed8936; - background-color: rgba(237, 137, 54, var(--bg-opacity)); -} - -.bg-green-200 { - --bg-opacity: 1; - background-color: #c6f6d5; - background-color: rgba(198, 246, 213, var(--bg-opacity)); -} - -.bg-green-400 { - --bg-opacity: 1; - background-color: #68d391; - background-color: rgba(104, 211, 145, var(--bg-opacity)); -} - -.bg-green-500 { - --bg-opacity: 1; - background-color: #48bb78; - background-color: rgba(72, 187, 120, var(--bg-opacity)); -} - -.bg-teal-200 { - --bg-opacity: 1; - background-color: #b2f5ea; - background-color: rgba(178, 245, 234, var(--bg-opacity)); -} - -.bg-teal-500 { - --bg-opacity: 1; - background-color: #38b2ac; - background-color: rgba(56, 178, 172, var(--bg-opacity)); -} - -.bg-blue-200 { - --bg-opacity: 1; - background-color: #bee3f8; - background-color: rgba(190, 227, 248, var(--bg-opacity)); -} - -.bg-blue-300 { - --bg-opacity: 1; - background-color: #90cdf4; - background-color: rgba(144, 205, 244, var(--bg-opacity)); -} - -.bg-blue-400 { - --bg-opacity: 1; - background-color: #63b3ed; - background-color: rgba(99, 179, 237, var(--bg-opacity)); -} - -.bg-blue-500 { - --bg-opacity: 1; - background-color: #4299e1; - background-color: rgba(66, 153, 225, var(--bg-opacity)); -} - -.bg-blue-600 { - --bg-opacity: 1; - background-color: #3182ce; - background-color: rgba(49, 130, 206, var(--bg-opacity)); -} - -.bg-blue-800 { - --bg-opacity: 1; - background-color: #2c5282; - background-color: rgba(44, 82, 130, var(--bg-opacity)); -} - -.bg-blue-900 { - --bg-opacity: 1; - background-color: #2a4365; - background-color: rgba(42, 67, 101, var(--bg-opacity)); -} - -.bg-indigo-500 { - --bg-opacity: 1; - background-color: #667eea; - background-color: rgba(102, 126, 234, var(--bg-opacity)); -} - -.bg-purple-200 { - --bg-opacity: 1; - background-color: #e9d8fd; - background-color: rgba(233, 216, 253, var(--bg-opacity)); -} - -.bg-purple-500 { - --bg-opacity: 1; - background-color: #9f7aea; - background-color: rgba(159, 122, 234, var(--bg-opacity)); -} - -.bg-pink-500 { - --bg-opacity: 1; - background-color: #ed64a6; - background-color: rgba(237, 100, 166, var(--bg-opacity)); -} - -.active\:bg-gray-100:active { - --bg-opacity: 1; - background-color: #f7fafc; - background-color: rgba(247, 250, 252, var(--bg-opacity)); -} - -.active\:bg-gray-700:active { - --bg-opacity: 1; - background-color: #4a5568; - background-color: rgba(74, 85, 104, var(--bg-opacity)); -} - -.active\:bg-blue-600:active { - --bg-opacity: 1; - background-color: #3182ce; - background-color: rgba(49, 130, 206, var(--bg-opacity)); -} - -.active\:bg-indigo-600:active { - --bg-opacity: 1; - background-color: #5a67d8; - background-color: rgba(90, 103, 216, var(--bg-opacity)); -} - -.bg-center { - background-position: center; -} - -.bg-cover { - background-size: cover; -} - -.border-collapse { - border-collapse: collapse; -} - -.border-transparent { - border-color: transparent; -} - -.border-gray-100 { - --border-opacity: 1; - border-color: #f7fafc; - border-color: rgba(247, 250, 252, var(--border-opacity)); -} - -.border-gray-200 { - --border-opacity: 1; - border-color: #edf2f7; - border-color: rgba(237, 242, 247, var(--border-opacity)); -} - -.border-gray-300 { - --border-opacity: 1; - border-color: #e2e8f0; - border-color: rgba(226, 232, 240, var(--border-opacity)); -} - -.border-gray-400 { - --border-opacity: 1; - border-color: #cbd5e0; - border-color: rgba(203, 213, 224, var(--border-opacity)); -} - -.border-gray-600 { - --border-opacity: 1; - border-color: #718096; - border-color: rgba(113, 128, 150, var(--border-opacity)); -} - -.border-gray-700 { - --border-opacity: 1; - border-color: #4a5568; - border-color: rgba(74, 85, 104, var(--border-opacity)); -} - -.border-blue-700 { - --border-opacity: 1; - border-color: #2b6cb0; - border-color: rgba(43, 108, 176, var(--border-opacity)); -} - -.rounded { - border-radius: 0.25rem; -} - -.rounded-lg { - border-radius: 0.5rem; -} - -.rounded-full { - border-radius: 9999px; -} - -.rounded-t { - border-top-left-radius: 0.25rem; - border-top-right-radius: 0.25rem; -} - -.rounded-t-lg { - border-top-left-radius: 0.5rem; - border-top-right-radius: 0.5rem; -} - -.border-solid { - border-style: solid; -} - -.border-none { - border-style: none; -} - -.border-0 { - border-width: 0; -} - -.border-2 { - border-width: 2px; -} - -.border { - border-width: 1px; -} - -.border-t-0 { - border-top-width: 0; -} - -.border-r-0 { - border-right-width: 0; -} - -.border-l-0 { - border-left-width: 0; -} - -.border-t { - border-top-width: 1px; -} - -.border-b { - border-bottom-width: 1px; -} - -.cursor-pointer { - cursor: pointer; -} - -.block { - display: block; -} - -.inline-block { - display: inline-block; -} - -.flex { - display: flex; -} - -.inline-flex { - display: inline-flex; -} - -.table { - display: table; -} - -.hidden { - display: none; -} - -.flex-row { - flex-direction: row; -} - -.flex-col { - flex-direction: column; -} - -.flex-wrap { - flex-wrap: wrap; -} - -.items-center { - align-items: center; -} - -.items-stretch { - align-items: stretch; -} - -.justify-end { - justify-content: flex-end; -} - -.justify-center { - justify-content: center; -} - -.justify-between { - justify-content: space-between; -} - -.content-center { - align-content: center; -} - -.flex-1 { - flex: 1 1 0%; -} - -.flex-auto { - flex: 1 1 auto; -} - -.flex-initial { - flex: 0 1 auto; -} - -.flex-grow { - flex-grow: 1; -} - -.float-left { - float: left; -} - -.font-light { - font-weight: 300; -} - -.font-normal { - font-weight: 400; -} - -.font-semibold { - font-weight: 600; -} - -.font-bold { - font-weight: 700; -} - -.h-0 { - height: 0; -} - -.h-2 { - height: 0.5rem; -} - -.h-5 { - height: 1.25rem; -} - -.h-8 { - height: 2rem; -} - -.h-10 { - height: 2.5rem; -} - -.h-12 { - height: 3rem; -} - -.h-16 { - height: 4rem; -} - -.h-auto { - height: auto; -} - -.h-full { - height: 100%; -} - -.text-xs { - font-size: 0.75rem; -} - -.text-sm { - font-size: 0.875rem; -} - -.text-base { - font-size: 1rem; -} - -.text-lg { - font-size: 1.125rem; -} - -.text-xl { - font-size: 1.25rem; -} - -.text-2xl { - font-size: 1.5rem; -} - -.text-3xl { - font-size: 1.875rem; -} - -.text-4xl { - font-size: 2.25rem; -} - -.text-5xl { - font-size: 3rem; -} - -.leading-none { - line-height: 1; -} - -.leading-snug { - line-height: 1.375; -} - -.leading-normal { - line-height: 1.5; -} - -.leading-relaxed { - line-height: 1.625; -} - -.list-none { - list-style-type: none; -} - -.m-2 { - margin: 0.5rem; -} - -.m-4 { - margin: 1rem; -} - -.-m-16 { - margin: -4rem; -} - -.-m-24 { - margin: -6rem; -} - -.my-2 { - margin-top: 0.5rem; - margin-bottom: 0.5rem; -} - -.my-4 { - margin-top: 1rem; - margin-bottom: 1rem; -} - -.mx-4 { - margin-left: 1rem; - margin-right: 1rem; -} - -.my-6 { - margin-top: 1.5rem; - margin-bottom: 1.5rem; -} - -.mx-auto { - margin-left: auto; - margin-right: auto; -} - -.mt-0 { - margin-top: 0; -} - -.mr-0 { - margin-right: 0; -} - -.mb-0 { - margin-bottom: 0; -} - -.mt-1 { - margin-top: 0.25rem; -} - -.mr-1 { - margin-right: 0.25rem; -} - -.mb-1 { - margin-bottom: 0.25rem; -} - -.ml-1 { - margin-left: 0.25rem; -} - -.mt-2 { - margin-top: 0.5rem; -} - -.mr-2 { - margin-right: 0.5rem; -} - -.mb-2 { - margin-bottom: 0.5rem; -} - -.ml-2 { - margin-left: 0.5rem; -} - -.mt-3 { - margin-top: 0.75rem; -} - -.mr-3 { - margin-right: 0.75rem; -} - -.mb-3 { - margin-bottom: 0.75rem; -} - -.ml-3 { - margin-left: 0.75rem; -} - -.mt-4 { - margin-top: 1rem; -} - -.mr-4 { - margin-right: 1rem; -} - -.mb-4 { - margin-bottom: 1rem; -} - -.mt-5 { - margin-top: 1.25rem; -} - -.mb-5 { - margin-bottom: 1.25rem; -} - -.mt-6 { - margin-top: 1.5rem; -} - -.mb-6 { - margin-bottom: 1.5rem; -} - -.mt-8 { - margin-top: 2rem; -} - -.mb-8 { - margin-bottom: 2rem; -} - -.mt-10 { - margin-top: 2.5rem; -} - -.mt-12 { - margin-top: 3rem; -} - -.mb-12 { - margin-bottom: 3rem; -} - -.mt-16 { - margin-top: 4rem; -} - -.mt-20 { - margin-top: 5rem; -} - -.mb-24 { - margin-bottom: 6rem; -} - -.mt-32 { - margin-top: 8rem; -} - -.mr-auto { - margin-right: auto; -} - -.ml-auto { - margin-left: auto; -} - -.-ml-4 { - margin-left: -1rem; -} - -.-mt-20 { - margin-top: -5rem; -} - -.-ml-20 { - margin-left: -5rem; -} - -.-mt-24 { - margin-top: -6rem; -} - -.-mt-48 { - margin-top: -12rem; -} - -.-mt-64 { - margin-top: -16rem; -} - -.max-w-full { - max-width: 100%; -} - -.min-w-0 { - min-width: 0; -} - -.opacity-50 { - opacity: 0.5; -} - -.opacity-75 { - opacity: 0.75; -} - -.outline-none { - outline: 0; -} - -.focus\:outline-none:focus { - outline: 0; -} - -.overflow-hidden { - overflow: hidden; -} - -.overflow-x-auto { - overflow-x: auto; -} - -.overflow-y-auto { - overflow-y: auto; -} - -.overflow-x-hidden { - overflow-x: hidden; -} - -.p-3 { - padding: 0.75rem; -} - -.p-4 { - padding: 1rem; -} - -.p-5 { - padding: 1.25rem; -} - -.p-8 { - padding: 2rem; -} - -.px-0 { - padding-left: 0; - padding-right: 0; -} - -.py-1 { - padding-top: 0.25rem; - padding-bottom: 0.25rem; -} - -.py-2 { - padding-top: 0.5rem; - padding-bottom: 0.5rem; -} - -.px-2 { - padding-left: 0.5rem; - padding-right: 0.5rem; -} - -.py-3 { - padding-top: 0.75rem; - padding-bottom: 0.75rem; -} - -.px-3 { - padding-left: 0.75rem; - padding-right: 0.75rem; -} - -.py-4 { - padding-top: 1rem; - padding-bottom: 1rem; -} - -.px-4 { - padding-left: 1rem; - padding-right: 1rem; -} - -.py-5 { - padding-top: 1.25rem; - padding-bottom: 1.25rem; -} - -.py-6 { - padding-top: 1.5rem; - padding-bottom: 1.5rem; -} - -.px-6 { - padding-left: 1.5rem; - padding-right: 1.5rem; -} - -.py-10 { - padding-top: 2.5rem; - padding-bottom: 2.5rem; -} - -.py-16 { - padding-top: 4rem; - padding-bottom: 4rem; -} - -.py-20 { - padding-top: 5rem; - padding-bottom: 5rem; -} - -.py-24 { - padding-top: 6rem; - padding-bottom: 6rem; -} - -.pt-0 { - padding-top: 0; -} - -.pb-0 { - padding-bottom: 0; -} - -.pt-1 { - padding-top: 0.25rem; -} - -.pt-2 { - padding-top: 0.5rem; -} - -.pb-2 { - padding-bottom: 0.5rem; -} - -.pl-3 { - padding-left: 0.75rem; -} - -.pr-4 { - padding-right: 1rem; -} - -.pb-4 { - padding-bottom: 1rem; -} - -.pl-4 { - padding-left: 1rem; -} - -.pt-6 { - padding-top: 1.5rem; -} - -.pb-6 { - padding-bottom: 1.5rem; -} - -.pt-8 { - padding-top: 2rem; -} - -.pl-10 { - padding-left: 2.5rem; -} - -.pt-12 { - padding-top: 3rem; -} - -.pr-12 { - padding-right: 3rem; -} - -.pt-16 { - padding-top: 4rem; -} - -.pt-20 { - padding-top: 5rem; -} - -.pb-20 { - padding-bottom: 5rem; -} - -.pb-32 { - padding-bottom: 8rem; -} - -.pb-48 { - padding-bottom: 12rem; -} - -.placeholder-gray-400::-webkit-input-placeholder { - --placeholder-opacity: 1; - color: #cbd5e0; - color: rgba(203, 213, 224, var(--placeholder-opacity)); -} - -.placeholder-gray-400:-ms-input-placeholder { - --placeholder-opacity: 1; - color: #cbd5e0; - color: rgba(203, 213, 224, var(--placeholder-opacity)); -} - -.placeholder-gray-400::-ms-input-placeholder { - --placeholder-opacity: 1; - color: #cbd5e0; - color: rgba(203, 213, 224, var(--placeholder-opacity)); -} - -.placeholder-gray-400::placeholder { - --placeholder-opacity: 1; - color: #cbd5e0; - color: rgba(203, 213, 224, var(--placeholder-opacity)); -} - -.pointer-events-none { - pointer-events: none; -} - -.absolute { - position: absolute; -} - -.relative { - position: relative; -} - -.top-0 { - top: 0; -} - -.right-0 { - right: 0; -} - -.bottom-0 { - bottom: 0; -} - -.left-0 { - left: 0; -} - -.top-auto { - top: auto; -} - -.bottom-auto { - bottom: auto; -} - -.shadow { - box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06); -} - -.shadow-lg { - box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); -} - -.shadow-xl { - box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04); -} - -.shadow-none { - box-shadow: none; -} - -.hover\:shadow-md:hover { - box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); -} - -.hover\:shadow-lg:hover { - box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); -} - -.focus\:shadow-outline:focus { - box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.5); -} - -.fill-current { - fill: currentColor; -} - -.text-left { - text-align: left; -} - -.text-center { - text-align: center; -} - -.text-right { - text-align: right; -} - -.text-black { - --text-opacity: 1; - color: #000; - color: rgba(0, 0, 0, var(--text-opacity)); -} - -.text-white { - --text-opacity: 1; - color: #fff; - color: rgba(255, 255, 255, var(--text-opacity)); -} - -.text-gray-200 { - --text-opacity: 1; - color: #edf2f7; - color: rgba(237, 242, 247, var(--text-opacity)); -} - -.text-gray-300 { - --text-opacity: 1; - color: #e2e8f0; - color: rgba(226, 232, 240, var(--text-opacity)); -} - -.text-gray-400 { - --text-opacity: 1; - color: #cbd5e0; - color: rgba(203, 213, 224, var(--text-opacity)); -} - -.text-gray-500 { - --text-opacity: 1; - color: #a0aec0; - color: rgba(160, 174, 192, var(--text-opacity)); -} - -.text-gray-600 { - --text-opacity: 1; - color: #718096; - color: rgba(113, 128, 150, var(--text-opacity)); -} - -.text-gray-700 { - --text-opacity: 1; - color: #4a5568; - color: rgba(74, 85, 104, var(--text-opacity)); -} - -.text-gray-800 { - --text-opacity: 1; - color: #2d3748; - color: rgba(45, 55, 72, var(--text-opacity)); -} - -.text-gray-900 { - --text-opacity: 1; - color: #1a202c; - color: rgba(26, 32, 44, var(--text-opacity)); -} - -.text-red-500 { - --text-opacity: 1; - color: #f56565; - color: rgba(245, 101, 101, var(--text-opacity)); -} - -.text-orange-500 { - --text-opacity: 1; - color: #ed8936; - color: rgba(237, 137, 54, var(--text-opacity)); -} - -.text-green-500 { - --text-opacity: 1; - color: #48bb78; - color: rgba(72, 187, 120, var(--text-opacity)); -} - -.text-teal-500 { - --text-opacity: 1; - color: #38b2ac; - color: rgba(56, 178, 172, var(--text-opacity)); -} - -.text-blue-300 { - --text-opacity: 1; - color: #90cdf4; - color: rgba(144, 205, 244, var(--text-opacity)); -} - -.text-blue-400 { - --text-opacity: 1; - color: #63b3ed; - color: rgba(99, 179, 237, var(--text-opacity)); -} - -.text-blue-500 { - --text-opacity: 1; - color: #4299e1; - color: rgba(66, 153, 225, var(--text-opacity)); -} - -.text-blue-600 { - --text-opacity: 1; - color: #3182ce; - color: rgba(49, 130, 206, var(--text-opacity)); -} - -.text-pink-400 { - --text-opacity: 1; - color: #f687b3; - color: rgba(246, 135, 179, var(--text-opacity)); -} - -.hover\:text-gray-400:hover { - --text-opacity: 1; - color: #cbd5e0; - color: rgba(203, 213, 224, var(--text-opacity)); -} - -.hover\:text-gray-600:hover { - --text-opacity: 1; - color: #718096; - color: rgba(113, 128, 150, var(--text-opacity)); -} - -.hover\:text-gray-800:hover { - --text-opacity: 1; - color: #2d3748; - color: rgba(45, 55, 72, var(--text-opacity)); -} - -.hover\:text-gray-900:hover { - --text-opacity: 1; - color: #1a202c; - color: rgba(26, 32, 44, var(--text-opacity)); -} - -.hover\:text-blue-600:hover { - --text-opacity: 1; - color: #3182ce; - color: rgba(49, 130, 206, var(--text-opacity)); -} - -.uppercase { - text-transform: uppercase; -} - -.no-underline { - text-decoration: none; -} - -.antialiased { - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; -} - -.tracking-wide { - letter-spacing: 0.025em; -} - -.align-middle { - vertical-align: middle; -} - -.whitespace-no-wrap { - white-space: nowrap; -} - -.break-words { - overflow-wrap: break-word; -} - -.w-5 { - width: 1.25rem; -} - -.w-8 { - width: 2rem; -} - -.w-10 { - width: 2.5rem; -} - -.w-12 { - width: 3rem; -} - -.w-16 { - width: 4rem; -} - -.w-auto { - width: auto; -} - -.w-1\/2 { - width: 50%; -} - -.w-6\/12 { - width: 50%; -} - -.w-full { - width: 100%; -} - -.z-10 { - z-index: 10; -} - -.z-40 { - z-index: 40; -} - -.z-50 { - z-index: 50; -} - -.transform { - --transform-translate-x: 0; - --transform-translate-y: 0; - --transform-rotate: 0; - --transform-skew-x: 0; - --transform-skew-y: 0; - --transform-scale-x: 1; - --transform-scale-y: 1; - transform: translateX(var(--transform-translate-x)) translateY(var(--transform-translate-y)) rotate(var(--transform-rotate)) skewX(var(--transform-skew-x)) skewY(var(--transform-skew-y)) scaleX(var(--transform-scale-x)) scaleY(var(--transform-scale-y)); -} - -.transition { - transition-property: background-color, border-color, color, fill, stroke, opacity, box-shadow, transform; -} - @-webkit-keyframes spin { to { transform: rotate(360deg); @@ -2835,14 +1573,6 @@ video { max-width: 1280px; } } - - .sm\:mt-0 { - margin-top: 0; - } - - .sm\:mr-2 { - margin-right: 0.5rem; - } } @media (min-width: 768px) { @@ -3181,139 +1911,6 @@ video { max-width: 1280px; } } - - .md\:block { - display: block; - } - - .md\:flex { - display: flex; - } - - .md\:hidden { - display: none; - } - - .md\:flex-row { - flex-direction: row; - } - - .md\:flex-col { - flex-direction: column; - } - - .md\:flex-no-wrap { - flex-wrap: nowrap; - } - - .md\:items-stretch { - align-items: stretch; - } - - .md\:justify-start { - justify-content: flex-start; - } - - .md\:justify-end { - justify-content: flex-end; - } - - .md\:justify-between { - justify-content: space-between; - } - - .md\:mt-4 { - margin-top: 1rem; - } - - .md\:mb-4 { - margin-bottom: 1rem; - } - - .md\:ml-64 { - margin-left: 16rem; - } - - .md\:min-h-full { - min-height: 100%; - } - - .md\:min-w-full { - min-width: 100%; - } - - .md\:opacity-100 { - opacity: 1; - } - - .md\:overflow-hidden { - overflow: hidden; - } - - .md\:overflow-y-auto { - overflow-y: auto; - } - - .md\:px-10 { - padding-left: 2.5rem; - padding-right: 2.5rem; - } - - .md\:pb-2 { - padding-bottom: 0.5rem; - } - - .md\:pr-12 { - padding-right: 3rem; - } - - .md\:pt-32 { - padding-top: 8rem; - } - - .md\:fixed { - position: fixed; - } - - .md\:relative { - position: relative; - } - - .md\:top-0 { - top: 0; - } - - .md\:bottom-0 { - bottom: 0; - } - - .md\:left-0 { - left: 0; - } - - .md\:shadow-none { - box-shadow: none; - } - - .md\:w-64 { - width: 16rem; - } - - .md\:w-4\/12 { - width: 33.333333%; - } - - .md\:w-5\/12 { - width: 41.666667%; - } - - .md\:w-6\/12 { - width: 50%; - } - - .md\:w-8\/12 { - width: 66.666667%; - } } @media (min-width: 1024px) { @@ -3652,162 +2249,6 @@ video { max-width: 1280px; } } - - .lg\:bg-transparent { - background-color: transparent; - } - - .lg\:block { - display: block; - } - - .lg\:inline-block { - display: inline-block; - } - - .lg\:flex { - display: flex; - } - - .lg\:hidden { - display: none; - } - - .lg\:flex-row { - flex-direction: row; - } - - .lg\:self-center { - align-self: center; - } - - .lg\:justify-start { - justify-content: flex-start; - } - - .lg\:order-1 { - order: 1; - } - - .lg\:order-2 { - order: 2; - } - - .lg\:order-3 { - order: 3; - } - - .lg\:mb-0 { - margin-bottom: 0; - } - - .lg\:mr-1 { - margin-right: 0.25rem; - } - - .lg\:mr-4 { - margin-right: 1rem; - } - - .lg\:ml-auto { - margin-left: auto; - } - - .lg\:-ml-16 { - margin-left: -4rem; - } - - .lg\:-mt-64 { - margin-top: -16rem; - } - - .lg\:p-10 { - padding: 2.5rem; - } - - .lg\:py-2 { - padding-top: 0.5rem; - padding-bottom: 0.5rem; - } - - .lg\:px-10 { - padding-left: 2.5rem; - padding-right: 2.5rem; - } - - .lg\:pt-0 { - padding-top: 0; - } - - .lg\:pt-4 { - padding-top: 1rem; - } - - .lg\:pt-12 { - padding-top: 3rem; - } - - .lg\:pt-24 { - padding-top: 6rem; - } - - .lg\:pb-64 { - padding-bottom: 16rem; - } - - .lg\:static { - position: static; - } - - .lg\:shadow-none { - box-shadow: none; - } - - .lg\:text-right { - text-align: right; - } - - .lg\:text-white { - --text-opacity: 1; - color: #fff; - color: rgba(255, 255, 255, var(--text-opacity)); - } - - .lg\:text-gray-300 { - --text-opacity: 1; - color: #e2e8f0; - color: rgba(226, 232, 240, var(--text-opacity)); - } - - .lg\:hover\:text-gray-300:hover { - --text-opacity: 1; - color: #e2e8f0; - color: rgba(226, 232, 240, var(--text-opacity)); - } - - .lg\:w-auto { - width: auto; - } - - .lg\:w-3\/12 { - width: 25%; - } - - .lg\:w-4\/12 { - width: 33.333333%; - } - - .lg\:w-6\/12 { - width: 50%; - } - - .lg\:w-8\/12 { - width: 66.666667%; - } - - .lg\:w-9\/12 { - width: 75%; - } } @media (min-width: 1280px) { @@ -4146,20 +2587,4 @@ video { max-width: 1280px; } } - - .xl\:mb-0 { - margin-bottom: 0; - } - - .xl\:w-3\/12 { - width: 25%; - } - - .xl\:w-4\/12 { - width: 33.333333%; - } - - .xl\:w-8\/12 { - width: 66.666667%; - } } diff --git a/components/Dropdowns/PagesDropdown.js b/components/Dropdowns/PagesDropdown.js index 5d43b2f2..3ac0885c 100644 --- a/components/Dropdowns/PagesDropdown.js +++ b/components/Dropdowns/PagesDropdown.js @@ -1,5 +1,5 @@ import React from "react"; -import { Link } from "react-router-dom"; +import Link from "next/link"; import Popper from "popper.js"; const PagesDropdown = () => { @@ -44,37 +44,45 @@ const PagesDropdown = () => { > Admin Layout - - Dashboard + + + Dashboard + - - Settings + + + Settings + - - Tables + + + Tables + - - Maps + + + Maps +
{ > Auth Layout - - Login + + + Login + - - Register + + + Register +
{ > No Layout - - Lading + + + Lading + - - Profile + + + Profile +
diff --git a/components/Footers/Footer.js b/components/Footers/Footer.js index 5ea5a5e1..dad14c3e 100644 --- a/components/Footers/Footer.js +++ b/components/Footers/Footer.js @@ -144,7 +144,7 @@ export default function Footer() {
- Copyright © {new Date().getFullYear()} Tailwind Webapp React by{" "} + Copyright © {new Date().getFullYear()} Tailwind Webapp NextJS by{" "} - Tailwind Webapp React + Tailwind Webapp NextJS {/* Brand */} - - Tailwind Webapp React + + + Tailwind Webapp NextJS + {/* User */}
    @@ -45,11 +47,13 @@ export default function Sidebar() {
    - - Tailwind Webapp React + + + Tailwind Webapp NextJS +
    @@ -84,62 +88,70 @@ export default function Sidebar() { @@ -154,22 +166,26 @@ export default function Sidebar() { @@ -184,22 +200,26 @@ export default function Sidebar() { @@ -213,62 +233,74 @@ export default function Sidebar() { {/* Navigation */} diff --git a/index.js b/index.js deleted file mode 100644 index 8fa1dda5..00000000 --- a/index.js +++ /dev/null @@ -1,32 +0,0 @@ -import React from "react"; -import ReactDOM from "react-dom"; -import { HashRouter, Route, Switch, Redirect } from "react-router-dom"; - -import "@fortawesome/fontawesome-free/css/all.min.css"; -import "assets/styles/tailwind.css"; - -// layouts - -import Admin from "layouts/Admin.js"; -import Auth from "layouts/Auth.js"; - -// views without layouts - -import Landing from "views/Landing.js"; -import Profile from "views/Profile.js"; - -ReactDOM.render( - - - {/* add routes with layouts */} - - - {/* add routes without layouts */} - - - {/* add redirect for first page */} - - - , - document.getElementById("root") -); diff --git a/package.json b/package.json index 7d68627f..b012996f 100644 --- a/package.json +++ b/package.json @@ -1,29 +1,35 @@ { - "name": "tailwind-webapp-react", - "homepage": "https://demos.creative-tim.com/tailwind-webapp-react", + "name": "tailwind-webapp-nexjs", + "homepage": "https://demos.creative-tim.com/tailwind-webapp-nexjs", "version": "1.0.0", "dependencies": { "@fortawesome/fontawesome-free": "5.14.0", "@popperjs/core": "2.4.4", "@tailwindcss/custom-forms": "0.2.1", + "@zeit/next-css": "1.0.1", + "@zeit/next-sass": "1.0.1", "chart.js": "2.9.3", "gulp": "4.0.2", "gulp-append-prepend": "1.0.8", + "next": "9.5.2", + "next-compose-plugins": "2.2.0", + "next-fonts": "1.4.0", + "next-images": "1.4.1", "node-sass": "4.14.1", + "path": "0.12.7", "react": "16.13.1", "react-dom": "16.13.1", "react-google-maps": "9.4.5", - "react-router": "5.2.0", - "react-router-dom": "5.2.0", "react-scripts": "3.4.3", - "tailwindcss": "1.7.6" + "tailwindcss": "1.7.6", + "webpack": "4.44.1" }, "scripts": { "start": "next start", "build": "next build", "dev": "next dev", "install:clean": "rm -rf node_modules/ && rm -rf package-lock.json && npm install && npm run build:tailwind && npm run dev", - "build:tailwind": "tailwind build src/assets/styles/index.css -o src/assets/styles/tailwind.css" + "build:tailwind": "tailwind build assets/styles/index.css -o assets/styles/tailwind.css" }, "eslintConfig": { "extends": "react-app" diff --git a/views/404.js b/pages/404.js similarity index 100% rename from views/404.js rename to pages/404.js diff --git a/views/_app.js b/pages/_app.js similarity index 100% rename from views/_app.js rename to pages/_app.js diff --git a/views/_document.js b/pages/_document.js similarity index 100% rename from views/_document.js rename to pages/_document.js diff --git a/views/_error.js b/pages/_error.js similarity index 100% rename from views/_error.js rename to pages/_error.js diff --git a/views/admin/dashboard.js b/pages/admin/dashboard.js similarity index 100% rename from views/admin/dashboard.js rename to pages/admin/dashboard.js diff --git a/views/admin/maps.js b/pages/admin/maps.js similarity index 100% rename from views/admin/maps.js rename to pages/admin/maps.js diff --git a/views/admin/settings.js b/pages/admin/settings.js similarity index 100% rename from views/admin/settings.js rename to pages/admin/settings.js diff --git a/views/admin/tables.js b/pages/admin/tables.js similarity index 100% rename from views/admin/tables.js rename to pages/admin/tables.js diff --git a/views/auth/login.js b/pages/auth/login.js similarity index 96% rename from views/auth/login.js rename to pages/auth/login.js index 9eededa3..4e56d091 100644 --- a/views/auth/login.js +++ b/pages/auth/login.js @@ -1,5 +1,5 @@ import React from "react"; -import { Link } from "react-router-dom"; +import Link from "next/link"; export default function Login() { return ( @@ -113,8 +113,10 @@ export default function Login() {
    - - Create new account + + + Create new account +
    diff --git a/views/auth/register.js b/pages/auth/register.js similarity index 100% rename from views/auth/register.js rename to pages/auth/register.js diff --git a/views/landing.js b/pages/landing.js similarity index 99% rename from views/landing.js rename to pages/landing.js index dbf03e90..e806a18f 100644 --- a/views/landing.js +++ b/pages/landing.js @@ -35,7 +35,7 @@ export default function Landing() {

    This is a simple example of a Landing Page you can build - using Tailwind Webapp React. It features multiple CSS + using Tailwind Webapp NextJS. It features multiple CSS components based on the Tailwindcss design system.

    @@ -135,7 +135,7 @@ export default function Landing() { href="https://www.creative-tim.com/learning-lab/tailwind-starter-kit#/presentation" className="font-bold text-gray-800 mt-8" > - Check Tailwind Webapp React! + Check Tailwind Webapp NextJS!
diff --git a/views/profile.js b/pages/profile.js similarity index 100% rename from views/profile.js rename to pages/profile.js From 20c1495cec698f928fa5d44d837a2661760b73f2 Mon Sep 17 00:00:00 2001 From: EINazare Date: Wed, 2 Sep 2020 15:22:22 +0300 Subject: [PATCH 02/90] fix: solve not starting project --- package.json | 4 ++-- pages/404.js | 12 ++++++++++++ pages/_error.js | 12 ++++++++++++ 3 files changed, 26 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index b012996f..6cb958d6 100644 --- a/package.json +++ b/package.json @@ -11,10 +11,10 @@ "chart.js": "2.9.3", "gulp": "4.0.2", "gulp-append-prepend": "1.0.8", - "next": "9.5.2", + "next": "9.5.3", "next-compose-plugins": "2.2.0", "next-fonts": "1.4.0", - "next-images": "1.4.1", + "next-images": "1.3.1", "node-sass": "4.14.1", "path": "0.12.7", "react": "16.13.1", diff --git a/pages/404.js b/pages/404.js index e69de29b..37ad3b67 100644 --- a/pages/404.js +++ b/pages/404.js @@ -0,0 +1,12 @@ +import React, { Component } from "react"; +import Router from "next/router"; + +export default class Error404 extends Component { + componentDidMount = () => { + Router.push("/admin/dashboard"); + }; + + render() { + return
; + } +} diff --git a/pages/_error.js b/pages/_error.js index e69de29b..5d9bb471 100644 --- a/pages/_error.js +++ b/pages/_error.js @@ -0,0 +1,12 @@ +import React, { Component } from "react"; +import Router from "next/router"; + +export default class _error extends Component { + componentDidMount = () => { + Router.push("/admin/dashboard"); + }; + + render() { + return
; + } +} From 97e7425cc01420b7eb2bd974e5d3c6e8210d2051 Mon Sep 17 00:00:00 2001 From: EINazare Date: Wed, 2 Sep 2020 15:27:21 +0300 Subject: [PATCH 03/90] fix: solve react-router-dom issue --- layouts/Admin.js | 17 ++--------------- layouts/Auth.js | 13 ++----------- 2 files changed, 4 insertions(+), 26 deletions(-) diff --git a/layouts/Admin.js b/layouts/Admin.js index e6881842..89166cb3 100644 --- a/layouts/Admin.js +++ b/layouts/Admin.js @@ -1,5 +1,4 @@ import React from "react"; -import { Switch, Route } from "react-router-dom"; // components @@ -8,14 +7,7 @@ import Sidebar from "components/Sidebar/Sidebar.js"; import HeaderStats from "components/Headers/HeaderStats.js"; import FooterAdmin from "components/Footers/FooterAdmin.js"; -// views - -import Dashboard from "views/admin/Dashboard.js"; -import Maps from "views/admin/Maps.js"; -import Settings from "views/admin/Settings.js"; -import Tables from "views/admin/Tables.js"; - -export default function Admin() { +export default function Admin({ children }) { return ( <> @@ -24,12 +16,7 @@ export default function Admin() { {/* Header */}
- - - - - - + {children}
diff --git a/layouts/Auth.js b/layouts/Auth.js index c9ab7305..865eee97 100644 --- a/layouts/Auth.js +++ b/layouts/Auth.js @@ -1,17 +1,11 @@ import React from "react"; -import { Switch, Route } from "react-router-dom"; // components import Navbar from "components/Navbars/AuthNavbar.js"; import FooterSmall from "components/Footers/FooterSmall.js"; -// views - -import Login from "views/auth/Login.js"; -import Register from "views/auth/Register.js"; - -export default function Auth() { +export default function Auth({ children }) { return ( <> @@ -26,10 +20,7 @@ export default function Auth() { backgroundRepeat: "no-repeat", }} >
- - - - + {children} From 64d660ad2a25fa41847fc104b561dd5f1843f4c6 Mon Sep 17 00:00:00 2001 From: EINazare Date: Wed, 2 Sep 2020 15:27:30 +0300 Subject: [PATCH 04/90] refactor: add layouts --- pages/admin/dashboard.js | 6 ++++++ pages/admin/maps.js | 6 ++++++ pages/admin/settings.js | 6 ++++++ pages/admin/tables.js | 6 ++++++ pages/auth/login.js | 6 ++++++ pages/auth/register.js | 6 ++++++ 6 files changed, 36 insertions(+) diff --git a/pages/admin/dashboard.js b/pages/admin/dashboard.js index a1c648e3..896408f6 100644 --- a/pages/admin/dashboard.js +++ b/pages/admin/dashboard.js @@ -7,6 +7,10 @@ import CardBarChart from "components/Cards/CardBarChart.js"; import CardPageVisits from "components/Cards/CardPageVisits.js"; import CardSocialTraffic from "components/Cards/CardSocialTraffic.js"; +// layout for page + +import Admin from "layouts/Admin.js"; + export default function Dashboard() { return ( <> @@ -29,3 +33,5 @@ export default function Dashboard() { ); } + +Dashboard.layout = Admin; diff --git a/pages/admin/maps.js b/pages/admin/maps.js index e525ce03..27bd1b90 100644 --- a/pages/admin/maps.js +++ b/pages/admin/maps.js @@ -4,6 +4,10 @@ import React from "react"; import MapExample from "components/Maps/MapExample.js"; +// layout for page + +import Admin from "layouts/Admin.js"; + export default function Maps() { return ( <> @@ -29,3 +33,5 @@ export default function Maps() { ); } + +Maps.layout = Admin; diff --git a/pages/admin/settings.js b/pages/admin/settings.js index 7a6a29ae..b4f110b5 100644 --- a/pages/admin/settings.js +++ b/pages/admin/settings.js @@ -5,6 +5,10 @@ import React from "react"; import CardSettings from "components/Cards/CardSettings.js"; import CardProfile from "components/Cards/CardProfile.js"; +// layout for page + +import Admin from "layouts/Admin.js"; + export default function Settings() { return ( <> @@ -19,3 +23,5 @@ export default function Settings() { ); } + +Settings.layout = Admin; diff --git a/pages/admin/tables.js b/pages/admin/tables.js index 2e09ce78..86e89406 100644 --- a/pages/admin/tables.js +++ b/pages/admin/tables.js @@ -4,6 +4,10 @@ import React from "react"; import CardTable from "components/Cards/CardTable.js"; +// layout for page + +import Admin from "layouts/Admin.js"; + export default function Tables() { return ( <> @@ -18,3 +22,5 @@ export default function Tables() { ); } + +Tables.layout = Admin; diff --git a/pages/auth/login.js b/pages/auth/login.js index 4e56d091..7e8a9d7c 100644 --- a/pages/auth/login.js +++ b/pages/auth/login.js @@ -1,6 +1,10 @@ import React from "react"; import Link from "next/link"; +// layout for page + +import Auth from "layouts/Auth.js"; + export default function Login() { return ( <> @@ -126,3 +130,5 @@ export default function Login() { ); } + +Login.layout = Auth; diff --git a/pages/auth/register.js b/pages/auth/register.js index d77f3a42..dd623370 100644 --- a/pages/auth/register.js +++ b/pages/auth/register.js @@ -1,5 +1,9 @@ import React from "react"; +// layout for page + +import Auth from "layouts/Auth.js"; + export default function Register() { return ( <> @@ -130,3 +134,5 @@ export default function Register() { ); } + +Register.layout = Auth; From c89d741b281fa110b2638b282e9fcdc4f30607e8 Mon Sep 17 00:00:00 2001 From: EINazare Date: Wed, 2 Sep 2020 15:27:41 +0300 Subject: [PATCH 05/90] fix: solve window issue --- components/Sidebar/Sidebar.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/components/Sidebar/Sidebar.js b/components/Sidebar/Sidebar.js index e35b0f1c..cfbde3f6 100644 --- a/components/Sidebar/Sidebar.js +++ b/components/Sidebar/Sidebar.js @@ -1,11 +1,13 @@ import React from "react"; import Link from "next/link"; +import { useRouter } from "next/router"; import NotificationDropdown from "components/Dropdowns/NotificationDropdown.js"; import UserDropdown from "components/Dropdowns/UserDropdown.js"; export default function Sidebar() { const [collapseShow, setCollapseShow] = React.useState("hidden"); + const router = useRouter(); return ( <>
@@ -122,9 +116,8 @@ export default function CardSettings() {
@@ -138,9 +131,8 @@ export default function CardSettings() { @@ -154,9 +146,8 @@ export default function CardSettings() { @@ -178,9 +169,8 @@ export default function CardSettings() { diff --git a/components/Cards/CardSocialTraffic.js b/components/Cards/CardSocialTraffic.js index 0035d1cf..28fe0419 100644 --- a/components/Cards/CardSocialTraffic.js +++ b/components/Cards/CardSocialTraffic.js @@ -15,9 +15,8 @@ export default function CardSocialTraffic() {
diff --git a/components/Footers/Footer.js b/components/Footers/Footer.js index dad14c3e..d3a63478 100644 --- a/components/Footers/Footer.js +++ b/components/Footers/Footer.js @@ -5,8 +5,8 @@ export default function Footer() { <>