Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixos-homepage
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: e388a7c0509d
Choose a base ref
...
head repository: NixOS/nixos-homepage
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: acfff3bf6b6d
Choose a head ref
  • 1 commit
  • 3 files changed
  • 1 contributor

Commits on Apr 15, 2020

  1. Copy the full SHA
    acfff3b View commit details
Showing with 67 additions and 23 deletions.
  1. +5 −0 css/nixos-site.css
  2. +21 −0 js/nixos-site.js
  3. +41 −23 layout.tt
5 changes: 5 additions & 0 deletions css/nixos-site.css
Original file line number Diff line number Diff line change
@@ -40,6 +40,11 @@ p {
padding-bottom: 0;
}

.navbar .navbar-search {
margin-top: 0.6em;

}

.dropdown .caret {
vertical-align: middle;
margin-top: -3px;
21 changes: 21 additions & 0 deletions js/nixos-site.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
$(document).ready(function () {
$(".nixos-popover").popover({});
$(".navbar-search a").click(function (event) {
var url = window.location.protocol + "//" + window.location.host + "/nixos";
if ($(this).text() === "Options") {
url += "/options.html";
url += "#" + $("input", $(this).parents("form")).val()
} else {
url += "/packages.html"
url += "?channel=nixos-" + $(document.body).data('latest-nixos-series');
url += "&query=" + $("input", $(this).parents("form")).val();
}
window.location.href = url;
event.preventDefault();
});
var qs = new URLSearchParams(window.location.search.substring(1));
var query = qs.get("query");
if (query !== null) {
$(".navbar-search input").val(query);
}
});
64 changes: 41 additions & 23 deletions layout.tt
Original file line number Diff line number Diff line change
@@ -30,25 +30,48 @@

</head>

<body>

<div class="nav-collapse collapse">
<ul class="nav pull-left">
<li><a href="[%root%]nixos/download.html">Download</a></li>
<li><a href="[%root%]learn.html">Learn</a></li>
<li><a href="[%root%]nixos/packages.html">Packages</a></li>
<li><a href="[%root%]nixos/options.html">Options</a></li>
<li><a href="[%root%]governance.html">Governance</a></li>
<li><a href="[%root%]nixos/community.html">Community</a></li>
</ul>
<!--
<ul class="nav pull-right">
<li><a href="https://github.com/NixOS/nixpkgs"><i class="fa fa-github"></i></a></li>
<li><a href="https://twitter.com/nixos_org"><i class="fa fa-twitter"></i></a></li>
</ul>
-->
<body data-latest-nixos-series="[% latestNixOSSeries %]">

<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="brand" href="[% root %]">
<img src="[% root %]logo/nix-wiki.png" alt="NixOS" class="logo" />
</a>
<div class="nav-collapse collapse">
<ul class="nav">
<li><a href="[%root%]learn.html">Learn</a></li>
<li><a href="[%root%]download.html">Download</a></li>
<li><a href="[%root%]governance.html">Governance</a></li>
<li><a href="[%root%]community.html">Community</a></li>
</ul>

<form class="navbar-search pull-right">
<div class="input-append">
<input class="span2" id="appendedDropdownButton" type="text" />
<div class="btn-group">
<button class="btn dropdown-toggle" data-toggle="dropdown">
Search
<span class="caret"></span>
</button>
<ul class="dropdown-menu pull-right">
<li><a href="#">Packages</a></li>
<li><a href="#">Options</a></li>
</ul>
</div>
</div>
</form>
</div>
</div>
</div>
</div>


<div class="container main">
[% IF !hideTitle %]
<div class="page-header">
@@ -71,12 +94,7 @@

</div>

<script>
$(document).ready(function () {
$(".nixos-popover").popover({});
});
</script>

<script src="[% root %]js/nixos-site.js"></script>
[% IF anchors %]
<script src="[% root %]js/anchor.min.js"></script>
<script>