Просмотр исходного кода

WIP: apply bootstrap theme

* refactor layout files
Yuki Takei 8 лет назад
Родитель
Сommit
5af2be5cbd

+ 1 - 1
lib/views/admin/app.html

@@ -2,7 +2,7 @@
 
 {% block html_title %}{{ t('App settings') }} · {% endblock %}
 
-{% block content_head %}
+{% block layout_header %}
 <div class="header-wrap">
   <header id="page-header">
     <h1 class="title" id="">{{ t('App settings') }}</h1>

+ 1 - 1
lib/views/admin/customize.html

@@ -15,7 +15,7 @@
 {% endblock %}
 
 
-{% block content_head %}
+{% block layout_header %}
 <div class="header-wrap">
   <header id="page-header">
     <h1 class="title" id="">カスタマイズ</h1>

+ 1 - 1
lib/views/admin/external-accounts.html

@@ -2,7 +2,7 @@
 
 {% block html_title %}外部アカウント管理 · {% endblock %}
 
-{% block content_head %}
+{% block layout_header %}
 <div class="header-wrap">
   <header id="page-header">
     <h1 class="title" id="">ユーザー管理/外部アカウント管理</h1>

+ 1 - 1
lib/views/admin/index.html

@@ -2,7 +2,7 @@
 
 {% block html_title %}Wiki管理· {{ path }}{% endblock %}
 
-{% block content_head %}
+{% block layout_header %}
 <div class="header-wrap">
   <header id="page-header">
     <h1 class="title" id=""> {{ t('admin_top.Management Wiki') }}</h1>

+ 1 - 1
lib/views/admin/markdown.html

@@ -2,7 +2,7 @@
 
 {% block html_title %}Markdown設定 · {{ path }}{% endblock %}
 
-{% block content_head %}
+{% block layout_header %}
 <div class="header-wrap">
   <header id="page-header">
     <h1 class="title" id="">Markdown設定</h1>

+ 1 - 1
lib/views/admin/notification.html

@@ -2,7 +2,7 @@
 
 {% block html_title %}通知設定 · {{ path }}{% endblock %}
 
-{% block content_head %}
+{% block layout_header %}
 <div class="header-wrap">
   <header id="page-header">
     <h1 class="title" id="">通知設定</h1>

+ 1 - 1
lib/views/admin/search.html

@@ -2,7 +2,7 @@
 
 {% block html_title %}検索管理 · {{ path }}{% endblock %}
 
-{% block content_head %}
+{% block layout_header %}
 <div class="header-wrap">
   <header id="page-header">
     <h1 class="title" id="">検索管理</h1>

+ 1 - 1
lib/views/admin/security.html

@@ -2,7 +2,7 @@
 
 {% block html_title %}セキュリティ · {% endblock %}
 
-{% block content_head %}
+{% block layout_header %}
 <div class="header-wrap">
   <header id="page-header">
     <h1 class="title" id="">{{ t('Security settings') }}</h1>

+ 1 - 1
lib/views/admin/users.html

@@ -2,7 +2,7 @@
 
 {% block html_title %}ユーザー管理 · {% endblock %}
 
-{% block content_head %}
+{% block layout_header %}
 <div class="header-wrap">
   <header id="page-header">
     <h1 class="title" id="">ユーザー管理</h1>

+ 1 - 9
lib/views/crowi-plus/base/not_found_nosidebar.html

@@ -1,10 +1,6 @@
 {% extends '../../not_found.html' %}
 
 
-{% block layout_sidebar %}
-{% endblock %}
-
-
 {% block layout_main %}
 <div id="main" class="main col-md-12 {% if page %}{{ css.grant(page) }}{% endif %} {% block main_css_class %}{% endblock %}">
   {% if page && page.grant != 1 %}
@@ -19,10 +15,6 @@
   </p>
   {% endif %}
   <article>
-    {% block content_head %}
-      {% parent %}
-    {% endblock %}
-
     {% block content_main_before %}
     {% endblock %}
 
