From e60d94fb3c0e28ac84610d9e5f6baa53effe31f9 Mon Sep 17 00:00:00 2001 From: cagataycivici Date: Sat, 9 May 2020 02:19:35 +0300 Subject: [PATCH] Drop-in of badge --- public/themes/saga-blue/theme.css | 51 ++++++++++ public/themes/saga-cyan/theme.css | 51 ++++++++++ public/themes/saga-deeppurple/theme.css | 51 ++++++++++ public/themes/saga-green/theme.css | 51 ++++++++++ public/themes/saga-indigo/theme.css | 51 ++++++++++ public/themes/saga-orange/theme.css | 51 ++++++++++ public/themes/saga-purple/theme.css | 51 ++++++++++ public/themes/saga-teal/theme.css | 51 ++++++++++ src/AppMenu.vue | 1 + src/assets/styles/app.scss | 4 +- src/assets/styles/primevue.css | 1 + src/components/badge/Badge.css | 27 +++++ src/router.js | 5 + src/views/badge/BadgeDemo.vue | 91 +++++++++++++++++ src/views/badge/BadgeDoc.vue | 128 ++++++++++++++++++++++++ 15 files changed, 662 insertions(+), 3 deletions(-) create mode 100644 src/components/badge/Badge.css create mode 100644 src/views/badge/BadgeDemo.vue create mode 100644 src/views/badge/BadgeDoc.vue diff --git a/public/themes/saga-blue/theme.css b/public/themes/saga-blue/theme.css index b9679dde3..9e09b88cd 100644 --- a/public/themes/saga-blue/theme.css +++ b/public/themes/saga-blue/theme.css @@ -3403,4 +3403,55 @@ background: rgba(0, 0, 0, 0.4); } +.p-badge { + background: #2196F3; + color: #ffffff; + font-size: 0.75em; + font-weight: 700; + min-width: 2em; + height: 2em; + line-height: 2em; +} +.p-badge.p-badge-success { + background-color: #689F38; + color: #ffffff; +} +.p-badge.p-badge-info { + background-color: #0288D1; + color: #ffffff; +} +.p-badge.p-badge-warning { + background-color: #FBC02D; + color: #212529; +} +.p-badge.p-badge-danger { + background-color: #D32F2F; + color: #ffffff; +} + +.p-tag { + background: #2196F3; + color: #ffffff; + font-size: 0.75em; + font-weight: 700; + padding: 0.25em 0.4em; + border-radius: 3px; +} +.p-tag.p-tag-success { + background-color: #689F38; + color: #ffffff; +} +.p-tag.p-tag-info { + background-color: #0288D1; + color: #ffffff; +} +.p-tag.p-tag-warning { + background-color: #FBC02D; + color: #212529; +} +.p-tag.p-tag-danger { + background-color: #D32F2F; + color: #ffffff; +} + /* Add your customizations of theme here */ diff --git a/public/themes/saga-cyan/theme.css b/public/themes/saga-cyan/theme.css index b0341c550..d7e381dfb 100644 --- a/public/themes/saga-cyan/theme.css +++ b/public/themes/saga-cyan/theme.css @@ -3403,4 +3403,55 @@ background: rgba(0, 0, 0, 0.4); } +.p-badge { + background: #00ACC1; + color: #ffffff; + font-size: 0.75em; + font-weight: 700; + min-width: 2em; + height: 2em; + line-height: 2em; +} +.p-badge.p-badge-success { + background-color: #689F38; + color: #ffffff; +} +.p-badge.p-badge-info { + background-color: #0288D1; + color: #ffffff; +} +.p-badge.p-badge-warning { + background-color: #FBC02D; + color: #212529; +} +.p-badge.p-badge-danger { + background-color: #D32F2F; + color: #ffffff; +} + +.p-tag { + background: #00ACC1; + color: #ffffff; + font-size: 0.75em; + font-weight: 700; + padding: 0.25em 0.4em; + border-radius: 3px; +} +.p-tag.p-tag-success { + background-color: #689F38; + color: #ffffff; +} +.p-tag.p-tag-info { + background-color: #0288D1; + color: #ffffff; +} +.p-tag.p-tag-warning { + background-color: #FBC02D; + color: #212529; +} +.p-tag.p-tag-danger { + background-color: #D32F2F; + color: #ffffff; +} + /* Add your customizations of theme here */ diff --git a/public/themes/saga-deeppurple/theme.css b/public/themes/saga-deeppurple/theme.css index 8e4513f86..ddfe195e5 100644 --- a/public/themes/saga-deeppurple/theme.css +++ b/public/themes/saga-deeppurple/theme.css @@ -3403,4 +3403,55 @@ background: rgba(0, 0, 0, 0.4); } +.p-badge { + background: #673AB7; + color: #ffffff; + font-size: 0.75em; + font-weight: 700; + min-width: 2em; + height: 2em; + line-height: 2em; +} +.p-badge.p-badge-success { + background-color: #689F38; + color: #ffffff; +} +.p-badge.p-badge-info { + background-color: #0288D1; + color: #ffffff; +} +.p-badge.p-badge-warning { + background-color: #FBC02D; + color: #212529; +} +.p-badge.p-badge-danger { + background-color: #D32F2F; + color: #ffffff; +} + +.p-tag { + background: #673AB7; + color: #ffffff; + font-size: 0.75em; + font-weight: 700; + padding: 0.25em 0.4em; + border-radius: 3px; +} +.p-tag.p-tag-success { + background-color: #689F38; + color: #ffffff; +} +.p-tag.p-tag-info { + background-color: #0288D1; + color: #ffffff; +} +.p-tag.p-tag-warning { + background-color: #FBC02D; + color: #212529; +} +.p-tag.p-tag-danger { + background-color: #D32F2F; + color: #ffffff; +} + /* Add your customizations of theme here */ diff --git a/public/themes/saga-green/theme.css b/public/themes/saga-green/theme.css index ea0b7b752..49baeadbc 100644 --- a/public/themes/saga-green/theme.css +++ b/public/themes/saga-green/theme.css @@ -3403,4 +3403,55 @@ background: rgba(0, 0, 0, 0.4); } +.p-badge { + background: #4CAF50; + color: #ffffff; + font-size: 0.75em; + font-weight: 700; + min-width: 2em; + height: 2em; + line-height: 2em; +} +.p-badge.p-badge-success { + background-color: #689F38; + color: #ffffff; +} +.p-badge.p-badge-info { + background-color: #0288D1; + color: #ffffff; +} +.p-badge.p-badge-warning { + background-color: #FBC02D; + color: #212529; +} +.p-badge.p-badge-danger { + background-color: #D32F2F; + color: #ffffff; +} + +.p-tag { + background: #4CAF50; + color: #ffffff; + font-size: 0.75em; + font-weight: 700; + padding: 0.25em 0.4em; + border-radius: 3px; +} +.p-tag.p-tag-success { + background-color: #689F38; + color: #ffffff; +} +.p-tag.p-tag-info { + background-color: #0288D1; + color: #ffffff; +} +.p-tag.p-tag-warning { + background-color: #FBC02D; + color: #212529; +} +.p-tag.p-tag-danger { + background-color: #D32F2F; + color: #ffffff; +} + /* Add your customizations of theme here */ diff --git a/public/themes/saga-indigo/theme.css b/public/themes/saga-indigo/theme.css index 38977f0c0..e2cc8e6bf 100644 --- a/public/themes/saga-indigo/theme.css +++ b/public/themes/saga-indigo/theme.css @@ -3403,4 +3403,55 @@ background: rgba(0, 0, 0, 0.4); } +.p-badge { + background: #3F51B5; + color: #ffffff; + font-size: 0.75em; + font-weight: 700; + min-width: 2em; + height: 2em; + line-height: 2em; +} +.p-badge.p-badge-success { + background-color: #689F38; + color: #ffffff; +} +.p-badge.p-badge-info { + background-color: #0288D1; + color: #ffffff; +} +.p-badge.p-badge-warning { + background-color: #FBC02D; + color: #212529; +} +.p-badge.p-badge-danger { + background-color: #D32F2F; + color: #ffffff; +} + +.p-tag { + background: #3F51B5; + color: #ffffff; + font-size: 0.75em; + font-weight: 700; + padding: 0.25em 0.4em; + border-radius: 3px; +} +.p-tag.p-tag-success { + background-color: #689F38; + color: #ffffff; +} +.p-tag.p-tag-info { + background-color: #0288D1; + color: #ffffff; +} +.p-tag.p-tag-warning { + background-color: #FBC02D; + color: #212529; +} +.p-tag.p-tag-danger { + background-color: #D32F2F; + color: #ffffff; +} + /* Add your customizations of theme here */ diff --git a/public/themes/saga-orange/theme.css b/public/themes/saga-orange/theme.css index b550a2fa5..ec6aa7618 100644 --- a/public/themes/saga-orange/theme.css +++ b/public/themes/saga-orange/theme.css @@ -3403,4 +3403,55 @@ background: rgba(0, 0, 0, 0.4); } +.p-badge { + background: #FFC107; + color: #212529; + font-size: 0.75em; + font-weight: 700; + min-width: 2em; + height: 2em; + line-height: 2em; +} +.p-badge.p-badge-success { + background-color: #689F38; + color: #ffffff; +} +.p-badge.p-badge-info { + background-color: #0288D1; + color: #ffffff; +} +.p-badge.p-badge-warning { + background-color: #FBC02D; + color: #212529; +} +.p-badge.p-badge-danger { + background-color: #D32F2F; + color: #ffffff; +} + +.p-tag { + background: #FFC107; + color: #212529; + font-size: 0.75em; + font-weight: 700; + padding: 0.25em 0.4em; + border-radius: 3px; +} +.p-tag.p-tag-success { + background-color: #689F38; + color: #ffffff; +} +.p-tag.p-tag-info { + background-color: #0288D1; + color: #ffffff; +} +.p-tag.p-tag-warning { + background-color: #FBC02D; + color: #212529; +} +.p-tag.p-tag-danger { + background-color: #D32F2F; + color: #ffffff; +} + /* Add your customizations of theme here */ diff --git a/public/themes/saga-purple/theme.css b/public/themes/saga-purple/theme.css index cbbeb64ec..cea27b662 100644 --- a/public/themes/saga-purple/theme.css +++ b/public/themes/saga-purple/theme.css @@ -3403,4 +3403,55 @@ background: rgba(0, 0, 0, 0.4); } +.p-badge { + background: #9C27B0; + color: #ffffff; + font-size: 0.75em; + font-weight: 700; + min-width: 2em; + height: 2em; + line-height: 2em; +} +.p-badge.p-badge-success { + background-color: #689F38; + color: #ffffff; +} +.p-badge.p-badge-info { + background-color: #0288D1; + color: #ffffff; +} +.p-badge.p-badge-warning { + background-color: #FBC02D; + color: #212529; +} +.p-badge.p-badge-danger { + background-color: #D32F2F; + color: #ffffff; +} + +.p-tag { + background: #9C27B0; + color: #ffffff; + font-size: 0.75em; + font-weight: 700; + padding: 0.25em 0.4em; + border-radius: 3px; +} +.p-tag.p-tag-success { + background-color: #689F38; + color: #ffffff; +} +.p-tag.p-tag-info { + background-color: #0288D1; + color: #ffffff; +} +.p-tag.p-tag-warning { + background-color: #FBC02D; + color: #212529; +} +.p-tag.p-tag-danger { + background-color: #D32F2F; + color: #ffffff; +} + /* Add your customizations of theme here */ diff --git a/public/themes/saga-teal/theme.css b/public/themes/saga-teal/theme.css index 903819138..cc1c7a563 100644 --- a/public/themes/saga-teal/theme.css +++ b/public/themes/saga-teal/theme.css @@ -3403,4 +3403,55 @@ background: rgba(0, 0, 0, 0.4); } +.p-badge { + background: #009688; + color: #ffffff; + font-size: 0.75em; + font-weight: 700; + min-width: 2em; + height: 2em; + line-height: 2em; +} +.p-badge.p-badge-success { + background-color: #689F38; + color: #ffffff; +} +.p-badge.p-badge-info { + background-color: #0288D1; + color: #ffffff; +} +.p-badge.p-badge-warning { + background-color: #FBC02D; + color: #212529; +} +.p-badge.p-badge-danger { + background-color: #D32F2F; + color: #ffffff; +} + +.p-tag { + background: #009688; + color: #ffffff; + font-size: 0.75em; + font-weight: 700; + padding: 0.25em 0.4em; + border-radius: 3px; +} +.p-tag.p-tag-success { + background-color: #689F38; + color: #ffffff; +} +.p-tag.p-tag-info { + background-color: #0288D1; + color: #ffffff; +} +.p-tag.p-tag-warning { + background-color: #FBC02D; + color: #212529; +} +.p-tag.p-tag-danger { + background-color: #D32F2F; + color: #ffffff; +} + /* Add your customizations of theme here */ diff --git a/src/AppMenu.vue b/src/AppMenu.vue index ffc8a9c58..06e670d77 100755 --- a/src/AppMenu.vue +++ b/src/AppMenu.vue @@ -146,6 +146,7 @@ Misc
+ Badge BlockUI Inplace ProgressBar diff --git a/src/assets/styles/app.scss b/src/assets/styles/app.scss index 1d9fccb1c..4b4a36ee4 100644 --- a/src/assets/styles/app.scss +++ b/src/assets/styles/app.scss @@ -473,10 +473,8 @@ a { h1 { font-size: 28px; margin: 0 0 20px 0; - display: block; - text-align: left; color: #ffffff; - font-weight: normal; + font-weight: 700; } p { diff --git a/src/assets/styles/primevue.css b/src/assets/styles/primevue.css index ecceb3a2b..986a67488 100644 --- a/src/assets/styles/primevue.css +++ b/src/assets/styles/primevue.css @@ -1,4 +1,5 @@ @import '../../components/common/Common.css'; +@import '../../components/badge/Badge.css'; @import '../../components/button/Button.css'; @import '../../components/checkbox/Checkbox.css'; @import '../../components/colorpicker/ColorPicker.css'; diff --git a/src/components/badge/Badge.css b/src/components/badge/Badge.css new file mode 100644 index 000000000..2b288c9d9 --- /dev/null +++ b/src/components/badge/Badge.css @@ -0,0 +1,27 @@ +.p-badge { + display: inline-block; + border-radius: 50%; + text-align: center; +} + +.p-tag { + display: inline-block; + text-align: center; +} + +.p-tag.p-tag-rounded { + border-radius: 10em; +} + +.p-overlay-badge { + position: relative; + display: inline-block; +} + +.p-overlay-badge .p-badge { + position: absolute; + top: 0; + right: 0; + transform: translate(1em, -1em); + margin: 0; +} \ No newline at end of file diff --git a/src/router.js b/src/router.js index 6464924e3..2a3d0d213 100755 --- a/src/router.js +++ b/src/router.js @@ -41,6 +41,11 @@ export default new Router({ name: 'autocomplete', component: () => import('./views/autocomplete/AutoCompleteDemo.vue') }, + { + path: '/badge', + name: 'badge', + component: () => import('./views/badge/BadgeDemo.vue') + }, { path: '/blockui', name: 'blockui', diff --git a/src/views/badge/BadgeDemo.vue b/src/views/badge/BadgeDemo.vue new file mode 100644 index 000000000..df52b6929 --- /dev/null +++ b/src/views/badge/BadgeDemo.vue @@ -0,0 +1,91 @@ + + + + + \ No newline at end of file diff --git a/src/views/badge/BadgeDoc.vue b/src/views/badge/BadgeDoc.vue new file mode 100644 index 000000000..e71f3cd3c --- /dev/null +++ b/src/views/badge/BadgeDoc.vue @@ -0,0 +1,128 @@ + \ No newline at end of file