weex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jinji...@apache.org
Subject [01/50] [abbrv] incubator-weex git commit: * [doc] upgrade to latest version of gitbook
Date Tue, 24 Jan 2017 08:18:16 GMT
Repository: incubator-weex
Updated Branches:
  refs/heads/master a277cf7f1 -> 9ca297a31


* [doc] upgrade to latest version of gitbook


Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/50452956
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/50452956
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/50452956

Branch: refs/heads/master
Commit: 504529568e250b8b5b9125539eeee74440313211
Parents: dd9fe6e
Author: lvscar <lvscar@gmail.com>
Authored: Thu May 19 18:19:18 2016 +0800
Committer: lvscar <lvscar@gmail.com>
Committed: Thu May 19 18:19:18 2016 +0800

----------------------------------------------------------------------
 doc/SUMMARY.md                        | 28 +++++-----
 doc/_layouts/website/languages.html   |  2 +-
 doc/_layouts/website/page.html        | 89 +++++++++++-------------------
 doc/_layouts/website/summary.html     | 61 ++++++++++----------
 doc/_layouts/website/weex_header.html | 24 ++++++++
 5 files changed, 100 insertions(+), 104 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/50452956/doc/SUMMARY.md
----------------------------------------------------------------------
diff --git a/doc/SUMMARY.md b/doc/SUMMARY.md
index eaf87cd..5aa7055 100644
--- a/doc/SUMMARY.md
+++ b/doc/SUMMARY.md
@@ -32,20 +32,20 @@
             * [Text Style](/references/text-style.md)
         * [Common Event](/references/common-event.md)
         * [Special Element](/components/special-element.md)
-        * [&lt;div&gt;](/components/div.md)
-        * [&lt;scroller&gt;](/components/scroller.md)
-        * [&lt;list&gt;](/components/list.md)
-            * [&lt;cell&gt;](/components/cell.md)
-        * [&lt;text&gt;](/components/text.md)
-        * [&lt;image&gt;](/components/image.md)
-        * [&lt;input&gt;](/components/input.md)
-        * [&lt;switch&gt;](/components/switch.md)
-        * [&lt;slider&gt;](/components/slider.md)
-            * [&lt;indicator&gt;](/components/indicator.md)
-        * [&lt;video&gt;](/components/video.md)
-        * [&lt;a&gt;](/components/a.md)
-        * [&lt;web&gt;](/components/web.md)
-        * [&lt;wxc-tabbar&gt;](/components/wxc-tabbar.md)
+        * [div](/components/div.md)
+        * [scroller](/components/scroller.md)
+        * [list](/components/list.md)
+            * [cell](/components/cell.md)
+        * [text](/components/text.md)
+        * [image](/components/image.md)
+        * [input](/components/input.md)
+        * [switch](/components/switch.md)
+        * [slider](/components/slider.md)
+            * [indicator](/components/indicator.md)
+        * [video](/components/video.md)
+        * [a](/components/a.md)
+        * [web](/components/web.md)
+        * [wxc-tabbar](/components/wxc-tabbar.md)
     * [Built-in Modules](/modules/README.md)
         * [dom](/modules/dom.md)
         * [steam](/modules/stream.md)

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/50452956/doc/_layouts/website/languages.html
----------------------------------------------------------------------
diff --git a/doc/_layouts/website/languages.html b/doc/_layouts/website/languages.html
index 1af8ca2..a9d43be 100644
--- a/doc/_layouts/website/languages.html
+++ b/doc/_layouts/website/languages.html
@@ -10,7 +10,7 @@
         <ul class="languages">
         {%  for lang in languages.list %}
             <li>
-                <a href="../{{ lang.id }}/">{{ lang.title }}</a>
+                <a href="{{ (lang.id + "/README.md")|contentURL }}">{{ lang.title }}</a>
             </li>
         {% endfor %}
         </ul>

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/50452956/doc/_layouts/website/page.html
----------------------------------------------------------------------
diff --git a/doc/_layouts/website/page.html b/doc/_layouts/website/page.html
index f32ec08..fa288af 100644
--- a/doc/_layouts/website/page.html
+++ b/doc/_layouts/website/page.html
@@ -12,17 +12,14 @@
     {% if page.previous and page.previous.path %}
     <link rel="prev" href="{{ page.previous.path|resolveFile }}" />
     {% endif %}
