Posts /

initial commit

RESUME
21 Mar 2018

context

I’d been meaning to make my own personal website for a while now but hadn’t gotten around to it for a couple reasons: for one, I didn’t know how exactly I wanted to use it—what purpose would it serve besides that of any other ordinary personal website/blog (and I wasn’t even sure if I wanted to use it as a blog)? And of course, those choices would inform my design decisions when I would finally get around to making my website. It eventually came down to if I wanted a static site that I made from scratch in pure HTML/CSS/JS or that was based on a Jekyll template and built with GitHub pages. And at some point, I decided to go with the Jekyll template because web “design” (as opposed to development) isn’t my strongest area; it’s easy enough to cobble together a basic Bootstrap website that isn’t some aesthetic abomination, but a lot of people who are (frankly) better at making things look good have put a lot of time into, well, making things look good, so it just made sense to use an existing template and modify it to my unique (ish) needs/preferences. I think I stumbled across the Halve theme while browsing one of GitHub’s collection of Jekyll themes, and decided to use that as my foundation. Since then, I’ve made some moderately heavy modifications to the internal structure of the project, so I’m just gonna go through some of those changes, commit-by-commit, and try to explain my thought process for anyone interested (but mostly for the sake of proper documentation and posterity). Note: most of these sections are actually not in chronological order—I just arranged them to fit more cleanly into some sort of narrative.

initial commit pt. 1

relevant commits

06a69ab basic Halve theme
7870932 updated _config.yml with personal info
e105a6b added placeholder index
9a3aac6 basic 404 Markdown

This is Halve:

Home Page of Halve

Some more screenshots:

And on mobile:

You can find Halve on GitHub with some solid documentation on how to get up and running.

setting up my local environment

relevant commits

8051816 added files for local hosting
1885084 renamed local environment setup script

I basically just followed this guide to setting up a GitHub Pages site locally with Jekyll and wrote env-setup.sh for future reference since I ran into some dependency issues.

overhauling the projects page

relevant commits

8cf30ee transitioned projects overlay to its own page
d30773f fixed cross browser compatability issue with /projects

The way Halve is originally set up has the projects page as an overlay on the other pages, which I personally really disliked, so I went ahead and made the projects overlay into a fully-fledged page. This involved updating the projects icon href on the rest of the layouts, making a separate projects.html (which was basically identical to the original overlay.html) layout and projects.md page, and then updating a bunch of CSS. It worked pretty well the first time around—the second commit’s just fixing a CSS inheritance I forgot in the first commit and found while testing the new projects page on different browsers (probably something to do with Firefox’s default CSS versus Chrome’s and Edge’s).

…and then scrapping it altogether

relevant commits

f82432f added rough draft of web-based resume
436a468 cleaned up resume assets and restructured data
59c8c02 styling for resume layout
62e349c merged /resume into project structure
3774bdc cleaned up web resume and added GitHub links and download button
45b45da overhauled project structure

I wasn’t really a fan of the projects page to begin with so I decided to replace it altogether. At this point I still had yet to add my resume to the site as well, so I decided to just replace the projects page with a resume. I didn’t want to just link to a PDF so I started looking into web-based resumes. So, I did some research and settled on the Jekyll theme online-cv. I wasn’t a huge fan of how the project was structured, so I rewrote a fair bit of the theme, while still keeping parts of the structure and styling intact. After that I just merged the web resume into my main site, added my own embellishments (e.g. GitHub icon/links for projects, a “Download as PDF” button in the sidebar, a section for relevant coursework at UCSD), and replaced /projects with /resume in a giant commit where I ended up restructuring the entire site (more on that later).

a standard “navbar”

relevant commits

028af1b updated post-list layout to match right block in home
7e064b4 updated post layout to standardized right block navbar
b286671 removed /projects "navbar" and placed icons on top of menu
262c03b updated icon CSS on /projects
45b45da overhauled project structure

Pretty self-explanatory. The pages had different “navbars”: the home page indicated what the icons stood for (i.e. had the “POSTS” and “PROJECTS” text under the icons) but the posts-list and post layouts didn’t so I went ahead and changed that in the layouts’ HTML. And since the projects page was originally an overlay, all it had was the projects icon, which closed the overlay, but that seemed a little restrictive and not very user-centered, so I added this standard navbar to the projects page as well, albeit color-inverted since that looked much cleaner. And then, when I restructured the entire project (in a giant commit that feels like a non sequitur now), I moved that standardized navbar to a template (/_includes/navbar.html).

hiding scrollbars

relevant commits

4b1b238 hid scrollbar across site
1e2d82f hid scrollbar for non-webkit browsers
0138b40 updated post layout with hidden scrollbar
79f4a01 hid horizontal scrollbars
ba61c3c cleaned up inline styling and scripting
45b45da overhauled project structure

One thing I noticed with the original theme was that when going from the home page to the posts page or an individual post, the icons on the top right would shift slightly left. I realized that was because of the scrollbar throwing off the icons’ offsets, so I decided to hide the scrollbars (while still maintaining the ability to scroll, of course). This was pretty easy via ::-webkit-scrollbar, but the problem is that that only works on browsers that support webkit (e.g. Chrome and Safari) and browsers that didn’t (e.g. Firefox and Edge) still had the scrollbars and the shifting icon issue. I found this Stack Overflow post pretty helpful; basically, it was just adding this snippet of JavaScript to each affected HTML file:

var block = document.getElementById('affected-block');
block.style.marginRight = (block.clientWidth - block.offsetWidth) + "px";

What that does is add a margin-right style rule to the affected block, where margin-right equals the number of pixels the scrollbar takes up, essentially moving the entire block some n pixels right and hiding the scrollbar off-screen. Of course, this creates a horizontal scrollbar since the vertical scrollbar is now off-screen, but the horizontal scrollbar can be easily hidden with no issues via the overflow-x: hidden rule. This code snippet would get its own script (assets/js/scrollbars.js) in that last commit.

farm my data Google

relevant commits

6f12da3 adding tracking code for Google Analytics

So I can see just how few people visit.

pt. 2

relevant commits

47c09a4 updated 404 page style
a8587d6 added border-radius to profile image
1c184b9 cleaned out old images and updated post backgrounds
c78187c subbed out projects
0c65264 cleaned out placeholder posts
3b9626c cleaned up styling and updated color scheme
91a656 updated layouts with profile-small for faster loading
ba61c3c cleaned up inline styling and scripting
... basically the entirety of this post
45b45da overhauled project structure

More housekeeping and just making the site mine. The commit messages seem pretty self-explanatory.

no soap, radio.

relevant commits

45b45da overhauled project structure

I just found it really amusing and almost anticlimactic how I was updating this post while actually implementing all these changes, then ended up rewriting a significant portion of basically everything in the end. Each section basically became “I did this, then I did that, then I rewrote everything.” It’s very anticlimactic.

For reference, here’s what that commit includes (from the commit message):

home stretch

relevant commits

29b52b8 added basic website description
95bced9 finished home page blurb and edited CSS
24f40a5 added bitmoji favicons
9bc021b validated most of site code

Came up with a better placeholder than “Hi MTV!”, wrote an actual introduction/blurb, added a favicon (my bitmoji), validated most of the site code, and ran through most of the front-end checklist.

conclusion

For anyone who bothered reading this far, I’m still not entirely sure what this website is for, but I’m sure I’ll figure it out at some point. At the very least, I can put “portfolio” type stuff like my personal projects, and I applied for a slot at KSDT (UCSD’s college radio), so it might be cool to post my weekly playlists as blog posts—assuming I do get a slot. We’ll see, I guess?