Skip to content

Commit 0fe55dd

Browse files
committed
(lint) the stuff
1 parent 7aabfa7 commit 0fe55dd

File tree

1 file changed

+33
-10
lines changed

1 file changed

+33
-10
lines changed

script.js

Lines changed: 33 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
console.log('hello there!');
2-
addAmplitudeListeners();
3-
41
// todo - throttle listener;
52
window.addEventListener('DOMContentLoaded', () =>
63
document.getElementById('main').style.marginTop = newMargin());
@@ -9,13 +6,18 @@ window.addEventListener('resize', () =>
96
document.getElementById('main').style.marginTop = newMargin());
107

118
/** keep the text in the .~* ✨ stars 💫 *~. */
12-
function newMargin() {
9+
const newMargin = () => {
1310
const height = document.documentElement.clientWidth * 0.2;
1411
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+
};
1618

1719
// attach amplitude event listeners
18-
function addAmplitudeListeners() {
20+
const addAmplitudeListeners = () => {
1921
window.addEventListener('DOMContentLoaded', () => {
2022
const linkedin = document.getElementById('linkedin');
2123
const github = document.getElementById('github');
@@ -62,8 +64,29 @@ function addAmplitudeListeners() {
6264
window.open('https://medium.com/@davidchristophersally', '_self');
6365
});
6466
});
65-
}
67+
};
6668

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

Comments
 (0)