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 - homepage frontend #16

Merged
merged 62 commits into from
Aug 19, 2024
Merged
Show file tree
Hide file tree
Changes from 54 commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
0f1aed4
build: Installed vue heroicons
tiankongldp Aug 8, 2024
58345b1
chore: added colors to the tailwind configuration
tiankongldp Aug 11, 2024
34b4c67
chore: add assets
tiankongldp Aug 11, 2024
9be0dc5
chore: configure default transition in vue
tiankongldp Aug 11, 2024
6ee9667
chore: add homepage route
tiankongldp Aug 11, 2024
ee1106a
feat: add homepage
tiankongldp Aug 11, 2024
0746034
feat: added "forgot password" link
tiankongldp Aug 11, 2024
9852b15
fix: uncanny line removed
tiankongldp Aug 12, 2024
7a11829
fix: line added
tiankongldp Aug 12, 2024
4d94241
fix: corrected tailwind dependency
tiankongldp Aug 12, 2024
7af6be6
chore: added `xs` property for responsivness in tailwind
tiankongldp Aug 12, 2024
b398123
fix: corrected responsivness for extra small mobile layout
tiankongldp Aug 12, 2024
fc02c9b
fix: renamed `RegisterBanner` component to `AuthBanner`
tiankongldp Aug 12, 2024
87f5b06
fix: renamed login button to `Sign In`
tiankongldp Aug 12, 2024
52314e8
fix: renamed both auth buttons to "Continue"
tiankongldp Aug 12, 2024
aea9b4b
fix: changed "/home" path to "/"
tiankongldp Aug 12, 2024
54184d8
chore: added red color to config
tiankongldp Aug 12, 2024
ac74a4b
fix: responsiveness for ultra small screens
tiankongldp Aug 12, 2024
2769bb4
fix: added fields requirements
tiankongldp Aug 12, 2024
73a5b8a
style: change fields' outline color
tiankongldp Aug 12, 2024
5b3485f
style: change font "Forgot password?" font size
tiankongldp Aug 12, 2024
f270426
style: added animations for fields
tiankongldp Aug 12, 2024
a24f232
fix: add absent submitForm function
tiankongldp Aug 13, 2024
682f104
refactor: remove redundant styles
tiankongldp Aug 13, 2024
4ddcede
feat: added underdeveloped search (option click doesn't always work)
tiankongldp Aug 13, 2024
a4bd8a0
fix: animation disabled due to inconsistent behaviour
tiankongldp Aug 13, 2024
3c4767b
fix: option click always works
tiankongldp Aug 13, 2024
ed3e380
fix: changed language to polish
tiankongldp Aug 13, 2024
9e9de08
doc: added screenshots
tiankongldp Aug 13, 2024
87428d2
Merge branch 'main' into 2-home-page-frontend
JokeUrSelf Aug 13, 2024
3f0fb55
Update resources/js/components/Home/RegisterForm.vue
JokeUrSelf Aug 13, 2024
4c5215d
Update resources/js/components/Home/InformationButton.vue
JokeUrSelf Aug 13, 2024
8c6c5ce
Update resources/js/components/Home/Footer.vue
JokeUrSelf Aug 13, 2024
a4dc638
Update resources/js/components/Home/RegisterForm.vue
JokeUrSelf Aug 13, 2024
7a1c767
Update resources/js/components/Home/LoginForm.vue
JokeUrSelf Aug 13, 2024
cdd2135
Update resources/js/components/Home/LoginForm.vue
JokeUrSelf Aug 13, 2024
a0eb34a
style: rephrasing sentences
JokeUrSelf Aug 13, 2024
f664a55
rephrasing words and sentences; removing a comment
JokeUrSelf Aug 13, 2024
1f0e25b
rephrasing and removing a line
JokeUrSelf Aug 13, 2024
5e484ba
style: changed the position of a school searchbar
tiankongldp Aug 13, 2024
04fb205
fix: vertical responsiveness
tiankongldp Aug 14, 2024
43f7945
fix: incorrect banner text color with a dark mode turned on
tiankongldp Aug 14, 2024
d521f8e
style: naming banner title to "Testy"
tiankongldp Aug 14, 2024
bf04dc0
fix: footer is now visible on the screen for large displays
tiankongldp Aug 14, 2024
4feb39e
fix: information button hover proportions optimization
tiankongldp Aug 14, 2024
d67cc57
refactor: rewriting a comment
tiankongldp Aug 14, 2024
01e86d8
fix: fixed error on login
tiankongldp Aug 14, 2024
b789a0e
feat: applied styled scrollbar globally
tiankongldp Aug 14, 2024
246d992
fix: sponsors' proper positioning
tiankongldp Aug 14, 2024
c3973c0
refactor: clean sponsors block
tiankongldp Aug 14, 2024
7aba545
refactor: move searchbar from registration to its own component
tiankongldp Aug 14, 2024
592deaa
fix: proper animation for searchbar
tiankongldp Aug 14, 2024
b296f51
refactor: deleted empty line
tiankongldp Aug 14, 2024
d605393
fix: background responsiveness
tiankongldp Aug 15, 2024
371643c
refactor: indentation corrections
JokeUrSelf Aug 19, 2024
eab876c
refactor: remove empty functions
tiankongldp Aug 19, 2024
d1bad96
fix: localization in the banner
tiankongldp Aug 19, 2024
51d46c8
style: added icon to indicate searchbar
tiankongldp Aug 19, 2024
7c134f7
style: correction of titles
tiankongldp Aug 19, 2024
58389e7
fix: responsiveness for fields on small screens
tiankongldp Aug 19, 2024
3cf8140
doc: add screenshots
tiankongldp Aug 19, 2024
d556a40
doc: revert changes in readme
tiankongldp Aug 19, 2024
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
11 changes: 10 additions & 1 deletion package-lock.json

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

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,13 @@
"tsc": "vue-tsc"
},
"dependencies": {
"@heroicons/vue": "^2.1.5",
"@inertiajs/vue3": "^1.0.14",
"@tailwindcss/forms": "^0.5.7",
"@tailwindcss/typography": "^0.5.10",
"tailwindcss": "^3.4.8",
"laravel-vite-plugin": "^1.0.2",
"lodash": "^4.17.21",
"tailwindcss": "^3.4.1",
"vue": "^3.4.21"
},
"devDependencies": {
Expand Down
3 changes: 2 additions & 1 deletion readme.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## @blumilksoftware/interns2024b
### About application
> placeholder
![desktop-home](screenshots/desktop/homepage.png)
![mobile-home](screenshots/mobile/homepage.png)

### Local development
```
Expand Down
Binary file added resources/assets/header-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
80 changes: 80 additions & 0 deletions resources/assets/logo-nowe.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
38 changes: 38 additions & 0 deletions resources/css/app.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,41 @@
@tailwind base;
@tailwind components;
@tailwind utilities;

.v-enter-active,
.v-leave-active {
transition: opacity 0.3s ease;
}
html {
overflow-y: scroll;
}
.v-enter-from,
.v-leave-to {
opacity: 0;
}

::-webkit-scrollbar {
width: 10px;
position: fixed;
}

::-webkit-scrollbar-track {
background: #ffffff4c;
position: fixed;
}

/* Handle */
::-webkit-scrollbar-thumb {
background: #262c8926;
border-radius: 1rem;
border: 2px solid transparent;
background-clip: content-box;
position: fixed;
}

::-webkit-scrollbar-thumb:hover {
background: #262c894c;
border: 2px solid transparent;
background-clip: content-box;
position: fixed;
}
JokeUrSelf marked this conversation as resolved.
Show resolved Hide resolved
JokeUrSelf marked this conversation as resolved.
Show resolved Hide resolved
23 changes: 23 additions & 0 deletions resources/js/Pages/Home.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<script lang="ts" setup>
import { ref, provide } from 'vue'
import Footer from '@/components/Home/Footer.vue'
import AuthBanner from '@/components/Home/AuthBanner.vue'
import GeneralSection from '@/components/Home/GeneralSection.vue'
import AuthSection from '@/components/Home/AuthSection.vue'
import BackgroundEffect from '@/components/Home/BackgroundEffect.vue'

const isLogin = ref(null)
provide('isLoginRef', isLogin)
</script>

<template>
<div class="flex flex-col h-screen">
<BackgroundEffect />
<AuthBanner :is-login="isLogin" />
<div class="flex flex-col lg:flex-row lg:justify-evenly lg:gap-x-[5vw] lg:px-[5vw]">
<GeneralSection />
<AuthSection ref="isLogin" />
</div>
<Footer />
</div>
</template>
22 changes: 22 additions & 0 deletions resources/js/components/Common/AuthButton.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<script setup lang="ts">

const props = defineProps<{isLogin: boolean}>()

const emit = defineEmits<(e: 'update:isLogin', value: boolean) => void>()

const handleCheckboxChange = () => {
emit('update:isLogin', !props.isLogin)
}
</script>

<template>
<label class="flex p-2 relative w-full cursor-pointer border-2 border-primary/30 rounded-xl bg-white/30">
<input type="checkbox" class="sr-only" @change="handleCheckboxChange">
<span
:class="{ 'translate-x-full' : props.isLogin}"
class="left-2 w-[calc(50%-.5rem)] absolute h-[calc(100%-1rem)] rounded-md bg-primary duration-200"
/>
<span :class="{ 'text-white': !props.isLogin}" class="z-10 w-full text-center duration-200 py-3 text-primary font-bold">Rejestracja</span>
<span :class="{ 'text-white': props.isLogin }" class="z-10 w-full text-center duration-200 py-3 text-primary font-bold">Logowanie</span>
</label>
</template>
23 changes: 23 additions & 0 deletions resources/js/components/Common/Checkbox.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<template>
<div class="inline-flex items-center">
<label class="relative flex items-center rounded-full cursor-pointer" htmlFor="checkbox">
<input
id="checkbox"
type="checkbox"
class="before:content[''] peer relative size-5 cursor-pointer appearance-none rounded-md border border-blue-gray-200 transition-all before:absolute before:top-2/4 before:left-2/4 before:block before:size-12 before:-translate-y-2/4 before:-translate-x-2/4 before:rounded-full before:bg-blue-gray-500 before:opacity-0 before:transition-opacity checked:border-primary checked:bg-primary checked:before:bg-primary hover:before:opacity-10" checked
>
<span
class="absolute text-white transition-opacity opacity-0 pointer-events-none top-2/4 left-2/4 -translate-y-2/4 -translate-x-2/4 peer-checked:opacity-100"
>
<svg xmlns="http://www.w3.org/2000/svg" class="size-3.5" viewBox="0 0 20 20" fill="currentColor"
stroke="currentColor" stroke-width="1"
>
<path fill-rule="evenodd"
d="M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z"
clip-rule="evenodd"
/>
</svg>
</span>
</label>
</div>
</template>
48 changes: 48 additions & 0 deletions resources/js/components/Common/Searchbar.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<script lang="ts" setup>
import {computed, ref, defineProps} from 'vue'
const isSearchFocused = ref(false)
const searchQuery = ref('')
const props = defineProps({options: {type: Object, default:()=>{}}})
const filteredSchools: any = computed(
() => {
return props.options.filter(
(obj:any) => obj.option.toString().includes(searchQuery.value),
)
},
)
const selectedOption = ref('')

const onOptionClick = (obj:any)=>{
selectedOption.value = obj.option
isSearchFocused.value = false
}
</script>

<template>
<div :class="{'scale-y-100 max-h-80': isSearchFocused}" class="overflow-hidden duration-200 max-h-12 flex flex-col mt-2 bg-white/30 placeholder:text-gray-400 rounded-[.5rem] ring-2 ring-primary/30 ring-inset">
<input
:value="isSearchFocused ? searchQuery : selectedOption"
class="outline-none focus:duration-200 focus:ring-inset focus:ring focus:ring-primary rounded-[.5rem] p-3 bg-transparent w-full text-gray-900"
required name="search-schools" :class="{'cursor-pointer' : !isSearchFocused}"
type="text"
:placeholder="selectedOption"
@input="(e:any)=>searchQuery=e.target.value"
@focus="isSearchFocused=true"
@blur="isSearchFocused=false"
>
<Transition>
<div v-show="true" class="m-0.5 mt-0 py-2 overflow-auto">
<div v-if="filteredSchools.length>0">
<span v-for="obj in filteredSchools"
:key="obj.id"
class="cursor-pointer block px-4 py-2 hover:bg-primary/10 text-[0.9rem]"
@mousedown="onOptionClick(obj)"
>{{ obj.option }}</span>
</div>
<span v-else class="block px-4 py-2 text-sm">
Nie znaleziono szkoły
</span>
</div>
</Transition>
</div>
</template>
70 changes: 70 additions & 0 deletions resources/js/components/Home/AuthBanner.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
<script setup lang="ts">
import { ref, onMounted, onUnmounted, type Ref } from 'vue'
import { inject } from 'vue'
const isLoginRef: Ref<any, any> | undefined = inject('isLoginRef')


// const props = defineProps(['isLogin'])

// function gotoAuthSection() {
// props.authForm.authForm
// authFormRef.value.authForm

// props.authForm.authForm.value.authForm.scrollIntoView({
// behavior: 'smooth',
// block: 'center',
// })

// }
JokeUrSelf marked this conversation as resolved.
Show resolved Hide resolved

const isHidden = ref(false)

function setBannerVisibility() {
isHidden.value = window.scrollY / 100 >= 5
}
onMounted(() => window.addEventListener('scroll', setBannerVisibility))
onUnmounted(() => window.removeEventListener('scroll', setBannerVisibility))

function gotoAuthSection() {
window.scrollTo({
top: window.innerHeight,
behavior: 'smooth',
})
}

function gotoRegisterSection() {
gotoAuthSection()
if (isLoginRef)
isLoginRef.value.isLogin = false
}

function gotoLoginSection() {
gotoAuthSection()
if (isLoginRef)
isLoginRef.value.isLogin = true
}

</script>

<template>
<div>
<div class="h-16 lg:hidden" />
<div :class="{ '-translate-y-full': isHidden }"
class="lg:hidden top-0 duration-200 justify-evenly z-10 backdrop-blur-md bg-white/30 lg:bg-white fixed w-full flex items-center gap-x-6 px-6 py-2.5"
>
<div class="justify-center flex-1 hidden lg:flex" />
<div class="hidden lg:justify-center flex-1 xs:flex">
<p class="font-bold text-sm leading-6 text-gray-900">Testy</p>
</div>
<div class="flex justify-end flex-1 gap-6 items-center">
<b><button class="text-sm text-primary" @click="gotoLoginSection">Sign In </button></b>
<button
class="flex-none rounded-lg bg-primary px-3.5 py-3 text-sm font-bold text-white shadow-sm hover:bg-primary-950 duration-200 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-gray-900"
@click="gotoRegisterSection"
>
Sign up now
</button>
</div>
</div>
</div>
</template>
Loading
Loading