@@ -42,7 +34,7 @@
 {% endblock %} {# layout_main #}
 
 
-{% block footer %}
+{% block layout_footer %}
   {% parent %}
   {% include '../widget/system-version.html' %}
 {% endblock %}

+ 1 - 9
lib/views/crowi-plus/base/page_list_nosidebar.html

@@ -1,10 +1,6 @@
 {% extends '../../page_list.html' %}
 
 
-{% block layout_sidebar %}
-{% endblock %}
-
-
 {% block layout_main %}
 <div id="main" class="main col-md-12 {% if page %}{{ css.grant(page) }}{% endif %} {% block main_css_class %}{% endblock %}">
   {% if page && page.grant != 1 %}
@@ -19,10 +15,6 @@
   </p>
   {% endif %}
   <article>
-    {% block content_head %}
-      {% parent %}
-    {% endblock %}
-
     {% block content_main_before %}
     {% endblock %}
 
@@ -42,7 +34,7 @@
 {% endblock %} {# layout_main #}
 
 
-{% block footer %}
+{% block layout_footer %}
   {% parent %}
   {% include '../widget/system-version.html' %}
 {% endblock %}

+ 1 - 9
lib/views/crowi-plus/base/page_nosidebar.html

@@ -1,10 +1,6 @@
 {% extends '../../page.html' %}
 
 
-{% block layout_sidebar %}
-{% endblock %}
-
-
 {% block layout_main %}
 <div id="main" class="main col-md-12 {% if page %}{{ css.grant(page) }}{% endif %} {% block main_css_class %}{% endblock %}">
   {% if page && page.grant != 1 %}
@@ -19,10 +15,6 @@
   </p>
   {% endif %}
   <article>
-    {% block content_head %}
-      {% parent %}
-    {% endblock %}
-
     {% block content_main_before %}
     {% endblock %}
 
@@ -42,7 +34,7 @@
 {% endblock %} {# layout_main #}
 
 
-{% block footer %}
+{% block layout_footer %}
   {% parent %}
   {% include '../widget/system-version.html' %}
 {% endblock %}

+ 1 - 10
lib/views/crowi-plus/base/user_page_nosidebar.html

@@ -1,10 +1,6 @@
 {% extends '../../user_page.html' %}
 
 
-{% block layout_sidebar %}
-{% endblock %}
-
-
 {% block layout_main %}
 <div id="main" class="main col-md-12 {% if page %}{{ css.grant(page) }}{% endif %} {% block main_css_class %}{% endblock %}">
   {% if page && page.grant != 1 %}
@@ -30,11 +26,6 @@
            #   Because this block has content like 'Bookmarks' or 'Recent Created' whose height changes dynamically,
            #   setting of 'revision-toc' (affix) is hindered.
            #}
-
-          {% block content_head %}
-            {% parent %}
-          {% endblock %}
-
           {% block content_main_before %}
           {% endblock %}
 
@@ -66,7 +57,7 @@
 {% endblock %} {# layout_main #}
 
 
-{% block footer %}
+{% block layout_footer %}
   {% parent %}
   {% include '../widget/system-version.html' %}
 {% endblock %}

+ 3 - 3
lib/views/crowi-plus/not_found.html

@@ -5,14 +5,14 @@
   {% parent %}
 {% endblock %}
 
-{% block content_head %}
+{% block layout_header %}
 
-  {% block content_head_before %}
+  {% block layout_header_before %}
   {% endblock %}
 
   {% include 'widget/header.html' %}
 
-  {% block content_head_after %}
+  {% block layout_header_after %}
   {% endblock %}
 
 {% endblock %} {# /content_head #}

+ 3 - 3
lib/views/crowi-plus/page.html

@@ -5,14 +5,14 @@
   {% parent %}
 {% endblock %}
 
-{% block content_head %}
+{% block layout_header %}
 
-  {% block content_head_before %}
+  {% block layout_header_before %}
   {% endblock %}
 
   {% include 'widget/header.html' %}
 
-  {% block content_head_after %}
+  {% block layout_header_after %}
   {% endblock %}
 
 {% endblock %} {# /content_head #}

+ 3 - 3
lib/views/crowi-plus/page_list.html

@@ -5,14 +5,14 @@
   {% parent %}
 {% endblock %}
 
-{% block content_head %}
+{% block layout_header %}
 
-  {% block content_head_before %}
+  {% block layout_header_before %}
   {% endblock %}
 
   {% include 'widget/header.html' %}
 
-  {% block content_head_after %}
+  {% block layout_header_after %}
   {% endblock %}
 
 {% endblock %} {# /content_head #}

+ 1 - 1
lib/views/crowi-plus/user_page.html

@@ -5,7 +5,7 @@
   {% parent %}
 {% endblock %}
 
-{% block content_head %}
+{% block layout_header %}
   {% parent %}
 {% endblock %} {# /content_head #}
 

+ 1 - 1
lib/views/index.html

@@ -1,6 +1,6 @@
 {% extends 'layout/2column.html' %}
 
-{% block content_head %}
+{% block layout_header %}
 <header>
   <h2>Index</h2>
 </header>

+ 1 - 9
lib/views/layout/2column.html

@@ -1,7 +1,6 @@
 {% extends 'layout.html' %}
 
-{% block layout_sidebar %}
-
+{% block layout_main %}
 <a href="" class=" hidden-xs hidden-sm layout-control" id="toggle-sidebar"><i class="fa fa-chevron-right"></i> <span class="hide-on-affix-top"></span></a>
 <aside class="sidebar col-md-3 hidden-xs hidden-sm hidden-print">
 
@@ -26,9 +25,6 @@
   </div>
 </aside>
 
-{% endblock %} {# layout_sidebar #}
-
-{% block layout_main %}
 <div id="main" class="main col-md-9 {% if page %}{{ css.grant(page) }}{% endif %} {% block main_css_class %}{% endblock %}">
   {% if page && page.grant != 1 %}
   <p class="page-grant">
@@ -42,11 +38,7 @@
   </p>
   {% endif %}
   <article>
-    {% block content_head %}
-    {% endblock %}
-
     {% block content_main %}
-    //
     {% endblock content_main %}
 
     {% block content_footer %}

+ 7 - 20
lib/views/layout/layout.html

@@ -227,37 +227,24 @@ gh/highlightjs/cdn-release@9.12.0/build/languages/yaml.min.js
   <div id="page-wrapper">
     <div class="container-fluid">
       <div class="row bg-title">
-        <div class="col-lg-3 col-md-4 col-sm-4 col-xs-12">
-          <h4 class="page-title">Dashboard 1</h4>
+        <div class="col-xs-12">
+          {% block layout_header %}
+          {% endblock %}
         </div>
-        <div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
-          <a href="#" target="_blank" class="btn btn-danger pull-right m-l-20 btn-rounded btn-outline hidden-xs hidden-sm waves-effect waves-light">Buy Now</a>
-          <ol class="breadcrumb">
-            <li>
-              <a href="#">Dashboard</a>
-            </li>
-            <li class="active">Dashboard 1</li>
-          </ol>
-        </div>
-        <!-- /.col-lg-12 -->
       </div>
       <!-- /.row -->
 
       <div class="row">
-        {% block layout_sidebar %}
-        {% endblock %} {# layout_sidebar #}
-
         {% block layout_main %}
         {% endblock %} {# layout_main #}
-
-        {% block footer %}
-        {% endblock %}
       </div>
 
-
     </div><!-- /.container-fluid -->
 
-    <footer class="footer text-center"> 2017 &copy; Agile Admin brought to you by wrappixel.com </footer>
+    <footer class="footer">
+      {% block layout_footer %}
+      {% endblock %}
+    </footer>
   </div><!-- /#page-wrapper -->
 
 </div><!-- /#wrapper -->

+ 0 - 6
lib/views/layout/single-nologin.html

@@ -5,14 +5,8 @@
 {% block layout_head_nav %}
 {% endblock  %} {# layout_head_nav #}
 
-{% block layout_sidebar %}
-{% endblock  %} {# layout_sidebar  #}
-
 {% block layout_main %}
 
-  {% block content_head %}
-  {% endblock %}
-
   {% block content_main %}
   {% endblock content_main %}
 

+ 1 - 4
lib/views/layout/single.html

@@ -3,9 +3,6 @@
 {% block layout_main %}
 <div id="main" class="main col-md-12">
   <article>
-    {% block content_head %}
-    {% endblock %}
-
     {% block content_main %}
     {% endblock content_main %}
 
@@ -16,7 +13,7 @@
 
 {% endblock %} {# layout_main #}
 
-{% block footer %}
+{% block layout_footer %}
 {% parent %}
 <div class="system-version">
   <span>

+ 2 - 2
lib/views/me/api_token.html

@@ -3,7 +3,7 @@
 
 {% block html_title %}{{ t('API Settings') }} · {{ path }}{% endblock %}
 
-{% block content_head %}
+{% block layout_header %}
 <div class="header-wrap">
   <header id="page-header">
   <h1 class="title" id="">{{ t('Home') }}</h1>
@@ -82,5 +82,5 @@
 {% block content_footer %}
 {% endblock %}
 
-{% block footer %}
+{% block layout_footer %}
 {% endblock %}

+ 2 - 2
lib/views/me/external-accounts.html

@@ -2,7 +2,7 @@
 
 {% block html_title %}{{ t('Password Settings') }} · {{ path }}{% endblock %}
 
-{% block content_head %}
+{% block layout_header %}
 <div class="header-wrap">
   <header id="page-header">
     <h1 class="title" id="">{{ t('Home') }}</h1>
@@ -247,5 +247,5 @@
 {% block content_footer %}
 {% endblock %}
 
-{% block footer %}
+{% block layout_footer %}
 {% endblock %}

+ 3 - 3
lib/views/me/index.html

@@ -2,7 +2,7 @@
 
 {% block html_title %}{{ t('Home') }} · {{ path }}{% endblock %}
 
-{% block content_head %}
+{% block layout_header %}
 <div class="header-wrap">
   <header id="page-header">
     <h1 class="title" id="">{{ t('Home') }}</h1>
@@ -305,5 +305,5 @@
 {% block content_footer %}
 {% endblock content_footer %}
 
-{% block footer %}
-{% endblock footer %}
+{% block layout_footer %}
+{% endblock layout_footer %}

+ 2 - 2
lib/views/me/password.html

@@ -2,7 +2,7 @@
 
 {% block html_title %}{{ t('Password Settings') }} · {{ path }}{% endblock %}
 
-{% block content_head %}
+{% block layout_header %}
 <div class="header-wrap">
   <header id="page-header">
     <h1 class="title" id="">{{ t('Home') }}</h1>
@@ -102,5 +102,5 @@
 {% block content_footer %}
 {% endblock %}
 
-{% block footer %}
+{% block layout_footer %}
 {% endblock %}

+ 3 - 3
lib/views/not_found.html

@@ -1,8 +1,8 @@
 {% extends 'layout/2column.html' %}
 
-{% block content_head %}
+{% block layout_header %}
 
-  {% block content_head_before %}
+  {% block layout_header_before %}
   {% endblock %}
 
   <div class="header-wrap">
@@ -17,7 +17,7 @@
     </header>
   </div>
 
-  {% block content_head_after %}
+  {% block layout_header_after %}
   {% endblock %}
 
 {% endblock %} {# /content_head #}

+ 4 - 4
lib/views/page.html

@@ -2,9 +2,9 @@
 
 {% block html_title %}{{ path|path2name }} · {{ path }}{% endblock %}
 
-{% block content_head %}
+{% block layout_header %}
 
-{% block content_head_before %}
+{% block layout_header_before %}
 {% endblock %}
 
 <div class="header-wrap">
@@ -37,7 +37,7 @@
   </header>
 </div>
 
-{% block content_head_after %}
+{% block layout_header_after %}
 {% endblock %}
 
 {% endblock %}
@@ -251,7 +251,7 @@
   {% endif %}
 {% endblock %}
 
-{% block footer %}
+{% block layout_footer %}
 {% endblock %}
 
 {% block body_end %}

+ 2 - 2
lib/views/page_list.html

@@ -7,9 +7,9 @@
   data-target="#search-result-list"
 {% endblock %}
 
-{% block content_head %}
+{% block layout_header %}
 
-{% block content_head_before %}
+{% block layout_header_before %}
 {% endblock %}
 
 <div class="header-wrap">

+ 2 - 2
lib/views/user/bookmarks.html

@@ -4,7 +4,7 @@
 
 {% block html_title %}{{ pageUser.name }}'s Bookmarks · {% endblock %}
 
-{% block content_head %}
+{% block layout_header %}
 <div class="header-wrap">
   <header id="page-header">
     <h1 class="title">{{ pageUser.name }}'s Bookmarks</h1>
@@ -26,5 +26,5 @@
 {% block side_content %}
 {% endblock %}
 
-{% block footer %}
+{% block layout_footer %}
 {% endblock %}

+ 2 - 2
lib/views/user/recent-create.html

@@ -4,7 +4,7 @@
 
 {% block html_title %}{{ pageUser.name }}'s Recent Created Pages 揃 {% endblock %}
 
-{% block content_head %}
+{% block layout_header %}
 <div class="header-wrap">
   <header id="page-header">
     <h1 class="title">{{ pageUser.name }}'s Created Pages</h1>
@@ -26,5 +26,5 @@
 {% block side_content %}
 {% endblock %}
 
-{% block footer %}
+{% block layout_footer %}
 {% endblock %}

+ 1 - 1
lib/views/user_page.html

@@ -2,7 +2,7 @@
 
 {% block main_css_class %}user-page{% endblock %}
 
-{% block content_head %}
+{% block layout_header %}
 
 {% if pageUser %}