mirror of
https://github.com/gitpitch/gitpitch.git
synced 2024-04-18 07:30:55 +08:00
New PITCHME.yaml published option.
This commit is contained in:
parent
c686ced77f
commit
10ca2f7f10
|
@ -394,6 +394,14 @@ public class SlideshowModel {
|
|||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Return true if "published" set to true in PITCHME.yaml.
|
||||
*/
|
||||
public boolean published() {
|
||||
|
||||
return (_yOpts != null) ? _yOpts.published(_pp) : false;
|
||||
}
|
||||
|
||||
public String fetchHorzDelim() {
|
||||
|
||||
String delim = null;
|
||||
|
|
|
@ -300,6 +300,10 @@ public final class YAMLOptions {
|
|||
return _yProps.get(REVEALJS_VERSION);
|
||||
}
|
||||
|
||||
public Boolean published(PitchParams pp) {
|
||||
return fetchBooleanOption(pp, PUBLISHED_OPTION);
|
||||
}
|
||||
|
||||
private Boolean fetchBooleanOption(PitchParams pp, String option) {
|
||||
return fetchBooleanOption(pp, option, false);
|
||||
}
|
||||
|
@ -379,6 +383,7 @@ public final class YAMLOptions {
|
|||
private static final String HISTORY_OPTION = "history";
|
||||
private static final String SLIDE_NUMBER_OPTION = "slide-number";
|
||||
private static final String REVEALJS_VERSION = "revealjs-version";
|
||||
private static final String PUBLISHED_OPTION = "published";
|
||||
|
||||
private static final String HSLIDE_DELIM = "horz-delim";
|
||||
private static final String VSLIDE_DELIM = "vert-delim";
|
||||
|
|
|
@ -42,6 +42,7 @@
|
|||
{ title: 'Home', active: true,
|
||||
icon: '<i class="fa fa-bookmark">',
|
||||
src: '@ssm.homePanel()' },
|
||||
@if(!ssm.published()) {
|
||||
{ title: 'Themes',
|
||||
icon: '<i class="fa fa-code-fork">',
|
||||
src: '@ssm.gitPanel()' },
|
||||
|
@ -49,6 +50,7 @@
|
|||
icon: '<i class="fa fa-image">',
|
||||
src: '@ssm.themesPanel()' }
|
||||
}
|
||||
}
|
||||
],
|
||||
path : "@deps.revealjs(offline, ssm.fetchRevealVersionOverride())/plugin/menu",
|
||||
themes : false,
|
||||
|
|
Loading…
Reference in New Issue
Block a user