-    <link rel="stylesheet" href="http://alibaba.github.io/weex/css/site.css">
-    <!-- 
-    <link rel="stylesheet" href="http://127.0.0.1/taobao/weex/docs/ali_addition/weex_doc.css">
-    -->    
+    
     <link rel="stylesheet"  href="http://alibaba.github.io/weex/css/weex_doc.css" >
   
     <link rel="icon" type="image/x-icon" href="http://alibaba.github.io/weex/img/favicon.ico">
   
-    
 {% endblock %}
 
 {% block javascript %}
-    <script src="{{ "app.js"|resolveAsset }}"></script>
+    <script src="{{ "gitbook.js"|resolveAsset }}"></script>
+    <script src="{{ "theme.js"|resolveAsset }}"></script>
     {% for resource in plugins.resources.js %}
         {% if resource.url %}
         <script src="{{ resource.url }}"></script>
@@ -30,58 +27,25 @@
         <script src="{{ resource.path|resolveAsset }}"></script>
         {% endif %}
     {% endfor %}
-    <script>
-    require(["gitbook"], function(gitbook) {
-        gitbook.start({{ config.pluginsConfig|dump|safe }});
-    });
-    </script>
-    
-    
 {% endblock %}
 
 {% block body %}
-<div class="book"
-    data-level="{{ page.level }}"
-    data-chapter-title="{{ page.title }}"
-    data-filepath="{{ file.path }}"
-    data-basepath="{{ './'|resolveFile }}"
-    data-revision="{{ gitbook.time }}"
-    data-innerlanguage="{{ innerlanguage }}">
-
-    <div class="weex-doc-header">
-        <div class="top-bar">
-                <div class="top-bar-title"></div>
-                <div class="top-bar-left">
-                    <ul  class="menu" role="menubar" >
-                        <li role="menuitem">
-                            <a href='http://alibaba.github.io/weex/index.html'>Weex</a>
                           
-                        </li>
-                        <li role="menuitem">
-                            Docs
-                        </li>
-                        <li role="menuitem">
-                            <a href='http://alibaba.github.io/weex/demo.html'>Demo</a>
                           
-                        </li>
-                        <li role="menuitem">
-                        </li>
-                        <li role="menuitem" >
-                            <a href="http://alibaba.github.io/weex/community.html">Community</a>
-                        </li>
-                    </ul>
-                </div>
-                <div class="top-bar-right">
-                    <ul class="menu">
-                        <li><a href="https://github.com/alibaba/weex/">Github</a>
-                        </li>
-                    </ul>
-                </div>
-        </div>        
-    </div>
+<div class="book">
     
-    {% include "website/summary.html" %}
+    {% include "website/weex_header.html" %}
+            
+    <div class="book-summary">
+        {% block book_sidebar %}
+            {% block search_input %}{% endblock %}
+            {% block book_summary %}
+                <nav role="navigation">
+                {% include "website/summary.html" %}
+                </nav>
+            {% endblock %}
+        {% endblock %}
+    </div>
 
     <div class="book-body">
-
         {% block book_body %}
             <div class="body-inner">
                 {% block book_inner %}
@@ -89,11 +53,13 @@
 
                     <div class="page-wrapper" tabindex="-1" role="main">
                         <div class="page-inner">
-                            <section class="normal markdown-section">
-                            {% block page %}
-                            {{ page.content|safe }}
+                            {% block search_results %}
+                                <section class="normal markdown-section">
+                                {% block page %}
+                                {{ page.content|safe }}
+                                {% endblock %}
+                                </section>
                             {% endblock %}
-                            </section>
                         </div>
                     </div>
                 {% endblock %}
@@ -101,17 +67,24 @@
 
             {% block book_navigation %}
                 {% if page.previous and page.previous.path %}
-                <a href="{{ page.previous.path|resolveFile }}" class="navigation navigation-prev
{% if not (page.next and page.next.path) %}navigation-unique{% endif %}" aria-label="Previous
page: {{ page.previous.title }}">
+                <a href="{{ page.previous.path|resolveFile }}{{ page.previous.anchor }}"
class="navigation navigation-prev {% if not (page.next and page.next.path) %}navigation-unique{%
endif %}" aria-label="Previous page: {{ page.previous.title }}">
                     <i class="fa fa-angle-left"></i>
                 </a>
                 {% endif %}
                 {% if page.next and page.next.path %}
-                <a href="{{ page.next.path|resolveFile }}" class="navigation navigation-next
{% if not (page.previous and page.previous.path) %}navigation-unique{% endif %}" aria-label="Next
page: {{ page.next.title }}">
+                <a href="{{ page.next.path|resolveFile }}{{ page.next.anchor }}" class="navigation
navigation-next {% if not (page.previous and page.previous.path) %}navigation-unique{% endif
%}" aria-label="Next page: {{ page.next.title }}">
                     <i class="fa fa-angle-right"></i>
                 </a>
                 {% endif %}
             {% endblock %}
         {% endblock %}
     </div>
