| Index: includes/sidebar/primary-navigation.tmpl |
| =================================================================== |
| --- a/includes/sidebar/primary-navigation.tmpl |
| +++ b/includes/sidebar/primary-navigation.tmpl |
| @@ -13,22 +13,31 @@ |
| # GNU General Public License for more details. |
| # |
| # You should have received a copy of the GNU General Public License |
| # along with acceptableads.org. If not, see <http://www.gnu.org/licenses/>. |
| #} |
| <ul> |
| {% for sitemap_page, sitemap_parent, sitemap_children in sitemap %} |
| - <li class="{% if parent == sitemap_page or page == sitemap_page %} active {% endif %} {% if sitemap_children | length > 0 %} has-submenu {% endif %}"> |
| - {{ sitemap_page | linkify }}{{ sitemap_parent | translate(sitemap_page, "Primary navigation label") }}</a> |
| - {% if sitemap_children | length > 0 %} |
| - <ul> |
| - {% for sitemap_page, sitemap_child in sitemap_children %} |
| - <li class="{% if page == sitemap_page %} active {% endif %}"> |
| - {{ sitemap_page | linkify }}{{ sitemap_child | translate(sitemap_page, "Primary navigation label under \"" + sitemap_parent + "\"") }}</a> |
| - </li> |
| - {% endfor %} |
| - </ul> |
| - {% endif %} |
| - </li> |
| + {% if 'http' in sitemap_page %} |
| + <li> |
| + <a href="{{ sitemap_page }}" target="_blank"> |
| + {{ sitemap_parent | translate(sitemap_parent, "Primary navigation label") }} |
| + <img src="/img/png/icon-external-link.png" srcset="/img/png/icon-external-link.png, /img/svg/icon-external-link.svg 2x" alt="{{ "External Link" | translate("external-link-icon", "Image alt text") }}" class="external-icon"> |
|
juliandoucette
2017/07/19 19:59:45
NIT: I don't think we need to the 1x src in srcset
juliandoucette
2017/07/19 19:59:45
NIT: I think this class name is too specific. Thes
ire
2017/07/20 13:03:55
Done.
ire
2017/07/20 13:03:55
Done.
|
| + </a> |
| + </li> |
| + {% else %} |
| + <li class="{% if parent == sitemap_page or page == sitemap_page %} active {% endif %} {% if sitemap_children | length > 0 %} has-submenu {% endif %}"> |
| + {{ sitemap_page | linkify }}{{ sitemap_parent | translate(sitemap_page, "Primary navigation label") }}</a> |
| + {% if sitemap_children | length > 0 %} |
| + <ul> |
| + {% for sitemap_page, sitemap_child in sitemap_children %} |
| + <li class="{% if page == sitemap_page %} active {% endif %}"> |
| + {{ sitemap_page | linkify }}{{ sitemap_child | translate(sitemap_page, "Primary navigation label under \"" + sitemap_parent + "\"") }}</a> |
| + </li> |
| + {% endfor %} |
| + </ul> |
| + {% endif %} |
| + </li> |
| + {% endif %} |
| {% endfor %} |
| </ul> |