twskj / pretty-swag

Pretty UI for Swagger spec
MIT License
122 stars 20 forks source link

Feature Request: Optional Link to Home in navbar #32

Closed craigmonson closed 7 years ago

craigmonson commented 7 years ago

It'd be great if we could get an optional link to "home" button in the upper left hand corner of the navbar that we can set with a command line option. ie: -home https://foo.bar.baz would enable your standard home icon in the upper left that linked to the input of the option.

twskj commented 7 years ago

Sounds like a good idea. I'll work on it this evening.

twskj commented 7 years ago

I might add 3 positions: 1 image

2 image

3 image

craigmonson commented 7 years ago

That looks awesome. :)

twskj commented 7 years ago

Rolled out on v0.1.105. Valid location values are: L, RL, RR (default to RR) Here's an example command line

pretty-swag -i pet.json -opet.html -home.url https://github.com/twskj/pretty-swag -home.location RR -home.text myHome

Check it out.

craigmonson commented 7 years ago

LR isn't working for me, but L and RR work great!

Source: swagger.yaml
Dest: foo.html
Format:  singleFile
MarkDown:  Disable
Nav Bar:  Normal
Auto tags:  Enable
Initial Collapse [Path: undefined, Method: true, Tool :false]
Theme: blue-grey
No Request Panel
Home: {"URL":"/","location":"LR","text":"<font size=\"+2\">⌂</font>"}
DONE
twskj commented 7 years ago

Woops my bad. It's RL

craigmonson commented 7 years ago

That was it. Works great! Thanks!