Skip to content

Commit

Permalink
Added vocabulary pages theme for UNECE publication #33
Browse files Browse the repository at this point in the history
  • Loading branch information
webilhan committed Nov 2, 2020
1 parent 33a5989 commit 4022e7e
Show file tree
Hide file tree
Showing 20 changed files with 1,146 additions and 251 deletions.
2 changes: 2 additions & 0 deletions _config_uncefact.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ defaults:
values:
layout: "vocabulary"

platform: uncefact

exclude:
- .idea
- .git
Expand Down
31 changes: 31 additions & 0 deletions _includes/footer-un.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<div class="section-fluid footer-fluid">
<footer class="footer-un2 container dark">
<div class="row"><!-- row -->
<div class="col-md-12">
<div class="pull-left flip footer-brand en"><!-- footer brand -->
<a href="https://www.un.org/en/" title="Home">
<span class="site-name">United Nations</span></a>
</div><!-- /footer brand -->
<div class="pull-right flip donate">
<a href="/en/sections/about-un/how-donate-united-nations-system/" class="btn btn-default btn-reverse dark" role="button" id="donate_button">Donate</a>
</div>
<div class="pull-right flip social-media" role="navigation"><!-- social media links -->
<ul class="nav list-inline">
<li class="list-inline-item facebook"><a href="https://www.facebook.com/unitednations"><span class="icon-text">facebook</span></a></li><li class="list-inline-item twitter"><a href="http://twitter.com/un"><span class="icon-text">twitter</span></a></li><li class="list-inline-item youtube"><a href="http://www.youtube.com/unitednations"><span class="icon-text">youtube</span></a></li><li class="list-inline-item flickr"><a href="http://www.flickr.com/photos/un_photo/"><span class="icon-text">flickr</span></a></li><li class="list-inline-item instagram"><a href="http://instagram.com/unitednations"><span class="icon-text">instagram</span></a></li> </ul>
</div><!-- /social media links -->
</div>
</div><!-- /row -->
<div class="row footer-links"><!-- row -->
<div class="divider"></div><!-- top border -->
<div class="col-md-12">
<div class="pull-right flip">
<div id="block-menu-menu-footer-links" class="block block-menu" role="navigation">
<ul class="nav list-inline">
<li class="list-inline-item "><a href="https://www.un.org/en/sections/about-website/z-site-index/">A-Z Site Index</a></li><li class="list-inline-item "><a href="https://www.un.org/en/contact-us/">Contact</a></li><li class="list-inline-item "><a href="https://www.un.org/en/sections/about-website/copyright/">Copyright</a></li><li class="list-inline-item "><a href="https://www.un.org/en/sections/about-un/frequently-asked-questions/">FAQ</a></li><li class="list-inline-item "><a href="https://www.un.org/en/sections/about-website/fraud-alert/">Fraud Alert</a></li><li class="list-inline-item "><a href="https://www.un.org/en/sections/about-website/privacy-notice/">Privacy Notice</a></li><li class="list-inline-item last"><a href="https://www.un.org/en/sections/about-website/terms-use/">Terms of Use</a></li>
</ul>
</div>
</div>
</div>
</div><!-- /row -->
</footer>
</div>
49 changes: 31 additions & 18 deletions _includes/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,36 @@
<meta charset="utf-8">
<title>{% if page.title %}{{ page.title }} - {% elsif site.data[page.data].info.title %}{{site.data[page.data].info.title}} - {% endif %}edi3 Standards by edi3</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="{{ "/css/style.css" | prepend: site.baseurl }}">
{% if site.platform == "uncefact" %}
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css">
<link rel="stylesheet" href="https://www.un.org/styleguide/css/theme.css">
<link rel="stylesheet" href="https://www.un.org/styleguide/css/theme-un2.css">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="{{ "/css/uncefact.css" | prepend: site.baseurl }}">
{% else %}
<link rel="stylesheet" href="{{ "/css/style.css" | prepend: site.baseurl }}">
{% endif %}

