Skip to content

Commit

Permalink
fix: 拉桿動畫調整 (#13)
Browse files Browse the repository at this point in the history
* 一些小東西 :)

* Update index.html

* style and small fix

* fix: more githubLink

---------

Co-authored-by: Liyan Zhao <[email protected]>
  • Loading branch information
SmallSun697 and zly2006 authored Apr 26, 2024
1 parent a379f6d commit 93fe3f7
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 23 deletions.
4 changes: 2 additions & 2 deletions src/appbar/RedenAppBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import SearchButton from './SearchButton.vue';
import TranslateButton from './TranslateButton.vue';
import '@/main.css';
import AccountButton from '@/appbar/AccountButton.vue';
import { discordInvite, theme } from '@/constants';
import { discordInvite, githubLink, theme } from '@/constants';
import { useAppStore } from '@/store/app';
import { useDisplay } from 'vuetify';
Expand Down Expand Up @@ -93,7 +93,7 @@ function toggleTheme() {
class="mobile-hide"
icon="mdi-github"
title="Github"
href="https://github.com/zly2006/reden-is-what-we-made"
:href="githubLink"
/>
<v-btn
class="mobile-hide"
Expand Down
Binary file modified src/assets/lever.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 1 addition & 8 deletions src/components/RedStoneSection.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script setup lang="ts">
import { onMounted, type Ref, ref, VueElement } from 'vue';
import { onMounted, type Ref, ref } from 'vue';
// todo: 不透明度渐变
// eslint-disable-next-line @typescript-eslint/no-unused-vars
Expand Down Expand Up @@ -46,13 +46,6 @@ onMounted(() => {
observer.observe(lightLine.value as Element);
});
defineSlots<{
title: VueElement;
subtitle: VueElement;
text: VueElement;
image: VueElement;
action: VueElement[];
}>();
const autoPlay = ref(true);
</script>

Expand Down
11 changes: 7 additions & 4 deletions src/components/RedstoneSectionTitle.vue
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@ const lampOffStyle = 'url(' + LampOff + ')';
</script>

<template>
<div class="redstone-section-title">
<div class="redstone-section-title" draggable="false">
<div class="lever-all" ref="all" @click="leverOn = !leverOn">
<img
:src="Lever"
:class="{ 'lever-on': leverOn, 'lever-off': !leverOn }"
height="50"
height="100"
width="50"
alt=""
/>
Expand All @@ -63,14 +63,16 @@ const lampOffStyle = 'url(' + LampOff + ')';
.lever-on {
position: absolute;
transform: translateY(-36px) rotate(45deg) translateX(25px);
top: -28px;
transform: rotate(45deg);
transition: transform 0.5s;
image-rendering: pixelated;
}
.lever-off {
position: absolute;
transform: translateY(-36px) rotate(-45deg) translateX(-25px);
top: -28px;
transform: rotate(-45deg);
transition: transform 0.5s;
image-rendering: pixelated;
}
Expand All @@ -87,6 +89,7 @@ const lampOffStyle = 'url(' + LampOff + ')';
position: absolute;
width: 50px;
height: 75px;
user-select: none;
}
.lamp-on {
Expand Down
1 change: 1 addition & 0 deletions src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { toast } from 'vuetify-sonner';
export const reCAPTCHAKey = '6Lczc24pAAAAAAxzBZbRy8CZc_ba06Qn_3OJ_Vg-';
export const cloudflareCAPTCHAKey = '0x4AAAAAAARtCTyyGc1nbVUm';
export const discordInvite = 'https://discord.gg/fCxmEyFgAd';
export const githubLink = 'https://github.com/zly2006/reden-is-what-we-made';
export const theme = ref(useAppStore().theme);

export type Profile = {
Expand Down
8 changes: 3 additions & 5 deletions src/layouts/default/Default.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import DefaultView from './View.vue';
import RedenAppBar from '@/appbar/RedenAppBar.vue';
import { VSonner } from 'vuetify-sonner';
import { theme } from '@/constants';
import { githubLink, theme } from '@/constants';
import { onMounted } from 'vue';
import vuetify from '@/plugins/vuetify';
Expand Down Expand Up @@ -56,9 +56,7 @@ onMounted(() => {
</b>
</div>
<div class="footer-list-item">
<a href="https://github.com/zly2006/reden-is-what-we-made">
Reden on Github
</a>
<a :href="githubLink"> Reden on Github </a>
</div>
<div class="footer-list-item">
<a href="//wiki.redenmc.com">
Expand Down Expand Up @@ -125,7 +123,7 @@ onMounted(() => {
</v-row>
<v-row class="last-line">
<v-col class="text-center" :cols="12">
<a href="https://github.com/zly2006/reden-is-what-we-made">Reden</a>
<a :href="githubLink">Reden</a>
and
<a href="https://github.com/RedenMC/reden-website">this website</a>
are both free software.
Expand Down
6 changes: 3 additions & 3 deletions src/views/Home.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { useI18n } from 'vue-i18n';
import RedStoneSection from '@/components/RedStoneSection.vue';
import RedstoneSectionTitle from '@/components/RedstoneSectionTitle.vue';
import Feature from '@/views/Feature.vue';
import { discordInvite } from '@/constants';
import { discordInvite, githubLink } from '@/constants';
const { t } = useI18n();
Expand Down Expand Up @@ -39,7 +39,7 @@ document.title = t('reden.title.home') + ' - Reden';
</v-btn>
<v-btn
class="main-button"
href="https://github.com/zly2006/reden-is-what-we-made"
:href="githubLink"
prepend-icon="mdi-github"
size="x-large"
rounded="rounded"
Expand Down Expand Up @@ -74,7 +74,7 @@ document.title = t('reden.title.home') + ' - Reden';
</template>
<template #action>
<v-btn
href="//github.com/zly2006/reden-is-what-we-made"
:href="githubLink"
color="primary"
variant="outlined"
rounded="rounded"
Expand Down
2 changes: 1 addition & 1 deletion src/views/admin/UserList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ function isBanned(user: Profile) {
.username {
font-size: 1.3rem;
text-decoration: none;
color: #dddddd;
color: currentColor;
}
.username:hover {
Expand Down

0 comments on commit 93fe3f7

Please sign in to comment.