Skip to content

Commit

Permalink
v5.0.0-alpha.276: Explainer Styling, AutoGUI with Text, Minify SVGs
Browse files Browse the repository at this point in the history
  • Loading branch information
cameroncheung00 committed Dec 21, 2023
1 parent 99c580d commit 529f35f
Show file tree
Hide file tree
Showing 699 changed files with 3,857 additions and 7,844 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,5 @@
"preview:https": "serve dist",
"reinstall": "rm -rf node_modules; yarn; vue-tsc --noEmit"
},
"version": "5.0.0-alpha.275"
"version": "5.0.0-alpha.276"
}
20 changes: 10 additions & 10 deletions src/components/templates/UniPopupWindow.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
width: 100%;
z-index: 9998;
> #top-click-area {
bottom: 90%;
bottom: 95%;
left: 0;
position: absolute;
right: 0;
Expand All @@ -32,18 +32,18 @@
left: 0;
position: absolute;
right: 0;
top: 90%;
top: 95%;
}
> #left-click-area {
bottom: 0;
left: 0;
position: absolute;
right: 90%;
right: 95%;
top: 0;
}
> #right-click-area {
bottom: 0;
left: 90%;
left: 95%;
position: absolute;
right: 0;
top: 0;
Expand All @@ -54,23 +54,23 @@
font-size: 2rem;
height: max(2.5rem, min(5vh, 5vw));
position: absolute;
right: 12.5%;
top: 12.5%;
right: 7.5%;
top: 7.5%;
width: max(2.5rem, min(5vh, 5vw));
z-index: 9999;
}
> #container {
background-color: var(--backgroundColor);
border-radius: 1rem;
border: 0.1rem solid var(--neutralColor);
bottom: 10%;
left: 10%;
bottom: 5%;
left: 5%;
margin: auto;
overflow-y: scroll;
padding: 5% 10%;
position: absolute;
right: 10%;
top: 10%;
right: 5%;
top: 5%;
}
}
}
Expand Down
8 changes: 2 additions & 6 deletions src/components/units/AppAbout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,9 @@
import { computed } from "vue";
import VueMarkdownIt from "vue3-markdown-it";
import MarkdownItLinkAttributes from "markdown-it-link-attributes";
import AppAboutCnSource from "../../models/docs/cn/AppAbout.md?raw";
import AppAboutEnSource from "../../models/docs/en/AppAbout.md?raw";
import { useStore } from "../../scripts/plugins/store";
const store = useStore();
import AppAboutEnSource from "../../models/docs/AppAbout.md?raw";
const plugins = [{ plugin: MarkdownItLinkAttributes, options: { attrs: { target: "_blank", rel: "noopener noreferrer nofollow" } } }];
const source = computed(() => (store.getters.locale === "cn" ? AppAboutCnSource : AppAboutEnSource));
const source = computed(() => AppAboutEnSource);
</script>

<style lang="scss" scoped>
Expand Down
38 changes: 24 additions & 14 deletions src/components/units/AppGameVariants.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<img :src="getLogoSource(variant.id)" :alt="game.name + ' ' + variant.description + ' Logo'" style="width: 8rem" />
<p>{{ variant.description }}</p>
</router-link>
<div v-if="gameCustom" v-on:click="customBoardRoute">
<div v-if="gameCustom" v-on:click="customBoardRoute" :class="game.gui_status">
<img :src="getLogoSource('custom')" :alt="game.name + ' ' + 'Custom Logo'" style="width: 8rem" />
<p>Custom</p>
</div>
Expand Down Expand Up @@ -40,21 +40,30 @@
}
});
const getLogoSource = (variantId: string) => {
const images = import.meta.globEager("../../models/images/thumbnail/*.png");
const logo = import.meta.globEager("../../models/images/logo-gamescrafters.png");
const appLogoFilePath = "../../models/images/logo-gamescrafters.png";
const regularThumbnailFilePath = `../../models/images/thumbnail/${gameId.value}-regular.png`;
const VariantThumbnailFilePath = `../../models/images/thumbnail/${gameId.value}-${variantId}.png`;
const images = import.meta.globEager("../../models/images/thumbnail/*");
try {
return images[VariantThumbnailFilePath].default;
const variantThumbnailSVGPath = `../../models/images/thumbnail/${gameId.value}-${variantId}.svg`;
return images[variantThumbnailSVGPath].default;
} catch (errorMessage) {
//console.warn(`${gameId.value} game's ${variantId} variant logo does not exist yet.`);
try {
return images[regularThumbnailFilePath].default;
const variantThumbnailFilePath = `../../models/images/thumbnail/${gameId.value}-${variantId}.png`;
return images[variantThumbnailFilePath].default;
} catch (errorMessage) {
//console.warn(`${gameId.value} game's regular variant logo does not exist yet.`);
try {
const regularThumbnailSVGPath = `../../models/images/thumbnail/${gameId.value}-regular.svg`;
return images[regularThumbnailSVGPath].default;
} catch (errorMessage) {
try {
const regularThumbnailFilePath = `../../models/images/thumbnail/${gameId.value}-regular.png`;
return images[regularThumbnailFilePath].default;
} catch (errorMessage) {
}
}
}
}
const logo = import.meta.globEager("../../models/images/logo-gamescrafters.png");
const appLogoFilePath = "../../models/images/logo-gamescrafters.png";
return logo[appLogoFilePath].default;
};
const customBoardRoute = () => {
Expand All @@ -81,24 +90,25 @@
border-radius: 1rem;
margin: 1rem;
padding: 1rem;
width: 10rem;
> * {
text-align: center;
}
}
> a.v3 {
> a.v3, div.v3 {
border: 0.2rem solid purple;
}
> a.v2 {
> a.v2, div.v2 {
border: 0.2rem solid gold;
}
> a.v1 {
> a.v1, div.v1 {
border: 0.2rem solid silver;
}
> a.v0 {
> a.v0, div.v0 {
border: 0.2rem solid #CD7F32;
}
Expand Down
Loading

0 comments on commit 529f35f

Please sign in to comment.