From 1f053c194dffdb1715ce09051e4d869ae5fcdd81 Mon Sep 17 00:00:00 2001 From: othree Date: Tue, 8 Mar 2011 18:24:10 +0800 Subject: [PATCH] regenerate index.html --- footer.html | 1 - index.html | 14 ++++-- scripts/detect_cleartype.js | 99 ------------------------------------- stylesheets/main.css | 8 ++- 4 files changed, 17 insertions(+), 105 deletions(-) delete mode 100644 scripts/detect_cleartype.js diff --git a/footer.html b/footer.html index 8725303..f142957 100644 --- a/footer.html +++ b/footer.html @@ -15,6 +15,5 @@ - diff --git a/index.html b/index.html index b9d33c6..cc5cc56 100644 --- a/index.html +++ b/index.html @@ -4,10 +4,11 @@ Markdown 語法說明 - - + +
+

NOTE: This is Traditional Chinese Edition Document of Markdown Syntax. If you are seeking for English Edition Document. Please refer to Markdown: Syntax.

@@ -1014,7 +1015,9 @@ _ 底線 . 英文句點Ddot ! 驚嘆號 - + + + + diff --git a/scripts/detect_cleartype.js b/scripts/detect_cleartype.js deleted file mode 100644 index a419fad..0000000 --- a/scripts/detect_cleartype.js +++ /dev/null @@ -1,99 +0,0 @@ -/* - * TypeHelpers version 1.0 - * Zoltan Hawryluk, Nov 24 2009. - * @see http://www.useragentman.com/blog/2009/11/29/how-to-detect-font-smoothing-using-javascript/ - * - * Released under the MIT License. http://www.opensource.org/licenses/mit-license.php - * - * Works for - * - IE6+ (Windows), - * - Firefox 3.5+ (Windows, Mac, Linux), - * - Safari 4+ (Windows, Mac OS X), - * - Chrome 3.0+ (Windows). - * Opera 10.10 and under reports unknown support for font-smoothing. - * - * Modified by Christian Beier (www.beier-christian.eu) to detect the ClearType technology. - * - * Required: jQuery 1.3.x - * - * - * METHODS - * ------- - * - * hasSmoothing() returns: - * true if font smoothing is enabled - * false if font smoothing isn't enabled - * null if it cannot detect if it's on or not. - * - * addClasses() adds the following classes to the html tag: - * "hasFontSmoothing-true" if font smoothing is enabled - * "hasFontSmoothing-false" if it isn't - * "hasFontSmoothing-unknown" if it cannot detect it. - * - */ - -var TypeHelpers = new function(){ - var me = this; - - me.hasSmoothing = function(){ - // IE has screen.fontSmoothingEnabled - sweet! - if (typeof(screen.fontSmoothingEnabled) != "undefined") { - return screen.fontSmoothingEnabled; - } else { - try { - // Create a 35x35 Canvas block. - var canvasNode = document.createElement("canvas"); - canvasNode.width = "35"; - canvasNode.height = "35" - - // We must put this node into the body, otherwise - // Safari Windows does not report correctly. - canvasNode.style.display = "none"; - document.body.appendChild(canvasNode); - var ctx = canvasNode.getContext("2d"); - - // draw a black letter "O", 32px Arial. - ctx.textBaseline = "top"; - ctx.font = "32px Arial"; - ctx.fillStyle = "black"; - ctx.strokeStyle = "black"; - - ctx.fillText("O", 0, 0); - - // start at (8,1) and search the canvas from left to right, - // top to bottom to see if we can find a non-black pixel. If - // so we return true. - for (var j = 8; j <= 32; j++) { - for (var i = 1; i <= 32; i++) { - var imageData = ctx.getImageData(i, j, 1, 1).data - var alpha = imageData[3]; - - if (alpha != 255 && alpha != 0 && alpha > 180) { - return true; // font-smoothing must be on. - } - } - - } - - // didn't find any non-black pixels - return false. - return false; - } - catch (ex) { - // Something went wrong (for example, Opera cannot use the - // canvas fillText() method. Return null (unknown). - return null; - } - } - } - - $(document).ready(function() { - var result = me.hasSmoothing(); - if (result == true) { - $('html').addClass('hasFontSmoothing-true'); - } else if (result == false) { - $('html').addClass('hasFontSmoothing-false'); - } else { // result == null - $('html').addClass('hasFontSmoothing-unknown'); - } - }); -} diff --git a/stylesheets/main.css b/stylesheets/main.css index f84c6bd..f6f78de 100644 --- a/stylesheets/main.css +++ b/stylesheets/main.css @@ -6,7 +6,13 @@ html.hasFontSmoothing-true { font-family: "微軟正黑體", "Microsoft JhengHei", sans-serif; } -div.wikistyle{width:960px} +body { + padding: 1em; +} +div.wikistyle{ + width:760px; + margin: 0 auto; +} div.wikistyle{background-color:#f8f8f8;padding:.7em;} div.wikistyle{border:1px solid #e9e9e9;}