<link rel="apple-touch-icon" sizes="57x57" href="{{ "/images/favicon/apple-icon-57x57.png" | prepend: site.baseurl }}">
<link rel="apple-touch-icon" sizes="60x60" href="{{ "/images/favicon/apple-icon-60x60.png" | prepend: site.baseurl }}">
<link rel="apple-touch-icon" sizes="72x72" href="{{ "/images/favicon/apple-icon-72x72.png" | prepend: site.baseurl }}">
<link rel="apple-touch-icon" sizes="76x76" href="{{ "/images/favicon/apple-icon-76x76.png" | prepend: site.baseurl }}">
<link rel="apple-touch-icon" sizes="114x114" href="{{ "/images/favicon/apple-icon-114x114.png" | prepend: site.baseurl }}">
<link rel="apple-touch-icon" sizes="120x120" href="{{ "/images/favicon/apple-icon-120x120.png" | prepend: site.baseurl }}">
<link rel="apple-touch-icon" sizes="144x144" href="{{ "/images/favicon/apple-icon-144x144.png" | prepend: site.baseurl }}">
<link rel="apple-touch-icon" sizes="152x152" href="{{ "/images/favicon/apple-icon-152x152.png" | prepend: site.baseurl }}">
<link rel="apple-touch-icon" sizes="180x180" href="{{ "/images/favicon/apple-icon-180x180.png" | prepend: site.baseurl }}">
<link rel="icon" type="image/png" sizes="192x192" href="{{ "/images/favicon/android-icon-192x192.png" | prepend: site.baseurl }}">
<link rel="icon" type="image/png" sizes="32x32" href="{{ "/images/favicon/favicon-32x32.png" | prepend: site.baseurl }}">
<link rel="icon" type="image/png" sizes="96x96" href="{{ "/images/favicon/favicon-96x96.png" | prepend: site.baseurl }}">
<link rel="icon" type="image/png" sizes="16x16" href="{{ "/images/favicon/favicon-16x16.png" | prepend: site.baseurl }}">
<link rel="manifest" href="{{ "/images/favicon/manifest.json" | prepend: site.baseurl }}">
<meta name="msapplication-TileColor" content="#ffffff">
<meta name="msapplication-TileImage" content="{{ "/images/favicon/ms-icon-144x144.png" | prepend: site.baseurl }}">
<meta name="theme-color" content="#ffffff">
{% if site.platform == "uncefact" %}
<link rel="shortcut icon" type="image/x-icon" href="{{ site.baseurl }}/images/un/favicon.ico">
{% else %}
<link rel="apple-touch-icon" sizes="57x57" href="{{ "/images/favicon/apple-icon-57x57.png" | prepend: site.baseurl }}">
<link rel="apple-touch-icon" sizes="60x60" href="{{ "/images/favicon/apple-icon-60x60.png" | prepend: site.baseurl }}">
<link rel="apple-touch-icon" sizes="72x72" href="{{ "/images/favicon/apple-icon-72x72.png" | prepend: site.baseurl }}">
<link rel="apple-touch-icon" sizes="76x76" href="{{ "/images/favicon/apple-icon-76x76.png" | prepend: site.baseurl }}">
<link rel="apple-touch-icon" sizes="114x114" href="{{ "/images/favicon/apple-icon-114x114.png" | prepend: site.baseurl }}">
<link rel="apple-touch-icon" sizes="120x120" href="{{ "/images/favicon/apple-icon-120x120.png" | prepend: site.baseurl }}">
<link rel="apple-touch-icon" sizes="144x144" href="{{ "/images/favicon/apple-icon-144x144.png" | prepend: site.baseurl }}">
<link rel="apple-touch-icon" sizes="152x152" href="{{ "/images/favicon/apple-icon-152x152.png" | prepend: site.baseurl }}">
<link rel="apple-touch-icon" sizes="180x180" href="{{ "/images/favicon/apple-icon-180x180.png" | prepend: site.baseurl }}">
<link rel="icon" type="image/png" sizes="192x192" href="{{ "/images/favicon/android-icon-192x192.png" | prepend: site.baseurl }}">
<link rel="icon" type="image/png" sizes="32x32" href="{{ "/images/favicon/favicon-32x32.png" | prepend: site.baseurl }}">
<link rel="icon" type="image/png" sizes="96x96" href="{{ "/images/favicon/favicon-96x96.png" | prepend: site.baseurl }}">
<link rel="icon" type="image/png" sizes="16x16" href="{{ "/images/favicon/favicon-16x16.png" | prepend: site.baseurl }}">
<link rel="manifest" href="{{ "/images/favicon/manifest.json" | prepend: site.baseurl }}">
<meta name="msapplication-TileColor" content="#ffffff">
<meta name="msapplication-TileImage" content="{{ "/images/favicon/ms-icon-144x144.png" | prepend: site.baseurl }}">
<meta name="theme-color" content="#ffffff">
{% endif %}
</head>
91 changes: 91 additions & 0 deletions _includes/header-un.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
<header class="header">
<div id="brand-bar" class="navbar navbar-default navbar-fixed-top" role="navigation"><!-- UN global brand bar -->
<div class="container-fluid brandbar-header">
<div class="row">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="col-md-4">
<a class="navbar-brand" href="/en/">Welcome to the United Nations</a>
</div><!-- /UN global brand bar -->

