feat(directory): added an arrow to indicate a link
This commit is contained in:
@@ -24,8 +24,8 @@ export default function ToTopButton(props) {
|
||||
const smoothScroll = useCallback(
|
||||
(target) => {
|
||||
const targetElement = document.querySelector(target);
|
||||
const targetPosition = targetElement.getBoundingClientRect().top + window.pageYOffset;
|
||||
const startPosition = window.pageYOffset;
|
||||
const targetPosition = targetElement.getBoundingClientRect().top + window.scrollY;
|
||||
const startPosition = window.scrollY;
|
||||
const distance = targetPosition - startPosition;
|
||||
const duration = 1000;
|
||||
let start = null;
|
||||
|
||||
@@ -167,7 +167,7 @@ export default function Home() {
|
||||
return (
|
||||
<section>
|
||||
{
|
||||
officalUpdate.length > operators.length && (
|
||||
officalUpdate.length === operators.length && (
|
||||
<section>
|
||||
<section className={classes['offical-update']}>
|
||||
<section className={classes.info}>
|
||||
@@ -199,6 +199,12 @@ export default function Home() {
|
||||
<section className={classes.title}>
|
||||
{entry.codename[language]}
|
||||
</section>
|
||||
<seection className={classes['arrow-icon']}>
|
||||
<section className={classes.bar}></section>
|
||||
<section className={classes.bar}></section>
|
||||
<section className={classes.bar}></section>
|
||||
<section className={classes.bar}></section>
|
||||
</seection>
|
||||
</section>
|
||||
</section>
|
||||
</section>
|
||||
|
||||
@@ -444,6 +444,12 @@ export default function Operator() {
|
||||
<section className={classes.text}>
|
||||
{i18n('web_version')}
|
||||
</section>
|
||||
<seection className={classes['arrow-icon']}>
|
||||
<section className={classes.bar}></section>
|
||||
<section className={classes.bar}></section>
|
||||
<section className={classes.bar}></section>
|
||||
<section className={classes.bar}></section>
|
||||
</seection>
|
||||
</section>
|
||||
</section>
|
||||
</Link>
|
||||
@@ -462,6 +468,12 @@ export default function Operator() {
|
||||
<section className={classes.text}>
|
||||
{i18n('steam_workshop')}
|
||||
</section>
|
||||
<seection className={classes['arrow-icon']}>
|
||||
<section className={classes.bar}></section>
|
||||
<section className={classes.bar}></section>
|
||||
<section className={classes.bar}></section>
|
||||
<section className={classes.bar}></section>
|
||||
</seection>
|
||||
</section>
|
||||
</section>
|
||||
</Link>
|
||||
|
||||
@@ -241,6 +241,42 @@
|
||||
border-bottom: var(--text-color) solid 0.25rem;
|
||||
transform: translate(-50%, -70%) rotate(45deg);
|
||||
}
|
||||
|
||||
.arrow-icon {
|
||||
display: inline-block;
|
||||
position: absolute;
|
||||
z-index: 0;
|
||||
right: -0.1em;
|
||||
top: 0.45em;
|
||||
width: 2em;
|
||||
height: 1em;
|
||||
transform: rotate(90deg);
|
||||
transition: opacity cubic-bezier(0.65, 0.05, 0.36, 1) 0.3s,
|
||||
visibility cubic-bezier(0.65, 0.05, 0.36, 1) 0.3s;
|
||||
opacity: 0;
|
||||
visibility: hidden;
|
||||
|
||||
.bar {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 0.25em;
|
||||
background-color: var(--text-color-full);
|
||||
will-change: auto;
|
||||
}
|
||||
|
||||
.bar:nth-child(1) {
|
||||
transform: rotateZ(45deg) scaleX(0.5) translateX(0.8em);
|
||||
}
|
||||
|
||||
.bar:nth-child(2) {
|
||||
transform: rotateZ(-45deg) scaleX(0.5) translateX(-0.8em);
|
||||
}
|
||||
|
||||
.bar:nth-child(3),
|
||||
.bar:nth-child(4) {
|
||||
transform: translateY(1em) rotateZ(90deg) scaleX(0.5);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&:hover,
|
||||
@@ -252,6 +288,11 @@
|
||||
opacity: 1;
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
.arrow-icon {
|
||||
opacity: 1;
|
||||
visibility: visible;
|
||||
}
|
||||
}
|
||||
|
||||
&.active {
|
||||
|
||||
Reference in New Issue
Block a user