From a1d23a02d0bd83e88a0d30a3ef9b64957034e41a Mon Sep 17 00:00:00 2001 From: cagataycivici Date: Sun, 16 Dec 2018 23:03:20 +0300 Subject: [PATCH] Implemented Card Component --- public/demo/images/usercard.png | Bin 0 -> 8003 bytes src/AppMenu.vue | 1 + src/assets/styles/primevue.css | 1 + src/components/card/Card.css | 24 ++++++++++++++++++++ src/components/card/Card.vue | 23 +++++++++++++++++++ src/main.js | 2 ++ src/router.js | 5 ++++ src/views/card/CardDemo.vue | 39 ++++++++++++++++++++++++++++++++ 8 files changed, 95 insertions(+) create mode 100644 public/demo/images/usercard.png create mode 100644 src/components/card/Card.css create mode 100644 src/components/card/Card.vue create mode 100644 src/views/card/CardDemo.vue diff --git a/public/demo/images/usercard.png b/public/demo/images/usercard.png new file mode 100644 index 0000000000000000000000000000000000000000..a83e51abeff75303584bdd8e38f7157a1dbb6d1a GIT binary patch literal 8003 zcmYM3cT^M27xx2!1R->UP!l6f2uKrY3P^t_(xq2}^e!MpN)$rxp?9#*q!($S1?h+B%_m4fhGk5OJnftw;xo0*~TT6wKoP`_!08px_D(V6N#2~`+0@=Si z1*roL0DzIJDaz~n5$!FKCM+nQ^&P*kJIvgdWfT3s*U7%HDCi;Na}qvFQ&XZ8Dn7xo z&Ozw<@meY!XuIgB^7PTNe$Z$A)gJTx?E~=C%|50Ir?q${TN%4uWK#>Fmv(b@@JK8v zC|5atH5hdnSwFsd)5s!pxBu1MgVELJ{smBkp#VZpeZlQZf0aH2m~_TrXMCJGNBjnv z?et==wbH1J25KcF5fLPJV{0={e$J}f$YKM{zv7P;5U{x0@!_7_MNvtw3i5J@rJ4~g z1ZCswmpR`)QcEjmQ0Vys<8d?J^cT%-LM5kevI&d9DYK9iea41Y&AIdFwLa`yCL@ax zCNJlzP@)90hOei_fmgqsdT6SzRccT4=srlY22tywBUQd%b0FdBcY?{^mv_9cS|sj402g?!m}S*WX9H{Z=R zAM9EAGVu^=#JB|SD7`0nOpUz_s}uG8MCXOZ0npxEl7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uwOVh)4r;|HYz<`!nOx zA_WT=JNo(pb2D^x2_2#w5 zEME+Qf$}~-XJk~=4=rm+q#38BRH3PgjH!yQG|}I!44c6(e>YBF_l`bp_wNv;gaw3B zA4?sx$uN!17A}W+-V#&S&fJu+)J##-Oku(2P)tsBJ-fy&ibh;D-xeiV@A3M%FrZ*h z<%F^C>pYt9F&48OqeHfoxyBY;s+W;H?MzOa}C z`->j*F7?Ivf%^540cvz``lwz8Uv(>Tu0nf!fos10uX`)9o1LIyI*WC>1dt{ErFY;HPEp^oRp1SxHO`Y9l9O z>8`+pz5?ZW(`-UjDK!5J!6kL0_*ot|`*+mtI{Wn4p0J_#IUAY+Ylw+SL6?Lr&eDs9 z6f|yg)7F#VNJV@}oAL@E+c16oK4^Lw8K}NE-RpH^hN_G`FATvQx0QzE8#v#RWrRXo zt)^|z=wkjvR$8hW4P6ZfrtXEo_y9@K%fTTA5)#r>5Lo6#hB-O?V(M{9Z$)4{AKV@$ zT3*NYl+;izut-5sF_oHhv9pw62VT|Yk&zuXkVZ{>l#TMF@_U**d+J^_AU`+gX+|UA z^LaRVuCNBzNU)V&VJv3@tu-er6g&crhwtf3^v}ho;l z@nFiBXOJ7}3E{kxJ&uZ;ZIHF{sa$x^WYWspswE%fM_Hhh;OC}>704x2H#9ueMB?CQ ia(nBKsFL2@5Chtf^#$JTT!f$F05v5o#mXmEVgCn`XCeCl literal 0 HcmV?d00001 diff --git a/src/AppMenu.vue b/src/AppMenu.vue index 5f7b75b56..04569ce9c 100644 --- a/src/AppMenu.vue +++ b/src/AppMenu.vue @@ -48,6 +48,7 @@
● Accordion + ● Card ● Panel ● Fieldset ● FlexGrid diff --git a/src/assets/styles/primevue.css b/src/assets/styles/primevue.css index d408856b6..4e2913686 100644 --- a/src/assets/styles/primevue.css +++ b/src/assets/styles/primevue.css @@ -1,6 +1,7 @@ @import '../../components/common/Common.css'; @import '../../components/accordion/Accordion.css'; @import '../../components/button/Button.css'; +@import '../../components/card/Card.css'; @import '../../components/checkbox/Checkbox.css'; @import '../../components/fieldset/Fieldset.css'; @import '../../components/inputtext/InputText.css'; diff --git a/src/components/card/Card.css b/src/components/card/Card.css new file mode 100644 index 000000000..2c0d223d9 --- /dev/null +++ b/src/components/card/Card.css @@ -0,0 +1,24 @@ +.p-card-header img { + width: 100%; +} + +.p-card-body { + padding: 1em; +} + +.p-card-title { + font-size: 1.5em; + font-weight: bold; + margin-bottom: .5em; +} + +.p-card-subtitle { + opacity: .7; + margin-bottom: .5em; + margin-top: -.25em; + font-weight: bold; +} + +.p-card-footer { + padding-top: 1em; +} \ No newline at end of file diff --git a/src/components/card/Card.vue b/src/components/card/Card.vue new file mode 100644 index 000000000..7c82986bf --- /dev/null +++ b/src/components/card/Card.vue @@ -0,0 +1,23 @@ + + + \ No newline at end of file diff --git a/src/main.js b/src/main.js index 92a975b66..2bcca6855 100644 --- a/src/main.js +++ b/src/main.js @@ -4,6 +4,7 @@ import router from './router'; import Accordion from './components/accordion/Accordion'; import AccordionTab from './components/accordion/AccordionTab'; import Button from './components/button/Button'; +import Card from './components/card/Card'; import Checkbox from './components/checkbox/Checkbox'; import InputText from './components/inputtext/InputText'; import Fieldset from './components/fieldset/Fieldset'; @@ -26,6 +27,7 @@ Vue.config.productionTip = false; Vue.component('p-accordion', Accordion); Vue.component('p-accordionTab', AccordionTab); Vue.component('p-button', Button); +Vue.component('p-card', Card); Vue.component('p-checkbox', Checkbox); Vue.component('p-inputtext', InputText); Vue.component('p-listbox', Listbox); diff --git a/src/router.js b/src/router.js index 5cb0a486a..e8a1cba67 100644 --- a/src/router.js +++ b/src/router.js @@ -21,6 +21,11 @@ export default new Router({ name: 'button', component: () => import('./views/button/ButtonDemo.vue') }, + { + path: '/card', + name: 'card', + component: () => import('./views/card/CardDemo.vue') + }, { path: '/checkbox', name: 'checkbox', diff --git a/src/views/card/CardDemo.vue b/src/views/card/CardDemo.vue new file mode 100644 index 000000000..ec81114db --- /dev/null +++ b/src/views/card/CardDemo.vue @@ -0,0 +1,39 @@ + \ No newline at end of file