index.html.tmpl 5.6 KB
Newer Older
Y
Yu Yang 已提交
1
<!DOCTYPE html>
Y
Yu Yang 已提交
2
<html lang="{% if is_en %}en{%else%}zh-Hans{% endif %}">
Y
Yu Yang 已提交
3 4
<head>
    <meta charset="UTF-8">
Y
Yu Yang 已提交
5
    <title>{% if not is_en %}深度学习入门{%else%}Deep Learning 101{% endif %}</title>
Y
Yu Yang 已提交
6 7 8 9
    <link href="http://cdn.bootcss.com/bootstrap/4.0.0-alpha.6/css/bootstrap.min.css" rel="stylesheet">
    <script src="http://cdn.bootcss.com/tether/1.4.0/js/tether.js"></script>
    <script src="http://cdn.bootcss.com/jquery/3.1.0/jquery.slim.js"></script>
    <script src="http://cdn.bootcss.com/bootstrap/4.0.0-alpha.6/js/bootstrap.min.js"></script>
10 11 12
    <link rel="stylesheet" href=".static/css/theme.css" type="text/css" />
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/perfect-scrollbar/0.6.14/css/perfect-scrollbar.min.css" type="text/css" />
    <link rel="stylesheet" href=".static/css/override.css" type="text/css" />
Y
Yu Yang 已提交
13
    <style>
Y
Yu Yang 已提交
14 15 16
* {
    font-family:"Roboto","Lato","proxima-nova","Helvetica Neue",Arial,sans-serif;
}
Y
Yu Yang 已提交
17
.left-panel {
Y
Yu Yang 已提交
18
    background: #E5E6EA;
Y
Yu Yang 已提交
19 20
}

Y
Yu Yang 已提交
21 22 23 24 25
.left-panel .card-block a.click_active {
    background-color: #597cf1;
    color: #fff;
}
 
Y
Yu Yang 已提交
26 27 28 29
.left-panel .card-header {
    background: #ecedee;
}

Y
Yu Yang 已提交
30
{% if not is_en %}
Y
Yu Yang 已提交
31
.left-panel .card-header a {
Y
Yu Yang 已提交
32 33 34 35 36 37
    font-size: 14px;
}
{% endif %}

.left-panel .card-block a:not(.click_active) {
    background: #e4e6e9;
Y
Yu Yang 已提交
38 39 40 41 42
}

.left-panel .card-block a {
    border-radius: 0px;
    font-size: 13px;
Y
Yu Yang 已提交
43
    color: #2F323A;
Y
Yu Yang 已提交
44 45 46 47 48
    padding-left: 40px;
    border: 1px solid rgba(0,0,0,.125);
}

.left-panel .card-block a.active_color {
Y
Yu Yang 已提交
49
    color:  rgb(70, 74, 76);
Y
Yu Yang 已提交
50 51 52
    font-weight: bolder;
}

Y
Yu Yang 已提交
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69
.left-panel .list-group-item {
    -moz-box-align: center;
    align-items: center;
    display: flex;
    flex-flow: row wrap;
    margin-bottom: -1px;
    padding: 0.75rem 1.25rem;
    position: relative;
    color: #2f323a;
}

.navbar img {
    height: 90%;
    width: 90%;
}

   </style>
Y
Yu Yang 已提交
70 71
</head>
<body>
72 73 74 75 76 77 78 79 80 81 82 83 84 85 86
    <header class="site-header">
    <div class="site-logo">
      <a href="/"><img src=".theme/PP_w.png"></a>
    </div>
    <div class="site-nav-links">
      <div class="site-menu">
        <a class="fork-on-github" href="https://github.com/PaddlePaddle/Paddle" target="_blank">Fork me on Github</a>
        <div class="language-switcher dropdown">
            <li><a href="{% if is_en %}./index.html{% else %}./index.en.html{%endif%}">{% if is_en %}English{% else %}中文{% endif %}</a></li>
        </div>
        <ul class="site-page-links">
          <li><a>Home</a></li>
          <li><a>Get Started</a></li>
          <li class="active"><a>Documentation</a></li>
          <li><a>About Us</a></li>
