Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#2 - main page #40

Merged
merged 38 commits into from
Jul 5, 2023
Merged
Show file tree
Hide file tree
Changes from 33 commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
818b8bb
Working mapbox and main page template
brzozka Jun 12, 2023
ee788a6
Adding logo component and main page template adjustment
brzozka Jun 12, 2023
6efd24a
Working main page with component split
brzozka Jun 13, 2023
5d61b7e
Working reusable Combobox component with static sample data
brzozka Jun 14, 2023
bdf1754
Test map resize
brzozka Jun 20, 2023
fabe0b2
Fixed styling and map component responsivity
brzozka Jun 20, 2023
6e295e4
Working Map switch with broken canvas
brzozka Jun 20, 2023
14d7954
Change to Leaflet from Mapbox
brzozka Jun 20, 2023
d0c74b0
Leaflet with working component swaps
brzozka Jun 21, 2023
2375dc9
Added SearchList Component
brzozka Jun 21, 2023
dc94b9d
Merge branch 'main' into #2-main-page
brzozka Jun 21, 2023
9149971
Updated SearchList to use flat-flags-iconset
brzozka Jun 21, 2023
697f7af
Fixed provider in searchList and removed MapBox from npm
brzozka Jun 22, 2023
f194dec
Removal of not use env variables
brzozka Jun 22, 2023
3f9d6a3
Fixed values to remove overflow of 2px
brzozka Jun 22, 2023
a359599
Accidental whitespace deletion
brzozka Jun 22, 2023
9b4929f
Whitespace and import fix
brzozka Jun 26, 2023
3098227
Fixed spacing, depricated imports and scrollbar
brzozka Jun 26, 2023
6392a5a
Working footer and button adjustments
brzozka Jun 26, 2023
c916d02
Navbar and SearchPanel style adjustments
brzozka Jun 26, 2023
07dddd2
Fixed buttons scaling and style of text
brzozka Jun 27, 2023
b6cf4b8
Merge branch 'main' into #2-main-page
brzozka Jun 27, 2023
03d77bc
Changed files location after merge
brzozka Jun 27, 2023
8bd19c5
After merge files fix
brzozka Jun 27, 2023
8c3d41a
Height scaling fix
brzozka Jun 27, 2023
8ae0eed
Requested changes
brzozka Jun 28, 2023
05e2da2
Mobile map fix
brzozka Jun 28, 2023
5f2ddbc
Import and spacing fixes
brzozka Jul 3, 2023
18ef98b
#2 - main page upgrade
vojcc Jul 4, 2023
3ec749f
#2 - run lint
vojcc Jul 4, 2023
a5b8e8c
#2 - more upgrades
vojcc Jul 4, 2023
2e7a675
#2 - add responsive landing page, fix label inputs, cosmetic changes
vojcc Jul 4, 2023
8254a67
#2 - image width fix
vojcc Jul 4, 2023
5fac5ac
#2 - fix details: borders, colors, shadows, spaces, lines
vojcc Jul 5, 2023
1dc4258
#2 - run lint
vojcc Jul 5, 2023
66eee5e
Merge branch 'main' into #2-main-page
vojcc Jul 5, 2023
ba64ed1
#2 - change hooks, run lint
vojcc Jul 5, 2023
a59a9dc
#2 - simplify rendering logic
vojcc Jul 5, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
136 changes: 136 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,14 @@
"lintf": "./node_modules/.bin/eslint resources/js --ext .js,.vue --fix"
},
"dependencies": {
"@headlessui/vue": "^1.7.14",
"@heroicons/vue": "^2.0.18",
"@inertiajs/inertia-vue3": "^0.6.0",
"@inertiajs/progress": "^0.2.7",
"@inertiajs/vue3": "^1.0.7",
"@tailwindcss/forms": "^0.5.3",
"@tailwindcss/typography": "^0.5.9",
"@vueuse/core": "^10.2.1",
"axios": "^1.4.0",
"laravel-vite-plugin": "^0.7.8",
"lodash": "^4.17.21",
Expand All @@ -22,11 +25,13 @@
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^5.59.8",
"@vitejs/plugin-vue": "^4.2.3",
"@vue-leaflet/vue-leaflet": "^0.10.1",
"autoprefixer": "^10.4.14",
"eslint": "^8.41.0",
"eslint-config-prettier": "^8.8.0",
"eslint-plugin-tailwindcss": "^3.12.1",
"eslint-plugin-vue": "^9.14.1",
"leaflet": "^1.9.4",
"postcss": "^8.4.24",
"vite": "^4.3.9"
}
Expand Down
10 changes: 10 additions & 0 deletions resources/css/app.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
@tailwind base;
@tailwind components;
@tailwind utilities;

@layer utilities {
.no-scrollbar::-webkit-scrollbar {
display: none;
}
.no-scrollbar {
-ms-overflow-style: none;
scrollbar-width: none;
}
}
EwelinaSkrzypacz marked this conversation as resolved.
Show resolved Hide resolved
2 changes: 1 addition & 1 deletion resources/js/Pages/Auth/Login.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script setup>
import { useForm } from '@inertiajs/vue3'
import ErrorMessage from '@/Components/ErrorMessage.vue'
import ErrorMessage from '@/Shared/Components/ErrorMessage.vue'

