|
| 1 | +--- |
| 2 | +title: Links Debug |
| 3 | +permalink: /debug/ |
| 4 | +layout: page |
| 5 | +--- |
| 6 | + |
| 7 | +## Scripts Debug |
| 8 | + |
| 9 | +Results: Only |
| 10 | + |
| 11 | +* Absolute URL: {{ "/assets/plyr/plyr.css" | absolute_url }} |
| 12 | +* Relative URL: {{ "assets/plyr/plyr.css" | relative_url }} |
| 13 | +* no filter: <a href="{{ "assets/plyr/plyr.css" }}">assets/plyr/plyr.css</a> - should break |
| 14 | + |
| 15 | +## Nav Debug |
| 16 | + |
| 17 | +{%- for item in site.data.navigation.header -%} |
| 18 | + {%- if item.type contains "dropdown" -%} |
| 19 | + * Home: [#]("#") |
| 20 | + {% if item.subpages %} |
| 21 | + {%- for page in item.subpages -%} |
| 22 | + * {{ page.url | absolute_url }} |
| 23 | + {% endfor %} |
| 24 | + {% endif %} |
| 25 | + {% endif %} |
| 26 | +{% endfor %} |
| 27 | + |
| 28 | + |
| 29 | +<ul> |
| 30 | + {%- for item in site.data.navigation.header -%} |
| 31 | + <!-- Dropdown Menus --> |
| 32 | + {%- if item.type contains "dropdown" -%} |
| 33 | + <li><a href="#">{{ item.title}}<span class="caret"></span></a></li> |
| 34 | + {%- if item.subpages -%} |
| 35 | + <ul class="dropdown-menu"> |
| 36 | + {%- for page in item.subpages -%} |
| 37 | + {%- if page.url contains "http" or "http" contains page.url -%} |
| 38 | + <!-- External Link --> |
| 39 | + <li><a href="{{ page.url | absolute_url }}">{{ page.title }}<i class="fad fa-external-link-alt"></i></a></li> |
| 40 | + {%- else -%} |
| 41 | + <!-- Internal Link --> |
| 42 | + <li><a href="{{ page.url | absolute_url }}">{{ page.title }}</a></li> |
| 43 | + {%- endif -%} |
| 44 | + {%- endfor -%} |
| 45 | + </ul> |
| 46 | + {%- endif -%} |
| 47 | + |
| 48 | + <!-- Dropdown Items --> |
| 49 | + {%- if item.subfolderitems[0] -%} |
| 50 | + <ul class="dropdown-menu"> |
| 51 | + {%- for entry in item.subfolderitems -%} |
| 52 | + <li><a class="nav-link" href="{{ entry.url }}">{{ entry.page }}</a></li> |
| 53 | + {%- endfor -%} |
| 54 | + </ul> |
| 55 | + </li> |
| 56 | + <!-- End of Dropdown Menus --> |
| 57 | + {%- endif -%} |
| 58 | + |
| 59 | + <!-- Normal Menu Items--> |
| 60 | + {%- else -%} |
| 61 | + <!-- Current page --> |
| 62 | + {%- if page.title == item.title -%} |
| 63 | + <li><a class="is-current-page" href="{{ item.url }}">{{ item.title }}</a></li> |
| 64 | + {%- else -%} |
| 65 | + <!-- Normal Page --> |
| 66 | + <li class="nav-item"><a class="nav-link" href="{{ item.url }}">{{ item.title }}</a></li> |
| 67 | + {%- endif -%} |
| 68 | + <!-- End normal items --> |
| 69 | + {%- endif -%} |
| 70 | + <!-- End Nav Loop --> |
| 71 | + {%- endfor -%} |
| 72 | +</ul> |
0 commit comments