33 <v-toolbar
44 style =" padding-left : 15px ; padding-right : 15px "
55 :color =" content.hasWebsite ? 'primary' : ''"
6+ v-if =" !isMobile"
67 >
7- <h2 >{{ content.name }}</h2 >
8+ <h2 class = " title " >{{ content.name }}</h2 >
89 <v-spacer ></v-spacer >
910 <div v-if =" content.hasWebsite" >
10- <v-btn @click =" openWebsite" text > Open Website </v-btn >
11+ <v-btn @click =" openWebsite" variant = " text" > Open Website </v-btn >
1112 <v-icon right >mdi-open-in-new</v-icon >
1213 </div >
1314 </v-toolbar >
15+ <div v-else >
16+ <v-sheet
17+ width =" 100%"
18+ style ="
19+ padding-left : 15px ;
20+ padding-right : 15px ;
21+ flex-direction : row ;
22+ display : flex ;
23+ align-items : center ;
24+ "
25+ :color =" content.hasWebsite ? 'primary' : 'rgba(255, 255, 255, 0.1)'"
26+ >
27+ <h2 class =" title" >{{ content.name }}</h2 >
28+ <v-spacer ></v-spacer >
29+ <v-icon v-if =" content.hasWebsite" right >mdi-open-in-new</v-icon >
30+ </v-sheet >
31+
32+ <v-sheet v-if =" content.hasWebsite" width =" 100%" class =" button" >
33+ <v-btn @click =" openWebsite" variant =" text" style =" width : 100% " >
34+ Open Website
35+ </v-btn >
36+ </v-sheet >
37+ </div >
1438 <v-card-text >
1539 {{ content.description }}
1640 </v-card-text >
2145 {{ content.status }}
2246 </v-chip >
2347 </div >
24- <div >
48+ <div style = " display : flex ; flex-wrap : nowrap " >
2549 <v-btn @click =" openRepo" >Open Repo</v-btn >
2650 <v-icon >mdi-github</v-icon >
2751 </div >
3155
3256<script setup>
3357import { computed } from " vue" ;
58+ import { useMediaQuery } from " @vueuse/core" ;
3459
3560// define prop for content object
3661const props = defineProps ({
@@ -47,6 +72,8 @@ const chipColor = computed(() => {
4772 }[props .content .status ];
4873});
4974
75+ const isMobile = useMediaQuery (" (max-width: 700px)" );
76+
5077function openWebsite () {
5178 window .open (props .content .url );
5279}
@@ -77,4 +104,14 @@ function openRepo() {
77104 display : flex ;
78105 color : white ;
79106}
107+
108+ .button {
109+ width : 100% ;
110+ /* linear gradient to white */
111+ background : linear-gradient (
112+ 90deg ,
113+ rgba (255 , 255 , 255 , 0 ) 0% ,
114+ rgba (255 , 255 , 255 , 0.1 ) 100%
115+ );
116+ }
80117 </style >
0 commit comments