summaryrefslogtreecommitdiffstats
path: root/docs/_layouts/user-guide.html
blob: af48da6938d056da664a71691b16424d175ca471 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
<!DOCTYPE html>
<html lang="{{ site.lang | default: " en-US" }}">

<head>
  <meta charset='utf-8'>
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <link rel="stylesheet" href="{{ '/assets/css/style.css?v=' | append: site.github.build_revision | relative_url }}">
  <link rel="stylesheet" type="text/css" href="{{ '/assets/css/print.css' | relative_url }}" media="print">
  <!--[if lt IE 9]>
    <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
  <style>
    #centeringDiv {
      margin: auto;
      max-width: 1000px;
      padding-left: 350px;
    }

    #tocColumn {
      width: 350px;
      position: fixed;
      overflow-y: auto;
      box-sizing: border-box;
      max-height: 100vh;
      display: block;
    }

    #tocInner {
      padding: 20px;
    }

    #rightColumn {
      padding-left: 40px;
      padding-right: 40px;
      padding-top: 20px;
      border-left-width: 1.5px;
      border-left-style: solid;
      border-left-color: #C8C8C8;
    }

    .toc_root_list {
      list-style-type: none;
      list-style-position: outside;
      background-color: initial;
      padding-left: 0px;
    }
    .toc_list {
        padding-left: 16px;
        background-color: initial;
        list-style-type: none;
        margin-bottom: 0px;
    }
    .toc_item {
        cursor: pointer;
        user-select: none;
        list-style-type: none;
        padding-left: 0px;
        padding-top: 5px;
    }
    .toc_item_expanded::before {
        content: "\25be";
        cursor: pointer;
    }
    .toc_item_collapsed::before {
        content: "\25b8";
        cursor: pointer;
    }
    .toc_item_leaf {
        padding-left: 14px;
        cursor: pointer;
        list-style-type: none;
    }
    .toc_span:hover
    {
      color: #303080
    }
    #btnToggleTOC {
      display: none;
      width: fit-content;
      margin-left: 10px;
      margin-top: 10px;
      padding: 10px;
      border-style: solid;
      border-color: #808080;
      border-width: 1px;
    }
    @media screen and (max-width: 850px) {
      #tocColumn {
        width: 300px;
        display: block;
      }
      #centeringDiv {
         padding-left: 300px;
      }
    }

    @media screen and (max-width: 700px) {
      #tocColumn {
        width: 100%;
        position: static;
        display: none;
      }
      #tocInner {
        padding: 10px;
      }
      #rightColumn {
        padding-left: 10px;
        padding-right: 10px;
      }
      #centeringDiv {
         padding-left: 0px;
      }
      #btnToggleTOC {
        display: block;
      }
    }
  </style>
  {% seo %}
</head>

