Cristiano Magro
2025-01-07 ada7d27da93a1a59a4b2c54abeaa1e072a5793d5
commit | author | age
eb387d 1 <template>
275780 2   <li>
CM 3     <base-card>
4       <header>
5         <h3>{{ title }}</h3>
ada7d2 6         <base-button mode="flat" @click="deleteResource(id)"
CM 7           >Delete</base-button
8         >
275780 9       </header>
CM 10       <p>{{ description }}</p>
11       <nav>
12         <a :href="link">View Resource</a>
13       </nav>
14     </base-card>
15   </li>
eb387d 16 </template>
CM 17
18 <script>
19 export default {
ada7d2 20   props: ['id', 'title', 'description', 'link'],
CM 21   inject: ['deleteResource'],
275780 22 };
43396a 23 </script>
CM 24
25 <style scoped>
26 li {
27   margin: auto;
28   max-width: 40rem;
29 }
30
31 header {
32   display: flex;
33   justify-content: space-between;
34   align-items: center;
35 }
36
37 h3 {
38   font-size: 1.25rem;
39   margin: 0.5rem 0;
40 }
41
42 p {
43   margin: 0.5rem 0;
44 }
45
46 a {
47   text-decoration: none;
48   color: #ce5c00;
49 }
50
51 a:hover,
52 a:active {
53   color: #c89300;
54 }
275780 55 </style>