+
+    <script>
+        var gitbook = gitbook || [];
+        gitbook.push(function() {
+            gitbook.page.hasChanged({{ template.getJSContext()|dump|safe }});
+        });
+    </script>
 </div>
 {% endblock %}

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/50452956/doc/_layouts/website/summary.html
----------------------------------------------------------------------
diff --git a/doc/_layouts/website/summary.html b/doc/_layouts/website/summary.html
index 3169d22..0c6f967 100644
--- a/doc/_layouts/website/summary.html
+++ b/doc/_layouts/website/summary.html
@@ -8,7 +8,7 @@
             {% else %}
                 <span>
             {% endif %}
-                    {% if article.level != "0" %}
+                    {% if article.level != "0" and config.pluginsConfig['theme-default'].showLevel
%}
                         <b>{{ article.level }}.</b>
                     {% endif %}
                     {{ article.title }}
@@ -20,43 +20,42 @@
 
             {% if article.articles.length > 0 %}
             <ul class="articles">
-                {{ articles(article.articles) }}
+                {{ articles(article.articles, file, config) }}
             </ul>
             {% endif %}
         </li>
     {% endfor %}
 {% endmacro %}
 
-<div class="book-summary">
-    {% block book_summary %}
-    <nav role="navigation">
-        <ul class="summary">
-            {% set _divider = false %}
-            {% if config.links.sidebar  %}
-            {% for linkTitle, link in config.links.sidebar  %}
-                {% set _divider = true %}
-                <li>
-                    <a href="{{ link }}" target="_blank" class="custom-link">{{ linkTitle
}}</a>
-                </li>
-            {% endfor %}
-            {% endif %}
+<ul class="summary">
+    {% set _divider = false %}
+    {% if config.links.sidebar  %}
+    {% for linkTitle, link in config.links.sidebar  %}
+        {% set _divider = true %}
+        <li>
+            <a href="{{ link }}" target="_blank" class="custom-link">{{ linkTitle }}</a>
+        </li>
+    {% endfor %}
+    {% endif %}
 
-            {% if _divider %}
-            <li class="divider"></li>
-            {% endif %}
+    {% if _divider %}
+    <li class="divider"></li>
+    {% endif %}
 
+    {% for part in summary.parts %}
+        {% if part.title %}
+        <li class="header">{{ part.title }}</li>
+        {% elif not loop.first %}
+        <li class="divider"></li>
+        {% endif %}
+        {{ articles(part.articles, file, config) }}
+    {% endfor %}
 
-            {% for part in summary.parts %}
-            {{ articles(part.articles) }}
-            <li class="divider"></li>
-            {% endfor %}
+    <li class="divider"></li>
 
-            <li>
-                <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
-                    {{ "GITBOOK_LINK"|t }}
-                </a>
-            </li>
-        </ul>
-    </nav>
-    {% endblock %}
-</div>
\ No newline at end of file
+    <li>
+        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
+            {{ "GITBOOK_LINK"|t }}
+        </a>
+    </li>
+</ul>

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/50452956/doc/_layouts/website/weex_header.html
----------------------------------------------------------------------
diff --git a/doc/_layouts/website/weex_header.html b/doc/_layouts/website/weex_header.html
new file mode 100644
index 0000000..e716199
--- /dev/null
+++ b/doc/_layouts/website/weex_header.html
@@ -0,0 +1,24 @@
+<div class="weex-doc-header">
+    <div class="top-bar">
+        <div class="top-bar-title" onclick="location='http://weex.alibaba-inc.com/en-site/'"
></div>                        
+        <div class="top-bar-left">
+            <ul  class="menu" role="menubar" >
+                <li role="menuitem">
+                    <a href='http://weex.alibaba-inc.com/en-site/demo.html'>Showcase</a>
                           
+                </li>
+                <li role="menuitem" >
+                    <a href="http://weex.alibaba-inc.com/en-site/download.html">Download</a>
+                </li>
+            </ul>
+        </div>
+        <div class="top-bar-right">
+            <ul class="menu">
+                <li>
+                    <a href="http://gitlab.alibaba-inc.com/groups/weex/">
+                        <img class='github' src='http://weex.alibaba-inc.com/en-site/img/github.png'
alt='github' >                                          </a>
+                </li>
+            </ul>                    
+        </div>
+    </div>        
+</div>
+


Mime
View raw message