-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update rides, adjust opacity/thickness of polylines on map, build ins…
…tructions
- Loading branch information
Showing
5 changed files
with
126 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,40 +6,47 @@ Vanilla javascript and CSS with no 3rd party libraries (except Maps). | |
|
||
The site is designed to be as small as possible so it will load quickly and smoothly on even the shittiest internet connections. You only download **60kb** of data on page load (yes, including fonts). | ||
|
||
Around of 250kb of img assets are lazyloaded as you cycle through all the sections. Thumbnails (~ 800kb), photos(~ 35mb if you open every single one) and maps (850kb+) are loaded on demand only. | ||
Using [MapboxGL JS](https://www.mapbox.com/) to display some shmancy vector maps with my Strava data for "fun" visualisations of my one and only hobby. | ||
|
||
Using [MapboxGL](https://www.mapbox.com/) to build some shmancy vector maps with geoJSONs. Connects to Firebase Storage to pull latest rides from Strava. | ||
--- | ||
|
||
Using a smaller 3rd party package called [ga-lite](https://github.com/jehna/ga-lite), a subset of Google Analytics without any of the bloat I dont use or need. | ||
### Build | ||
Server | ||
```` | ||
python3 -m http.server | ||
```` | ||
|
||
Styles | ||
```` | ||
sass --watch scss/main.scss:css/style.min.css --style compressed | ||
```` | ||
|
||
--- | ||
Scripts | ||
```` | ||
terser js/photos.js js/map.js js/bucket.js js/script.js --source-map -m -o js/script.terser.js | ||
```` | ||
|
||
|
||
|
||
### Color List | ||
<div align="center"> | ||
<h3>Color List</h3> | ||
<img src="https://raw.githubusercontent.com/rohanb10/rohan.xyz/gh-pages/assets/color-list.png" alt="color list"> | ||
</div> | ||
|
||
--- | ||
|
||
|
||
|
||
**Resources** | ||
### Resources | ||
Things I used during the development process. | ||
- [svgo-cli](https://github.com/svg/svgo) - svg optimisation | ||
- [sqip](https://github.com/axe312ger/sqip#CLI) - svg based polygonal placeholders for photos | ||
- [Clippy](https://bennettfeely.com/clippy/) - CSS `clip-path` playground | ||
- Rides scraped from the [Strava API](https://developers.strava.com) using Python. | ||
- Encoded polyline [algorithm](https://developers.google.com/maps/documentation/utilities/polylinealgorithm) by Google - reduced file size of all GPS coordinates by over 97%. | ||
- Rides scraped via the [Strava API](https://developers.strava.com). | ||
- Encoded polyline [algorithm](https://developers.google.com/maps/documentation/utilities/polylinealgorithm) to reduce size of all coordinates by over 95%. | ||
- [Sqoosh](https://squoosh.app/) - A better png compressor to strip unused colours out of images | ||
- [Easings](https://easings.net/en) | ||
|
||
SASS source files in the `scss` directory. All JS files in the `js` directory, then combined and minified for production. | ||
|
||
Map related functions are in `js/maps.js` but the request to get latest versions of MapboxGL from the CDN is in `js/scriptj.s`. | ||
|
||
All colour related files are named `bucket.*`. | ||
|
||
Feel free to reach out if you have any questions about my code. Happy to help - [[email protected]](mailto:[email protected]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.