diff --git a/src/App.vue b/src/App.vue
index 62bc351..537b1bc 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -30,11 +30,21 @@
-
+
![Scheme Card]()
+
Total Cards: {{ fetchedData.total_cards }}
@@ -50,17 +60,39 @@
+
+
+
+
+
+
![Zoomed card]()
+
+
@@ -76,6 +108,7 @@ interface Scheme {
image_uris: {
small: string
normal: string
+ large: string
},
type_line: TypeLine
}
@@ -91,6 +124,8 @@ const fetchedData = ref
(null)
const schemes = ref([])
const index = ref(-1)
const ongoingSchemes = ref([])
+const modalOpen = ref(false)
+const modalImageSrc = ref('')
interface QueryOptions {
japaneseOnly: boolean
@@ -165,4 +200,14 @@ const activateOngoingScheme = (scheme: Scheme) => {
ongoingSchemes.value.splice(schemeIndex, 1)
}
}
+
+const openModal = (imageUrl: string) => {
+ modalImageSrc.value = imageUrl
+ modalOpen.value = true
+}
+
+const closeModal = () => {
+ modalOpen.value = false
+ modalImageSrc.value = ''
+}
diff --git a/src/assets/main.css b/src/assets/main.css
index a92cbbf..13aadae 100644
--- a/src/assets/main.css
+++ b/src/assets/main.css
@@ -124,7 +124,7 @@ main {
.scrollable-list img {
width: 100%;
- max-width: 150px;
+ max-width: 250px;
border-radius: 4px;
transition: opacity 0.2s;
}
@@ -133,6 +133,86 @@ main {
opacity: 0.8;
}
+.image-container {
+ position: relative;
+ display: inline-block;
+}
+
+.zoom-button {
+ position: absolute;
+ top: 8px;
+ right: 8px;
+ width: 36px;
+ height: 36px;
+ padding: 0;
+ border: 1px solid #ccc;
+ border-radius: 4px;
+ background-color: rgba(255, 255, 255, 0.9);
+ cursor: pointer;
+ font-size: 18px;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ transition: background-color 0.2s, transform 0.2s;
+ z-index: 10;
+}
+
+.zoom-button:hover {
+ background-color: rgba(255, 255, 255, 1);
+ transform: scale(1.1);
+}
+
+.modal-overlay {
+ position: fixed;
+ top: 0;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ background-color: rgba(0, 0, 0, 0.8);
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ z-index: 200;
+}
+
+.modal-content {
+ position: relative;
+ max-width: 90vw;
+ max-height: 90vh;
+ background-color: #fff;
+ border-radius: 8px;
+ padding: 20px;
+}
+
+.close-button {
+ position: absolute;
+ top: 10px;
+ right: 10px;
+ width: 40px;
+ height: 40px;
+ padding: 0;
+ border: 1px solid #ccc;
+ border-radius: 4px;
+ background-color: #f5f5f5;
+ cursor: pointer;
+ font-size: 24px;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ transition: background-color 0.2s;
+ z-index: 201;
+}
+
+.close-button:hover {
+ background-color: #e0e0e0;
+}
+
+.modal-image {
+ max-width: 100%;
+ max-height: 85vh;
+ object-fit: contain;
+}
+
@media (hover: hover) {
a:hover {
background-color: hsla(160, 100%, 37%, 0.2);