mirror of
https://github.com/samsonjs/samhuri.net.git
synced 2026-04-25 14:37:47 +00:00
drop support for IE <= 8
This commit is contained in:
parent
589b7bb5aa
commit
b0740405b1
9 changed files with 0 additions and 459 deletions
|
|
@ -1,7 +0,0 @@
|
|||
ul { behavior: none
|
||||
; padding-bottom: 25px
|
||||
}
|
||||
|
||||
img { behavior: url(../js/iepngfix.htc)
|
||||
; behavior: url(../../js/iepngfix.htc)
|
||||
}
|
||||
|
|
@ -1 +0,0 @@
|
|||
ul#projects li { list-style-type: none }
|
||||
|
|
@ -18,8 +18,6 @@ td:nth-child(2) { padding: 0 10px }
|
|||
; -moz-border-radius: 20px
|
||||
; -webkit-border-radius: 20px
|
||||
; border-radius: 20px
|
||||
; behavior: url(../js/border-radius.htc)
|
||||
; behavior: url(../../js/border-radius.htc)
|
||||
}
|
||||
|
||||
h4 { margin: 0.5em 0 0.7em }
|
||||
|
|
|
|||
|
|
@ -53,8 +53,6 @@ ul.nav { text-align: center
|
|||
; -moz-border-radius: 20px
|
||||
; -webkit-border-radius: 20px
|
||||
; border-radius: 20px
|
||||
; behavior: url(js/border-radius.htc)
|
||||
; behavior: url(../js/border-radius.htc)
|
||||
}
|
||||
|
||||
ul.nav li { display: block
|
||||
|
|
|
|||
|
|
@ -1,143 +0,0 @@
|
|||
--Do not remove this if you are using--
|
||||
Original Author: Remiz Rahnas
|
||||
Original Author URL: http://www.htmlremix.com
|
||||
Published date: 2008/09/24
|
||||
|
||||
Changes by Nick Fetchak:
|
||||
- IE8 standards mode compatibility
|
||||
- VML elements now positioned behind original box rather than inside of it - should be less prone to breakage
|
||||
Published date : 2009/11/18
|
||||
|
||||
|
||||
<public:attach event="oncontentready" onevent="oncontentready('v08vnSVo78t4JfjH')" />
|
||||
<script type="text/javascript">
|
||||
|
||||
// findPos() borrowed from http://www.quirksmode.org/js/findpos.html
|
||||
function findPos(obj) {
|
||||
var curleft = curtop = 0;
|
||||
|
||||
if (obj.offsetParent) {
|
||||
do {
|
||||
curleft += obj.offsetLeft;
|
||||
curtop += obj.offsetTop;
|
||||
} while (obj = obj.offsetParent);
|
||||
}
|
||||
|
||||
return({
|
||||
'x': curleft,
|
||||
'y': curtop
|
||||
});
|
||||
}
|
||||
|
||||
function oncontentready(classID) {
|
||||
if (this.className.match(classID)) { return(false); }
|
||||
|
||||
if (!document.namespaces.v) { document.namespaces.add("v", "urn:schemas-microsoft-com:vml"); }
|
||||
|
||||
this.className = this.className.concat(' ', classID);
|
||||
var arcSize = Math.min(parseInt(this.currentStyle['-moz-border-radius'] ||
|
||||
this.currentStyle['-webkit-border-radius'] ||
|
||||
this.currentStyle['border-radius'] ||
|
||||
this.currentStyle['-khtml-border-radius']) /
|
||||
Math.min(this.offsetWidth, this.offsetHeight), 1);
|
||||
var fillColor = this.currentStyle.backgroundColor;
|
||||
var fillSrc = this.currentStyle.backgroundImage.replace(/^url\("(.+)"\)$/, '$1');
|
||||
var strokeColor = this.currentStyle.borderColor;
|
||||
var strokeWeight = parseInt(this.currentStyle.borderWidth);
|
||||
var stroked = 'true';
|
||||
if (isNaN(strokeWeight)) {
|
||||
strokeWeight = 0;
|
||||
strokeColor = fillColor;
|
||||
stroked = 'false';
|
||||
}
|
||||
|
||||
this.style.background = 'transparent';
|
||||
this.style.borderColor = 'transparent';
|
||||
|
||||
// Find which element provides position:relative for the target element (default to BODY)
|
||||
var el = this;
|
||||
var limit = 100, i = 0;
|
||||
while ((typeof(el) != 'unknown') && (el.currentStyle.position != 'relative') && (el.tagName != 'BODY')) {
|
||||
el = el.parentElement;
|
||||
i++;
|
||||
if (i >= limit) { return(false); }
|
||||
}
|
||||
var el_zindex = parseInt(el.currentStyle.zIndex);
|
||||
if (isNaN(el_zindex)) { el_zindex = 0; }
|
||||
//alert('got tag '+ el.tagName +' with pos '+ el.currentStyle.position);
|
||||
|
||||
var rect_size = {
|
||||
'width': this.offsetWidth - strokeWeight,
|
||||
'height': this.offsetHeight - strokeWeight
|
||||
};
|
||||
var el_pos = findPos(el);
|
||||
var this_pos = findPos(this);
|
||||
this_pos.y = this_pos.y + (0.5 * strokeWeight) - el_pos.y;
|
||||
this_pos.x = this_pos.x + (0.5 * strokeWeight) - el_pos.x;
|
||||
|
||||
var rect = document.createElement('v:roundrect');
|
||||
rect.arcsize = arcSize +'px';
|
||||
rect.strokecolor = strokeColor;
|
||||
rect.strokeWeight = strokeWeight +'px';
|
||||
rect.stroked = stroked;
|
||||
rect.style.display = 'block';
|
||||
rect.style.position = 'absolute';
|
||||
rect.style.top = this_pos.y +'px';
|
||||
rect.style.left = this_pos.x +'px';
|
||||
rect.style.width = rect_size.width +'px';
|
||||
rect.style.height = rect_size.height +'px';
|
||||
rect.style.antialias = true;
|
||||
rect.style.zIndex = el_zindex - 1;
|
||||
|
||||
var fill = document.createElement('v:fill');
|
||||
fill.color = fillColor;
|
||||
fill.src = fillSrc;
|
||||
fill.type = 'tile';
|
||||
|
||||
rect.appendChild(fill);
|
||||
el.appendChild(rect);
|
||||
|
||||
var css = el.document.createStyleSheet();
|
||||
css.addRule("v\\:roundrect", "behavior: url(#default#VML)");
|
||||
css.addRule("v\\:fill", "behavior: url(#default#VML)");
|
||||
|
||||
isIE6 = /msie|MSIE 6/.test(navigator.userAgent);
|
||||
// IE6 doesn't support transparent borders, use padding to offset original element
|
||||
if (isIE6 && (strokeWeight > 0)) {
|
||||
this.style.borderStyle = 'none';
|
||||
this.style.paddingTop = parseInt(this.currentStyle.paddingTop || 0) + strokeWeight;
|
||||
this.style.paddingBottom = parseInt(this.currentStyle.paddingBottom || 0) + strokeWeight;
|
||||
}
|
||||
|
||||
if (typeof(window.rounded_elements) == 'undefined') {
|
||||
window.rounded_elements = new Array();
|
||||
|
||||
if (typeof(window.onresize) == 'function') { window.previous_onresize = window.onresize; }
|
||||
window.onresize = window_resize;
|
||||
}
|
||||
this.element.vml = rect;
|
||||
window.rounded_elements.push(this.element);
|
||||
}
|
||||
|
||||
function window_resize() {
|
||||
if (typeof(window.rounded_elements) == 'undefined') { return(false); }
|
||||
|
||||
for (var i in window.rounded_elements) {
|
||||
var el = window.rounded_elements[i];
|
||||
|
||||
var strokeWeight = parseInt(el.currentStyle.borderWidth);
|
||||
if (isNaN(strokeWeight)) { strokeWeight = 0; }
|
||||
|
||||
var parent_pos = findPos(el.vml.parentNode);
|
||||
var pos = findPos(el);
|
||||
pos.y = pos.y + (0.5 * strokeWeight) - parent_pos.y;
|
||||
pos.x = pos.x + (0.5 * strokeWeight) - parent_pos.x;
|
||||
|
||||
el.vml.style.top = pos.y +'px';
|
||||
el.vml.style.left = pos.x +'px';
|
||||
}
|
||||
|
||||
if (typeof(window.previous_onresize) == 'function') { window.previous_onresize(); }
|
||||
}
|
||||
</script>
|
||||
|
||||
|
|
@ -1,198 +0,0 @@
|
|||
<public:component>
|
||||
<script type="text/javascript">
|
||||
|
||||
// IE5.5+ PNG Alpha Fix v2.0 Alpha
|
||||
// (c) 2004-2009 Angus Turnbull http://www.twinhelix.com
|
||||
|
||||
// This is licensed under the GNU LGPL, version 2.1 or later.
|
||||
// For details, see: http://creativecommons.org/licenses/LGPL/2.1/
|
||||
|
||||
var IEPNGFix = window.IEPNGFix || {};
|
||||
IEPNGFix.data = IEPNGFix.data || {};
|
||||
|
||||
|
||||
// CONFIG: blankImg is the path to blank.gif, *relative to the HTML document*.
|
||||
// Try either:
|
||||
// * An absolute path like: '/images/blank.gif'
|
||||
// * A path relative to this HTC file like: thisFolder + 'blank.gif'
|
||||
var thisFolder = document.URL.replace(/(\\|\/)[^\\\/]*$/, '/');
|
||||
IEPNGFix.blankImg = '/images/blank.gif';
|
||||
|
||||
|
||||
IEPNGFix.fix = function(elm, src, t) {
|
||||
// Applies an image 'src' to an element 'elm' using the DirectX filter.
|
||||
// If 'src' is null, filter is disabled.
|
||||
// Disables the 'hook' to prevent infinite recursion on setting BG/src.
|
||||
// 't' = type, where background tile = 0, background = 1, IMG SRC = 2.
|
||||
|
||||
var h = this.hook.enabled;
|
||||
this.hook.enabled = 0;
|
||||
|
||||
var f = 'DXImageTransform.Microsoft.AlphaImageLoader';
|
||||
src = (src || '').replace(/\(/g, '%28').replace(/\)/g, '%29');
|
||||
|
||||
if (
|
||||
src && !(/IMG|INPUT/.test(elm.nodeName) && (t != 2)) &&
|
||||
elm.currentStyle.width == 'auto' && elm.currentStyle.height == 'auto'
|
||||
) {
|
||||
if (elm.offsetWidth) {
|
||||
elm.style.width = elm.offsetWidth + 'px';
|
||||
}
|
||||
if (elm.clientHeight) {
|
||||
elm.style.height = elm.clientHeight + 'px';
|
||||
}
|
||||
if (elm.currentStyle.display == 'inline') {
|
||||
elm.style.display = 'inline-block';
|
||||
}
|
||||
}
|
||||
|
||||
if (t == 1) {
|
||||
elm.style.backgroundImage = 'url("' + this.blankImg + '")';
|
||||
}
|
||||
if (t == 2) {
|
||||
elm.src = this.blankImg;
|
||||
}
|
||||
|
||||
if (elm.filters[f]) {
|
||||
elm.filters[f].enabled = src ? true : false;
|
||||
if (src) {
|
||||
elm.filters[f].src = src;
|
||||
}
|
||||
} else if (src) {
|
||||
elm.style.filter = 'progid:' + f + '(src="' + src +
|
||||
'",sizingMethod="' + (t == 2 ? 'scale' : 'crop') + '")';
|
||||
}
|
||||
|
||||
this.hook.enabled = h;
|
||||
};
|
||||
|
||||
|
||||
IEPNGFix.process = function(elm, init) {
|
||||
// Checks the onpropertychange event (on first 'init' run, a fake event)
|
||||
// and calls the filter-applying-functions.
|
||||
|
||||
if (
|
||||
!/MSIE (5\.5|6)/.test(navigator.userAgent) ||
|
||||
typeof elm.filters == 'unknown'
|
||||
) {
|
||||
return;
|
||||
}
|
||||
if (!this.data[elm.uniqueID]) {
|
||||
this.data[elm.uniqueID] = {
|
||||
className: ''
|
||||
};
|
||||
}
|
||||
var data = this.data[elm.uniqueID],
|
||||
evt = init ? { propertyName: 'src,backgroundImage' } : event,
|
||||
isSrc = /src/.test(evt.propertyName),
|
||||
isBg = /backgroundImage/.test(evt.propertyName),
|
||||
isPos = /width|height|background(Pos|Rep)/.test(evt.propertyName),
|
||||
isClass = !init && ((elm.className != data.className) &&
|
||||
(elm.className || data.className));
|
||||
if (!(isSrc || isBg || isPos || isClass)) {
|
||||
return;
|
||||
}
|
||||
data.className = elm.className;
|
||||
var blank = this.blankImg.match(/([^\/]+)$/)[1],
|
||||
eS = elm.style,
|
||||
eCS = elm.currentStyle;
|
||||
|
||||
// Required for Whatever:hover - erase set BG if className changes.
|
||||
if (
|
||||
isClass && (eS.backgroundImage.indexOf('url(') == -1 ||
|
||||
eS.backgroundImage.indexOf(blank) > -1)
|
||||
) {
|
||||
return setTimeout(function() {
|
||||
eS.backgroundImage = '';
|
||||
}, 0);
|
||||
}
|
||||
|
||||
// Foregrounds.
|
||||
if (isSrc && elm.src && { IMG: 1, INPUT: 1 }[elm.nodeName]) {
|
||||
if ((/\.png/i).test(elm.src)) {
|
||||
if (!elm.oSrc) {
|
||||
// MM rollover compat
|
||||
elm.oSrc = elm.src;
|
||||
}
|
||||
this.fix(elm, elm.src, 2);
|
||||
} else if (elm.src.indexOf(blank) == -1) {
|
||||
this.fix(elm, '');
|
||||
}
|
||||
}
|
||||
|
||||
// Backgrounds.
|
||||
var bgSrc = eCS.backgroundImage || eS.backgroundImage;
|
||||
if ((bgSrc + elm.src).indexOf(blank) == -1) {
|
||||
var bgPNG = bgSrc.match(/url[("']+(.*\.png[^\)"']*)[\)"']/i);
|
||||
if (bgPNG) {
|
||||
if (this.tileBG && !{ IMG: 1, INPUT: 1 }[elm.nodeName]) {
|
||||
this.tileBG(elm, bgPNG[1]);
|
||||
this.fix(elm, '', 1);
|
||||
} else {
|
||||
if (data.tiles && data.tiles.src) {
|
||||
this.tileBG(elm, '');
|
||||
}
|
||||
this.fix(elm, bgPNG[1], 1);
|
||||
this.childFix(elm);
|
||||
}
|
||||
} else {
|
||||
if (data.tiles && data.tiles.src) {
|
||||
this.tileBG(elm, '');
|
||||
}
|
||||
this.fix(elm, '');
|
||||
}
|
||||
} else if ((isPos || isClass) && data.tiles && data.tiles.src) {
|
||||
this.tileBG(elm, data.tiles.src);
|
||||
}
|
||||
|
||||
if (init) {
|
||||
this.hook.enabled = 1;
|
||||
elm.attachEvent('onpropertychange', this.hook);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
IEPNGFix.childFix = function(elm) {
|
||||
// "hasLayout" fix for unclickable children inside PNG backgrounds.
|
||||
var tags = [
|
||||
'a',
|
||||
'input',
|
||||
'select',
|
||||
'textarea',
|
||||
'button',
|
||||
'iframe',
|
||||
'object'
|
||||
],
|
||||
t = tags.length,
|
||||
tFix = [];
|
||||
while (t--) {
|
||||
var pFix = elm.all.tags(tags[t]),
|
||||
e = pFix.length;
|
||||
while (e--) {
|
||||
tFix.push(pFix[e]);
|
||||
}
|
||||
}
|
||||
t = tFix.length;
|
||||
if (t && (/relative|absolute/i).test(elm.currentStyle.position)) {
|
||||
alert('IEPNGFix: Unclickable children of element:' +
|
||||
'\n\n<' + elm.nodeName + (elm.id && ' id=' + elm.id) + '>');
|
||||
}
|
||||
while (t--) {
|
||||
if (!(/relative|absolute/i).test(tFix[t].currentStyle.position)) {
|
||||
tFix[t].style.position = 'relative';
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
IEPNGFix.hook = function() {
|
||||
if (IEPNGFix.hook.enabled) {
|
||||
IEPNGFix.process(element, 0);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
IEPNGFix.process(element, 1);
|
||||
|
||||
</script>
|
||||
</public:component>
|
||||
|
|
@ -1,92 +0,0 @@
|
|||
if (!window.localStorage || !window.sessionStorage) (function () {
|
||||
|
||||
var Storage = function (type) {
|
||||
function createCookie(name, value, days) {
|
||||
var date, expires;
|
||||
|
||||
if (days) {
|
||||
date = new Date();
|
||||
date.setTime(date.getTime()+(days*24*60*60*1000));
|
||||
expires = "; expires="+date.toGMTString();
|
||||
} else {
|
||||
expires = "";
|
||||
}
|
||||
document.cookie = name+"="+value+expires+"; path=/";
|
||||
}
|
||||
|
||||
function readCookie(name) {
|
||||
var nameEQ = name + "=",
|
||||
ca = document.cookie.split(';'),
|
||||
i, c;
|
||||
|
||||
for (i=0; i < ca.length; i++) {
|
||||
c = ca[i];
|
||||
while (c.charAt(0)==' ') {
|
||||
c = c.substring(1,c.length);
|
||||
}
|
||||
|
||||
if (c.indexOf(nameEQ) == 0) {
|
||||
return c.substring(nameEQ.length,c.length);
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
function setData(data) {
|
||||
data = JSON.stringify(data);
|
||||
if (type == 'session') {
|
||||
window.top.name = data;
|
||||
} else {
|
||||
createCookie('localStorage', data, 365);
|
||||
}
|
||||
}
|
||||
|
||||
function clearData() {
|
||||
if (type == 'session') {
|
||||
window.top.name = '';
|
||||
} else {
|
||||
createCookie('localStorage', '', 365);
|
||||
}
|
||||
}
|
||||
|
||||
function getData() {
|
||||
var data = type == 'session' ? window.top.name : readCookie('localStorage');
|
||||
return data ? JSON.parse(data) : {};
|
||||
}
|
||||
|
||||
|
||||
// initialise if there's already data
|
||||
var data = getData();
|
||||
|
||||
return {
|
||||
clear: function () {
|
||||
data = {};
|
||||
clearData();
|
||||
},
|
||||
getItem: function (key) {
|
||||
return data[key] || null;
|
||||
},
|
||||
key: function (i) {
|
||||
// not perfect, but works
|
||||
var ctr = 0;
|
||||
for (var k in data) {
|
||||
if (ctr == i) return k;
|
||||
else ctr++;
|
||||
}
|
||||
return null;
|
||||
},
|
||||
removeItem: function (key) {
|
||||
delete data[key];
|
||||
setData(data);
|
||||
},
|
||||
setItem: function (key, value) {
|
||||
data[key] = value+''; // forces the value to a string
|
||||
setData(data);
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
if (!window.localStorage) window.localStorage = new Storage('local');
|
||||
if (!window.sessionStorage) window.sessionStorage = new Storage('session');
|
||||
|
||||
}());
|
||||
|
|
@ -30,11 +30,6 @@
|
|||
<br class="clear">
|
||||
</div>
|
||||
|
||||
<!--[if lt IE 8]>
|
||||
<script src="http://d1eqzjbvoh1rux.cloudfront.net/json2.min.js"></script>
|
||||
<script src="/js/storage-polyfill.js"></script>
|
||||
<![endif]-->
|
||||
|
||||
<script>
|
||||
SJS.projectName = '<%= title %>'
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -1,12 +1,3 @@
|
|||
<!--[if IE 6]>
|
||||
<link rel="stylesheet" href="/css/ie6.css">
|
||||
<![endif]-->
|
||||
<!--[if lt IE 8]>
|
||||
<link rel="stylesheet" href="/css/ie7.css">
|
||||
<script src="http://d1eqzjbvoh1rux.cloudfront.net/json2.min.js"></script>
|
||||
<script src="/js/storage-polyfill.js"></script>
|
||||
<![endif]-->
|
||||
|
||||
<a href="https://github.com/samsonjs"><img id="forkme" src="/images/forkme@2x.png" width="140" height="140" alt="Fork me on GitHub"></a>
|
||||
|
||||
<nav class="navbar" id="title">projects</nav>
|
||||
|
|
|
|||
Loading…
Reference in a new issue