Skip to content

Commit

Permalink
Fixed navbar collapse
Browse files Browse the repository at this point in the history
  • Loading branch information
julianflapper committed Mar 11, 2020
1 parent 6d067e6 commit 55e5878
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 13 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ The documentation for Ace was, of course, built with Ace. Therefore, the documen
- [Demo](https://docs.vantage-design.com/ace)
- [Documentation](https://docs.vantage-design.com/ace)
- [Issues](https://github.com/vantagedesign/ace-documentation/issues)
- [License](https://github.com/vantagedesign/ace-documentation/glob/master/LICENSE)
- [License](https://github.com/vantagedesign/ace-documentation/blob/master/LICENSE)


## Reporting Issues
Expand Down
8 changes: 8 additions & 0 deletions assets/css/ace.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
/* -------------------------------------------------------------------------
* ACE DOCUMENTATION
* Stylesheet
* @author Vantage Design
* @version 1.0.0
* @license https://github.com/vantagedesign/ace-documentation/blob/master/LICENSE
* ------------------------------------------------------------------------ */

$primary: #007bff;
$secondary: #6610f2;
$success: #28a745;
Expand Down
5 changes: 5 additions & 0 deletions exampleSite/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ menushortcutsnewtab = true # set true to open shortcuts links to a new tab/windo
[outputs]
home = [ "HTML", "RSS", "JSON"]

[[menu.shortcuts]]
name = "More from us"
url = "https://vantage-design.com"
weight = 1

[[menu.shortcuts]]
name = "<i class='fab fa-github'></i>"
url = "https://github.com/vantagedesign/ace-documentation"
Expand Down
2 changes: 2 additions & 0 deletions exampleSite/content/getting-started/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Installing Ace is easy. Just install the Hugo binary, create a new site and inst

## Installing Hugo
In order to run this theme, you need to install Hugo on your system.
This theme requires Hugo's extended version to support SCSS compilation, so make please sure you install the extended version.
For more detailed information and other methods of installation you can visit the <a href="https://gohugo.io/getting-started/installing/" target="_blank">Hugo installation guide.</a>

There may be other ways to install Hugo that are more applicable for your project. For example, you can use the NPM package <a href="https://www.npmjs.com/package/hugo-bin" target="_blank">hugo-bin</a> to include Hugo in a project that already uses NPM packages.
Expand All @@ -19,6 +20,7 @@ Run the following command in your terminal to check if Hugo is installed.
{{< code lang="bash" >}}
hugo version
{{< /code >}}
Make sure the version name mentions <i>extended</i>, to indicate you've installed the extended version of Hugo, which is required for this theme.

## Creating a site
Create a new site *docs* (you may choose any name you want). In your projects root folder, run the following command:
Expand Down
30 changes: 18 additions & 12 deletions layouts/partials/header.html
Original file line number Diff line number Diff line change
@@ -1,20 +1,26 @@
<nav class="navbar navbar-expand navbar-dark bg-primary shadow sticky-top">
<nav class="navbar navbar-expand-lg navbar-dark bg-primary shadow sticky-top" id="navbarMain">
<div class="container">
<div>
<a class="navbar-brand" href="{{ .Site.BaseURL | relLangURL }}">
{{ .Site.Title }}
</a>
</div>
<ul class="navbar-nav ml-auto">
{{- with .Site.Menus.shortcuts}}
{{- range sort . "Weight"}}
<li class="nav-item">
<a class="nav-link" href="{{.URL}}" {{if eq $.Site.Params.menushortcutsnewtab true}}target="_blank"{{end}}>
{{safeHTML .Name}}
</a>
</li>
{{- end}}
{{- end}}
</ul>
<button class="navbar-toggler navbar-toggler-right collapsed" type="button" data-toggle="collapse" data-target="#navbarMainCollapse" aria-controls="navbarMainCollapse" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>

<div class="collapse navbar-collapse" id="navbarMainCollapse">
<ul class="navbar-nav ml-auto">
{{- with .Site.Menus.shortcuts}}
{{- range sort . "Weight"}}
<li class="nav-item">
<a class="nav-link" href="{{.URL}}" {{if eq $.Site.Params.menushortcutsnewtab true}}target="_blank"{{end}}>
{{safeHTML .Name}}
</a>
</li>
{{- end}}
{{- end}}
</ul>
</div>
</div>
</nav>

0 comments on commit 55e5878

Please sign in to comment.