From 6d10939575fcad4266147445e3652d712215f1cc Mon Sep 17 00:00:00 2001 From: John Mulhausen Date: Tue, 9 Feb 2016 11:56:38 -0800 Subject: [PATCH] adding TOC logic --- .DS_Store | Bin 0 -> 8196 bytes _config.yml | 3 +- _data/v1_1/guides.yml | 110 +++ _data/v1_1/reference.yml | 105 +++ _data/v1_1/samples.yml | 48 ++ _data/v1_1/support.yml | 44 + _includes/.DS_Store | Bin 0 -> 8196 bytes _includes/tree.html | 45 + _layouts/.DS_Store | Bin 0 -> 6148 bytes _layouts/{docs.html => docwithnav.html} | 4 +- _site/index.html | 8 +- _site/v1.2/index.html | 1031 ++++++++++++++++++++++- v1.2/.DS_Store | Bin 0 -> 6148 bytes v1.2/index.md | 1 + 14 files changed, 1395 insertions(+), 4 deletions(-) create mode 100644 .DS_Store create mode 100644 _data/v1_1/guides.yml create mode 100644 _data/v1_1/reference.yml create mode 100644 _data/v1_1/samples.yml create mode 100644 _data/v1_1/support.yml create mode 100644 _includes/.DS_Store create mode 100644 _includes/tree.html create mode 100644 _layouts/.DS_Store rename _layouts/{docs.html => docwithnav.html} (73%) create mode 100644 v1.2/.DS_Store diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..c7e5cf4e46037011ab72301fc464fb29b8a8c4b3 GIT binary patch literal 8196 zcmeHMOK;Oa5T0$); zG-C>%=QUF%)W|F(gFewy@~BCRbVTh8S`TOjGy|Fe&46Y=Gw?SsfM+%@#yQV@IjdXE zfM(#oWPqO!CMuU@C5KXqqXUgd0U+}j76pCe0Yb-AvaIA#N}&pyGJ9Z3m8leiNp;Md z91dAlaww%#CnnX2sVg&;p)hfE=$QgetSqH&H3OP~ECW1upP?GnDWu>`{_fxN!@A># z4iG%3?xN10h=Lx`B(z+zDJDCG{DSZ^637CO9<0~Nryg_~6rI&z7Bp_c=G4iFusue@ z=|>&4nx9U`_o8@d={uXq{wZFaer&bEz7^YXFRIwxN8+33HXPO8w&T`m z|3Mh~qrUCzdX0Xqc>PWo#I_eSx(U_&Juh&>ekJS$ZnSSndwZT6w`#@N?QY``s@rzZ z*!3dM@q8~nG79`tE6yDsFE6hwn5EMCV8J|IUtd}6el-WY29X346D?al}{7S#@`Rks({iN5}@?hEV~TkX)j z0IJiv$Q2K*Zs3PO6W8K9GT;V29OekF)`Q!moPgjqG>sG?RT9pBSKPc1%7q8Obq1YX6AVQzj^-q|I4&xy%)`ZW+24?%U7*x1%s!*J5%!_ zRW~vCL``tq5EW9Wpb_afq)5jhM}HWiZvx7JWhIAFVg%)nzX;IJe~>P@r?DA^e*O!` HyyVR<{?%#%&7ES;{usv8VWqJBEn zyFJ5SR&yVM$7gr3u8g_a=Nay4#qEG)!_MG|=%1ycUsb$5l#=HjcCzv;A3W}~j|<8N zS1&@mM{&F4qo)Ob;hadg3TbZzDENEvr&)RI-!CI)Mk?|`!kD8oA=W9@8SJQy`=p6l zg384#rTGrcWpZ}r9m*c3R=S*;^9JqEHq|q^e7$Mz3bgEsefhDkbMMG0b{=~dft~pb zFznt`lsTnKY5J)XYNXedjB|#)u6jDZI$huE#l_+mwy>Bxaq^UrUn=mAd3Nc3qZ1Ar zu^sn&H9NW|zIkoeQTDDKcaH2kVdy8e?d*B(uxXyZ76!5H1#Xn09_)KTI~>-+e$eh6 zG^D?MuN`-q=Gt!L4nWLB<+qdp^$4{TXc=_t}o44;j;1)+=>fKN0 + {% for item in tree %} + + {% if item.status %} + {% capture statusHTML %} {{item.status}}{% endcapture %} + {% else %} + {% assign statusHTML = "" %} + {% endif %} + + {% if item.section %} + {% capture sectionHTML %}{% endcapture %} + {% else %} + {% assign sectionHTML = "" %} + {% endif %} + + + {% if item.path %} + {% if page.url | remove: ".html" | remove "index" == item.path %} + {% capture tocItemColor %}style="color:red;"{% endcapture %} + {% else %} + {% capture tocItemColor %}{% endcapture %} + {% endif %} +
  • {{ sectionHTML }}{{ item.title }} {{ statusHTML }}
  • + {% else %} + {% if item.include %} + {% assign tree = site.data[item.include].toc %} + {% assign subsection=false %} + {% include tree.html %} + {% else %} +
  • {{ sectionHTML }}{{ item.title }}{{ statusHTML }}
  • + {% endif %} + {% endif %} + + {% if item.break %} +
    + {% endif %} + + {% if item.section %} + {% assign tree = item.section %} + {% assign subsection=true %} + {% include tree.html %} + {% endif %} + {% endfor %} + diff --git a/_layouts/.DS_Store b/_layouts/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..462c326abb21b13e726cadd221f916464ccb2083 GIT binary patch literal 6148 zcmeHK%Sr=55UkN00v?Pvk8|`S_yBsC8>^uOZ`KCPsW&oya!X#rvG(76s^I&1BH6F0WJ)Urb?MR`&IHYesM2j9Pyx{Bi zpK>K@Jfgeo`qi@Qmy8rm7i=eQRcHZ6jJxHETk2=ru~N@G*}qkI{Z^rt2^949PBU?3O>20j_k{*c*(jbkyaTL+b{&+<=%656^X3$tV6SPbc*Bugb) zYVs#WvUHATk82!@p`|0$nOVnY{&>8kIy=X64M%DWLk9!Fz>tA`>&|rkpYxX)edG^Q zq8AJV1OJSHG+A6N=3JDYtv{Bhvo^C`vq=
    - HERE IS THE TOC + {% comment %} assign tree = site.data[page.toc].toc {% endcomment %} + {% assign tree = site.data[page.versionfilesafe][page.section].toc %} + {% include tree.html %}
    {{ content }} diff --git a/_site/index.html b/_site/index.html index c7e57a03fd..448f0d6f5b 100644 --- a/_site/index.html +++ b/_site/index.html @@ -74,7 +74,13 @@
    - HERE IS THE TOC + + + +
      + +
    +
    Yep. diff --git a/_site/v1.2/index.html b/_site/v1.2/index.html index 7ee4b2116b..881c915355 100644 --- a/_site/v1.2/index.html +++ b/_site/v1.2/index.html @@ -74,7 +74,1036 @@
    - HERE IS THE TOC + + + + +

    This is a test of the documentation layout use

    diff --git a/v1.2/.DS_Store b/v1.2/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..cf454e5a82630bfbcbcc3bfba578bf250412d15a GIT binary patch literal 6148 zcmeHKyG{c^3>-s>lW0;>Zb^m2AFQH)M9mMNa1=;^R7feW;=A~>Fn$OT9aM-0jivGI zdhOfX6z3R#tzO3~Uo?oohG+i6ZioxQ4hMRf6p#W^Knh3!DexNwy!Xfa;gd5jU oLKp3r9POAJZ^!46lzGk9JnzL*a+EV3P5=M^ literal 0 HcmV?d00001 diff --git a/v1.2/index.md b/v1.2/index.md index 952412cc8f..f4f1dc30d5 100644 --- a/v1.2/index.md +++ b/v1.2/index.md @@ -1,6 +1,7 @@ --- title: Doc test abstract: Testing the doducmentation with cascading layouts +section: reference --- # This is a test of the documentation layout use