<!-- Collect the nav links, forms, and other content for toggling -->
<!-- <div class="col-md-8 language-switcher">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#language-switcher">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<div class="language-title visible-xs-inline"><a href="javascript:void(0)" data-toggle="collapse" data-target="#language-switcher">Language:</a></div>
<div class="navbar-collapse collapse" id="language-switcher">
<nav role="navigation"> -->
<!-- <ul class="language-switcher-locale-url nav navbar-nav navbar-right" role="menu">
<li class="en active"><a href="/en/" class="language-link active" xml:lang="en">English</a></li>
<li class="ar first"><a href="/ar/" class="language-link" xml:lang="ar">العربية</a></li>
<li class="zh-hans"><a href="/zh/" class="language-link" xml:lang="zh-hans">中文</a></li>
<li class="fr"><a href="/fr/" class="language-link" xml:lang="fr">Français</a></li>
<li class="ru"><a href="/ru/" class="language-link" xml:lang="ru">Русский</a></li>
<li class="es last"><a href="/es/" class="language-link" xml:lang="es">Español</a></li>
</ul> -->
<!-- </nav> -->
</div>
</div><!-- /.navbar-collapse -->

</div>
<div class="header-line">
<div class="wrapper">
<div id="mobile-menu-wrapper" class="mobile-menu">
<button id="hamburger-menu" class="hamburger-menu">
<span>toggle menu</span>
</button>
<div id="mobile-menu" style="display: none;">
{% include header-menu.html %}
{% include sidebar-menu.html %}
</div>
</div>
<a href="/" class="logo logo-un"><img src="{{site.baseurl}}/images/un/logo.svg" alt=""></a>
<div class="header-search">
{% include search-form.html %}
</div>
{% include header-menu.html %}
</div>
</div>
<div class="header-content">
<div class="wrapper">
<div class="header-text-box">
<div class="header-name">
{% if include.header_name %}
{{ include.header_name }}
{% else %}
edi3 Standards
{% endif %}
</div>
<div class="header-tagline">
{% if include.header_description %}
{{ include.header_description | markdownify }}
{% else %}
Supply Chain Standards and Tools for Web Developers
{% endif %}
</div>
</div>
</div>
</div>
</header>
<script type="text/javascript">
document.getElementById('hamburger-menu').onclick = function() {
var nf = document.getElementById('mobile-menu');

if(nf.style.display==='none') {
nf.style.display = 'block';
}
else {
nf.style.display = 'none';
}
};

