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

Merge pull request #2141 from weseek/support/adjust-column-for-kibela

Support/adjust column for kibela
itizawa 5 лет назад
Родитель
Сommit
82cc0c64d6

+ 1 - 5
resource/locales/en-US/admin/admin.json

@@ -97,11 +97,7 @@
       "kibela_title": "Easy Viewing Structure",
       "kibela_text1": "Center aligned contents",
       "kibela_text2": "Show and post comments at the bottom of the page",
-      "kibela_text3": "Affix Table-of-contents",
-      "crowi_title": "Separated Functions",
-      "crowi_text1": "Collapsible Sidebar",
-      "crowi_text2": "Show and post comments in Sidebar",
-      "crowi_text3": "Collapsible Table-of-contents"
+      "kibela_text3": "Affix Table-of-contents"
     },
     "behavior": "Behavior",
     "behavior_desc": {

+ 1 - 5
resource/locales/ja/admin/admin.json

@@ -97,11 +97,7 @@
       "kibela_title": "閲覧重視の構造",
       "kibela_text1": "コンテンツが中心に表示されます。",
       "kibela_text2": "コメントはページの下部に表示されます。",
-      "kibela_text3": "ページ情報は下部に表示されます。",
-      "crowi_title": "ビュー・コントロールの分離",
-      "crowi_text1": "サイドバーを開くと情報が表示されます。",
-      "crowi_text2": "コメントはサイドバーに表示されます。",
-      "crowi_text3": "ページ情報はサイドバーに表示されます。"
+      "kibela_text3": "ページ情報は下部に表示されます。"
     },
     "behavior": "動作",
     "behavior_desc": {

+ 0 - 5
src/client/styles/scss/_comment_crowi.scss

@@ -1,5 +0,0 @@
-.crowi {
-  .page-comment-main {
-    margin-bottom: 0.5em;
-  }
-}

+ 0 - 38
src/client/styles/scss/_layout_crowi.scss

@@ -1,38 +0,0 @@
-.crowi {
-  header {
-    #search-listpage-form {
-      .btn-sm {
-        line-height: 0.5em;
-      }
-    }
-  }
-
-  .revision-toc {
-    float: right;
-    max-width: 250px;
-    overflow: hidden;
-    border: solid 1px #aaa;
-    border-radius: 5px;
-
-    .revision-toc-head {
-      display: inline-block;
-      float: right;
-      padding: 3px 11px;
-      margin-bottom: 5px;
-      margin-left: 5px;
-      font-weight: bold;
-      background: $gray-200;
-      border-bottom: solid 1px #aaa;
-      border-left: solid 1px #aaa;
-      border-radius: 0 5px;
-
-      &.collapsed {
-        margin: 0;
-        border: none;
-      }
-    }
-    .revision-toc-content {
-      background: #fcfcfc;
-    }
-  }
-}

+ 0 - 201
src/client/styles/scss/_layout_crowi_sidebar.scss

