diff --git a/_data/footer_links.yaml b/_data/footer_links.yaml deleted file mode 100644 index a120275..0000000 --- a/_data/footer_links.yaml +++ /dev/null @@ -1,3 +0,0 @@ -- url: new - text: New - title: Create a new post diff --git a/_includes/edit_page_link.html b/_includes/edit_page_link.html index b8b3cbd..662423f 100644 --- a/_includes/edit_page_link.html +++ b/_includes/edit_page_link.html @@ -1,3 +1 @@ -{% if site.edit_page_link != false %} - Edit -{% endif %} +Edit diff --git a/_includes/new_post_form.html b/_includes/new_post_form.html index caac81f..f52051c 100644 --- a/_includes/new_post_form.html +++ b/_includes/new_post_form.html @@ -9,7 +9,7 @@ Type a title and hit Enter to create a new post in {{ site.github.hostname }}/{{ site.github.repository_nwo }}: - + diff --git a/_includes/page_actions_menu.html b/_includes/page_actions_menu.html index 0a789ba..97b6b75 100644 --- a/_includes/page_actions_menu.html +++ b/_includes/page_actions_menu.html @@ -7,13 +7,14 @@ {% include page_actions_menu.html %} {% endcomment %} {% capture menu_items %} - {% for item in site.data.footer_links %} - {{ item.text }} - {% endfor %} - {% include view_source_link.html %} - {% include edit_page_link.html %} + {% if site.new_post_link != false %}{% include new_post_link.html %}{% endif %} + {% if site.view_source_link != false %}{% include view_source_link.html %}{% endif %} + {% if site.edit_page_link != false %}{% include edit_page_link.html %}{% endif %} {% endcapture %} -
- {% include dropup.html menu_items=menu_items %} -
+{% assign menu_items = menu_items | strip %} +{% if menu_items != "" %} +
+ {% include dropup.html menu_items=menu_items %} +
+{% endif %} diff --git a/_includes/view_source_link.html b/_includes/view_source_link.html index 688313b..db8d9bd 100644 --- a/_includes/view_source_link.html +++ b/_includes/view_source_link.html @@ -1,3 +1 @@ -{% if site.view_source_link != false -%} - View Source -{%- endif %} +View Source diff --git a/_layouts/default.html b/_layouts/default.html index 2417ca9..e2ab5d3 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -38,6 +38,7 @@ {{ content }} {% include page_actions_menu.html %} + {% if site.new_post_link != false %}{% include new_post_modal.html %}{% endif %}