Skip to content

Commit 063cbe2

Browse files
authored
CSS transition-delay added (#3)
* fixed CSS styling issues when tapping on mobile; other minor CSS tweaks
1 parent 9398d2d commit 063cbe2

File tree

8 files changed

+79
-21
lines changed

8 files changed

+79
-21
lines changed

components/header.module.css

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,27 @@
4949
right: 0.5rem;
5050
/* this hides the hamburger from being displayed */
5151
/* display: none; */
52+
/* -webkit-tap-highlight-color: rgb(245, 135, 25, 0.7) !important; */
53+
-webkit-tap-highlight-color: transparent !important;
54+
outline-color: #f68819;
55+
border-radius: 50%;
56+
overflow: hidden;
57+
}
58+
59+
.hamburgerOpen {
60+
background-color: #f68819;
61+
padding: 0;
62+
width: 36px;
63+
height: 36px;
64+
margin: 0 0.5rem;
65+
/* positions the icon to the right and center aligns it vertically */
66+
position: relative;
67+
top: 0px;
68+
right: 0.5rem;
69+
-webkit-tap-highlight-color: transparent !important;
70+
outline-color: #f68819;
71+
border-radius: 50%;
72+
overflow: hidden;
5273
}
5374

5475
/* common for active/inactive navigation */
@@ -77,6 +98,7 @@
7798
cursor: pointer;
7899
}
79100
.navigationMenu ul {
101+
display: hidden;
80102
box-shadow: none;
81103
}
82104

@@ -118,6 +140,9 @@
118140
.activeNavigationMenu li:active,
119141
.navigationMenu li:active {
120142
background-color: rgba(0, 0, 0, 0.5);
143+
-webkit-transition: background-color 50ms linear;
144+
-ms-transition: background-color 50ms linear;
145+
transition: background-color 50ms linear;
121146
}
122147

123148
.activeNavigationMenu,

components/layout.module.css

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
.back {
3838
height: 36;
3939
cursor: pointer;
40-
transition: transform 0.125s; /* Animation */
40+
transition: transform 0.1s; /* Animation */
4141
}
4242

4343
.back:hover,
@@ -55,7 +55,7 @@
5555
color: white;
5656
margin: 1rem 0rem;
5757
font-size: 24px;
58-
transition: transform 0.125s; /* Animation */
58+
transition: transform 0.1s; /* Animation */
5959
}
6060

6161
.backHomeButton:hover,
@@ -75,13 +75,13 @@
7575
.scaledImage img {
7676
/* Animation */
7777
transform: scale(1);
78-
transition: all 0.125s ease-in-out;
78+
transition: all 0.1s ease-in-out;
7979
}
8080

8181
/* needed for crisp (not blurry) img hover scale effect */
8282
.scaledImage img:hover,
8383
.scaledImage img:active {
8484
/* Animation */
8585
transform: scale(1.2);
86-
transition: all 0.125s ease-in-out;
86+
transition: all 0.1s ease-in-out;
8787
}