@@ -1,201 +0,0 @@
-.crowi-sidebar {
-  position: fixed;
-  top: 0;
-  right: 0;
-  height: 100%;
-  padding: 65px 0 0 0;
-  overflow: auto;
-  border-left: solid 1px transparent;
-
-  transition: 0.3s ease;
-
-  .page-meta {
-    padding: 15px 15px 5px 15px;
-    font-size: 0.9em;
-
-    line-height: 1.4em;
-    border-bottom: solid 1px #ccc;
-    p {
-      line-height: 1.4em;
-    }
-
-    .creator-picture {
-      text-align: center;
-      img {
-        width: 48px;
-        height: 48px;
-        border: 1px solid #ccc;
-      }
-    }
-    .creator {
-      font-size: 1.3em;
-      font-weight: bold;
-    }
-    .created-at {
-    }
-
-    .like-box {
-      padding-bottom: 0;
-
-      .dl-horizontal {
-        margin-bottom: 0;
-
-        dt,
-        dd {
-          padding-top: 5px;
-          padding-bottom: 5px;
-          border-top: solid 1px #ccc;
-        }
-        dt {
-          width: 80px;
-        }
-        dd {
-          margin-left: 90px;
-          text-align: right;
-        }
-      }
-    }
-
-    .liker-user-count,
-    .seen-user-count {
-      margin-bottom: 5px;
-      font-size: 1.2em;
-      font-weight: bold;
-    }
-  }
-
-  .side-content {
-    padding: 15px;
-    margin-bottom: 100px;
-
-    h3 {
-      font-size: 1.1em;
-    }
-
-    ul.fitted-list {
-      padding-left: 0;
-      li {
-        margin-bottom: 2px;
-
-        .input-group-addon {
-          padding: 5px 6px;
-        }
-      }
-    }
-
-    .page-comments {
-      margin: 8px 0 0 0;
-
-      .page-comment-form {
-        margin-top: 16px;
-
-        .comment-form-main {
-          .navbar-editor button {
-            padding: 5px;
-            font-size: 12px;
-          }
-          .overlay-gfm-cheatsheet {
-            display: none; // hide cheatsheet
-          }
-          .CodeMirror {
-            height: 150px;
-          }
-          .comment-submit {
-            margin-top: 8px;
-          }
-        }
-      }
-
-      hr {
-        border-color: #ccc;
-      }
-
-      .page-comments-list {
-        .page-comment {
-          padding-top: 8px;
-          margin-top: 8px;
-
-          .picture {
-            float: left;
-            width: 24px;
-            height: 24px;
-          }
-
-          .page-comment-creator {
-            font-weight: bold;
-          }
-
-          .page-comment-main {
-            position: relative;
-            margin-left: 40px;
-
-            .page-comment-meta {
-              font-size: 0.9em;
-              color: #aaa;
-            }
-            .page-comment-body {
-              padding: 8px 0;
-              word-wrap: break-word;
-            }
-            .page-comment-control {
-              position: absolute;
-              top: 0;
-              right: 0;
-              display: none; // default hidden
-            }
-          }
-        }
-      }
-    }
-  }
-
-  .portal-form-button {
-    text-align: center;
-  }
-
-  .system-version {
-    position: fixed;
-    right: 1.4em;
-    bottom: 0.1em;
-    z-index: 1;
-
-    display: flex;
-    justify-content: space-between;
-    width: calc(25% - 1.5em);
-    padding-right: 1em;
-    opacity: 1;
-
-    transition: 0.3s ease;
-  }
-}
-
-body:not(.aside-hidden) #toggle-crowi-sidebar {
-  i.ti-angle-left {
-    display: none;
-  }
-  i.ti-angle-right {
-    display: block;
-  }
-}
-
-.aside-hidden {
-  #toggle-crowi-sidebar {
-    right: 0;
-    i.ti-angle-right {
-      display: block;
-    }
-    i.ti-angle-right {
-      display: none;
-    }
-  }
-
-  .crowi-sidebar,
-  .system-version {
-    right: -25%;
-  }
-
-  .grw-subnav .col-md-9,
-  .main {
-    width: 100%;
-  }
-}

+ 0 - 6
src/client/styles/scss/_on-edit.scss

@@ -36,12 +36,6 @@ body.on-edit {
     display: none !important;
   }
 