window.addEventListener('click', function(e){
if (!document.getElementById('mobile-menu-wrapper').contains(e.target)){
document.getElementById('mobile-menu').style.display= 'none';
}
})
</script>
2 changes: 1 addition & 1 deletion _includes/search-form.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<form action="/search.html" method="get" class="search-form">
<form action="{{site.baseurl}}/search.html" method="get" class="search-form">
<input type="text" id="search-box" class="search-form__input" name="query" placeholder="Search">
<button type="submit" class="search-form__submit">
<svg width="13" height="13" viewBox="0 0 13 13"><title>search</title><path d="m4.8495 7.8226c0.82666 0 1.5262-0.29146 2.0985-0.87438 0.57232-0.58292 0.86378-1.2877 0.87438-2.1144 0.010599-0.82666-0.28086-1.5262-0.87438-2.0985-0.59352-0.57232-1.293-0.86378-2.0985-0.87438-0.8055-0.010599-1.5103 0.28086-2.1144 0.87438-0.60414 0.59352-0.8956 1.293-0.87438 2.0985 0.021197 0.8055 0.31266 1.5103 0.87438 2.1144 0.56172 0.60414 1.2665 0.8956 2.1144 0.87438zm4.4695 0.2115 3.681 3.6819-1.259 1.284-3.6817-3.7 0.0019784-0.69479-0.090043-0.098846c-0.87973 0.76087-1.92 1.1413-3.1207 1.1413-1.3553 0-2.5025-0.46363-3.4417-1.3909s-1.4088-2.0686-1.4088-3.4239c0-1.3553 0.4696-2.4966 1.4088-3.4239 0.9392-0.92727 2.0864-1.3969 3.4417-1.4088 1.3553-0.011889 2.4906 0.45771 3.406 1.4088 0.9154 0.95107 1.379 2.0924 1.3909 3.4239 0 1.2126-0.38043 2.2588-1.1413 3.1385l0.098834 0.090049z"></path></svg>
Expand Down
10 changes: 5 additions & 5 deletions _includes/vocabulary-menu.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
{% for graphItem in graphItems %}
{% if graphItem["@type"] == "rdfs:Class" %}
<li>
<a title='{{ graphItem["@id"] | replace_first: "unece:", "" }}' href='{{ vocabulary_item.url }}#{{ graphItem["@id"] | replace_first: "unece:", "" }}'>{{ graphItem["@id"] | replace_first: "unece:", "" | truncate: 25, "..." }}</a>
<a title='{{ graphItem["@id"] | replace_first: "unece:", "" }}' href='{{site.baseurl}}{{ vocabulary_item.url }}#{{ graphItem["@id"] | replace_first: "unece:", "" }}'>{{ graphItem["@id"] | replace_first: "unece:", "" | truncate: 25, "..." }}</a>
</li>
{% endif %}
{% endfor %}
Expand All @@ -40,7 +40,7 @@
{% for graphItem in graphItems %}
{% if graphItem["@type"] == "rdfs:Property" %}
<li>
<a title='{{ graphItem["@id"] | replace_first: "unece:", "" }}' href='{{ vocabulary_item.url }}#{{ graphItem["@id"] | replace_first: "unece:", "" }}'>{{ graphItem["@id"] | replace_first: "unece:", "" | truncate: 25, "..." }}</a>
<a title='{{ graphItem["@id"] | replace_first: "unece:", "" }}' href='{{site.baseurl}}{{ vocabulary_item.url }}#{{ graphItem["@id"] | replace_first: "unece:", "" }}'>{{ graphItem["@id"] | replace_first: "unece:", "" | truncate: 25, "..." }}</a>
</li>
{% endif %}
{% endfor %}
Expand All @@ -57,7 +57,7 @@
{% assign codeListItems = vocab["@graph"] %}
{% for codeListItem in codeListItems %}
<li>
<a title='{{ codeListItem["@id"] | replace_first: vocabulary_item.jsonid, "" | replace_first: ":", "" }}' href='{{ vocabulary_item.url }}#{{ codeListItem["@id"] | replace_first: vocabulary_item.jsonid, "" | replace_first: ":", "" }}'>{{ codeListItem["@id"] | replace_first: vocabulary_item.jsonid, "" | replace_first: ":", "" | truncate: 25, "..." }}</a>
<a title='{{ codeListItem["@id"] | replace_first: vocabulary_item.jsonid, "" | replace_first: ":", "" }}' href='{{site.baseurl}}{{ vocabulary_item.url }}#{{ codeListItem["@id"] | replace_first: vocabulary_item.jsonid, "" | replace_first: ":", "" }}'>{{ codeListItem["@id"] | replace_first: vocabulary_item.jsonid, "" | replace_first: ":", "" | truncate: 25, "..." }}</a>
</li>
{% endfor %}
</ul>
Expand All @@ -72,7 +72,7 @@
{% assign locodesItems = vocab["@graph"] %}
{% for locodeItem in locodesItems %}
<li>
<a title='{{ locodeItem["@id"] | replace_first: vocabulary_item.jsonid, "" | replace_first: ":", "" }}' href='{{ vocabulary_item.url }}#{{ locodeItem["@id"] | replace_first: vocabulary_item.jsonid, "" | replace_first: ":", "" }}'>{{ locodeItem["@id"] | replace_first: vocabulary_item.jsonid, "" | replace_first: ":", "" | truncate: 25, "..." }}</a>
<a title='{{ locodeItem["@id"] | replace_first: vocabulary_item.jsonid, "" | replace_first: ":", "" }}' href='{{site.baseurl}}{{ vocabulary_item.url }}#{{ locodeItem["@id"] | replace_first: vocabulary_item.jsonid, "" | replace_first: ":", "" }}'>{{ locodeItem["@id"] | replace_first: vocabulary_item.jsonid, "" | replace_first: ":", "" | truncate: 25, "..." }}</a>
</li>
{% endfor %}
</ul>
Expand All @@ -87,7 +87,7 @@
{% assign codeListItems = vocab["@graph"] %}
{% for codeListItem in codeListItems %}
<li>
<a title='{{ codeListItem["@id"] | replace_first: vocabulary_item.jsonid, "" | replace_first: ":", "" }}' href='{{ vocabulary_item.url }}#{{ codeListItem["@id"] | replace_first: vocabulary_item.jsonid, "" | replace_first: ":", "" }}'>{{ codeListItem["@id"] | replace_first: vocabulary_item.jsonid, "" | replace_first: ":", "" | truncate: 25, "..." }}</a>
<a title='{{ codeListItem["@id"] | replace_first: vocabulary_item.jsonid, "" | replace_first: ":", "" }}' href='{{site.baseurl}}{{ vocabulary_item.url }}#{{ codeListItem["@id"] | replace_first: vocabulary_item.jsonid, "" | replace_first: ":", "" }}'>{{ codeListItem["@id"] | replace_first: vocabulary_item.jsonid, "" | replace_first: ":", "" | truncate: 25, "..." }}</a>
</li>
{% endfor %}
</ul>
Expand Down
17 changes: 13 additions & 4 deletions _layouts/vocabulary.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,21 @@
---
<!DOCTYPE html>
<html lang="en">

