Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

converted icons to sprite sheet, file cleanup

  • Loading branch information...
commit 7106f8957e78c2201092dee58867ce50f393e9eb 1 parent 7e9c61d
@mhaugland authored
View
35 css/app.css
@@ -72,7 +72,7 @@ div.lastfm_component .lastfm_entry .lastfm_playcount { font-style: normal; opaci
div.lastfm_component div.recent_tracks .lastfm_track_name { font-weight: normal; }
.lastfm_entry .lastfm_playcount { display: block; }
-#photo { position: fixed; bottom: 0px; right: 0px; background-image: url(/images/header_bg.png); padding: 15px; color: #888; }
+#photo { position: fixed; bottom: 0px; right: 0px; background-color: rgba(0,0,0,.2); padding: 15px; color: #888; }
#projects { list-style: none; padding: 0; }
.github_description { display: block; margin-bottom: 12px; }
@@ -85,16 +85,37 @@ div.lastfm_component div.recent_tracks .lastfm_track_name { font-weight: normal;
line-height: 28px;
padding-left: 32px;
}
-#networks .github { background: url(../images/github.png) left center no-repeat; }
-#networks .linkedin { background: url(../images/linkedin.png) left center no-repeat; }
-#networks .google { background: url(../images/google.png) left center no-repeat; }
-#networks .twitter { background: url(../images/twitter.png) left center no-repeat; }
-#networks .lastfm { background: url(../images/lastfm.png) left center no-repeat; }
-#networks .flickr { background: url(../images/flickr.png) left center no-repeat; }
+
+#networks .linkedin {
+ background-image: url(../images/icons.png);
+ background-position: -10px -8px;
+ background-repeat: no-repeat;
+}
+#networks .twitter {
+ background-image: url(../images/icons.png);
+ background-position: -10px -52px;
+ background-repeat: no-repeat;
+}
+#networks .lastfm {
+ background-image: url(../images/icons.png);
+ background-position: -10px -96px;
+ background-repeat: no-repeat;
+}
+#networks .github {
+ background-image: url(../images/icons.png);
+ background-position: -10px -140px;
+ background-repeat: no-repeat;
+}
+#networks .google {
+ background-image: url(../images/icons.png);
+ background-position: -10px -184px;
+ background-repeat: no-repeat;
+}
.blog_post {
margin-bottom: 15px;
padding: 15px;
+ background-color: #222;
background-color: rgba(0,0,0,.2);
}
.blog_post img {
View
BIN  images/github.png
Deleted file not rendered
View
BIN  images/google.png
Deleted file not rendered
View
BIN  images/icons.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  images/lastfm.png
Deleted file not rendered
View
BIN  images/linkedin.png
Deleted file not rendered
View
BIN  images/twitter.png
Deleted file not rendered
View
2  index.html
@@ -15,7 +15,7 @@
<!-- vendor scripts -->
<script type="text/javascript" src="js/vendor/jquery.js"></script>
<script type="text/javascript" src="js/vendor/ejs.js"></script>
- <script type="text/javascript" src="js/vendor/sammy.js"></script>
+ <script type="text/javascript" src="js/vendor/min/sammy-latest.min.js"></script>
<script type="text/javascript" src="js/vendor/plugins/sammy.ejs.js"></script>
<script type="text/javascript" src="js/vendor/plugins/sammy.title.js"></script>
<script type="text/javascript" src="js/vendor/plugins/sammy.googleanalytics.js"></script>
View
127 js/jquery.scalingBackground.js
@@ -1,127 +0,0 @@
-var flexiBackground = function(){
-
- /**
- CONFIGURATION:
- Define the size of our background image
- */
- var bgImageSize = {
- width : 1200,
- height : 900
- };
-
- /**
- Declare and define variables
- */
- var $window,
- $body,
- imageID = "expando",
- tallClass = 'tall',
- wideClass = 'wide',
- $bgImage, $wrapper, img, url, imgAR;
-
- /**
- Are we dealing with ie6?
- */
- var ie6 = ($.browser.msie && parseInt($.browser.version, 10) <= 6);
-
- /**
- Set up the action that happens on resize
- */
- var resizeAction = function() {
- var win = {
- height : $window.height(),
- width : $window.width()
- };
-
- // The current aspect ratio of the window
- var winAR = win.width / win.height;
-
- // Determine if we need to show the image and whether it needs to stretch tall or wide
- if (win.width < bgImageSize.width && win.height < bgImageSize.height) {
- $body
- .removeClass(wideClass)
- .removeClass(tallClass);
- } else if ((win.w < bgImageSize.width && win.height >= bgImageSize.height) || (winAR < imgAR)) {
- $body
- .removeClass(wideClass)
- .addClass(tallClass);
- // Center the image
- $bgImage.css('left', Math.min(((win.width - bgImageSize.width) / 2), 0));
- } else if (win.width >= bgImageSize.width) {
- $body
- .addClass(wideClass)
- .removeClass(tallClass);
- $bgImage.css('left', 0);
- }
-
- // Need to fix the height of the wrapper for IE6
- if (ie6) {
- $wrapper.css('height', win.height);
- }
- };
-
- return {
-
- /*
- Sets up the basic functionality
- */
- initialize : function() {
-
- // No need for any of this if the screen isn't bigger than the background image
- if (screen.availWidth <= bgImageSize.width || screen.availHeight <= bgImageSize.height) {
- return;
- }
-
- // Grab elements we'll reference throughout
- $window = $(window);
- $body = $('body');
-
- // Parse out the URL of the background image and drop out if we don't have one
- url = $body.css('background-image').replace(/^url\(("|')?|("|')?\);?$/g, '') || false;
- if (!url || url === "none" || url === "") {
- return;
- }
-
- // Get the aspect ratio of the image
- imgAR = bgImageSize.width / bgImageSize.height;
-
- // Create a new image element
- $bgImage = $('<img />')
- .attr('src', url)
- .attr('id', imageID);
-
- // Create a wrapper and append the image to it.
- // The wrapper ensures we don't get scrollbars.
- $wrapper = $('<div></div>')
- .css({
- 'overflow' : 'hidden',
- 'width' : '100%',
- 'height' : '100%',
- 'z-index' : '-1'
- })
- .append($bgImage)
- .appendTo($body);
-
- // IE6 Doesn't do position: fixed, so let's fake it out.
- // We'll apply a class which gets used in the CSS to emulate position: fixed
- // Otherwise, we'll simply used position: fixed.
- if (ie6) {
- $wrapper.addClass('ie6fixed');
- } else {
- $wrapper.css({
- 'position' : 'fixed',
- 'top' : 0,
- 'left' : 0
- });
- }
-
- // Set up a resize listener to add/remove classes from the body
- $window.bind('resize', resizeAction);
-
- // Set it up by triggering a resize
- $window.trigger('resize');
- }
- };
- }();
-
- $(document).ready(flexiBackground.initialize);
Please sign in to comment.
Something went wrong with that request. Please try again.