Y
Yu Yang 已提交
87
        </ul>
88 89 90 91 92 93 94 95 96 97 98 99 100 101 102
      </div>
      <div class="doc-module">
        
        <ul class="current">
            <li class="toctree-l1"><a class="reference internal" href="#">{% if is_en %}GET STARTED{% else %}新手入门{% endif %}</a></li>
            <li class="toctree-l1"><a class="reference internal" href="#">{% if is_en %}TUTORIALS{% else %}完整教程{% endif %}</a></li>
            <li class="toctree-l1"><a class="reference internal" href="#">{% if is_en %}HOW TO{% else %}进阶指南{% endif%}</a></li>
            <li class="toctree-l1"><a class="reference internal" href="#">API</a></li>
            <li class="toctree-l1"><a class="reference internal" href="#">FAQ</a></li>
        </ul>

        
      </div>
    </div>
  </header>
Y
Yu Yang 已提交
103 104 105 106 107 108 109 110
    <div class="container-fluid">
        <div class="row">
            <div class="col-3 pl-1 pr-1 left-panel">
                <div id="accordion" role="tablist" aria-multiselectable="true">
                  <div class="card">
                    <div class="card-header" role="tab" id="headingOne">
                      <h5 class="mb-0">
                        <a aria-expanded="true" aria-controls="collapseOne">
Y
Yu Yang 已提交
111
                            {% if is_en %}Deep Learning 101<span class="sr-only">(current)</span>{% else %}深度学习入门{% endif %}
Y
Yu Yang 已提交
112 113 114 115 116 117 118
                        </a>
                      </h5>
                    </div>
                    <div id="collapseOne" class="rounded-0 collapse show" role="tabpanel" aria-labelledby="headingOne">
                      <div class="card-block pl-0 pr-0 pt-0 pb-0">
                        <div class="list-group ">
                          {% for chapter in chapters %}
Y
Yu Yang 已提交
119
                            <a href="{{ chapter.link }}" target="content_iframe" class="list-group-item list-group-item-action" style="border: 0px; border-bottom: 2px solid #dddfe3;">
Y
Yu Yang 已提交
120 121 122 123 124 125 126 127 128 129
                                {{ chapter.name }}
                            </a>
                          {% endfor %}
                        </div>
                      </div>
                    </div>
                  </div>
                </div>
            </div>
            <div class="col">
Y
Yu Yang 已提交
130
                <iframe src="./fit_a_line/index{% if is_en %}.en{% endif %}.html" style="border: none; overflow-y : hidden" width="100%" height="100%" name="content_iframe" id="content_iframe">
Y
Yu Yang 已提交
131 132 133 134 135 136 137
                </iframe>
            </div>
        </div>
    </div>
    <script>
    $('#content_iframe').on('load', function(){
        $("#content_iframe").height(200)  // trick code to shrink iframe size
Y
Yu Yang 已提交
138 139 140
        var body = $('#content_iframe').contents().find("body")
        body.css("overflow-y", "hidden")
        $("#content_iframe").height(body.height()+20)
Y
Yu Yang 已提交
141 142 143 144
        var alllinks = $('#content_iframe').contents().find("a")
        for (var i =0; i<alllinks.length; ++i) {
            alllinks[i].setAttribute("target", "_blank")
        }
Y
Yu Yang 已提交
145
    });
Y
Yu Yang 已提交
146 147 148 149 150
    $(".list-group a").click(function(){ 
       $(".list-group a.click_active").removeClass("click_active"); 
       $(this).addClass("click_active"); 
    })
    $($(".list-group a")[0]).addClass("click_active") 
Y
Yu Yang 已提交
151 152 153
    </script>
</body>
</html>