1
- console . log ( 'hello there!' ) ;
2
- addAmplitudeListeners ( ) ;
3
-
4
1
// todo - throttle listener;
5
2
window . addEventListener ( 'DOMContentLoaded' , ( ) =>
6
3
document . getElementById ( 'main' ) . style . marginTop = newMargin ( ) ) ;
@@ -9,13 +6,18 @@ window.addEventListener('resize', () =>
9
6
document . getElementById ( 'main' ) . style . marginTop = newMargin ( ) ) ;
10
7
11
8
/** keep the text in the .~* ✨ stars 💫 *~. */
12
- function newMargin ( ) {
9
+ const newMargin = ( ) => {
13
10
const height = document . documentElement . clientWidth * 0.2 ;
14
11
return ( height < 200 ) ? `${ height } px` : `200px` ;
15
- }
12
+ } ;
13
+
14
+ /** wrapper for amplitude event logging */
15
+ const logEvent = ( name , properties ) => {
16
+ amplitude . getInstance ( ) . logEvent ( name , properties ) ;
17
+ } ;
16
18
17
19
// attach amplitude event listeners
18
- function addAmplitudeListeners ( ) {
20
+ const addAmplitudeListeners = ( ) => {
19
21
window . addEventListener ( 'DOMContentLoaded' , ( ) => {
20
22
const linkedin = document . getElementById ( 'linkedin' ) ;
21
23
const github = document . getElementById ( 'github' ) ;
@@ -62,8 +64,29 @@ function addAmplitudeListeners() {
62
64
window . open ( 'https://medium.com/@davidchristophersally' , '_self' ) ;
63
65
} ) ;
64
66
} ) ;
65
- }
67
+ } ;
66
68
67
- function logEvent ( name , properties ) {
68
- amplitude . getInstance ( ) . logEvent ( name , properties ) ;
69
- }
69
+ /**
70
+ * big font from http://patorjk.com/software/taag/#p=display&f=Big&t=Sally
71
+ */
72
+ const printAscii = ( ) => {
73
+ console . log ( ' _____ _ _ \n' +
74
+ ' | __ \\ (_) | |\n' +
75
+ ' | | | | __ ___ ___ __| |\n' +
76
+ ' | | | |/ _` \\ \\ / / |/ _` |\n' +
77
+ ' | |__| | (_| |\\ V /| | (_| |\n' +
78
+ ' |_____/ \\__,_| \\_/ |_|\\__,_|\n' +
79
+ ' \n' +
80
+ ' \n' ) ;
81
+ console . log ( ' _____ _ _ \n' +
82
+ ' / ____| | | | \n' +
83
+ ' | (___ __ _| | |_ _ \n' +
84
+ ' \\___ \\ / _` | | | | | |\n' +
85
+ ' ____) | (_| | | | |_| |\n' +
86
+ ' |_____/ \\__,_|_|_|\\__, |\n' +
87
+ ' __/ |\n' +
88
+ ' |___/ \n' ) ;
89
+ } ;
90
+
91
+ printAscii ( ) ;
92
+ addAmplitudeListeners ( ) ;
0 commit comments