<body>
    <button id="btnToggleTOC" onclick="toggleTOC()">Table of Contents</button>
    <div id="tocColumn">
      <div id="tocInner">
        {% include_relative user-guide-toc.html %}
      </div>
    </div>
    <div id="centeringDiv">
      <div id="rightColumn">
        <section id="main_content">
          {% include anchor_headings.html html=content anchorBody="" %}
        </section>

        <footer>
          {% if site.github.is_project_page %}
          {{ site.title | default: site.github.repository_name }} is maintained by <a
            href="{{ site.github.owner_url }}">{{ site.github.owner_name }}</a><br>
          {% endif %}
          This page was generated by <a href="https://pages.github.com">GitHub Pages</a>.
        </footer>
      </div>
    </div>
  <script>
    var tocColumn = document.getElementById("tocColumn");
    var rightColumn = document.getElementById("rightColumn");
    function updatePosition()
    {
      if (window.innerWidth > 700)
        tocColumn.style.display = "";
      tocColumn.style.left = (rightColumn.getBoundingClientRect().x - tocColumn.getBoundingClientRect().width) + "px";
    }
    window.addEventListener("resize", updatePosition);
    updatePosition();
  </script>

  <script>
    var tocItemsArray = [];
    var selectedItem = null;
    function toggleTOC() {
      var tocColumn = document.getElementById("tocColumn");
      if (tocColumn.style.display == "block")
        tocColumn.style.display = "none";
      else
        tocColumn.style.display = "block";
      event.stopPropagation();
    }
    function expandItem(e) {
      if (e == selectedItem)
        e.style["font-weight"] = "bold";
      var childList = e.getElementsByClassName("toc_list");
      if (childList.length == 0)
        return;
      childList[0].style.display = "block";
      childList[0].style["font-weight"] = "normal";
      e.setAttribute("class", "toc_item toc_item_expanded");
    }
    function collapseItem(e) {
      var childList = e.getElementsByClassName("toc_list");
      if (childList.length == 0)
        return;
      childList[0].style.display = "none";
      e.setAttribute("class", "toc_item toc_item_collapsed");
    }
    function tocSpanOnClick(e)
    {
      if (event.srcElement != null && event.srcElement.parentElement != null)
      {
        var link = event.srcElement.parentElement.getAttribute("data-link");
        if (link != null)
        {
          var poundIndex = link.indexOf("#");
          if (poundIndex == -1)
            window.location.href = link + ".html";
          else
            window.location.href = link.substr(0, poundIndex) + ".html#" + link.substr(poundIndex+1, link.length - poundIndex - 1);
        }
      }
      event.stopPropagation();
    }
    function tocItemOnClick(e)
    {
      if (event.srcElement == null) return;
      // Toggle expanded/collapsed state.
      if (event.srcElement.getAttribute("class").endsWith("toc_item_collapsed"))
        expandItem(event.srcElement);
      else if (event.srcElement.getAttribute("class").endsWith("toc_item_expanded"))
        collapseItem(event.srcElement);
      event.stopPropagation();
    }
    var path = window.location.pathname;
    var pageName = path.split("/").pop();
    var currentPageID = pageName.substr(0, pageName.lastIndexOf("."));
    if (currentPageID.length == 0)
      currentPageID = "index";
    var tocLists = document.getElementsByClassName("toc_root_list");
    for (var i = 0; i < tocLists.length; i++) {
      var tocList = tocLists[i];
      var items = tocList.getElementsByTagName("li")
      for (var j = 0; j < items.length; j++)
        tocItemsArray.push(items[j]);
    }
    for (var i = 0; i < tocItemsArray.length; i++) {
      var item = tocItemsArray[i];
      if (item.getAttribute("data-link") == currentPageID)
        selectedItem = item;
      if (item.getElementsByTagName("li").length != 0) {
        collapseItem(item);
      }
      else {
        item.setAttribute("class", "toc_item toc_item_leaf");
      }
      item.addEventListener("click", tocItemOnClick);
      var innerSpan = item.getElementsByTagName("span");
      if (innerSpan.length != 0)
      {
        innerSpan[0].addEventListener("click", tocSpanOnClick);
        innerSpan[0].setAttribute("class", "toc_span");
      }
    }
    var curItem = selectedItem;
    while (curItem != null) {
      expandItem(curItem);
      curItem = curItem.parentElement;
      if (curItem != null && curItem.getAttribute("class") != null &&
        curItem.getAttribute("class").startsWith("toc_list"))
        curItem = curItem.parentElement;
      if (curItem != null && curItem.getAttribute("class") != null &&
        curItem.getAttribute("class").startsWith("toc_root_list"))
        break;
    }
  </script>

  {% if site.google_analytics %}
  <script>
    (function (i, s, o, g, r, a, m) {
      i['GoogleAnalyticsObject'] = r; i[r] = i[r] || function () {
        (i[r].q = i[r].q || []).push(arguments)
      }, i[r].l = 1 * new Date(); a = s.createElement(o),
        m = s.getElementsByTagName(o)[0]; a.async = 1; a.src = g; m.parentNode.insertBefore(a, m)
    })(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga');
    ga('create', '{{ site.google_analytics }}', 'auto');
    ga('send', 'pageview');
  </script>
  {% endif %}
</body>

</html>