From 411bb3990113e5f88e3ba9b2ddeef6288ad0740f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B8=A1=E9=82=89=E8=8C=82=E9=9B=85?= Date: Mon, 13 Nov 2017 19:45:51 +0900 Subject: [PATCH] =?UTF-8?q?cpprefjp=20=E3=81=A7=E3=81=AF=E3=82=B5=E3=82=A4?= =?UTF-8?q?=E3=83=89=E3=83=90=E3=83=BC=E3=82=92=E5=87=BA=E5=8A=9B=E3=81=97?= =?UTF-8?q?=E3=81=AA=E3=81=84=E3=82=88=E3=81=86=E3=81=AB=E3=81=97=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- cpprefjp/templates/content.html | 15 ++++++++++----- run.py | 1 + settings/boostjp.py | 3 +++ settings/cpprefjp.py | 5 ++++- settings/cpprefjp_local.py | 1 - 6 files changed, 19 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index b13871d..feffa0b 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/cpprefjp/templates/content.html b/cpprefjp/templates/content.html index 0ccbc24..c25d92b 100644 --- a/cpprefjp/templates/content.html +++ b/cpprefjp/templates/content.html @@ -36,11 +36,16 @@ {% endmacro %} {% block sidebar %} -
- -
+ {% if disable_sidebar %} + + {% else %} +
+ +
+ {% endif %} {% endblock %} {% block content_header %} diff --git a/run.py b/run.py index 604b175..10cc77a 100755 --- a/run.py +++ b/run.py @@ -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, diff --git a/settings/boostjp.py b/settings/boostjp.py index 0775fcf..3e0c57a 100644 --- a/settings/boostjp.py +++ b/settings/boostjp.py @@ -29,6 +29,9 @@ # テンプレートディレクトリ PAGE_TEMPLATE_DIR = 'boostjp/templates' +# サイドバーの出力を無しにするか +DISABLE_SIDEBAR = False + # HTML の minify を行なうか USE_MINIFY = True diff --git a/settings/cpprefjp.py b/settings/cpprefjp.py index 2c01d88..f8fbc9c 100644 --- a/settings/cpprefjp.py +++ b/settings/cpprefjp.py @@ -29,8 +29,11 @@ # テンプレートディレクトリ PAGE_TEMPLATE_DIR = 'cpprefjp/templates' +# サイドバーの出力を無しにするか +DISABLE_SIDEBAR = True + # HTML の minify を行なうか -USE_MINIFY = True +USE_MINIFY = False # 検索用 HTML GOOGLE_SITE_SEARCH = ''' diff --git a/settings/cpprefjp_local.py b/settings/cpprefjp_local.py index 38aab74..b1ede02 100644 --- a/settings/cpprefjp_local.py +++ b/settings/cpprefjp_local.py @@ -7,4 +7,3 @@ from .cpprefjp import * # NOQA BASE_URL = 'http://localhost:8000' -USE_MINIFY = False