Skip to content

Commit

Permalink
cpprefjp ではサイドバーを出力しないようにした
Browse files Browse the repository at this point in the history
  • Loading branch information
melpon committed Nov 13, 2017
1 parent e76dc18 commit 411bb39
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 8 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ popd
# この辺は必要に応じて実行する
(cd crsearch.json/site && git pull)
./crsearch.json/docker.sh run
./crsearch/docker.sh run
./kunai/docker.sh run build

./docker.sh run settings.cpprefjp_local
./docker.sh localhost cpprefjp
Expand Down
15 changes: 10 additions & 5 deletions cpprefjp/templates/content.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,16 @@
{% endmacro %}

{% block sidebar %}
<div class="tree">
<ul>
{{ sidebar_tree(sidebar.children, True) }}
</ul>
</div>
{% if disable_sidebar %}
<div id="sidebar">
</div>
{% else %}
<div class="tree">
<ul>
{{ sidebar_tree(sidebar.children, True) }}
</ul>
</div>
{% endif %}
{% endblock %}

{% block content_header %}
Expand Down
1 change: 1 addition & 0 deletions run.py
Original file line number Diff line number Diff line change
Expand Up @@ -505,6 +505,7 @@ def main():
'url': settings.BASE_URL + '/' + pageinfo['href'],
'description': pageinfo['description'],
'cachebust': '?cachebust=' + str(_CACHEBUST),
'disable_sidebar': settings.DISABLE_SIDEBAR,
'sidebar': sidebar,
'content_header': content_header,
'brand': settings.BRAND,
Expand Down
3 changes: 3 additions & 0 deletions settings/boostjp.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@
# テンプレートディレクトリ
PAGE_TEMPLATE_DIR = 'boostjp/templates'

# サイドバーの出力を無しにするか
DISABLE_SIDEBAR = False

# HTML の minify を行なうか
USE_MINIFY = True

Expand Down
5 changes: 4 additions & 1 deletion settings/cpprefjp.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,11 @@
# テンプレートディレクトリ
PAGE_TEMPLATE_DIR = 'cpprefjp/templates'

# サイドバーの出力を無しにするか
DISABLE_SIDEBAR = True

# HTML の minify を行なうか
USE_MINIFY = True
USE_MINIFY = False

# 検索用 HTML
GOOGLE_SITE_SEARCH = '''
Expand Down
1 change: 0 additions & 1 deletion settings/cpprefjp_local.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,3 @@
from .cpprefjp import * # NOQA

BASE_URL = 'http://localhost:8000'
USE_MINIFY = False

0 comments on commit 411bb39

Please # to comment.