2011/03/14

[memo]使用的blogger hack

幾乎都是來自Abin's Tech Note所提供的修改
順便記錄一下自己有改過的部分,以利日後更換樣板時加快修改速度

目前

twitter follow buttonprofile widget

直接套用公式版本

Remove the link outline

置於自訂CSS中

Feed Calendar

修改星期起始日,區分週末
var weekLabels = new Array('<span class="Weekend1">日</span>','月','火','水','木','金','<span class="Weekend2">土</span>');
...
function generateCalendar()
{
...
- var startDay = IsitNow.getDay() - 1;
+ var startDay = IsitNow.getDay();
...
  var nTableCol=0;
  for (index=1;index<=nDays;index++) {
...
    else {
-     if (nTableCol < 5)
-       sCalendarCode+='<td id="Day'+index+'">';
-     else
-       sCalendarCode+='<td id="Day'+index+'" class="Weekend">';

+     if (nTableCol > 0 && nTableCol < 6)
+       sCalendarCode+='<td id="Day'+index+'">';
+     else if (nTableCol==0)
+       sCalendarCode+='<td id="Day'+index+'" class="Weekend1">';
+     else if (nTableCol==6)
+       sCalendarCode+='<td id="Day'+index+'" class="Weekend2">';
將預設週末顏色區隔,修改連結顏色
#CalendarTable .Today a, #CalendarTable .Today a:visited {
  color: #fff;
}
#CalendarTable .Weekend1 {
  color: #962222;
}
#CalendarTable .Weekend2 {
  color: #386a05;
}
#CalendarTable a:visited, #CalendarTable a:hover, #CalendarTable a:active {
  color: $(widget.link.color);
}

Element Toggling

目前使用於Recent Comments模組上

Recent Comments

調整為顯示最新5則回應
var nCommentShow = 5;

動態調整文章字體大小

長度單位改為百分比
function FontZoom(size)
{
  var element = document.getElementsByTagName("div");
  var components = new Array();
...
  for (i = 0; i < components.length; i++)
    components[i].style.fontSize = size+'%';

自訂CSS

a img {
  border-width:0;
}

/* Style for Jump-Link */
.jump-link {
  float: left;
  text-decoration: none;
  border: 1px dotted #404040;
  color: #e2d0c8;
  background: #202020;
  font-size: 85%;
  margin: 0;
  padding: 1px 10px;
}

/* Style for Share Buttons */
.post-share-buttons {
  float: right;
}

blockquote {
  margin: .75em 0;
  border: 1px dashed #444444;
  border-width: 1px 0;
  padding: 5px 15px;
  color: #bbbbbb;
  font-size: 85%;
}

.aa{
  font-family: "MS Pゴシック","MS PGothic","Mona","mona-gothic-jisx0208.1990-0",sans-serif;
  font-size: 12px;
  line-height: 115%;
  font-weight: normal;
  white-space: nowrap;
}

停用

讓側邊列 (Sidebar) 的元件只在首頁顯示/不顯示
使用中的元件不多,想不出來有什麼需要隱藏的...
Label Cloud
改用blogger官方版
detail article toggle
改用blogger官方版,並自訂CSS
Related Post
隱藏 Navbar
預設底色在IE下有相容性問題
twitter follow button by Go2web20.net
改用公式版本

0 件のコメント:

コメントを投稿