-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Mike Wales
committed
Sep 23, 2014
1 parent
f48c45d
commit f30680b
Showing
19 changed files
with
1,891 additions
and
2 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 |
---|---|---|
@@ -1,2 +1,65 @@ | ||
frontend-nanodegree-mobile-portfolio | ||
==================================== | ||
## Website Performance Optimization portfolio project | ||
|
||
Your challenge, if you wish to accept it (and we sure hope you will), is to optimize this online portfolio for speed! In particular, optimize the critical rendering path and make this page render as quickly as possible by applying the techniques you've picked up in the [Critical Rendering Path course](https://www.udacity.com/course/ud884). | ||
|
||
To get started, check out the repository, inspect the code, | ||
|
||
### Getting started | ||
|
||
Some useful tips to help you get started: | ||
|
||
1. Check out the repository | ||
1. To inspect the site on your phone, you can run a local server | ||
|
||
```bash | ||
$> cd /path/to/your-project-folder | ||
$> python -m SimpleHTTPServer 8080 | ||
``` | ||
|
||
1. Open a browser and visit localhost:8080 | ||
1. Download and install [ngrok](https://ngrok.com/) to make your local server accessible remotely. | ||
|
||
``` bash | ||
$> cd /path/to/your-project-folder | ||
$> ngrok 8080 | ||
``` | ||
|
||
1. Copy the public URL ngrok gives you and try running it through PageSpeed Insights! [More on integrating ngrok, Grunt and PageSpeed.](http://www.jamescryer.com/2014/06/12/grunt-pagespeed-and-ngrok-locally-testing/) | ||
|
||
Profile, optimize, measure... and then lather, rinse, and repeat. Good luck! | ||
|
||
### Optimization Tips and Tricks | ||
* [Optimizing Performance](https://developers.google.com/web/fundamentals/performance/ "web performance") | ||
* [Analyzing the Critical Rendering Path](https://developers.google.com/web/fundamentals/performance/critical-rendering-path/analyzing-crp.html "analyzing crp") | ||
* [Optimizing the Critical Rendering Path](https://developers.google.com/web/fundamentals/performance/critical-rendering-path/optimizing-critical-rendering-path.html "optimize the crp!") | ||
* [Avoiding Rendering Blocking CSS](https://developers.google.com/web/fundamentals/performance/critical-rendering-path/render-blocking-css.html "render blocking css") | ||
* [Optimizing JavaScript](https://developers.google.com/web/fundamentals/performance/critical-rendering-path/adding-interactivity-with-javascript.html "javascript") | ||
* [Measuring with Navigation Timing](https://developers.google.com/web/fundamentals/performance/critical-rendering-path/measure-crp.html "nav timing api"). We didn't cover the Navigation Timing API in the first two lessons but it's an incredibly useful tool for automated page profiling. I highly recommend reading. | ||
* <a href="https://developers.google.com/web/fundamentals/performance/optimizing-content-efficiency/eliminate-downloads.html">The fewer the downloads, the better</a> | ||
* <a href="https://developers.google.com/web/fundamentals/performance/optimizing-content-efficiency/optimize-encoding-and-transfer.html">Reduce the size of text</a> | ||
* <a href="https://developers.google.com/web/fundamentals/performance/optimizing-content-efficiency/image-optimization.html">Optimize images</a> | ||
* <a href="https://developers.google.com/web/fundamentals/performance/optimizing-content-efficiency/http-caching.html">HTTP caching</a> | ||
|
||
### Customization with Bootstrap | ||
The portfolio was built on Twitter's <a href="http://getbootstrap.com/">Bootstrap</a> framework. All custom styles are in `dist/css/portfolio.css` in the portfolio repo. | ||
|
||
* <a href="http://getbootstrap.com/css/">Bootstrap's CSS Classes</a> | ||
* <a href="http://getbootstrap.com/components/">Bootstrap's Components</a> | ||
|
||
### Sample Portfolios | ||
|
||
Feeling uninspired by the portfolio? Here's a list of cool portfolios I found after a few minutes of Googling. | ||
|
||
* <a href="http://www.reddit.com/r/webdev/comments/280qkr/would_anybody_like_to_post_their_portfolio_site/">A great discussion about portfolios on reddit</a> | ||
* <a href="http://ianlunn.co.uk/">http://ianlunn.co.uk/</a> | ||
* <a href="http://www.adhamdannaway.com/portfolio">http://www.adhamdannaway.com/portfolio</a> | ||
* <a href="http://www.timboelaars.nl/">http://www.timboelaars.nl/</a> | ||
* <a href="http://futoryan.prosite.com/">http://futoryan.prosite.com/</a> | ||
* <a href="http://playonpixels.prosite.com/21591/projects">http://playonpixels.prosite.com/21591/projects</a> | ||
* <a href="http://colintrenter.prosite.com/">http://colintrenter.prosite.com/</a> | ||
* <a href="http://calebmorris.prosite.com/">http://calebmorris.prosite.com/</a> | ||
* <a href="http://www.cullywright.com/">http://www.cullywright.com/</a> | ||
* <a href="http://yourjustlucky.com/">http://yourjustlucky.com/</a> | ||
* <a href="http://nicoledominguez.com/portfolio/">http://nicoledominguez.com/portfolio/</a> | ||
* <a href="http://www.roxannecook.com/">http://www.roxannecook.com/</a> | ||
* <a href="http://www.84colors.com/portfolio.html">http://www.84colors.com/portfolio.html</a> |
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
@media print { | ||
* { background: transparent !important; color: black !important; text-shadow: none !important; filter:none !important; -ms-filter: none !important; } | ||
a, a:visited { color: #444 !important; text-decoration: underline; } | ||
a[href]:after { content: " (" attr(href) ")"; } | ||
tr, img { page-break-inside: avoid; } | ||
img { max-width: 100% !important; } | ||
@page { margin: 0.5cm; } | ||
p, h2, h3 { orphans: 3; widows: 3; } | ||
h2, h3{ page-break-after: avoid; } | ||
} |
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 |
---|---|---|
@@ -0,0 +1,49 @@ | ||
html { | ||
font-size: 100%; | ||
overflow-y: scroll; | ||
-webkit-tap-highlight-color: rgba(0,0,0,0); | ||
-ms-text-size-adjust: 100%; | ||
-webkit-text-size-adjust: none; | ||
} | ||
body { margin: 0; font-size: 14px; line-height: 1.61; font-weight: 400; } | ||
body, button, input, select, textarea { font-family: 'Open Sans', sans-serif; color: #333; } | ||
|
||
a { color: #12C; } | ||
a:visited { color: #61C; } | ||
a:focus { outline: thin dotted; } | ||
a:hover, a:active { color: #c00; outline: 0; } | ||
|
||
b, strong { font-weight: bold; } | ||
pre, code { font-family: monospace, monospace; font-size: 1em; } | ||
ul, ol { margin: 1em 0; padding: 0 0 0 20px; } | ||
img { border: 0; max-width: 100%; } | ||
|
||
body { background: #fff; } | ||
header, footer, .container { max-width: 45em; margin: 0 auto; } | ||
|
||
header { padding: 0 0.5em; color: #C90B0B; } | ||
header img { border-radius: 40px; float: left; } | ||
header p { font-size:1.5em; font-weight: bold; padding-left: 4em;} | ||
header p span { font-size: 0.8em; font-weight: normal;} | ||
|
||
.hero { padding: 2em; background-color: #f8f8f8; font-size:1.2em; | ||
border-bottom: 1px solid #ccc; | ||
border-top: 1px solid #ccc; | ||
} | ||
|
||
.content { padding: 1em 1em; } | ||
.content li { list-style-type: none; font-size: 1.1em;} | ||
li img { float:left; padding-right: 1em; } | ||
li p { font-size: 0.9em; font-style: italic; } | ||
|
||
footer { | ||
padding: 0 0.5em; | ||
border-top: 1px solid #ccc; | ||
} | ||
footer span { float: right; font-style: italic; } | ||
|
||
/* Smartphones (portrait) */ | ||
@media only screen and (max-width: 480px) { | ||
body { font-size: 12px;} | ||
header p { padding-left: 4.5em;} | ||
} |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
.DS_Store |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 |
---|---|---|
@@ -0,0 +1,71 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<meta name="description" content=" FILL ME IN "> | ||
<meta name="author" content=" FILL ME IN "> | ||
<title>Cameron Pittman: Portfolio</title> | ||
|
||
<!-- Hmm, what is the impact of web fonts on speed? Measure it... --> | ||
<link href="//fonts.googleapis.com/css?family=Open+Sans:400,700" rel="stylesheet"> | ||
|
||
<link href="css/style.css" rel="stylesheet"> | ||
<link href="css/print.css" rel="stylesheet"> | ||
|
||
<script> | ||
(function(w,g){w['GoogleAnalyticsObject']=g; | ||
w[g]=w[g]||function(){(w[g].q=w[g].q||[]).push(arguments)};w[g].l=1*new Date();})(window,'ga'); | ||
|
||
// TODO: replace with your Google Analytics profile ID. | ||
ga('create', 'UA-XXXX-Y'); | ||
ga('send', 'pageview'); | ||
</script> | ||
<script src="http://www.google-analytics.com/analytics.js"></script> | ||
<script async src="js/perfmatters.js"></script> | ||
</head> | ||
|
||
<body> | ||
<header> | ||
<a href="/"><img src="img/profilepic.jpg"></a> | ||
<p>Cameron Pittman<br><span>Course Developer</span></p> | ||
</header> | ||
|
||
<div class="container"> | ||
<div class="hero"> | ||
<strong>I love web development!</strong> This is a template for a simple portfolio. I decided to use it to showcase a few Udacity courses I've taken and some teaching work, but you can use it to showcase any kind of project that you want the world to see :) <br> Contact me: [email protected] | ||
</div> | ||
|
||
<div class="content"> | ||
<ul> | ||
<li> | ||
<img src="https://lh4.ggpht.com/kJEnfqhPvtm4m3EneSZ4fWYGS8lW4YNhEjk6zPkyrQaBUHc-2Y_ElDic99NHI0h-UBLXVbRCjFybFvrWxdk=s100"> | ||
<a href="project-2048.html">Build Your Own 2048!</a> | ||
<p>I made my own version of 2048. How cool is that!?</p> | ||
</li> | ||
|
||
<li> | ||
<img src="https://lh6.ggpht.com/f_0W8h__3G99CWTjnMjD8BUKm7yp2-wJyApLtTwFoFtlal2ULf_JgHIsOQq2NiYfKOdMlXlMHDKNo5XVZLs=s100"> | ||
<a href="project-webperf.html">Website Performance Optimization</a> | ||
<p>Hey... this class looks familiar.</p> | ||
</li> | ||
|
||
<li> | ||
<img src="https://lh5.ggpht.com/IKdCmTWn8a2nMhlwMYzryvzRN5CUZAOBr4tDrEAbszV7TIFe9pRAInA4kkYcgTXwrifJsBEsq1agTueuu-g=s100"> | ||
<a href="project-mobile.html">Mobile Web Development</a> | ||
<p>Making mobile apps isn't so hard after all.</p> | ||
</li> | ||
|
||
<li> | ||
<img style="width: 100px;" src="views/images/pizzeria.jpg"> | ||
<a href="views/pizza.html">Cam's Pizzeria</a> | ||
<p>Who wants a performant pizza?</p> | ||
</li> | ||
</ul> | ||
</div> | ||
|
||
<footer> | ||
<p>© Web Performance 2014 <span id="crp-stats"></span></p> | ||
</footer> | ||
</body> | ||
</html> |
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// Measuring the Critical Rendering Path with Navigation Timing | ||
// https://developers.google.com/web/fundamentals/performance/critical-rendering-path/measure-crp | ||
|
||
function logCRP() { | ||
var t = window.performance.timing, | ||
dcl = t.domContentLoadedEventStart - t.domLoading, | ||
complete = t.domComplete - t.domLoading; | ||
var stats = document.getElementById("crp-stats"); | ||
stats.textContent = 'DCL: ' + dcl + 'ms, onload: ' + complete + 'ms'; | ||
} | ||
|
||
window.addEventListener("load", function(event) { | ||
logCRP(); | ||
}); |
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 |
---|---|---|
@@ -0,0 +1,53 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<meta name="description" content=" FILL ME IN "> | ||
<meta name="author" content=" FILL ME IN "> | ||
<title>Cameron Pittman: Portfolio</title> | ||
|
||
<!-- Hmm, what is the impact of web fonts on speed? Measure it... --> | ||
<!-- <link href="//fonts.googleapis.com/css?family=Open+Sans:400,700" rel="stylesheet"> --> | ||
|
||
<link href="css/style.css" rel="stylesheet"> | ||
<link href="css/print.css" rel="stylesheet"> | ||
|
||
<script> | ||
(function(w,g){w['GoogleAnalyticsObject']=g; | ||
w[g]=w[g]||function(){(w[g].q=w[g].q||[]).push(arguments)};w[g].l=1*new Date();})(window,'ga'); | ||
|
||
// TODO: replace with your Google Analytics profile ID. | ||
ga('create', 'UA-XXXX-Y'); | ||
ga('send', 'pageview'); | ||
</script> | ||
<script src="//www.google-analytics.com/analytics.js"></script> | ||
<script src="js/perfmatters.js"></script> | ||
</head> | ||
|
||
<body> | ||
<header> | ||
<a href="/"><img src="img/profilepic.jpg"></a> | ||
<p>Cameron Pittman<br><span>Course Developer</span></p> | ||
</header> | ||
|
||
<div class="container"> | ||
<div class="hero"> | ||
<strong>2048 is awesome!</strong> I loved making my own 2048 with Andy and Sarah. Below, I'm showing off a screenshot from the Udacity version of 2048. | ||
</div> | ||
|
||
<div class="content"> | ||
|
||
<img class="img-responsive" src="http://cameronwp.github.io/udportfolio/img/2048.png"> | ||
|
||
<p>Bacon ipsum dolor sit amet et pork belly porchetta excepteur dolor, laborum laboris magna labore dolore in fugiat beef ribs. Fugiat leberkas nulla do kevin dolore. Flank hamburger dolor swine prosciutto sirloin pig jerky sunt consequat pariatur. Mollit meatloaf nostrud laboris shoulder excepteur velit officia meatball nisi turkey. Nulla jowl spare ribs, et drumstick magna frankfurter.</p> | ||
|
||
<p>Venison spare ribs dolor tri-tip duis turkey. Ut chicken proident ribeye est flank, sed frankfurter. Kielbasa exercitation ullamco leberkas. Landjaeger turkey culpa, tail short loin consectetur salami venison in corned beef eiusmod qui ad leberkas. Tri-tip adipisicing frankfurter ut sirloin rump consectetur. Chuck sint filet mignon labore eiusmod nulla. Venison shankle pork, consectetur nisi bacon spare ribs anim meatball sausage ball tip labore aute reprehenderit adipisicing.</p> | ||
|
||
</div> | ||
|
||
<footer> | ||
<p>© Web Performance 2014 <span id="crp-stats"></span></p> | ||
</footer> | ||
</body> | ||
</html> |
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 |
---|---|---|
@@ -0,0 +1,53 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<meta name="description" content=" FILL ME IN "> | ||
<meta name="author" content=" FILL ME IN "> | ||
<title>Cameron Pitman: Portfolio</title> | ||
|
||
<!-- Hmm, what is the impact of web fonts on speed? Measure it... --> | ||
<!-- <link href="//fonts.googleapis.com/css?family=Open+Sans:400,700" rel="stylesheet"> --> | ||
|
||
<link href="css/style.css" rel="stylesheet"> | ||
<link href="css/print.css" rel="stylesheet"> | ||
|
||
<script> | ||
(function(w,g){w['GoogleAnalyticsObject']=g; | ||
w[g]=w[g]||function(){(w[g].q=w[g].q||[]).push(arguments)};w[g].l=1*new Date();})(window,'ga'); | ||
|
||
// TODO: replace with your Google Analytics profile ID. | ||
ga('create', 'UA-XXXX-Y'); | ||
ga('send', 'pageview'); | ||
</script> | ||
<script src="http://www.google-analytics.com/analytics.js"></script> | ||
<script async src="js/perfmatters.js"></script> | ||
</head> | ||
|
||
<body> | ||
<header> | ||
<a href="/"><img src="img/profilepic.jpg"></a> | ||
<p>Cameron Pittman<br><span>Course Developer</span></p> | ||
</header> | ||
|
||
<div class="container"> | ||
<div class="hero"> | ||
<strong>Developing for mobile is important!</strong> If you haven't taken this class, I highly recommend it! | ||
</div> | ||
|
||
<div class="content"> | ||
|
||
<p>Bacon ipsum dolor sit amet et pork belly porchetta excepteur dolor, laborum laboris magna labore dolore in fugiat beef ribs. Fugiat leberkas nulla do kevin dolore. Flank hamburger dolor swine prosciutto sirloin pig jerky sunt consequat pariatur. Mollit meatloaf nostrud laboris shoulder excepteur velit officia meatball nisi turkey. Nulla jowl spare ribs, et drumstick magna frankfurter.</p> | ||
|
||
<img src="img/mobilewebdev.jpg"> | ||
|
||
<p>Venison spare ribs dolor tri-tip duis turkey. Ut chicken proident ribeye est flank, sed frankfurter. Kielbasa exercitation ullamco leberkas. Landjaeger turkey culpa, tail short loin consectetur salami venison in corned beef eiusmod qui ad leberkas. Tri-tip adipisicing frankfurter ut sirloin rump consectetur. Chuck sint filet mignon labore eiusmod nulla. Venison shankle pork, consectetur nisi bacon spare ribs anim meatball sausage ball tip labore aute reprehenderit adipisicing.</p> | ||
|
||
</div> | ||
|
||
<footer> | ||
<p>© Web Performance 2014 <span id="crp-stats"></span></p> | ||
</footer> | ||
</body> | ||
</html> |
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 |
---|---|---|
@@ -0,0 +1,55 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<meta name="description" content=" FILL ME IN "> | ||
<meta name="author" content=" FILL ME IN "> | ||
<title>Cameron Pitman: Portfolio</title> | ||
|
||
<!-- Hmm, what is the impact of web fonts on speed? Measure it... --> | ||
<!-- <link href="//fonts.googleapis.com/css?family=Open+Sans:400,700" rel="stylesheet"> --> | ||
|
||
<link href="css/style.css" rel="stylesheet"> | ||
<link href="css/print.css" rel="stylesheet"> | ||
|
||
<script> | ||
(function(w,g){w['GoogleAnalyticsObject']=g; | ||
w[g]=w[g]||function(){(w[g].q=w[g].q||[]).push(arguments)};w[g].l=1*new Date();})(window,'ga'); | ||
|
||
// TODO: replace with your Google Analytics profile ID. | ||
ga('create', 'UA-XXXX-Y'); | ||
ga('send', 'pageview'); | ||
</script> | ||
<script src="http://www.google-analytics.com/analytics.js"></script> | ||
<script async src="js/perfmatters.js"></script> | ||
</head> | ||
|
||
<body> | ||
<header> | ||
<a href="/"><img src="img/profilepic.jpg"></a> | ||
<p>Cameron Pittman<br><span>Course Developer</span></p> | ||
</header> | ||
|
||
<div class="container"> | ||
<div class="hero"> | ||
<strong>Thanks for taking this class!</strong> You are awesome for investing time and energy into your future :) We love making classes for you! | ||
</div> | ||
|
||
<div class="content"> | ||
|
||
<p>Thanks to everyone at Udacity and Google who made this class happen! Now for a very true meme and some <strike>lorem</strike> bacon ipsum.</p> | ||
|
||
<img src="img/cam_be_like.jpg"> | ||
|
||
<p>Bacon ipsum dolor sit amet et pork belly porchetta excepteur dolor, laborum laboris magna labore dolore in fugiat beef ribs. Fugiat leberkas nulla do kevin dolore. Flank hamburger dolor swine prosciutto sirloin pig jerky sunt consequat pariatur. Mollit meatloaf nostrud laboris shoulder excepteur velit officia meatball nisi turkey. Nulla jowl spare ribs, et drumstick magna frankfurter.</p> | ||
|
||
<p>Venison spare ribs dolor tri-tip duis turkey. Ut chicken proident ribeye est flank, sed frankfurter. Kielbasa exercitation ullamco leberkas. Landjaeger turkey culpa, tail short loin consectetur salami venison in corned beef eiusmod qui ad leberkas. Tri-tip adipisicing frankfurter ut sirloin rump consectetur. Chuck sint filet mignon labore eiusmod nulla. Venison shankle pork, consectetur nisi bacon spare ribs anim meatball sausage ball tip labore aute reprehenderit adipisicing.</p> | ||
|
||
</div> | ||
|
||
<footer> | ||
<p>© Web Performance 2014 <span id="crp-stats"></span></p> | ||
</footer> | ||
</body> | ||
</html> |
Oops, something went wrong.