-
Notifications
You must be signed in to change notification settings - Fork 15
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
[WIP]: Refactor team page #94
Closed
rennavittorio
wants to merge
18
commits into
Schroedinger-Hat:main
from
rennavittorio:update/team-page
Closed
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
0004bc3
fix: delete cypress dep, cause error in package downloading
rennavittorio 1996780
enh: add new team member and refactor img folder name and team-member…
rennavittorio 725994a
fix: delete router-link from whole card
rennavittorio 6151da8
enh(TeamPage): add MemberCard and SocialIcons component
rennavittorio 0ae6958
chore: refactor script positioning and delete old comments
rennavittorio c88b29f
refactor(team-member): refactor using component and p
rennavittorio d948b0f
feat: create reusable heading component for page title
rennavittorio f7a5150
refactor: refactor team page with unocss and heading
rennavittorio 3be1717
fix: fix h1, align to convention
rennavittorio 4605522
refactor: refactor components style with unocss
rennavittorio 17f2167
refactor: refactor team-member page with unocss
rennavittorio b173c39
fix(package): add cypress dependency (align to project)
rennavittorio 666e2cc
fix(img): rename folder into team-members
rennavittorio bb20108
fix(img): rename members team img (align to project)
rennavittorio c165a85
chore(config): add brand color to unocss config
rennavittorio bd94805
fix(components): align unocss classes to project, manage light-dark m…
rennavittorio 13a889d
fix(components): align array type to project standard
rennavittorio ed76e4b
fix(views): align unocss classes and position to project standard
rennavittorio File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
<script setup lang="ts"> | ||
import { useI18n } from 'vue-i18n' | ||
import SocialIcons from './SocialIcons.vue' | ||
|
||
defineProps<{ | ||
member: string | ||
}>() | ||
|
||
const socials = ['github', 'linkedin', 'twitter', 'website'] | ||
|
||
const { t } = useI18n() | ||
</script> | ||
|
||
<template> | ||
<div | ||
class="overflow-hidden p-8 font-sans rounded bg-light-bg-secondary dark:bg-dark-bg-secondary" | ||
data-test="team-card" | ||
:data-test-member-name="`team-member-${member}`" | ||
> | ||
<div class="relative z-0 flex h-auto items-center justify-center rounded-full my-auto text-center"> | ||
<div | ||
:data-test="`team-member-${member}-index-photo`" | ||
class="block w-32 h-32 rounded-full bg-center bg-cover" | ||
:style="`background-image: url( ${$t(`team.${member}.image`)} );`" | ||
/> | ||
</div> | ||
<div class="relative z-1 flex flex-col items-center justify-center gap-1"> | ||
<h2 | ||
class="text-6 font-700 text-text-primary" | ||
:data-test="`team-member-${member}-name`" | ||
> | ||
{{ $t(`team.${member}.name`) }} | ||
</h2> | ||
|
||
<SocialIcons :member="member" :socials="socials" /> | ||
|
||
<router-link | ||
class="font-700 w-fit px-4 py-1 border-1 border-solid border-transparent rounded-full bg-light-bg-primary text-light-text-primary dark:bg-dark-bg-primary dark:text-dark-text-primary hover:bg-dark-bg-primary hover:text-dark-text-primary dark:hover:bg-light-bg-primary dark:hover:text-light-text-primary " | ||
:data-test="`team-member-${member}-page-link`" | ||
:to="{ name: 'TeamMember', params: { member } }" | ||
> | ||
{{ t('redirect.profile') }} | ||
</router-link> | ||
</div> | ||
</div> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<script setup lang="ts"> | ||
defineProps<{ | ||
member: string | ||
socials: string[] | ||
}>() | ||
</script> | ||
|
||
<template> | ||
<div class="w-fit"> | ||
<div v-for="social in socials" :key="social" class="inline-block"> | ||
<a | ||
v-if="$t(`team.${member}.${social}_url`).length > 1" | ||
class="inline-block m-0.2em group" | ||
:data-test="`team-member-${member}-${social}`" | ||
:href="$t(`team.${member}.${social}${social !== 'website' ? '_url' : ''}`)" target="_blank" | ||
> | ||
<i :class="[`text-1.2em ${social !== 'website' ? `fab fa-${social}` : 'fa fa-cloud'} group-hover:text-#2e3440`]" /> | ||
</a> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<style scoped lang="scss"> | ||
|
||
</style> |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's some confusion on how the UnoCSS rules are declared and utilized in this PR: for example, we have rules like:
px-15px
,py-5px
,w-128px
,mx-2em
,text-1rem
utilized in this component which mix all the possible types of units that we can utilize in CSS. This plays against the flexibility of UnoCSS and their already baked in values inrem
units.w-128px
shouldn't be utilized like this, because you could've already declared it likew-32
which if you multiply32 * 4 = 128
it will give you your desired result! You can also check this specific documentation of TailwindCSS width which allows you to see how all this type of frameworks have an approach of 4 point grid in their design.py-5px
should be avoided because it doesn't fit into the4pt grid
, you could easily usepy-1
to obtain4px
.px-15px
should be avoided as well, you could utilizepx-4
which would equal to16px
and and by doing that avoiding to use px on an UnoCSS rule.mx-2em
the use ofem
is discouraged as it doesn't fit well with the4pt grid
. You should stick torem
values.text-1rem
could also be rewritten astext-base
. See explicit font size documentation of Tailwind here. Even with the documentation read, you shouldn't be applying this rule because the global font value is already16px
(which equals to1rem
) check it out on your own App.vue file!You can check out this recent component that has been updated to utilize UnoCSS so you can see how there's no need to implement all different types of unit values on the utility rules if we already stand by a system =]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fix(components): align unocss classes to project, manage light-dark m…
fixed
(also big thanks for all the docs linked! <3 )