Skip to content

Commit

Permalink
fix: theme toggler made client only
Browse files Browse the repository at this point in the history
Signed-off-by: zubairrafi <[email protected]>

fix: package-lock removed

Signed-off-by: zubairrafi <[email protected]>

fix: v-show instead of v-if

Signed-off-by: zubairrafi <[email protected]>

clientOnly removed

Signed-off-by: zubairrafi <[email protected]>

package-lock removed

Signed-off-by: zubairrafi <[email protected]>
  • Loading branch information
walleeva2018 committed Aug 18, 2024
1 parent 7823da8 commit dc5e14b
Showing 1 changed file with 24 additions and 24 deletions.
48 changes: 24 additions & 24 deletions components/navbar-item.vue
Original file line number Diff line number Diff line change
Expand Up @@ -159,31 +159,31 @@
News</NuxtLink>
</li>
</ul>
<button
class="btn btn-sm btn-ghost"
@click="toggleTheme"
>
<svg
v-if="colorMode.value == 'light'"
xmlns="http://www.w3.org/2000/svg"
width="16"
height="16"
fill="currentColor"
viewBox="0 0 16 16"
>
<path d="M8 11a3 3 0 1 1 0-6 3 3 0 0 1 0 6m0 1a4 4 0 1 0 0-8 4 4 0 0 0 0 8M8 0a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-1 0v-2A.5.5 0 0 1 8 0m0 13a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-1 0v-2A.5.5 0 0 1 8 13m8-5a.5.5 0 0 1-.5.5h-2a.5.5 0 0 1 0-1h2a.5.5 0 0 1 .5.5M3 8a.5.5 0 0 1-.5.5h-2a.5.5 0 0 1 0-1h2A.5.5 0 0 1 3 8m10.657-5.657a.5.5 0 0 1 0 .707l-1.414 1.415a.5.5 0 1 1-.707-.708l1.414-1.414a.5.5 0 0 1 .707 0m-9.193 9.193a.5.5 0 0 1 0 .707L3.05 13.657a.5.5 0 0 1-.707-.707l1.414-1.414a.5.5 0 0 1 .707 0m9.193 2.121a.5.5 0 0 1-.707 0l-1.414-1.414a.5.5 0 0 1 .707-.707l1.414 1.414a.5.5 0 0 1 0 .707M4.464 4.465a.5.5 0 0 1-.707 0L2.343 3.05a.5.5 0 1 1 .707-.707l1.414 1.414a.5.5 0 0 1 0 .708" />
</svg>
<svg
v-if="colorMode.value == 'dark'"
xmlns="http://www.w3.org/2000/svg"
width="16"
height="16"
fill="currentColor"
viewBox="0 0 16 16"
<button

Check failure on line 162 in components/navbar-item.vue

View workflow job for this annotation

GitHub Actions / eslint (20)

Expected indentation of 10 spaces but found 12 spaces
class="btn btn-sm btn-ghost"

Check failure on line 163 in components/navbar-item.vue

View workflow job for this annotation

GitHub Actions / eslint (20)

Expected indentation of 12 spaces but found 14 spaces
@click="toggleTheme"

Check failure on line 164 in components/navbar-item.vue

View workflow job for this annotation

GitHub Actions / eslint (20)

Expected indentation of 12 spaces but found 14 spaces
>

Check failure on line 165 in components/navbar-item.vue

View workflow job for this annotation

GitHub Actions / eslint (20)

Expected indentation of 10 spaces but found 12 spaces
<path d="M6 .278a.77.77 0 0 1 .08.858 7.2 7.2 0 0 0-.878 3.46c0 4.021 3.278 7.277 7.318 7.277q.792-.001 1.533-.16a.79.79 0 0 1 .81.316.73.73 0 0 1-.031.893A8.35 8.35 0 0 1 8.344 16C3.734 16 0 12.286 0 7.71 0 4.266 2.114 1.312 5.124.06A.75.75 0 0 1 6 .278M4.858 1.311A7.27 7.27 0 0 0 1.025 7.71c0 4.02 3.279 7.276 7.319 7.276a7.32 7.32 0 0 0 5.205-2.162q-.506.063-1.029.063c-4.61 0-8.343-3.714-8.343-8.29 0-1.167.242-2.278.681-3.286" />
</svg>
</button>
<svg

