Skip to content

Commit

Permalink
Rename ReturnToHome component
Browse files Browse the repository at this point in the history
  • Loading branch information
ts5h committed Dec 10, 2021
1 parent 5721fd2 commit 2d0d0bb
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ import "./scss/index.scss"
import "./scss/Circles.scss"
import "./scss/GitHub.scss"
import "./scss/Reload.scss"
import "./scss/ReturnToTop.scss"
import "./scss/ReturnToHome.scss"

// ts
import "./ts/Circles"
import "./ts/GitHub"
import "./ts/Reload"
import setTheme from "./ts/ReturnToTop"
import setTheme from "./ts/ReturnToHome"

setTheme({ type: "dark" })
12 changes: 6 additions & 6 deletions src/scss/ReturnToTop.scss → src/scss/ReturnToHome.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
@import url("//fonts.googleapis.com/css2?family=Inter:wght@200;300;400&display=swap");

/* Return to the HOME on static pages */
.return-to-top {
.return-to-home {
position: absolute;
left: 0;
top: 0;
Expand All @@ -17,11 +17,11 @@
transition: opacity 0.3s ease-out;
}

.return-to-top.on {
.return-to-home.on {
opacity: 1;
}

.return-to-top a {
.return-to-home a {
display: block;
color: white;
font-family: Inter, sans-serif;
Expand All @@ -31,7 +31,7 @@
}

// Light
.return-to-top {
.return-to-home {
&.light {
background-image: url(/img/arrow-back-to-home-dark.svg);

Expand All @@ -42,7 +42,7 @@
}

@media screen and (max-width: 599px) {
.return-to-top {
.return-to-home {
text-indent: -9999px;
background-position: center center;
width: 24px;
Expand All @@ -52,7 +52,7 @@
transition: none;
}

.return-to-top a {
.return-to-home a {
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
padding: 0;
width: 100%;
Expand Down
4 changes: 2 additions & 2 deletions src/ts/ReturnToTop.ts → src/ts/ReturnToHome.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ import isMobile from "ismobilejs"
// Return to top (TYpeScript version)
// Add button into body
const button = document.createElement("div")
button.classList.add("return-to-top")
button.classList.add("return-to-home")

const anchor = document.createElement("a")
anchor.textContent = "Back"
anchor.textContent = "HOME"
anchor.setAttribute("href", "/")
button.appendChild(anchor)

Expand Down

0 comments on commit 2d0d0bb

Please # to comment.