← rgit
/
0.1.5
/
templates/repo/macros/breadcrumbs.html
https://dev.kronoz.win/r/rgit.git
1{%- macro breadcrumbs(repo_path, query) -%}
2 path:
3 <a href="/{{ repo.display() }}/tree/{{ query }}">{{ repo.display() }}</a>
4 {%- for child in repo_path.ancestors().collect_vec().into_iter().rev() -%}
5 {%- if let Some(file_name) = child.file_name() -%}
6 /<a href="/{{ repo.display() }}/tree/{{ child.display() }}{{ query }}">
7 {{- file_name.to_string_lossy() -}}
8 </a>
9 {%- endif -%}
10 {%- endfor -%}
11{%- endmacro -%}