yum-mirror/slang

Making it easier to work with shaders

git clone https://git.yummers.dev/yum-mirror/slang

Yong Hefix javascript error on doc layout. (#5464)0f68de95b

master
12.7 KiB417 linesraw
1<!DOCTYPE html>
2<html lang="{{ site.lang | default: " en-US" }}">
3
4<head>
5  <meta charset='utf-8'>
6  <meta name="viewport" content="width=device-width, initial-scale=1">
7  <meta http-equiv="X-UA-Compatible" content="IE=edge">
8  <link rel="stylesheet" href="{{ '/assets/css/style.css?v=' | append: site.github.build_revision | relative_url }}">
9  <link rel="stylesheet" type="text/css" href="{{ '/assets/css/print.css' | relative_url }}" media="print">
10  <script async src="https://www.googletagmanager.com/gtag/js?id=G-TMTZVLLMBP"></script>
11  <script>
12    window.dataLayer = window.dataLayer || [];
13    function gtag(){dataLayer.push(arguments);}
14    gtag('js', new Date());
15    gtag('config', 'G-TMTZVLLMBP');
16  </script>
17  <!--[if lt IE 9]>
18    <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
19    <![endif]-->
20  <style>
21    #centeringDiv {
22      margin: auto;
23      max-width: 1200px;
24    }
25    #navDiv
26    {
27      display: block;
28      box-sizing: border-box;
29      padding-top: 5px;
30      padding-bottom: 5px;
31      border-bottom-width: 3px;
32      border-bottom-style: solid;
33      border-bottom-color: #F0F0F0;
34    }
35    #navDiv nav
36    {
37      float:left;
38    }
39    #navDiv::after {
40      content: "";
41      clear: both;
42      display: table;
43    }
44    #navDiv nav li::after
45    {
46      content: "/";
47      padding-left: 10px;
48      padding-right: 0px;
49      color: #808080;
50    }
51    #navDiv nav li
52    {
53      display:inline;
54      padding-left: 10px;
55      padding-right: 0px;
56    }
57    #tocColumn {
58      width: 350px;
59      position: fixed;
60      overflow-y: auto;
61      box-sizing: border-box;
62      display: block;
63    }
64
65    #tocInner {
66      padding: 20px;
67    }
68
69    #rightColumn {
70      padding-left: 390px;
71      padding-right: 40px;
72      padding-top: 20px;
73    }
74
75    .toc_root_list {
76      list-style-type: none;
77      list-style-position: outside;
78      background-color: initial;
79      padding-left: 0px;
80    }
81    .toc_list {
82        padding-left: 16px;
83        background-color: initial;
84        list-style-type: none;
85        margin-bottom: 0px;
86    }
87    .toc_item {
88        cursor: pointer;
89        user-select: none;
90        list-style-type: none;
91        padding-left: 0px;
92        padding-top: 5px;
93    }
94    .toc_item_expanded::before {
95        content: "\25be";
96        cursor: pointer;
97    }
98    .toc_item_collapsed::before {
99        content: "\25b8";
100        cursor: pointer;
101    }
102    .toc_item_leaf {
103        padding-left: 14px;
104        cursor: pointer;
105        list-style-type: none;
106    }
107    .toc_span:hover
108    {
109      color: #d5000d;
110    }
111    .tocIcon
112    {
113      vertical-align: -2.5px;
114    }
115    .editButton
116    {
117      float: right;
118      margin-right: 10px;
119      color:#808080;
120    }
121    .editIcon
122    {
123      fill: currentColor;
124      vertical-align: text-top;
125    }
126    #btnToggleTOC {
127      display: none;
128      width: fit-content;
129      margin-left: 10px;
130      margin-top: 10px;
131      padding: 10px;
132      border-style: solid;
133      border-color: #808080;
134      border-width: 1px;
135      background-color: #E8E8E8;
136    }
137    #btnToggleTOC:hover {
138      background-color: #F0F0E8;
139    }
140    #btnToggleTOC:active {
141      background-color: #D4D4D4;
142    }
143    @media screen and (max-width: 900px) {
144      #tocColumn {
145        width: 300px;
146        display: block;
147        box-sizing: border-box;
148      }
149      #rightColumn {
150        padding-left: 320px;
151        padding-right: 20px;
152      }
153    }
154
155    @media screen and (max-width: 700px) {
156      #tocColumn {
157        width: 100%;
158        position: static;
159        display: none;
160        border-right-style: none;
161        box-sizing: content-box;
162      }
163      #tocInner {
164        padding: 10px;
165      }
166      #rightColumn {
167        padding-left: 10px;
168        padding-right: 10px;
169      }
170      #centeringDiv {
171         padding-left: 0px;
172      }
173      #btnToggleTOC {
174        display: block;
175      }
176    }
177  </style>
178  {% seo %}
179</head>
180
181<body>
182  <div id="centeringDiv">
183    <div id="navDiv">
184    {% include_relative nav.html %}
185    <a class="editButton" title="Edit this page" href="https://github.com/{{ site.github.repository_nwo }}/edit/master/docs/{{ page.path }}">
186      <svg class="editIcon" height="16" viewBox="0 0 16 16" version="1.1" width="16" aria-hidden="true">
187        <path fill-rule="evenodd"
188          d="M11.013 1.427a1.75 1.75 0 012.474 0l1.086 1.086a1.75 1.75 0 010 2.474l-8.61 8.61c-.21.21-.47.364-.756.445l-3.251.93a.75.75 0 01-.927-.928l.929-3.25a1.75 1.75 0 01.445-.758l8.61-8.61zm1.414 1.06a.25.25 0 00-.354 0L10.811 3.75l1.439 1.44 1.263-1.263a.25.25 0 000-.354l-1.086-1.086zM11.189 6.25L9.75 4.81l-6.286 6.287a.25.25 0 00-.064.108l-.558 1.953 1.953-.558a.249.249 0 00.108-.064l6.286-6.286z">
189        </path>
190      </svg>
191    </a>
192    </div>
193    <button id="btnToggleTOC" onclick="toggleTOC()">
194      <svg height="16" class="tocIcon" viewBox="0 0 16 16" version="1.1" width="16" aria-hidden="true">
195        <path fill-rule="evenodd"
196          d="M2 4a1 1 0 100-2 1 1 0 000 2zm3.75-1.5a.75.75 0 000 1.5h8.5a.75.75 0 000-1.5h-8.5zm0 5a.75.75 0 000 1.5h8.5a.75.75 0 000-1.5h-8.5zm0 5a.75.75 0 000 1.5h8.5a.75.75 0 000-1.5h-8.5zM3 8a1 1 0 11-2 0 1 1 0 012 0zm-1 6a1 1 0 100-2 1 1 0 000 2z">
197        </path>
198      </svg>
199      Table of Contents</button>
200    <div id="tocColumn">
201      <div id="tocInner">
202        {% include_relative toc.html %}
203      </div>
204    </div>
205    <div id="rightColumn">
206        <section id="main_content">
207          {% include anchor_headings.html html=content anchorBody="" %}
208        </section>
209        <a href="javascript:;" id="_content_end_"></a>
210        <footer>
211          {% if site.github.is_project_page %}
212          {{ site.title | default: site.github.repository_name }} is maintained by <a
213            href="{{ site.github.owner_url }}">{{ site.github.owner_name }}</a><br>
214          {% endif %}
215          This page was generated by <a href="https://pages.github.com">GitHub Pages</a>.
216        </footer>
217      </div>
218    </div>
219  <script>
220    // Fix for IE. Make sure String has `startsWith` method.
221    if (!String.prototype.startsWith)
222    {
223      String.prototype.startsWith = function (searchString, position) {
224        position = position || 0;
225        return this.indexOf(searchString, position) === position;
226      };
227    }
228
229    var tocColumn = document.getElementById("tocColumn");
230    var rightColumn = document.getElementById("rightColumn");
231    function updateScroll()
232    {
233      if (window.innerWidth < 700)
234      {
235        tocColumn.style.height = "";
236        return;
237      }
238      var top = Math.max(0, rightColumn.getBoundingClientRect().top);
239      tocColumn.style.top = top + "px";
240      tocColumn.style.height = (window.innerHeight-top) + "px";
241    }
242    function updatePosition()
243    {
244      if (window.innerWidth > 700)
245        tocColumn.style.display = "";
246      tocColumn.style.left = rightColumn.getBoundingClientRect().left + "px";
247      updateScroll();
248    }
249    window.addEventListener("resize", updatePosition);
250    updatePosition();
251
252    var tocItemsArray = [];
253    var subSectionItems = [];
254    var selectedItem = null;
255    function toggleTOC() {
256      var tocColumn = document.getElementById("tocColumn");
257      if (tocColumn.style.display == "block")
258        tocColumn.style.display = "none";
259      else
260        tocColumn.style.display = "block";
261      event.stopPropagation();
262    }
263    function expandItem(e) {
264      if (e == selectedItem)
265        e.style["font-weight"] = "bold";
266      var childList = e.getElementsByClassName("toc_list");
267      if (childList.length == 0)
268        return;
269      childList[0].style.display = "block";
270      childList[0].style["font-weight"] = "normal";
271      e.setAttribute("class", "toc_item toc_item_expanded");
272    }
273    function collapseItem(e) {
274      var childList = e.getElementsByClassName("toc_list");
275      if (childList.length == 0)
276        return;
277      childList[0].style.display = "none";
278      e.setAttribute("class", "toc_item toc_item_collapsed");
279    }
280    function tocSpanOnClick(e)
281    {
282      if (event.srcElement != null && event.srcElement.parentElement != null)
283      {
284        var link = event.srcElement.parentElement.getAttribute("data-link");
285        if (link != null)
286        {
287          var poundIndex = link.indexOf("#");
288          if (poundIndex == -1)
289            window.location.href = link + ".html";
290          else
291            window.location.href = link.substr(0, poundIndex) + ".html#" + link.substr(poundIndex+1, link.length - poundIndex - 1);
292        }
293      }
294      event.stopPropagation();
295    }
296    function tocItemOnClick(e)
297    {
298      if (event.srcElement == null) return;
299      // Toggle expanded/collapsed state.
300      if (event.srcElement.getAttribute("class").endsWith("toc_item_collapsed"))
301        expandItem(event.srcElement);
302      else if (event.srcElement.getAttribute("class").endsWith("toc_item_expanded"))
303        collapseItem(event.srcElement);
304      event.stopPropagation();
305    }
306    var path = window.location.pathname;
307    var pageName = path.split("/").pop();
308    var currentPageID = pageName.substr(0, pageName.lastIndexOf("."));
309    if (currentPageID.length == 0)
310      currentPageID = "index";
311    var tocLists = document.getElementsByClassName("toc_root_list");
312    for (var i = 0; i < tocLists.length; i++) {
313      var tocList = tocLists[i];
314      var items = tocList.getElementsByTagName("li")
315      for (var j = 0; j < items.length; j++)
316        tocItemsArray.push(items[j]);
317    }
318    for (var i = 0; i < tocItemsArray.length; i++) {
319      var item = tocItemsArray[i];
320      if (item.getAttribute("data-link") == currentPageID)
321        selectedItem = item;
322      if (item.getElementsByTagName("li").length != 0) {
323        collapseItem(item);
324      }
325      else {
326        item.setAttribute("class", "toc_item toc_item_leaf");
327      }
328      item.addEventListener("click", tocItemOnClick);
329      var innerSpan = item.getElementsByTagName("span");
330      if (innerSpan.length != 0)
331      {
332        innerSpan[0].addEventListener("click", tocSpanOnClick);
333        innerSpan[0].setAttribute("class", "toc_span");
334      }
335    }
336    var curItem = selectedItem;
337    while (curItem != null) {
338      expandItem(curItem);
339      curItem = curItem.parentElement;
340      if (curItem != null && curItem.getAttribute("class") != null &&
341        curItem.getAttribute("class").startsWith("toc_list"))
342        curItem = curItem.parentElement;
343      if (curItem != null && curItem.getAttribute("class") != null &&
344        curItem.getAttribute("class").startsWith("toc_root_list"))
345        break;
346    }
347
348    var subItems = selectedItem.getElementsByTagName("li");
349    var subSectionTitles = [];
350    var subSectionTitleStrs = [];
351    for (var i = 0; i < subItems.length; i++)
352    {
353      subSectionItems.push(subItems[i]);
354      var title = subItems[i].getAttribute("data-link");
355      var pos = title.lastIndexOf("#");
356      title = title.substr(pos + 1);
357      var element = document.getElementById(title);
358      subSectionTitles.push(element);
359      subSectionTitleStrs.push(title);
360    }
361    subSectionTitles.push(document.getElementById("_content_end_"));
362    function isSectionFullyVisible(id)
363    {
364      var titleElement = subSectionTitles[id];
365      var nextTitleElement = subSectionTitles[id+1];
366      return (titleElement.getBoundingClientRect().top >= 0 && nextTitleElement.getBoundingClientRect().top <= window.innerHeight);
367    }
368    function findCurrentSubsection()
369    {
370      var currentSubsectionID = -1;
371      for (var i = 0; i < subSectionItems.length; i++) {
372        var titleElement = subSectionTitles[i];
373        if (titleElement == null)
374          continue;
375        if (titleElement.getBoundingClientRect().top < window.innerHeight * 0.12)
376          currentSubsectionID = i;
377      }
378      return currentSubsectionID;
379    }
380    function updateCurrentSubsection(currentSubsectionID)
381    {
382      for (var i = 0; i < subSectionItems.length; i++)
383      {
384        if (i == currentSubsectionID || isSectionFullyVisible(i))
385          subSectionItems[i].getElementsByTagName("span")[0].style["font-weight"] = 600;
386        else
387          subSectionItems[i].getElementsByTagName("span")[0].style["font-weight"] = 400;
388      }
389    }
390    function windowScroll(e)
391    {
392      updateCurrentSubsection(findCurrentSubsection());
393      updateScroll();
394    }
395    window.addEventListener("scroll", windowScroll);
396    updateCurrentSubsection(findCurrentSubsection());
397  </script>
398  <script type="text/x-mathjax-config">
399    MathJax.Hub.Config({
400      tex2jax: {
401        inlineMath: [ ['$$','$$'], ["\\(","\\)"] ],
402        displayMath: [ ['$$','$$'], ["\\(","\\)"] ],
403      },
404      TeX: {
405        Macros: {
406          bra: ["\\langle{#1}|", 1],
407          ket: ["|{#1}\\rangle", 1],
408          braket: ["\\langle{#1}\\rangle", 1],
409          bk: ["\\langle{#1}|{#2}|{#3}\\rangle", 3]
410       }
411     }
412    });
413  </script>
414  <script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
415</body>
416
417</html>