Skip to content

Commit

Permalink
Version from package
Browse files Browse the repository at this point in the history
  • Loading branch information
leongersen committed Jan 20, 2018
1 parent 1ce80ce commit 6aca6a6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions documentation/_run/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
<link href="/nouislider/documentation/assets/prism.css" rel="stylesheet">
<script src="/nouislider/documentation/assets/wNumb.js"></script>

<link href="<?php echo $distribute; ?>/nouislider.css?v=1010" rel="stylesheet">
<script src="<?php echo $distribute; ?>/nouislider.js?v=1010"></script>
<link href="<?php echo $distribute; ?>/nouislider.css?v=<?php echo $plain_version; ?>" rel="stylesheet">
<script src="<?php echo $distribute; ?>/nouislider.js?v=<?php echo $plain_version; ?>"></script>
<?php /* <script src="/nouislider/concat.php"></script> */ ?>

</head>
Expand Down
4 changes: 4 additions & 0 deletions documentation/_run/router.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@
$title = "";
$description = "";

$package = json_decode(file_get_contents('./../package.json'));
$version = $package->version;
$plain_version = str_replace('.', '', $version);

ob_start();

include $file;
Expand Down
2 changes: 1 addition & 1 deletion documentation/download.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

<p>noUiSlider is open source, and you can use it <strong>for free</strong> in any personal or commercial product. No attribution required. Both the uncompressed and compressed version of noUiSlider are available in a <code>.zip</code> release, which is hosted by Github and available over <code>https</code>.</p>

<a class="button" href="https://github.com/leongersen/noUiSlider/releases/download/11.0.0/noUiSlider.11.0.0.zip" data-category="convert" data-action="download">Download noUiSlider from Github</a>
<a class="button" href="https://github.com/leongersen/noUiSlider/releases/download/<?php echo $version; ?>/noUiSlider.<?php echo $version; ?>.zip" data-category="convert" data-action="download">Download noUiSlider from Github</a>

<div class="share">
<iframe src="https://ghbtns.com/github-btn.html?user=leongersen&repo=noUiSlider&type=star&count=true&size=large" frameborder="0" scrolling="0" width="160px" height="30px"></iframe>
Expand Down

0 comments on commit 6aca6a6

Please sign in to comment.