Skip to content

Commit

Permalink
Merge pull request #60 from wangchristine/feature/image
Browse files Browse the repository at this point in the history
update github link
  • Loading branch information
wangchristine authored Sep 29, 2024
2 parents d0d3042 + 3d8da18 commit cf04c06
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 21 deletions.
34 changes: 13 additions & 21 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,21 @@ import { ref, onMounted, watch } from "vue";
import { RouterLink, RouterView, useRoute } from "vue-router";
const route = useRoute();
let themeIcon = ref("");
const currentTheme = ref(null);
const themeIcon = ref("");
onMounted(() => {
if (localStorage.getItem("theme") === "light") {
setTheme("light");
} else {
setTheme("dark");
}
});
watch(() => route.name, () => {
toolLink.value.style.display = "";
});
const switchTheme = () => {
if (localStorage.getItem("theme") === "dark") {
setTheme("light");
Expand All @@ -26,10 +30,12 @@ const setTheme = (theme) => {
if (theme == "dark") {
document.documentElement.className = "dark";
localStorage.setItem("theme", "dark");
currentTheme.value = "dark";
themeIcon.value = "🌞";
} else {
document.documentElement.className = "";
localStorage.setItem("theme", "light");
currentTheme.value = "light";
themeIcon.value = "🌙";
}
};
Expand All @@ -42,6 +48,7 @@ const toggleBurger = () => {
toolLink.value.style.display = "";
}
};
</script>

<template>
Expand All @@ -55,9 +62,10 @@ const toggleBurger = () => {
</nav>
<button class="burger" @click="toggleBurger">≡</button>
<div class="header-right">
<a href="https://github.com/wangchristine/dev-tools" target="_blank" class="github-text">Star me at GitHub!🎉</a>
<a href="https://github.com/wangchristine/dev-tools" target="_blank" class="github-icon">
<img src="@/assets/github.png" alt="github">
<img v-if="currentTheme == 'dark'" src="@/assets/github-mark-white.png" alt="github" class="github-dark">
<img v-else src="@/assets/github.png" alt="github" class="github-light">

</a>
<button name="theme" class="theme" @click="switchTheme">
{{ themeIcon }}
Expand Down Expand Up @@ -142,30 +150,18 @@ header .burger {
header .header-right {
float: right;
display: flex;
}
.github-text {
text-decoration: none;
padding: 2px 0 2px 6px;
margin-right: 20px;
background-color: rgb(96, 182, 153);
border-radius: 5px;
color: rgb(239, 239, 239);
display: inline;
height: 28px;
}
.github-icon {
display: none;
margin-right: 16px;
}
.github-icon img {
width: 28px;
height: 28px;
border-radius: 50%;
border: 1px solid;
padding: 2px;
background-color: #fff;
padding: 1px;
color: var(--color-text);
}
Expand All @@ -185,10 +181,6 @@ main {
}
@media (max-width: 830px) {
.github-text {
display: none;
}
.github-icon {
display: inline;
}
Expand Down
Binary file added src/assets/github-mark-white.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions src/views/HomeView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
The inspiration of Dev Tools comes from my usual and work coding
experience. This website contains tools commonly used in development,
and continually updating.
<br><br>
Copyright © 2022-{{ new Date().getFullYear() }} Chris Wang
</div>
</div>
<div class="about">
Expand All @@ -24,6 +26,9 @@
<div class="description">Special thanks in alphabetical order</div>
<div class="log">
<ul>
<li>
[Sep 29, 2024] Change GitHub link style.
</li>
<li>
[Apr 23, 2023] Image Editor can handle multiple images and download by zip.
</li>
Expand Down

0 comments on commit cf04c06

Please sign in to comment.