Check failure on line 166 in components/navbar-item.vue

View workflow job for this annotation

GitHub Actions / eslint (20)

Expected indentation of 12 spaces but found 14 spaces
v-show="colorMode.value == 'light'"

Check failure on line 167 in components/navbar-item.vue

View workflow job for this annotation

GitHub Actions / eslint (20)

Expected indentation of 14 spaces but found 16 spaces
xmlns="http://www.w3.org/2000/svg"

Check failure on line 168 in components/navbar-item.vue

View workflow job for this annotation

GitHub Actions / eslint (20)

Expected indentation of 14 spaces but found 16 spaces
width="16"

Check failure on line 169 in components/navbar-item.vue

View workflow job for this annotation

GitHub Actions / eslint (20)

Expected indentation of 14 spaces but found 16 spaces
height="16"

Check failure on line 170 in components/navbar-item.vue

View workflow job for this annotation

GitHub Actions / eslint (20)

Expected indentation of 14 spaces but found 16 spaces
fill="currentColor"

Check failure on line 171 in components/navbar-item.vue

View workflow job for this annotation

GitHub Actions / eslint (20)

Expected indentation of 14 spaces but found 16 spaces
viewBox="0 0 16 16"
>
<path d="M8 11a3 3 0 1 1 0-6 3 3 0 0 1 0 6m0 1a4 4 0 1 0 0-8 4 4 0 0 0 0 8M8 0a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-1 0v-2A.5.5 0 0 1 8 0m0 13a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-1 0v-2A.5.5 0 0 1 8 13m8-5a.5.5 0 0 1-.5.5h-2a.5.5 0 0 1 0-1h2a.5.5 0 0 1 .5.5M3 8a.5.5 0 0 1-.5.5h-2a.5.5 0 0 1 0-1h2A.5.5 0 0 1 3 8m10.657-5.657a.5.5 0 0 1 0 .707l-1.414 1.415a.5.5 0 1 1-.707-.708l1.414-1.414a.5.5 0 0 1 .707 0m-9.193 9.193a.5.5 0 0 1 0 .707L3.05 13.657a.5.5 0 0 1-.707-.707l1.414-1.414a.5.5 0 0 1 .707 0m9.193 2.121a.5.5 0 0 1-.707 0l-1.414-1.414a.5.5 0 0 1 .707-.707l1.414 1.414a.5.5 0 0 1 0 .707M4.464 4.465a.5.5 0 0 1-.707 0L2.343 3.05a.5.5 0 1 1 .707-.707l1.414 1.414a.5.5 0 0 1 0 .708" />
</svg>
<svg
v-show="colorMode.value == 'dark'"
xmlns="http://www.w3.org/2000/svg"
width="16"
height="16"
fill="currentColor"
viewBox="0 0 16 16"
>
<path d="M6 .278a.77.77 0 0 1 .08.858 7.2 7.2 0 0 0-.878 3.46c0 4.021 3.278 7.277 7.318 7.277q.792-.001 1.533-.16a.79.79 0 0 1 .81.316.73.73 0 0 1-.031.893A8.35 8.35 0 0 1 8.344 16C3.734 16 0 12.286 0 7.71 0 4.266 2.114 1.312 5.124.06A.75.75 0 0 1 6 .278M4.858 1.311A7.27 7.27 0 0 0 1.025 7.71c0 4.02 3.279 7.276 7.319 7.276a7.32 7.32 0 0 0 5.205-2.162q-.506.063-1.029.063c-4.61 0-8.343-3.714-8.343-8.29 0-1.167.242-2.278.681-3.286" />
</svg>
</button>
</div>
</div>
</div>
Expand Down

0 comments on commit dc5e14b

Please sign in to comment.