Personal tools
You are here: Home 清水川記 DeliveranceでOSWDのデザインをTwitter.comに適用してみた
Document Actions

DeliveranceでOSWDのデザインをTwitter.comに適用してみた

Deliveranceでデザイン適用した例

Zope/Plone勉強会3 でDeliveranceを使ってデザイン適用をちょっと練習してみた。

デザインは Open Source Web Design から取得した SilverGlow 。適用サイトは今回はTwitterにしてみました。 ルールファイルとなるdeliverance.xmlに書いたルール部分は6行です。

deliverance.xml:

<ruleset>

  <server-settings>
    <server>localhost:8000</server>
    <execute-pyref>true</execute-pyref>
    <dev-allow>127.0.0.1</dev-allow>
    <dev-user username="admin" password="admin" />
  </server-settings>

  <proxy path="/_theme">
    <dest href="{here}/../theme" />
  </proxy>

  <proxy path="/" >
    <response rewrite-links="1" />
    <dest href="http://twitter.com" />
  </proxy>

  <theme href="/_theme/theme.html" />

  <rule>
    <append content="ul.about" theme="children:#about" />
    <append content="div.stats" theme="children:#stats" />
    <append content="#following" theme="children:#following" />
    <replace content="div.section || div#content" theme=".right_content" />
    <append content="h2.thumb img" theme="#about h4" />
    <replace content="children:h2.thumb" theme="children:.block_right" />
  </rule>

</ruleset>

あとはthemeのcss/htmlを数行書き換えて完成。1ページくらいなら簡単にできました。

DeliveranceとSphinx生成ドキュメントってとっても親和性が高い気がする。SphinxやPloneに独自Skinを適用しようとがんばるよりもDeliveranceのルールを覚える方が楽ではある。実際の運用まで考えるとまだ色々ひっかかるケドね。

Category(s)
Web
The URL to Trackback this entry is:
http://www.freia.jp/taka/blog/669/tbping
Add comment

You can add a comment by filling out the form below. Plain text formatting.

(Required)
(Required)
(Required)

« July 2010 »
Mo Tu We Th Fr Sa Su
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31  
About this blog
Zope, Python, FreeBSD, その他色々について。つまり日記か。
Categories
Agile(XP) (0)
Event (10)
Pattern (0)
その他 (10)
Zope (11)
Memo (0)
(3)
python (17)
Programming (0)
Game (0)
OO (0)
Unix (0)
WZ (0)
work (0)
Plone (11)
Windows (1)
IT-PC (4)
自転車 (0)
TurboGears (0)
ダーツ (0)
JavaScript (0)
旅行 (0)
Web (3)
セキュリティー (1)
Django (0)
LDAP (0)
データベース (0)
vi/vim/gvim (0)
C/C++ (0)
ボドゲ (0)
RoR (2)
pyspa (1)
スタトレ (0)