Skip to content

Commit

Permalink
Updated to be it's own module
Browse files Browse the repository at this point in the history
  • Loading branch information
Lukewh authored and bartaz committed Aug 14, 2019
1 parent b516a86 commit 810a2c3
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
6 changes: 0 additions & 6 deletions static/js/base/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,3 @@ import "./polyfills";
import "./dropdown-menu-toggle";
import "./notification-dismiss";
import "./ga";

import { createNav } from "@canonical/global-nav";
createNav({
maxWidth: "72rem",
showLogins: false
});
5 changes: 5 additions & 0 deletions static/js/base/global-nav.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { createNav } from "@canonical/global-nav";
createNav({
maxWidth: "72rem",
showLogins: false
});
3 changes: 3 additions & 0 deletions templates/_layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@
<!-- End Google Tag Manager (noscript) -->

{% block header %}
<!-- JS that is needed right away -->
<script src="{{ static_url('js/dist/global-nav.js') }}"></script>

{% include "_header.html" %}
{% endblock %}

Expand Down
1 change: 1 addition & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ const plugins = production

module.exports = {
entry: {
"global-nav": "./static/js/base/global-nav.js",
base: "./static/js/base/base.js",
release: "./static/js/publisher/release.js",
public: "./static/js/public/public.js",
Expand Down

0 comments on commit 810a2c3

Please sign in to comment.