-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Now can display content in tabs with a title for each tab. Useful for…
… code samples in different languages and operating systems. Converted getting started page to use tabs for code samples
- Loading branch information
1 parent
2882a51
commit 95da1fc
Showing
8 changed files
with
351 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,6 @@ aux_links: | |
|
||
plugins: | ||
- jekyll-remote-theme | ||
- jekyll-tabs | ||
|
||
logo: "/images/specmatic-logo.png" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<link rel="stylesheet" href="/css/plugin-jekyll-tabs.css"> | ||
<script src="/js/plugin-jekyll-tabs.js"></script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,62 @@ | ||
Download the standalone Jar. | ||
The quickest approach to getting started is through the command line. There are two ways specmatic is distributed for command line usage, one via jar and another via npm package | ||
|
||
<https://github.com/znsio/specmatic/releases/download/{{ site.latest_release }}/specmatic.jar> | ||
{% tabs install %} | ||
{% tab install java %} | ||
Download the standalone jar from [here](<https://github.com/znsio/specmatic/releases/download/{{ site.latest_release }}/specmatic.jar>) to a location on your computer | ||
|
||
#### Mac / Linux | ||
Run specmatic as below to list all the options available | ||
```bash | ||
java -jar specmatic.jar | ||
``` | ||
{% endtab %} | ||
{% tab install npm %} | ||
|
||
Install specmatic npm package | ||
|
||
``` bash | ||
npm install -g specmatic | ||
``` | ||
alias specmatic='java -jar <basedir>/specmatic.jar' | ||
|
||
Run specmatic by | ||
|
||
``` bash | ||
$ npx specmatic | ||
``` | ||
{% endtab %} | ||
{% endtabs %} | ||
|
||
--- | ||
### Tip to run java jar easily | ||
|
||
By following below tip running `java -jar specmatic.jar` everytime can be avoided | ||
|
||
#### Windows | ||
{% tabs hint-java %} | ||
{% tab hint-java mac/linux %} | ||
|
||
Create a batch file with below content. | ||
Add this to the startup script of your shell like `~/.bashrc` or `~/.zshrc` | ||
|
||
``` bash | ||
alias specmatic='java -jar <path-to-jar>/specmatic.jar' | ||
``` | ||
java -jar <basedir>/specmatic.jar %* | ||
|
||
Run specmatic by | ||
|
||
``` bash | ||
$ specmatic <options> | ||
``` | ||
{% endtab %} | ||
{% tab hint-java windows %} | ||
Create a batch file (`specmatic.bat`) with below content and add it your system path. | ||
|
||
``` bash | ||
java -jar <path-to-jar>/specmatic.jar %* | ||
``` | ||
The %* portion at the end tells the batch script to pass all of the parameters it receives to the new command. | ||
|
||
Run specmatic by | ||
|
||
The %* portion tells the batch script to pass all of the parameters it receives to the new command. | ||
``` bash | ||
C:\> specmatic.bat <options> | ||
``` | ||
{% endtab %} | ||
{% endtabs %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
.tab { | ||
display: flex; | ||
flex-wrap: wrap; | ||
margin-left: -20px; | ||
padding: 0; | ||
list-style: none; | ||
position: relative; | ||
} | ||
|
||
.tab > * { | ||
flex: none; | ||
padding-left: 20px; | ||
position: relative; | ||
} | ||
|
||
.tab > * > a { | ||
display: block; | ||
text-align: center; | ||
padding: 9px 20px; | ||
color: #999; | ||
border-bottom: 2px solid transparent; | ||
border-bottom-color: transparent; | ||
font-size: 12px; | ||
text-transform: uppercase; | ||
transition: color .1s ease-in-out; | ||
line-height: 20px; | ||
} | ||
|
||
.tab > .active > a { | ||
color:#222; | ||
border-color: #1e87f0; | ||
} | ||
|
||
.tab-content > li::before, .tab > li::before { | ||
content: ""!important; | ||
} | ||
|
||
.tab > li > a { | ||
text-decoration: none; | ||
cursor: pointer; | ||
} | ||
|
||
.tab-content { | ||
padding: 0; | ||
} | ||
|
||
.tab-content > li { | ||
display: none; | ||
} | ||
.tab-content > li.active { | ||
display: initial; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.