File tree Expand file tree Collapse file tree 3 files changed +50
-14
lines changed Expand file tree Collapse file tree 3 files changed +50
-14
lines changed Original file line number Diff line number Diff line change 73
73
}
74
74
75
75
.card {
76
- background : black ;
76
+ background : rgba ( 0 , 0 , 0 , 0.5 ) ;
77
77
// border-color: white;
78
78
}
79
79
@@ -275,6 +275,7 @@ span.hu {
275
275
border-radius : 1em ;
276
276
border : 2px solid #aaa ;
277
277
box-shadow : 0px 0.3em 0.6em rgba (0 ,0 ,0 ,0.1 );
278
+ overflow : clip ;
278
279
h2 {
279
280
/* L shaped border
280
281
border-image: linear-gradient(to right, #1ec1c7, #4e44b0) 1 100%;
@@ -287,8 +288,24 @@ span.hu {
287
288
// border-width: 0 0 0 5px;
288
289
text-align : left ;
289
290
// padding: 5px 15px;
291
+ top : 0px ;
292
+ margin-left : 0px ;
290
293
font-weight : 900 ;
291
294
margin-bottom : 0.3em ;
295
+ transform-origin : top left ;
296
+
297
+ & .stickyheader {
298
+ display : inline-block ;
299
+ transition : 0.5s $bezier ;
300
+ }
301
+
302
+ & .sticky {
303
+ z-index : -1 ;
304
+ position : sticky ;
305
+ top : 2rem ;
306
+ transform : scale (10 );
307
+ opacity : 0.2 ;
308
+ }
292
309
}
293
310
}
294
311
@@ -693,14 +710,20 @@ div.shake {
693
710
h3 {
694
711
font-size : 2em ;
695
712
}
696
- & .arrow h3 :after {
697
- content : " >" ;
698
- opacity : 0.3 ;
699
- margin-left : 0.1em ;
700
- transition : 0.3s ;
701
- }
702
- @include hover {
703
- & .arrow :hover h3 :after {
713
+ & .arrow {
714
+ h3 :after {
715
+ content : " >" ;
716
+ opacity : 0.3 ;
717
+ margin-left : 0.1em ;
718
+ transition : 0.3s ;
719
+ }
720
+ @include hover {
721
+ & :hover h3 :after {
722
+ opacity : 0.6 ;
723
+ margin-left : 0.4em ;
724
+ }
725
+ }
726
+ & :active h3 :after {
704
727
opacity : 0.6 ;
705
728
margin-left : 0.4em ;
706
729
}
@@ -733,6 +756,7 @@ div.shake {
733
756
box-shadow : 0px 0.3em 0.6em rgba (0 ,0 ,0 ,0.15 );
734
757
margin-bottom : 1.25em !important ;
735
758
font-size : 0.8rem ;
759
+ background : rgba (255 ,255 ,255 ,0.5 );
736
760
737
761
.heading {
738
762
h3 {
Original file line number Diff line number Diff line change 20
20
< script defer src ="{{ site.baseurl }}/js/github.js " async > </ script >
21
21
22
22
< div class ="section " id ="intro ">
23
- < h2 class ="aos " data-aos ="fadein-expand-up "> EXPERIENCE</ h2 >
23
+ < h2 class ="aos stickyheader " data-aos ="fadein-expand-up "> EXPERIENCE</ h2 >
24
24
25
25
< h3 class ="aos " data-aos ="fadein-up "> I'm great at... </ h3 >
26
26
@@ -106,7 +106,7 @@ <h3>Golang</h3>
106
106
107
107
108
108
< div class ="section " id ="portfolio ">
109
- < h2 class ="aos " data-aos ="fadein-expand-up "> PROJECTS</ h2 >
109
+ < h2 class ="aos stickyheader " data-aos ="fadein-expand-up "> PROJECTS</ h2 >
110
110
111
111
< p class ="aos " data-aos ="fadein-up "> Check out a few of my creations. Pulled from < a href ="https://github.com/{{ site.github_username }} "> my GitHub</ a > .</ p >
112
112
< div class ="row card-columns gh-projects ">
@@ -144,7 +144,7 @@ <h3></h3>
144
144
</ div >
145
145
146
146
< div class ="section " id ="contact ">
147
- < h2 class ="aos " data-aos ="fadein-expand-up "> FIND ME</ h2 >
147
+ < h2 class ="aos stickyheader " data-aos ="fadein-expand-up "> FIND ME</ h2 >
148
148
149
149
< div class ="aos " data-aos ="fadein-up " class ="contact-slides " style ="margin-bottom: 1em; ">
150
150
<!-- icons -->
Original file line number Diff line number Diff line change @@ -198,10 +198,10 @@ ready(() => {
198
198
if ( nav . classList . contains ( 'scrolled' ) ) nav . classList . remove ( "scrolled" ) ;
199
199
}
200
200
201
- updateCheckpoints ( checkpointContainer )
201
+ sectionActions ( checkpointContainer )
202
202
} , 150 ) ;
203
203
204
- function updateCheckpoints ( container ) {
204
+ function sectionActions ( container ) {
205
205
const vh = Math . max ( document . documentElement . clientHeight || 0 , window . innerHeight || 0 )
206
206
// width to set the scroll progress bar to
207
207
let newWidth = 0 ;
@@ -219,6 +219,18 @@ ready(() => {
219
219
*/
220
220
newWidth = Math . min ( increment * ( i + ( vh - rect . top ) / ( rect . bottom - rect . top ) ) , 100 )
221
221
}
222
+
223
+ header = section . querySelector ( "h2.stickyheader" )
224
+ if ( header ) {
225
+ // if the element is at the top of the screen
226
+ if ( rect . top < 0 ) {
227
+ header . classList . add ( "sticky" )
228
+ header . style . transform = `scale(10) translateX(${ ( rect . top ) / ( rect . bottom - rect . top - vh ) * 30 } %)`
229
+ } else {
230
+ header . classList . remove ( "sticky" )
231
+ header . style . transform = null
232
+ }
233
+ }
222
234
} )
223
235
container . querySelector ( "#checkpoint-fill" ) . style . width = `${ newWidth } %`
224
236
const circlesToFill = Math . floor ( ( newWidth + 1 ) / increment )
You can’t perform that action at this time.
0 commit comments