mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-10 02:05:37 +02:00
Hide the beta version button on the website if there is only a stable version
This commit is contained in:
parent
31bff2d950
commit
2b5bc6bcec
2 changed files with 11 additions and 2 deletions
|
@ -1169,6 +1169,15 @@ gulp.task('wintersmith', ['gh-pages-prepare'], function (done) {
|
|||
/STABLE_VERSION/g, config.stableVersion);
|
||||
replaceInFile(GH_PAGES_DIR + '/getting_started/index.html',
|
||||
/BETA_VERSION/g, config.betaVersion);
|
||||
|
||||
// Hide the beta version button if there is only a stable version.
|
||||
const groupClass = config.betaVersion ? 'btn-group-vertical centered' : '';
|
||||
const hiddenClass = config.betaVersion ? '' : 'hidden';
|
||||
replaceInFile(GH_PAGES_DIR + '/getting_started/index.html',
|
||||
/GROUP_CLASS/g, groupClass);
|
||||
replaceInFile(GH_PAGES_DIR + '/getting_started/index.html',
|
||||
/HIDDEN_CLASS/g, hiddenClass);
|
||||
|
||||
console.log('Done building with wintersmith.');
|
||||
done();
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue