IEEE.org
|
IEEE Xplore Digital Library
|
IEEE Standards
|
IEEE Spectrum
|
More Sites
Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Open at RIT
RIT Open Programs Website
Commits
0d855689
Commit
0d855689
authored
Jun 13, 2022
by
Amy Rose
Browse files
use breadcrumbs in project pages
parent
cf8bdf2f
Pipeline
#785
passed with stage
in 3 minutes and 18 seconds
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
_layouts/base.html
View file @
0d855689
...
...
@@ -57,11 +57,15 @@ layout: default
<!-- Sidenav -->
<div
id=
"sidenav"
>
{% if page.breadcrumbs %}
{% assign breadcrumbs = page.breadcrumbs | default: layout.breadcrumbs %}
{% if breadcrumbs %}
<div
id=
"breadcrumbs"
>
<a
href=
"{{ '/' | relative_url }}"
>
<b>
Open@RIT
</b>
</a>
{% for crumb in page.breadcrumbs %}
/
<a
href=
"{{ crumb.path | relative_url }}"
>
{{crumb.name}}
</a>
{% for crumb in breadcrumbs %}
/
<a
href=
"{{ crumb.path | flatify | relative_url }}"
>
{{ crumb.name | flatify }}
</a>
{% endfor %}
</div>
{% endif %}
...
...
_layouts/project.html
View file @
0d855689
...
...
@@ -3,6 +3,14 @@ layout: base
banner: /assets/images/banners/our-work.webp
load_scripts:
- /assets/js/project.js
breadcrumbs:
- name: Our Open Work
path: /our-work/
- name: Our Fellows' Projects
path: /our-work/fellows-projects
- name: "{{ page.name }}"
path: "{{ page.url }}"
---
<div
id=
"project-content"
style=
"display: none;"
>
...
...
_plugins/expand_nested_variable_filter.rb
View file @
0d855689
# credit: http://acegik.net/blog/ruby/jekyll/plugins/howto-nest-liquid-template-variables-inside-yaml-front-matter-block.html
# modified to ignore non-templated content
module
Jekyll
module
ExpandNestedVariableFilter
def
flatify
(
input
)
Liquid
::
Template
.
parse
(
input
).
render
(
@context
)
end
end
module
ExpandNestedVariableFilter
def
flatify
(
input
)
text
=
input
.
to_s
if
text
.
match?
(
/\{\{(.*?)\}\}/
)
return
Liquid
::
Template
.
parse
(
input
).
render
(
@context
)
end
return
text
end
end
end
Liquid
::
Template
.
register_filter
(
Jekyll
::
ExpandNestedVariableFilter
)
our-work/fellows-projects.md
View file @
0d855689
...
...
@@ -3,11 +3,13 @@ layout: base
banner
:
/assets/images/banners/our-work.webp
breadcrumbs
:
-
name
:
PLACEHOLDER-RENAME
-
name
:
Our Open Work
path
:
/our-work/
-
name
:
Our Fellows' Projects
path
:
/our-work/fellows-projects
subnav
:
-
name
:
PLACEHOLDER-RENAME
-
name
:
Our Work and Projects
link
:
/our-work
sections
:
-
LibreCorps Team
...
...
our-work/index.md
View file @
0d855689
...
...
@@ -3,11 +3,13 @@ layout: base
banner
:
/assets/images/banners/our-work.webp
breadcrumbs
:
-
name
:
PLACEHOLDER-RENAME
-
name
:
Our Open Work
path
:
/our-work/
-
name
:
Our Work and Projects
path
:
/our-work/
subnav
:
-
name
:
PLACEHOLDER-RENAME
-
name
:
Our Work and Projects
link
:
/our-work
active
:
true
sections
:
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment