Skip to content

Commit

Permalink
♻️Refactor: 細かい修正
Browse files Browse the repository at this point in the history
  • Loading branch information
SoniPana committed Aug 29, 2024
1 parent 44bc855 commit d99d6b3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 13 deletions.
6 changes: 4 additions & 2 deletions src/pages/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import BaseLayout from '../layouts/BaseLayout.astro';
import info from '../data/info.json';
const pageTitle = 'Home';
const title = 'みといちでいりーのホームページ';
const description = '水戸一高の時間割を配信する学校非公式のサービスです。現在ホームページ作成中。';
const description = '水戸一高の時間割を配信する学校非公式のサービスです。現在ホームページ作成中。トップページとプロフィールのページのみ閲覧できます。';
---
<!-- https://preline.co/examples/hero-sections.html#hero-with-polygon-bg-element -->

<BaseLayout pageTitle={pageTitle}>
<!-- Hero -->
<div class="relative overflow-hidden before:absolute before:top-0 before:start-1/2 before:bg-top before:bg-cover before:size-full before:-z-[1] before:transform before:-translate-x-1/2">
Expand Down Expand Up @@ -50,3 +50,5 @@ const description = '水戸一高の時間割を配信する学校非公式の
<script>
import "../scripts/daily.js";
</script>

<!-- https://preline.co/examples/hero-sections.html#hero-with-polygon-bg-element -->
12 changes: 2 additions & 10 deletions src/scripts/daily.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,9 @@
let clickCount = 0
let timer = null
const timeout = 700
const hogeElement = document.getElementById('daily-image')

hogeElement.addEventListener('click', () => {
clickCount += 1
if (clickCount === 1) {
timer = setTimeout(() => {
if (clickCount >= 7) {
window.location.href = '/unknown';
}
timer = null
clickCount = 0
}, timeout)
if (clickCount === 10) {
window.location.href = '/unknown';
}
})
2 changes: 1 addition & 1 deletion tailwind.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export default {
'green': '#13ce66',
'yellow': '#ffc82c',
'gray-dark': '#151720',
'gray': '#2e3647',
'gray': '#192030',
'gray2': '#505e7a',
'gray-light': '#f0f0f0',
'black': '#000000',
Expand Down

0 comments on commit d99d6b3

Please sign in to comment.