Commits

Tetsuya Morimoto committed 976ab7f Merge

merged from original

Comments (0)

Files changed (6)

     'python_version':sysconfig.get_config_vars()['py_version'],
     }
 
-html_sidebars = {
-    'index':['sidebar_subscribe.html',
+if os.environ['TEMPLATES'] == 'pkg':
+    html_sidebars = {
+        'index':['sidebar_subscribe.html',
+                 'sidebar_book.html',
+                 ],
+        'about':['sidebar_subscribe.html',
+                 'sidebar_toc.html',
+                 'sidebar_book.html',
+                 ],
+        '*':['sidebar_toc.html',
+             'sidebar_navigation.html',
+             'sidebar_book.html',
+             ],
+        '**':['sidebar_toc.html',
+              'sidebar_navigation.html',
+              'sidebar_examples.html',
+              'sidebar_book.html',
+              ],
+        }
+else:
+    html_sidebars = {
+        'index':['sidebar_subscribe.html',
+                 'sidebar_book.html',
+                 'sidebar_ads.html',
+                 ],
+        'about':['sidebar_subscribe.html',
+                 'sidebar_toc.html',
+                 'sidebar_book.html',
+                 'sidebar_ads.html',
+                 ],
+        '*':['sidebar_toc.html',
+             'sidebar_navigation.html',
              'sidebar_book.html',
              'sidebar_ads.html',
              ],
-    'about':['sidebar_subscribe.html',
-             'sidebar_toc.html',
-             'sidebar_book.html',
-             'sidebar_ads.html',
-             ],
-    '*':['sidebar_toc.html',
-         'sidebar_navigation.html',
-         'sidebar_book.html',
-         'sidebar_ads.html',
-         ],
-    '**':['sidebar_toc.html',
-          'sidebar_navigation.html',
-          'sidebar_examples.html',
-          'sidebar_book.html',
-          'sidebar_ads.html',
-          ],
-    }
+        '**':['sidebar_toc.html',
+              'sidebar_navigation.html',
+              'sidebar_examples.html',
+              'sidebar_book.html',
+              'sidebar_ads.html',
+              ],
+        }
 
 # The TEMPLATES variable is set by the Makefile before sphinx-build is called.
 templates_path = ['../sphinx/templates/%s' % os.environ['TEMPLATES'],

sphinx/templates/pkg/sidebar_book.html

+<p><iframe src="http://rcm.amazon.com/e/cm?lt1=_blank&bc1=000000&IS2=1&bg1=DDDDDD&fc1=000000&lc1=CC6714&t=hellflynet-20&o=1&p=8&l=as1&m=amazon&f=ifr&md=10FE9736YVPPT7A0FBG2&asins=0321767349" style="width:120px;height:240px;margin:0 1em 0 1em;" scrolling="no" frameborder="0"></iframe></p>

sphinx/templates/pkg/sidebar_examples.html

+<h3>サンプルプログラム</h3>
+
+<p>PyMOTW の全てのサンプルプログラムの出力は、
+注記されていない限りは Python {{python_version}} で生成されています。
+標準ライブラリの初期のバージョンでは利用できない機能も紹介している
+可能性があります。</p>

sphinx/templates/pkg/sidebar_navigation.html

+    <h3>ナビゲーション</h3>
+      <p>
+    <a href="{{ pathto("contents") }}"><strong>コンテンツテーブル</strong></a><br/>
+    {% if next or prev %}
+        {%- if prev %}
+          <a href="{{ prev.link|e }}" title="前の章へ"><strong>前:</strong> {{ prev.title }}</a><br/>
+        {%- endif %}
+
+        {%- if next %}
+          <a href="{{ next.link|e }}" title="次の章へ"><strong>次:</strong> {{ next.title }}</a><br/>
+        {%- endif %}
+      </p>
+    {% endif %}
+
+    {%- if show_source and has_source and sourcename %}
+      <h3>{{ _('This Page') }}</h3>
+      <p>
+      <a href="{{ pathto('_sources/' + sourcename, true)|e }}"
+               rel="nofollow">{{ _('Show Source') }}</a>
+      </p>
+    {%- endif %}

sphinx/templates/pkg/sidebar_subscribe.html

+<h3>購読</h3>
+
+<p>
+<a href="http://feeds.feedburner.com/PyMOTW" title="Subscribe to my feed" rel="alternate" type="application/rss+xml"><img src="http://www.feedburner.com/fb/images/pub/feed-icon32x32.png" alt="" style="border:0"/></a> <a href="http://feeds.feedburner.com/PyMOTW" title="フィードを購読" rel="alternate" type="application/rss+xml">リーダーでフィードを購読</a></p>
+
+<p><a target="_blank" href="http://www.feedburner.com/fb/a/emailverifySubmit?feedId=806224&amp;loc=en_US" title="Receive email notification of posts"><img src="_static/images/mail-icon-32x32.png" alt="" style="border:0" /></a> <a target="_blank" href="http://www.feedburner.com/fb/a/emailverifySubmit?feedId=806224&amp;loc=en_US" title="投稿通知をメールで受け取る">メールで購読</a></p>

sphinx/templates/pkg/sidebar_toc.html

+{%- block sidebartoc %}
+{%- if display_toc %}
+  <h3>ページコンテンツ</h3>
+  {{ toc }}
+{%- endif %}
+{%- endblock %}