Skip to content

feat(frontend)::guitar: Adding card components || JIRA: PT-18 #14

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

Merged
merged 9 commits into from
May 17, 2022
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
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
6 changes: 6 additions & 0 deletions components.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,22 @@
declare module 'vue' {
export interface GlobalComponents {
ElAlert: typeof import('element-plus/es')['ElAlert']
ElAvatar: typeof import('element-plus/es')['ElAvatar']
ElButton: typeof import('element-plus/es')['ElButton']
ElButtonGroup: typeof import('element-plus/es')['ElButtonGroup']
ElCard: typeof import('element-plus/es')['ElCard']
ElCol: typeof import('element-plus/es')['ElCol']
ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider']
ElContainer: typeof import('element-plus/es')['ElContainer']
ElDivider: typeof import('element-plus/es')['ElDivider']
ElDropdown: typeof import('element-plus/es')['ElDropdown']
ElDropdownItem: typeof import('element-plus/es')['ElDropdownItem']
ElDropdownMenu: typeof import('element-plus/es')['ElDropdownMenu']
ElIcon: typeof import('element-plus/es')['ElIcon']
ElLink: typeof import('element-plus/es')['ElLink']
ElRow: typeof import('element-plus/es')['ElRow']
ElSkeleton: typeof import('element-plus/es')['ElSkeleton']
ElSkeletonItem: typeof import('element-plus/es')['ElSkeletonItem']
ElTable: typeof import('element-plus/es')['ElTable']
ElTableColumn: typeof import('element-plus/es')['ElTableColumn']
ElTag: typeof import('element-plus/es')['ElTag']
Expand Down
2 changes: 1 addition & 1 deletion src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</template>

<script lang="ts">
import { defineComponent, inject, watch, onMounted } from 'vue'
import { defineComponent, inject } from 'vue'
import { ElConfigProvider } from 'element-plus'
import DefaultLayout from './layouts/default-layout.vue'
import AuthLayout from 'layouts/auth-layout.vue'
Expand Down
3 changes: 0 additions & 3 deletions src/assets/css/el-alert.css

This file was deleted.

6 changes: 6 additions & 0 deletions src/assets/css/el-alert.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.el-alert {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dùng tailwind css class nhé em

border-radius: 0.25rem !important; /* 4px */
}
.el-alert .el-alert__content .el-icon.el-alert__close-btn {
@apply py-3 text-slate-50 hover:text-slate-200;
}
Empty file removed src/assets/css/el-button.css
Empty file.
20 changes: 13 additions & 7 deletions src/assets/css/el-button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,15 @@ body {
--el-button-border-color: var(--button-border-color) !important;
--el-button-hover-border-color: var(--button-hover-border-color) !important;
--el-button-active-border-color: var(--button-active-border-color) !important;

@apply hover:pt-1.5 hover:shadow-sm;
}

@each $type in $types {
.el-button--#{$type} {
@if $type == 'primary' {
background-color: var(--button-bg-color-#{$type}) !important;
}
--el-button-bg-color: var(--button-bg-color-#{$type}) !important;
--el-button-hover-bg-color: var(--button-hover-bg-color-#{$type}) !important;
--el-button-active-bg-color: var(--button-active-bg-color-#{$type}) !important;
Expand All @@ -29,21 +33,23 @@ body {
--el-button-text-color: var(--button-text-color-#{$type});
--el-button-hover-text-color: var(--button-hover-text-color-#{$type}) !important;
--el-button-active-text-color: var(--button-active-text-color-#{$type}) !important;

&:active {
filter: drop-shadow(0 0 #0000);
background-color: var(--button-active-bg-color-#{$type}) !important;
}

@if $type == 'secondary' {
@apply shadow-lg;
}

&:hover {
&:hover, &:focus {
filter: drop-shadow(0 10px 8px rgb(0 0 0 / 0.04)) drop-shadow(0 4px 3px rgb(0 0 0 / 0.1));
background: var(--button-hover-bg-color-#{$type});
}
}
.el-button--#{$type}:active {
filter: drop-shadow(0 0 #0000);
background-color: var(--button-active-bg-color-#{$type});
@if $type == 'primary' {
background-color: var(--button-active-bg-color-#{$type}) !important;
}
}

.el-button.el-button--#{$type}.is-plain {
background: none !important;
Expand All @@ -68,7 +74,7 @@ body {
@apply shadow-none border-none;
}

&:hover {
&:hover, &:focus {
filter: drop-shadow(0 10px 8px rgb(0 0 0 / 0.04)) drop-shadow(0 4px 3px rgb(0 0 0 / 0.1));
background: var(--button-hover-bg-color-#{$type}) !important;
}
Expand Down
6 changes: 6 additions & 0 deletions src/assets/css/el-card.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

body {
.el-card {
--el-card-bg-color: white !important
}
}
7 changes: 7 additions & 0 deletions src/assets/css/el-checkbox.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.el-table .el-checkbox {
--el-checkbox-checked-icon-color: var(--el-color-primary-light-2) !important;
}

.el-table th.is-leaf .el-checkbox .el-checkbox__inner {
--el-checkbox-checked-icon-color: var(--el-text-color-primary) !important;
}
16 changes: 0 additions & 16 deletions src/assets/css/el-dropdown.css

This file was deleted.

20 changes: 20 additions & 0 deletions src/assets/css/el-dropdown.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
.el-dropdown {
@apply rounded-full shadow-teal-400;
}

.el-dropdown .el-button-group .el-button:first-child {
@apply rounded-l-full border-solid border-slate-300 border-r-0 text-black;
}

.el-dropdown .el-button-group .el-dropdown__caret-button {
@apply rounded-r-full border-solid border-slate-300 border-l-0 text-black;
}

.el-dropdown .el-button-group .el-button.el-button.el-button--small {
@apply border-none;
}

.el-dropdown .el-button:first-child,
.el-dropdown .el-button-group .el-dropdown__caret-button {
@apply bg-white font-sans hover:bg-slate-100;
}
11 changes: 0 additions & 11 deletions src/assets/css/el-tag.css

This file was deleted.

13 changes: 13 additions & 0 deletions src/assets/css/el-tag.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.el-tag {
width: 5rem; /* 80px */
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ở đây nữa

border-radius: 9999px !important;
font-weight: 300 !important;
}

.el-tag.el-tag--success {
@apply bg-[#7ACCC8] border-[#7ACCC8];
}

.el-tag.el-tag--danger {
@apply bg-[#E14E58] border-[#E14E58];
}
4 changes: 3 additions & 1 deletion src/assets/css/var.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ $colors: 'default' '#b4ffff' '#000000' '#b4ffff' '#bbffff' '#bbffff' '#000000' '

--button-text-color: #000000;
--button-hover-text-color: #000000;
--button-active-text-color: #000000;
--button-active-text-color: #000000;

--el-table-checked-fill-base: #E14E58;

@each $type, $bg, $color, $bd, $bg-hv, $bd-hv, $color-hv, $bg-active in $colors {
@debug $bg-hv;
Expand Down
Binary file added src/assets/images/Jon_Snow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/images/man_draw.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/images/purple-woman-image.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/images/throne.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/images/tyrion_lannister.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/images/tywin_lannister.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/images/window-purple-image.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 5 additions & 3 deletions src/components/element-plus.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@ import 'assets/css/var.scss'
import 'assets/css/el-button.scss'
import 'assets/css/el-table.css'
import 'assets/css/el-table-column.css'
import 'assets/css/el-dropdown.css'
import 'assets/css/el-tag.css'
import 'assets/css/el-alert.css'
import 'assets/css/el-dropdown.scss'
import 'assets/css/el-alert.scss'
import 'assets/css/el-checkbox.scss'

import 'assets/css/el-message.css'
import 'assets/css/typography.scss'
import 'assets/css/el-card.scss'
import 'assets/css/el-tag.scss'


import 'element-plus/dist/index.css'
Expand Down
Loading