{% include head.html %}

{% include header.html header_name=page.header_name header_description=page.header_description %}
{% if site.platform == "uncefact" %}
{% include header-un.html header_name=page.header_name header_description=page.header_description %}
{% else %}
{% include header.html header_name=page.header_name header_description=page.header_description %}
{% endif %}

<div class="main-wrapper">
<div class="main-content">
<div class="page-sidebar vocabulary-sidebar">
{% if site.platform != "uncefact" %}
<div class="sidebar-search">
{% include search-form.html %}
</div>
{% endif %}
{% include vocabulary-menu.html %}

</div>
Expand Down Expand Up @@ -301,7 +305,12 @@ <h3 class="collapsible" id="{{ graphItem["@id"] | replace_first: "unece:", "" }}
</div>
</div>

{% include footer.html %}
{% if site.platform == "uncefact" %}
{% include footer-un.html %}
{% else %}
{% include footer.html %}
{% endif %}

<button type="button" onclick="scrollTopFunction();" id="scroll-to-top" style="display: none;"></button>
<script>
var coll = document.getElementsByClassName("collapsible");
Expand Down
2 changes: 1 addition & 1 deletion _sass/_content.scss
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
}

a{
color: $app-red;
color: $content-link;
text-decoration: none;

&:hover{
Expand Down
Loading

0 comments on commit 4022e7e

Please sign in to comment.