components/navigation.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,10 @@ const Navigation = () => {
4343
{/* price on top left, menu top right */}
4444
<div className={styles.headerContainer}>
4545
<PricePanel />
46-
<div className={styles.hamburger} onClick={toggleHamburger}>
46+
<div
47+
className={hamburgerOpen ? styles.hamburgerOpen : styles.hamburger}
48+
onClick={toggleHamburger}
49+
>
4750
<HamburgerMenu />
4851
</div>
4952
</div>

pages/about.tsx

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,15 @@ const About = () => {
1515
<h1 className={utilStyles.heading2Xl}>About</h1>
1616
</header>
1717
<p>
18-
Welcome to Satoshi Vibes, the quote wiki for Satoshi Nakamoto. If you've made it here,
19-
you must be in the middle of your Bitcoin journey. As you go down deeper the infinite
20-
rabbit hole 🐇🕳, you will be curious to see what Satoshi was saying on cypherpunk forums
18+
Welcome to Satoshi Vibes, the "Satoshi Nakamoto" quote wiki. If you've made it here, you
19+
must be in the middle of your Bitcoin journey. As you go down deeper the infinite rabbit
20+
hole 🐇🕳, you will be curious to read up on what Satoshi was saying on cypherpunk forums
2121
back in the years of 2008, 2009, and 2010 before he disappeared forever. It's nice to
22-
get a little taste of how it all started and learn about the impetus for the ideas that
23-
culminated in creation of Bitcoin a.k.a hardest money on earth. On the home page you
22+
get a taste of how it all started and learn about the impetus for the ideas that
23+
culminated in creation of Bitcoin aka hardest money in the world. On the home page you
2424
will find 24 quote categories to choose from. Each category is sorted by published date
2525
in descending order (for now). Let this be a quick reference for Satoshi's quotes you
26-
can pull up on your mobile or desktop as you orange pill your friends and family. That's
27-
it for now, dive in 🧐!
26+
can pull up on your mobile/tablet/desktop as you orange pill your family and friends.
2827
</p>
2928
</div>
3029

pages/quotes/[id].tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export default function Quote({ quoteData }: Props) {
2323
</Head>
2424
<div className={`${styles.article} ${utilStyles.breakWithHyphens} ${utilStyles.boxShadow}`}>
2525
<h2
26-
className={`${utilStyles.headingLg} ${utilStyles.truncateTitle} ${utilStyles.textCenter} ${utilStyles.breakWithHyphens}`}
26+
className={`${utilStyles.headingLg} ${utilStyles.truncateTitle} ${utilStyles.textCenter} `}
2727
>
2828
{quoteData.title}
2929
</h2>

styles/categories.module.css

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@
7878
overflowing into the rounded-corners */
7979
overflow: hidden;
8080
justify-content: space-around;
81-
text-decoration: none;
8281
}
8382

8483
.categoryItem {
@@ -93,16 +92,27 @@
9392
justify-content: center;
9493
}
9594

96-
.categoryItem:hover,
95+
@media (hover: hover) {
96+
.categoryItem:hover {
97+
background-color: #f68819;
98+
cursor: pointer;
99+
text-decoration: none;
100+
box-shadow: 0px 10px 20px 5px rgba(0, 0, 0, 0.5);
101+
transition: box-shadow 0.2s ease-out;
102+
-webkit-transition: background-color 150ms linear;
103+
-ms-transition: background-color 150ms linear;
104+
transition: background-color 150ms linear;
105+
}
106+
}
107+
108+
.categoryItem:focus,
97109
.categoryItem:active {
98-
background-color: #f68819;
99-
cursor: pointer;
100110
text-decoration: none;
111+
color: white;
112+
cursor: pointer;
101113
box-shadow: 0px 10px 20px 5px rgba(0, 0, 0, 0.5);
102-
transition: box-shadow 0.2s ease-out;
103-
-webkit-transition: background-color 100ms linear;
104-
-ms-transition: background-color 100ms linear;
105-
transition: background-color 100ms linear;
114+
background-color: #f68819;
115+
-webkit-tap-highlight-color: #f68819;
106116
}
107117

108118
@media only screen and (min-width: 1200px) {

styles/global.css

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ body {
1717
a {
1818
color: #fff;
1919
text-decoration: none;
20+
/* turn off the blue flashing outline on mobile devices when tapping */
21+
-webkit-tap-highlight-color: transparent !important;
2022
}
2123

2224
@media (hover) {
@@ -29,3 +31,14 @@ img {
2931
max-width: 100%;
3032
display: block;
3133
}
34+
35+
/* turn off all <button> styling */
36+
button {
37+
background: none;
38+
color: inherit;
39+
border: none;
40+
padding: 0;
41+
font: inherit;
42+
cursor: pointer;
43+
outline: inherit;
44+
}

styles/quotes.module.css

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,14 @@ quote tags (keep it only in the quote .article) */
102102
align-items: center;
103103
}
104104

105+
.quoteTag a {
106+
text-decoration: underline;
107+
}
108+
109+
.quoteTag a:hover {
110+
color: #8595ae;
111+
}
112+
105113
/* print an empty space after category string */
106114
.quoteTag::after {
107115
content: "\00a0";

0 commit comments

Comments
 (0)