Why there are no themes for swagger-ui? [closed] - themes

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 1 year ago.
The community reviewed whether to reopen this question 1 year ago and left it closed:
Original close reason(s) were not resolved
Improve this question
I like swagger for documenting Restful APIs very much, especially "Try it out!" button, but swagger-ui interface doesn't look very cool.
And I cannot believe there are no templates for such amazing open source tool (or I can't find any)?
I don't want it for free.. Like http://getbootstrap.com/ has many sites to buy themes (like https://wrapbootstrap.com/), why I cannot find any site for swagger themes?

A late answer, albeit a good one. This is pretty awesome! A slick implementation, and he has customized many things that are easy to tweak yet again for your needs: https://github.com/jensoleg/swagger-ui.
Credits go to this google group: https://groups.google.com/forum/#!topic/swagger-swaggersocket/oeMyayrvKRI. Strange that this has not been posted here yet.
For an action demo, please check out this link: http://senodio.com/site/swagger/#!/pet/addPet
--
EDIT:
Recently found that the DEMO is down, so I forked the Repo (https://github.com/MartinSahlen/swagger-ui) and created a simple node/express server that runs on heroku. Please note that this a free heroku dyno, so it might take a while to load (~20 sec) if there is low activity on it for some time.
You're welcome:
http://sleepy-harbor-80783.herokuapp.com/#!/pet/addPet
EDIT 2:
Just came across another one that looks promising:
https://github.com/legendecas/material-swagger-ui
. It also seems that the swagger ui I am hosting now is resurrected at http://swaggerui.herokuapp.com/. Keeping mine as well in case it is taken down again.

This is a collection of stylesheet themes that can be applied to Swagger UI. Link below to my repo on how to use.
Hope this helps.
https://github.com/ostranme/swagger-ui-themes

Another options is ReDoc.
You just need to bring your swagger.json file with an index.html. Easy setup.
<head>
<title>ReDoc</title>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="https://fonts.googleapis.com/css?family=Montserrat:300,400,700|Roboto:300,400,700" rel="stylesheet">
<style>
body {
margin: 0;
padding: 0;
}
</style>
</head>
<body>
<redoc spec-url='your.swagger.json'></redoc>
<script src="https://cdn.jsdelivr.net/npm/redoc#next/bundles/redoc.standalone.js"> </script>
</body>

Swagger-UI, while not being a new tool, is very specific for its task. I'm unaware of any website the provides themes for it (free or paid). Many of its users have customized the UI to fit their local theme. Some have made subtle changes, some a complete overhaul.
I'd recommend looking around at the available implementations and see if something suits your needs. Then perhaps ask permission to reuse their theme/template for your own needs.

I recently forked refactored the swagger-ui theme shared above using bootstrap v4 for anyone who is interested. See it here https://github.com/afgarcia86/bootstrap-swagger-ui

I'm also on the search for a better looking theme and found https://github.com/mrin9/RapiDoc
It web component based and says it works with any framework.

Related

What files and folders should I have in Laravel if Vue and Vuetify is installed? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 2 years ago.
Improve this question
That may sound like an odd question so let me explain why I ask it. I am just learning Laravel, Vue and Vuetify but I haven't found a coherent set of instructions that actually works for installing them except for this video. Based on the verification steps at the end, it appears that this procedure correctly installs Vue and Vuetify in Laravel.
Unfortunately, I can't find any course on learning Vuetify in Laravel, although this playlist seems pretty clear for a non-Laravel environment. Unfortunately, the playlist's installation instructions seem to result in a very different structure for the project which bears almost no resemblance to what I see in Laravel. And that is confusing me when it comes to actually writing code.
For instance, at the start of the third video, the narrator starts to go through the first Vuetify code that he is going to teach and the files shown in his IDE are very different than what I have in Laravel. While I do have a node_modules and public folder, as he does, I've also got a bunch of other folders, like app, bootstrap, config, database, resources, storage, route, and vendor but I do not have a src folder (nor most of its subfolders, aside from views). I am also lacking an App.vue file, the one he is editing at the start of that video.
I have no idea how to proceed after many hours of searching for videos and tutorials. I am afraid that I am missing a bunch of critical files that I will need but I can't think of any way to determine what those files are nor do I know where to find them.
I am keen to proceed with learning Vuetify but I won't make any progress until I can be certain that I have all the files and folders I need to proceed.
Vue is the most unopinionated framework you have come across. It doesn't require any folder structure (node_modules is imposed by node.js, not by Vue).
So, whatever you think works best for your current project is what you should go for.
Obviously, having this type of freedom can be confusing and counter-productive, especially for those who don't know what they want or don't have much experience. Those often need to be told by more experienced others: "try this thing, it's been tested, works pretty well".
If you're looking for that type of opinionated advice/structure, give Nuxt a try. Nuxt was developed by people using Vue on a daily basis who, at some point, realized having a similar structure across projects might be beneficial and would allow for even faster prototyping.
If all you need is to be certain you're not missing anything crucial, you're not.
All you need to run Vue (and everything that's associated with it, including Vuetify) is one element's id in your page and the vue script loaded, at which point running
new Vue({ el: '#host'})
will create a Vue instance and use the element with id="host" as template.

My website is really slow, how to make it faster [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 5 years ago.
Improve this question
So, my website is done, my website is: http://rocase.win/ But now you go to it, you will see that it is going really slow.
Loading time takes 10-20 seconds. I do an test on pingdom, and they say my loading time is 60 seconds, but almost all the performance is 100%.
Here is the result: https://tools.pingdom.com/#!/bObPdM/http://rocase.win I have tried like deleting all the comments I have, all the blank lines deleting.
But still is the loading time really really long. How can I make this shorter?
Thanks!
You have some missing files which result(s) in long timeout,
You are missing some fonts and more....
Your problem is the external load of JS and CSS( kaspersky ). Comment or remove this lines of your code:
<script type="text/javascript" src="https://gc.kis.v2.scr.kaspersky-labs.com/859509E7-F570-4047-AEC0-CEF2BFA49B1B/main.js" charset="UTF-8"></script>
<link rel="stylesheet" crossorigin="anonymous" href="https://gc.kis.v2.scr.kaspersky-labs.com/B1B94AFB2FEC-0CEA-7404-075F-7E905958/abn/main.css"/>
Your main.js and main.css in kaspersky-labs are making your website slow.
Delete your main.js and main.css lines or move files to your host .
Next time you can use Developer Console in Chrome or some browsers.
In Chrome click the Network tab and refresh page. You can see which file is trouble.

Joomla and Google Analytics with advanced options [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I want to insert google analytics tracking code in my joomla site.
so i registered in the official site of google and saw there is an advanced tab with three more options than standard.
Do i have to check "i want to track dynamic pages" and "i want to track php pages"?
Do these options provide me better results or they are necessary for a dynamic site based on php like joomla?
Also where do i place the tracking code? Because of some bugs some say it is better just after the tag whereas other say just before the tag.
Thank you
General SEO advice: with Joomla you don't need to track pages dynamically, if you want, you can turn on SEF and use robots.txt, ror.xml and sitemap.xml (the first and last files are very important to google).
I also recommend on using Google webmaster tool to update Google whenever you post a new article as well as to check if there are crawling errors and remove "bad" URLs from google.
Like I commented on the other answer, tracking code should be located just before the closing tag for your web page - I recommend on placing the tracking code in the template! (even though you can copy and paste it separately into each article - this option should be done only on rare cases that you need to pass different parameters to GA from different articles.
Update:
Regarding your comment: yes, if you go to the "admin" section, then to "tracking code" you'll see the following option:
All it does is provide a different way of including the tracking code in your pages. I got to admit that I didn't use this option with a few Joomla and WP websites I've dealt with, and it still works totally fine. But if Google recommend on doing so - by all means go ahead and do it!
Judging by this source on setting up GA, it is important for PHP websites that you include the google tracking script at the bottom of the page before the </BODY> tag. I'm struggling to find any information that would give relevance to the questions you have mentioned above, beyond the fact that choosing different checkboxes shows you different instructions to setting up your script.

Are there any command line validation tools for HTML and CSS? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
Is anyone aware of command line tools that can validate CSS and/or HTML?
The W3C offers its validators for local installation, with directions to use from the command line, but the installation process is a nightmare for anyone who isn't a seasoned Java developer.
I've searched with Google, but can't find anything.
Ideally I'd like to use a tool (or tools) that I can point at my CSS, and have it report back on any errors. I want it to be local to increase the speed of my debugging cycles.
Ideally, the tools will understand HTML5 and CSS3.
There is tidy for HTML. It's more than a validator: it doesn't only check if your HTML is valid, but also tries to fix it. But you can just look at the errors and warnings and ignore the fix if you want.
I'm not sure how well it works with HTML5, but take a look at Wanted: Command line HTML5 beautifier, there are some parameter suggestions.
For CSS there is CSSTidy (I have never used it though.)
Regarding the W3C validator: if you happen to use debian/ubuntu, the package w3c-markup-validator is in the repositories and very easy to install via package management. Packages for other distos are also available.
And the W3C CSS validator is available as a jar, which is easy to use:
java -jar css-validator.jar http://www.w3.org/.
One of the most popular web-based validators is http://validator.nu.
On their About page, they list a command-line script (written in Python) for validation.
On Ubuntu, you can install the package w3c-markup-validator. It provides a CGI web interface. But you do not have to use it.
You can use my w3c-validator-runner to run the validator without having a webserver.
If that does not work, consider starting a webserver. You can then use srackham/w3c-validator.
WC3 has the source to their validators here: https://github.com/w3c
Although not directly a solution to your problem, you could consider using a CSS-extension framework for the validation part. I use SASS extensively in all my web projects and find it indispensible when you get used to it. Besides all the fancy mixins and variables features etc. it will also perform a validation of your CSS/SASS markup and report for errors as it is perfectly backwards compatible with regular CSS3. The nice thing is that it works as a Ruby Gem which means that it runs locally and can be integrated with other workflows through either Ruby or the command line (terminal in unix environment).
Take it for a spin: http://sass-lang.com/docs/yardoc/
Run sass style.scss and see what happens.
Not sure if this works but if you have Node & NPM there is: html-validator and html-validator-cli https://github.com/zrrrzzt/html-validator & https://github.com/zrrrzzt/html-validator-cli

Disqus and SEO Friendly comments [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
I'm looking for a hosted platform for managing comments on my website.
I came across http://disqus.com/.
Disqus seems to be feature rich, with on my top list requirements support for SEO friendly comments.
So I check many website using Disqus and I cannot find any of theme have friendly SEO comments.
For SEO friendly I mean that comments should be considered plain text and be visible in the HTML source page.
Also I notice that Disqus works only with JAVASCRIPT enabled.
Do you know if the SEO feature for Disqus it is really working and how?
Most important I need this SEO feature working in Universal Code, I use a custom CMS.
The problem with Disqus is that it uses JavaScript to render comments, so, when robots come to your site, they don't find the comments. Even if it uses index-friendly "#!" URLs, those are still not your page, so, they're not applicable here.
They have a REST API you can use. My idea here is to bring all comments from API by code and write it to HTML inside one container then hide this container via JavaScript (not CSS, as I'm not sure whether robots will hate that, but JS is not discover-able).
Then I'd still have the Disqus JS widget, because the API won't bring me all the nice features Disqus direct use has. When a user adds a link, it won't be added to hidden HTML until the page is refreshed, but who cares, it's hidden anyway, Disqus will update their JavaScript and comment will be visible.
The down-side of course is the user is now downloading the comments twice. You can solve this too by doing some checks for request user-agent string or whatever to tell whether the page is requested by robot or not, and display the comments from the API in HTML only in this case (and then you won't even care about hiding it).
Of course there is a trade-off between time implementing this and how effective-nice it can be, but it's at least achievable.
...
P.S. I also heard the WordPress and Drupal plugins render HTML too in addition to JS. So, if you develop semi-dynamic or CMS websites on top of any of them, you can get that already. See Getting Disqus html code to show in source for SEO purposes.
The fact that Disqus script loading the content via AJAX will be less of an issue soon, because Google starts crawling and indexing such content.

Resources