Skip to content

Commit

Permalink
Add banner page (#318)
Browse files Browse the repository at this point in the history
  • Loading branch information
janfaracik authored Apr 3, 2024
1 parent c03c055 commit 5657626
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 0 deletions.
21 changes: 21 additions & 0 deletions src/main/java/io/jenkins/plugins/designlibrary/Banner.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package io.jenkins.plugins.designlibrary;

import hudson.Extension;

@Extension
public class Banner extends UISample {
@Override
public String getDisplayName() {
return "Banner";
}

@Override
public String getIconFileName() {
return "symbol-information-circle-outline plugin-ionicons-api";

Check warning on line 14 in src/main/java/io/jenkins/plugins/designlibrary/Banner.java

View check run for this annotation

ci.jenkins.io / Code Coverage

Not covered lines

Lines 6-14 are not covered by tests
}

@Extension
public static final class DescriptorImpl extends UISampleDescriptor {
}
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:s="/lib/samples">
<s:sample>
<div class="jdl-leading-paragraph">
Banners are a handy way to display small snippets of text and actions.
</div>
<div class="jdl-component-group">
<div class="jdl-component-sample jdl-component-sample--full-width jdl-component-sample--gridless">
<div class="alert alert-info">
Hello world
</div>
<div class="alert alert-warning">
Hello world
</div>
<div class="alert alert-danger">
Hello world
</div>
<div class="alert alert-success jenkins-!-margin-bottom-0">
Hello world
</div>
</div>
<s:code language="xml" file="index.jelly" />
</div>
</s:sample>
</j:jelly>
12 changes: 12 additions & 0 deletions src/main/webapp/Banner/index.jelly
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<div class="alert alert-info">
Hello world
</div>
<div class="alert alert-warning">
Hello world
</div>
<div class="alert alert-danger">
Hello world
</div>
<div class="alert alert-success">
Hello world
</div>

0 comments on commit 5657626

Please sign in to comment.