《Redis 设计与实现》所使用的 sphinx 样式。
CSS
Permalink
Failed to load latest commit information.
static 添加对 color 选项的支持,让更换颜色变得更简单 Dec 9, 2013
README.rst Fix a url in README.rst May 8, 2013
disqus.html hello world Mar 21, 2013
layout.html
theme.conf 添加对 color 选项的支持,让更换颜色变得更简单 Dec 9, 2013

README.rst

DER

DER == reverse("RED")

本项目是 《Redis 设计与实现》 所使用的 Sphinx 样式。

样式特点:

  • 单色调简单风格(默认为红色,但很容易就可以修改成其他颜色)
  • 醒目的 h1 标题
  • 清晰的、可以高效地对文本进行视线分割的 h2 标题
  • 固定大小、居中显示、百分比字体大小,布局健壮,适用于多种不同的屏幕环境

使用方法

  1. 克隆本项目。
  2. 修改 sphinx 项目 conf.py 文件中的 html_theme_path 变量,让它指向 der 文件夹所在的位置。
  3. 修改 sphinx 项目 conf.py 文件中的 html_theme 变量的值为 der
  4. 完成!

开启 disqus 支持

  1. 编辑 der 文件夹中的 layout.html 文件,修改文件中和 disqus 有关的语句:

    {# note: remove this comment if you want to enable disqus support
    
    {% include "disqus.html" %}
    
    #}
    

    只保留这一句:

    {% include "disqus.html" %}
    
  2. 编辑 der 文件夹中的 disqus.html 文件,将其中的

    var disqus_shortname = 'YOUR-DISQUS-FORUM-SHORTNAME';
    

    中的 YOUR-DISQUS-FORUM-SHORTNAME 替换成你的 disqus 论坛的名字。

  3. 完成!

使用许可

本样式修改自 Sphinx 项目自带的 pyramid 样式, 使用与源项目同样的 BSD 协议发布。

Copyright (c) 2013, huangz
All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  • Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  • Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.