Răsfoiți Sursa

ensure to insert 'content_head' block of user_page to col-xx-xx

* Because this block has content like 'Bookmarks' or 'Recent Created' whose height changes dynamically, setting of 'revision-toc' (affix) is hindered.
Yuki Takei 9 ani în urmă
părinte
comite
543fb4ae57

+ 30 - 8
lib/views/crowi-plus/base/user_page_nosidebar.html

@@ -19,16 +19,38 @@
   </p>
   {% endif %}
   <article>
-    {% block content_head %}
-      {% parent %}
-    {% endblock %}
+    <div class="container-fluid">
+      <div class="row">
 
-    {% block content_main_before %}
-    {% endblock %}
+        <div class="col-lg-10 col-md-9">
 
-    {% block content_main %}
-      {% parent %}
-    {% endblock content_main %}
+          {#
+           # ensure to insert 'content_head' block to col-xx-xx
+           #
+           #   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 %}
+
+          {% block content_main %}
+            {% parent %}
+          {% endblock content_main %}
+
+        </div> {# /.col- #}
+
+        {# relocate #revision-toc #}
+        <div class="col-lg-2 col-md-3 visible-lg visible-md">
+          <div id="revision-toc" class="revision-toc" data-spy="affix" data-offset-top="50"></div>
+        </div> {# /.col- #}
+
+      </div>
+    </div>
 
     {% block content_main_after %}
     {% endblock %}

+ 5 - 20
lib/views/crowi-plus/user_page.html

@@ -11,27 +11,12 @@
 
 
 {% block content_main %}
-  <div class="container-fluid">
-    <div class="row">
-
-      <div class="col-lg-10 col-md-9">
-
-        {% parent %}
-
-        {# force remove #revision-toc from #content_main of parent #}
-        <script>
-          $('#revision-toc').remove();
-        </script>
-
-      </div> {# /.col- #}
-
-      {# relocate #revision-toc #}
-      <div class="col-lg-2 col-md-3 visible-lg visible-md">
-        <div id="revision-toc" class="revision-toc" data-spy="affix" data-offset-top="310"></div>
-      </div> {# /.col- #}
+  {% parent %}
 
-    </div>
-  </div>
+  {# force remove #revision-toc from #content_main of parent #}
+  <script>
+    $('#revision-toc').remove();
+  </script>
 {% endblock %}
 
 {% block content_main_after %}

+ 20 - 0
resource/css/_user_crowi-plus.scss

@@ -0,0 +1,20 @@
+.crowi-plus.main-container {
+  .main-crowi-plus-customized.user-page {
+
+    .header-wrap {
+      padding: 16px 0 0 0;
+    }
+
+    .revision-toc {
+      .revision-toc-content {
+        margin-top: 25px;
+        background: none;
+      }
+
+      &.affix {
+        top: 10px;
+      }
+    }
+
+  }
+}

+ 16 - 14
resource/css/_wiki_crowi-plus.scss

@@ -1,19 +1,21 @@
-.crowi-plus .revision-toc {
+.crowi-plus.main-container {
 
-  // reset official styles
-  float: none;
-  border: none;
-  border-radius: 0;
-  max-width: none;
-  overflow: auto;
+  .revision-toc {
+    // reset official styles
+    float: none;
+    border: none;
+    border-radius: 0;
+    max-width: none;
+    overflow: auto;
 
-  .revision-toc-content {
-    margin-top: 50px;
-    background: none;
-  }
+    .revision-toc-content {
+      margin-top: 50px;
+      background: none;
+    }
 
-  // affix
-  &.affix {
-    top: 30px;
+    // affix
+    &.affix {
+      top: 30px;
+    }
   }
 }

+ 1 - 0
resource/css/crowi.scss

@@ -29,6 +29,7 @@ $bootstrap-sass-asset-helper: true;
 @import 'portal';
 @import 'search';
 @import 'user';
+@import 'user_crowi-plus';
 @import 'wiki';
 @import 'wiki_crowi-plus';