const form = useForm({
email: '',
Expand Down
2 changes: 1 addition & 1 deletion resources/js/Pages/Auth/Register.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script setup>
import { useForm } from '@inertiajs/vue3'
import ErrorMessage from '@/Components/ErrorMessage.vue'
import ErrorMessage from '@/Shared/Components/ErrorMessage.vue'

const form = useForm({
name: '',
Expand Down
7 changes: 7 additions & 0 deletions resources/js/Pages/Landing.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<script setup>
import Panel from '@/Shared/Components/Panel.vue'
</script>

<template>
<Panel />
</template>
3 changes: 0 additions & 3 deletions resources/js/Pages/Welcome.vue

This file was deleted.

56 changes: 56 additions & 0 deletions resources/js/Shared/Components/ComboboxField.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
<script setup>
import { computed, ref } from 'vue'
import { CheckIcon, ChevronUpDownIcon } from '@heroicons/vue/20/solid'
import { Combobox, ComboboxButton, ComboboxInput, ComboboxLabel, ComboboxOption, ComboboxOptions } from '@headlessui/vue'

const props = defineProps({
label: { type: String, required: true },
items: { type: Array, required: true },
displayValue: { type: Function, default: (item) => item.name },
})

const emit = defineEmits(['update'])
const query = ref('')
const selectedItem = ref(null)

const filteredItems = computed(() =>
query.value === ''
? props.items
: props.items.filter((item) => {
return props.displayValue(item).toLowerCase().includes(query.value.toLowerCase())
}),
)

const updateQuery = (event) => {
query.value = event.target.value
emit('update', query.value)
}
</script>

<template>
<Combobox v-model="selectedItem" as="div">
<ComboboxLabel class="block text-sm font-medium leading-6 text-blumilk-700">
{{ label }}
</ComboboxLabel>
<div class="relative mt-0.5">
<ComboboxInput class="w-full rounded-md border-0 bg-white py-3 pl-3 pr-10 text-blumilk-700 shadow-sm ring-1 ring-inset ring-gray-300 focus:ring-2 focus:ring-inset focus:ring-blumilk-500 sm:leading-6" :display-value="displayValue" @change="updateQuery" />
<ComboboxButton class="absolute inset-y-0 right-0 flex items-center rounded-r-md px-2 focus:outline-none">
<ChevronUpDownIcon class="h-5 w-5 text-blumilk-200" aria-hidden="true" />
</ComboboxButton>

<ComboboxOptions v-if="filteredItems.length > 0" class="absolute z-10 mt-1 max-h-60 w-full overflow-auto rounded-md bg-white py-1 text-base shadow-lg ring-1 ring-black focus:outline-none">
<ComboboxOption v-for="item in filteredItems" :key="item.id" v-slot="{ active, selected }" :value="item" as="template">
<li :class="['relative cursor-pointer select-none py-2 pl-3 pr-9 text-lg hover:text-blumilk-500', active ? 'bg-blumilk-25' : 'text-blumilk-700']">
<span :class="['block truncate', selected && 'text-blumilk-900']">
{{ item.name }}
</span>

<span v-if="selected" :class="['absolute inset-y-0 right-0 flex items-center pr-4', active ? 'text-blumilk-300' : 'text-blumilk-500']">
<CheckIcon class="h-5 w-5" aria-hidden="true" />
</span>
</li>
</ComboboxOption>
</ComboboxOptions>
</div>
</Combobox>
</template>
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<script setup>
import { defineProps } from 'vue'

defineProps({
message: {
Expand Down
62 changes: 62 additions & 0 deletions resources/js/Shared/Components/Info.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
<script setup>
import PrimaryButton from '@/Shared/Components/PrimaryButton.vue'
import SecondaryButton from '@/Shared/Components/SecondaryButton.vue'
import Footer from '../Layout/Footer.vue'

const emit = defineEmits(['try-it-out'])
</script>

<template>
<div class="flex h-full flex-col items-start justify-evenly bg-blumilk-25 px-6 md:px-10 lg:px-14">
<div class="hidden md:flex md:w-7/12 lg:w-3/4 xl:w-7/12">
<img class="h-auto max-w-full" src="@/assets/undraw_scooter.svg" alt="Man riding an e-scooter">
</div>

<div class="lg:pb-16">
<h1 class="text-4xl font-bold tracking-tight text-gray-900 sm:text-5xl">
Looking for an e&#8209;scooter?
</h1>
<p class="mx-0 w-full items-start pt-10 text-sm leading-7 text-gray-600 sm:w-2/3 sm:text-base lg:mx-auto lg:w-full lg:text-lg">
There are plenty of e-scooter providers, so sometimes you can be confused about which app you should
use during your trips.
<br><br>
<strong>This application can help you with planning your vacations or business trips.</strong>
</p>
</div>

<div
class="flex w-full flex-wrap items-center justify-center space-y-5 sm:hidden sm:justify-between sm:space-y-0 md:flex"
>
<PrimaryButton class="h-fit w-11/12 py-5 sm:w-5/12" @click="emit('try-it-out')">
Try it out
</PrimaryButton>

<SecondaryButton class="h-fit w-11/12 py-5 sm:w-5/12">
Create account
</SecondaryButton>
</div>

<div class="hidden w-full items-center space-x-12 sm:flex md:hidden">
<div class="flex w-2/3 md:h-1/2 lg:h-1/3">
<img class="max-h-full" src="@/assets/undraw_scooter.svg" alt="Man riding an e-scooter">
</div>

<div class="flex w-1/3 flex-col space-y-8">
<PrimaryButton class="h-fit w-full py-5" @click="emit('try-it-out')">
Try it out
</PrimaryButton>

<SecondaryButton class="h-fit w-full py-5">
EwelinaSkrzypacz marked this conversation as resolved.
Show resolved Hide resolved
Create account
</SecondaryButton>
</div>
</div>
</div>
<Footer />
</template>

<!--<style scoped>-->
<!--* {-->
<!-- border: 1px solid red;-->
<!--}-->
<!--</style>-->
EwelinaSkrzypacz marked this conversation as resolved.
Show resolved Hide resolved
Loading