-  // hide unnecessary elements for crowi layout
-  #toggle-crowi-sidebar,
-  .crowi-sidebar {
-    display: none;
-  }
-
   // show only either Edit button or HackMD button
   &.hackmd .nav-tab-edit {
     display: none;

+ 0 - 3
src/client/styles/scss/style-app.scss

@@ -24,7 +24,6 @@
 @import 'admin';
 @import 'attachments';
 @import 'comment';
-@import 'comment_crowi';
 @import 'comment_growi';
 @import 'comment_kibela';
 @import 'drawio';
@@ -35,8 +34,6 @@
 @import 'editor-navbar';
 @import 'handsontable';
 @import 'layout';
-@import 'layout_crowi';
-@import 'layout_crowi_sidebar';
 @import 'layout_growi';
 @import 'layout_kibela';
 @import 'layout_variable';

+ 0 - 58
src/server/views/layout-crowi/base/layout.html

@@ -1,58 +0,0 @@
-{% extends '../../layout/layout.html' %}
-
-{% block html_title %}{{ customizeService.generateCustomTitle(path) }}{% endblock %}
-
-{% block html_additional_headers %}
-  {% parent %}
-  {{ cdnScriptTag('highlight-addons') }}
-  {{ cdnScriptTag('drawio-viewer') }}
-{% endblock %}
-
-{% block layout_main %}
-<div class="container-fluid">
-
-  <a href="" class=" hidden-xs hidden-sm layout-control" id="toggle-crowi-sidebar">
-    <i class="ti-angle-right"></i><i class="ti-angle-left"></i> <span class="hide-on-affix-top"></span>
-  </a>
-  <aside class="crowi-sidebar col-md-3 hidden-xs hidden-sm hidden-print">
-
-    {% block side_header %}
-    {% endblock %}
-
-    <div class="side-content">
-      {% block side_content %}
-      {% endblock %}
-    </div>
-
-    {% block side_footer %}
-    {% endblock %}
-
-    {% include '../../widget/system-version.html' %}
-  </aside>
-
-  <div class="row grw-subnav d-edit-none">
-    <div class="col-md-9">
-      {% block content_header %}
-      {% endblock %}
-    </div>
-  </div><!-- /.grw-subnav -->
-
-  <div class="row">
-    <div id="main" class="main col-md-9 {% if page %}{{ css.grant(page) }}{% endif %} {% block main_css_class %}{% endblock %}">
-      {% block content_main_before %}
-      {% endblock %}
-
-      {% block content_main %}
-      {% endblock content_main %}
-
-      {% block content_main_after %}
-      {% endblock %}
-
-      {% block content_footer %}
-      {% endblock %}
-
-    </div>
-  </div>
-
-</div><!-- /.container-fluid -->
-{% endblock %} {# layout_main #}

+ 0 - 40
src/server/views/layout-crowi/forbidden.html

@@ -1,40 +0,0 @@
-{% extends 'base/layout.html' %}
-
-{% block content_header %}
-
-  {% block content_header_before %}
-  {% endblock %}
-
-  <header id="page-header">
-    <div>
-      <div>
-        <h1 class="title" id="revision-path"></h1>
-        {% if page and not forbidden and not isTrashPage() %}
-          <div id="tag-label"></div>
-        {% endif %}
-      </div>
-    </div>
-  </header>
-
-  {% block content_header_after %}
-  {% endblock %}
-
-{% endblock %} {# /content_head #}
-
-
-{% block content_main_before %}
-  {% include '../widget/page_alerts.html' %}
-{% endblock %}
-
-
-{% block content_main %}
-  {% include '../widget/forbidden_content.html' %}
-{% endblock %}
-
-
-{% block content_main_after %}
-{% endblock %}
-
-
-{% block content_footer %}
-{% endblock %}

+ 0 - 40
src/server/views/layout-crowi/not_creatable.html

@@ -1,40 +0,0 @@
-{% extends 'base/layout.html' %}
-
-{% block content_header %}
-
-  {% block content_header_before %}
-  {% endblock %}
-
-  <header id="page-header">
-    <div>
-      <div>
-        <h1 class="title" id="revision-path"></h1>
-        {% if page and not forbidden and not isTrashPage() %}
-          <div id="tag-label"></div>
-        {% endif %}
-      </div>
-    </div>
-  </header>
-
-  {% block content_header_after %}
-  {% endblock %}
-
-{% endblock %} {# /content_head #}
-
-
-{% block content_main_before %}
-  {% include '../widget/page_alerts.html' %}
-{% endblock %}
-
-
-{% block content_main %}
-  {% include '../widget/not_creatable_content.html' %}
-{% endblock %}
-
-
-{% block content_main_after %}
-{% endblock %}
-
-
-{% block content_footer %}
-{% endblock %}

+ 0 - 40
src/server/views/layout-crowi/not_found.html

@@ -1,40 +0,0 @@
-{% extends 'base/layout.html' %}
-
-{% block content_header %}
-
-  {% block content_header_before %}
-  {% endblock %}
-
-  <header id="page-header">
-    <div>
-      <div>
-        <h1 class="title" id="revision-path"></h1>
-        {% if not forbidden and not isTrashPage() %}
-          <div id="tag-label"></div>
-        {% endif %}
-      </div>
-    </div>
-  </header>
-
-  {% block content_header_after %}
-  {% endblock %}
-
-{% endblock %} {# /content_head #}
-
-
-{% block content_main_before %}
-  {% include '../widget/page_alerts.html' %}
-{% endblock %}
-
-
-{% block content_main %}
-  {% include '../widget/not_found_content.html' %}
-{% endblock %}
-
-
-{% block content_main_after %}
-{% endblock %}
-
-
-{% block content_footer %}
-{% endblock %}

+ 0 - 69
src/server/views/layout-crowi/page.html

@@ -1,69 +0,0 @@
-{% extends 'base/layout.html' %}
-
-
-{% block content_header %}
-
-  {% block content_header_before %}
-  {% endblock %}
-
-  <header id="page-header">
-    <div class="d-flex align-items-center">
-      <div class="title-container">
-        <h1 class="title" id="revision-path"></h1>
-        {% if page and not forbidden and not isTrashPage() %}
-          <div id="tag-label"></div>
-        {% endif %}
-      </div>
-    </div>
-  </header>
-
-  {% block content_header_after %}
-  {% endblock %}
-
-{% endblock %}
-
-
-{% block content_main_before %}
-{% endblock %}
-
-
-{% block content_main %}
-  <div class="m-b-30">
-    {% include '../widget/page_content.html' %}
-  </div>
-{% endblock %}
-
-
-{% block content_main_after %}
-{% endblock %}
-
-
-{% block content_footer %}
-  {% if page %}
-    {% include '../widget/page_attachments.html' %}
-  {% endif %}
-{% endblock %}
-
-{% block side_header %}
-  {% if page and not page.isDeleted() %}
-    {% include 'widget/page_side_header.html' %}
-  {% endif %}
-{% endblock %} {# side_header #}
-
-{% block side_content %}
-  {% if page and not page.isDeleted() %}
-    {% include 'widget/page_side_content.html' %}
-  {% endif %}
-{% endblock %}
-
-{% block layout_footer %}
-{% endblock %}
-
-{% block body_end %}
-  <div id="presentation-layer" class="fullscreen-layer">
-    <div id="presentation-container"></div>
-  </div>
-  <div id="crowi-modals">
-    {% include '../widget/page_modals.html' %}
-  </div>
-{% endblock %}

+ 0 - 83
src/server/views/layout-crowi/page_list.html

@@ -1,83 +0,0 @@
-{% extends 'base/layout.html' %}
-
-
-{% block html_base_attr %}
-  data-spy="scroll"
-  data-target="#search-result-list"
-{% endblock %}
-
-{% block content_header %}
-
-{% block content_header_before %}
-{% endblock %}
-
-<header id="page-header" class="{% if page %}has-page{% endif %}">
-
-  <div class="d-flex align-items-center">
-    <div class="title-container">
-      <h1 class="title" id="revision-path"></h1>
-      {% if page and not forbidden and not isTrashPage() %}
-        <div id="tag-label"></div>
-      {% endif %}
-    </div>
-  </div>
-
-</header>
-
-{% endblock %}
-
-{% block content_main %}
-
-  {% block content_main_before %}
-  {% endblock %}
-
-  {# page-list-search should be fully managed by react.js,
-  # but now the header and page list content is rendered separately by the server,
-  # so now bind the values through the hidden fields.
-  #}
-  {% if false %} {# Disable temporaly -- 2018.03.08 Yuki Takei #}
-  {% if isSearchServiceConfigured() && !isTopPage() && !isTrashPage() %}
-  <div id="page-list-search">
-  </div>
-  {% endif %}
-  {% endif %}
-
-  <div>
-    {% include '../widget/page_content.html' %}
-  </div>
-
-  <div class="row page-list d-edit-none d-print-none {% if page.isPortal() %}mt-5{% endif %}">
-    <div class="col-md-12">
-      {% include '../widget/page_list_and_timeline.html' %}
-    </div>
-  </div>
-
-{% endblock %}
-
-
-{% block content_main_after %}
-{% endblock %}
-
-
-{% block content_footer %}
-<footer>
-</footer>
-{% endblock %}
-
-
-{% block side_header %}
-
-{% if not page and not isUserPageList(path) and !isTrashPage() %}
-  {% include '../widget/create_portal.html' %}
-{% else %}
-  {% include 'widget/page_side_header.html' %}
-{% endif %}
-
-{% endblock %} {# side_header #}
-
-{% block body_end %}
-<div id="crowi-modals">
-  {% include '../modal/what_is_portal.html' %}
-  {% include '../modal/unportalize.html' %}
-</div>
-{% endblock %} {# body_end #}

+ 0 - 19
src/server/views/layout-crowi/user_page.html

@@ -1,19 +0,0 @@
-{% extends 'page.html' %}
-
-{% block main_css_class %}user-page{% endblock %}
-
-
-{% block content_header %}
-  {% if pageUser %}
-    {% include '../widget/user_page_header.html' %}
-  {% else %}
-    {% parent %}
-  {% endif %}
-{% endblock %}
-
-
-{% block content_main_before %}
-  <div class="m-b-30 user-page-content-container d-edit-none hidden-print">
-    {% include '../widget/user_page_content.html' %}
-  </div>
-{% endblock %}

+ 0 - 23
src/server/views/layout-crowi/widget/page_side_content.html

@@ -1,23 +0,0 @@
-<h3><i class="icon-link"></i> {{ t('Share') }}</h3>
-<ul class="fitted-list">
-  <li class="input-group">
-    <span class="input-group-addon">{{ t('Share Link') }}</span>
-    <input readonly class="copy-link form-control" type="text" value="{{ appTitle }} {{ path }} {{ baseUrl }}/{{ page._id.toString() }}">
-  </li>
-  <li class="input-group">
-    <span class="input-group-addon">Markdown</span>
-    <input readonly class="copy-link form-control" type="text" value="[{{ path }}]({{ baseUrl }}/{{ page._id.toString() }})">
-  </li>
-</ul>
-
-<h3><i class="icon-bubble"></i> Comments</h3>
-<div class="page-comments">
-  {% if page and not page.isDeleted() %}
-  <div id="page-comment-write"></div>
-  <hr>
-  {% endif %}
-
-  <div id="page-comment-form-behavior"></div>
-
-  <div class="page-comments-list" id="page-comments-list"></div>
-</div>

+ 0 - 43
src/server/views/layout-crowi/widget/page_side_header.html

@@ -1,43 +0,0 @@
-{% if page %} {# {{{ if page #}
-<div class="page-meta">
-  <div class="row">
-    {# default(author) としているのは、v1.1.1 以前に page.creator データが入ってないから。暫定として最新更新ユーザーを表示しちゃう。 #}
-    <div class="col-md-3 creator-picture">
-      <a href="{{ userPageRoot(page.creator) }}">
-        <img src="{{ page.creator|default(author)|picture }}" class="picture picture-lg rounded-circle"><br>
-      </a>
-    </div>
-    <div class="col-md-9">
-      <p class="creator">
-        <a href="{{ userPageRoot(page.creator) }}">{{ page.creator.name|default(author.name) }}</a>
-      </p>
-      <p class="created-at">
-        {{ t('Created') }}: {{ page.createdAt|datetz('Y/m/d H:i:s') }}<br>
-        {{ t('Last updated') }}: {{ page.updatedAt|datetz('Y/m/d H:i:s') }} <a href="/user/{{ page.revision.author.username }}"><img src="{{ page.revision.author|picture }}" class="picture picture-xs rounded-circle" alt="{{ page.revision.author.name }}"></a>
-      </p>
-    </div>
-  </div>
-
-  <span class="like-box">
-    <dl class="dl-horizontal">
-      <dt class="text-info">
-        <i class="icon-like"></i> {{ t('Like!') }}
-      </dt>
-      <dd>
-        <p class="liker-user-count">{{ page.liker.length|default(0) }}</p>
-        {% if page.liker.length > 15 %}<span class="text-muted">..</span>{% endif %}
-        <span id="liker-list" data-user-ids="{{ page.liker|slice(-15)|default([])|join(',') }}"></span>
-      </dd>
-
-      <dt class="text-danger">
-        <i class="fa fa-paw"></i> {{ t('Seen by') }}
-      </dt>
-      <dd>
-        <p class="seen-user-count">{{ page.seenUsers.length|default(0) }}</p>
-        {% if page.seenUsers.length > 15 %}<span class="text-muted">..</span>{% endif %}
-        <span id="seen-user-list" data-user-ids="{{ page.seenUsers|slice(-15)|default([])|join(',') }}"></span>
-      </dd>
-    </dl>
-  </div>
-</iv>
-{% endif %} {# if page }}} #}

+ 1 - 0
src/server/views/layout-kibela/not_found.html

@@ -16,6 +16,7 @@
     <div class="col bg-white round-corner">
       {% include '../widget/not_found_content.html' %}
     </div>
+    <div class="col-xl-3 col-lg-4 d-none d-lg-block revision-toc-container"></div>
   </div>
 {% endblock %}
 

+ 1 - 1
src/server/views/layout-kibela/page_list.html

@@ -32,7 +32,7 @@
 
 </div>
 
-  <div class="row page-list bg-white round-corner grw-pt-10px mb-5 d-edit-none {% if page.isPortal() %}mt-5{% endif %}">
+  <div class="row page-list bg-white round-corner grw-pt-10px my-5 d-edit-none {% if page.isPortal() %}mt-5{% endif %}">
     <div class="col">
       {% include '../widget/page_list_and_timeline_kibela.html' %}
     </div>