-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improved documentation and purpose in README.md (#1)
* Improved documentation and purpose in README.md * README.md updated * Version updated to 0.5.1.beta1
- Loading branch information
1 parent
97fee9f
commit be1f601
Showing
11 changed files
with
252 additions
and
58 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,5 +2,5 @@ | |
|
||
# Current version of Apicraft. | ||
module Apicraft | ||
VERSION = "0.5.0.beta1" | ||
VERSION = "0.5.1.beta1" | ||
end |
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,83 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>APICraft</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-top: 40px; | ||
font-family: 'Montserrat', 'Roboto', sans-serif; | ||
background-color: #121212; | ||
position: relative; | ||
} | ||
#container { | ||
margin-top: 60px; | ||
text-align: center; | ||
max-width: 550px; | ||
margin-left: auto; | ||
margin-right: auto; | ||
color: white; | ||
} | ||
.muted { | ||
opacity: 0.5; | ||
} | ||
.primary-btn { | ||
background-color: #4C2A85; | ||
color: white; | ||
padding: 10px 20px; | ||
text-decoration: none; | ||
border-radius: 5px; | ||
font-size: 16px; | ||
display: inline-block; | ||
cursor: pointer; | ||
transition: background-color 0.3s ease; | ||
} | ||
|
||
.primary-btn:hover { | ||
background-color: #3A2064; | ||
} | ||
|
||
.github-btn { | ||
background-color: white; | ||
color: #4C2A85; | ||
padding: 5px 10px; | ||
text-decoration: none; | ||
border-radius: 5px; | ||
font-size: 12px; | ||
display: inline-block; | ||
border: 2px solid #4C2A85; | ||
cursor: pointer; | ||
transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease; | ||
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); | ||
} | ||
|
||
.github-btn:hover { | ||
box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15); | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<div id="container"> | ||
<img src="<%= @vars[:namespace] %>/assets/images/logo.png" height="120" width="120"/> | ||
<p>Welcome to <strong>API</strong>Craft.<p> | ||
<p class="muted">An opinionated framework for an API Design First approach to development.</p> | ||
<div> | ||
<a class="primary-btn" href="<%= @vars[:namespace] %>/rapidoc">RapiDoc</a> | ||
<a class="primary-btn" href="<%= @vars[:namespace] %>/swaggerdoc">Swagger</a> | ||
</div> | ||
<br/> | ||
<div> | ||
<a href="https://github.com/apicraft-dev/apicraft-rails" class="github-btn" target="_blank"> | ||
⭐ Star us on GitHub | ||
</a> | ||
</div> | ||
<br/> | ||
<div> | ||
<code class="muted">v<%= @vars[:version] %></code> | ||
</div> | ||
</div> | ||
</body> | ||
</html> |
This file was deleted.
Oops, something went wrong.
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,102 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>APICraft - Rapidoc</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; | ||
font-family: 'Montserrat', 'Roboto', sans-serif; | ||
background-color: #121212; | ||
} | ||
|
||
.select-label { | ||
color: white; | ||
font-weight: 400; | ||
margin-right: 10px; | ||
} | ||
|
||
#api_select { | ||
padding: 16px 16px; | ||
color: white; | ||
background-color: black; | ||
border: none; | ||
border-bottom: 1px solid #333; | ||
border-radius: 0px; | ||
cursor: pointer; | ||
outline: none !important; | ||
width: 100%; | ||
display: none; | ||
} | ||
|
||
rapi-doc { | ||
flex-grow: 1; | ||
height: calc(100vh - 0px); /* Adjust for nav height */ | ||
width: 100%; | ||
display: none; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<rapi-doc | ||
theme="dark" | ||
id="rapidoc_element" | ||
header-color="#121212" | ||
primary-color="#4C2A85" | ||
use-path-in-nav-bar="false" | ||
bg-color="#111" | ||
show-header="false" | ||
> | ||
<div slot="nav-logo"> | ||
<img | ||
src="assets/images/thumb.png" | ||
height="60px" | ||
width="60px" | ||
/> | ||
<span style="top: -23px; position: relative;"><strong>API</strong>Craft</span> | ||
</div> | ||
<select id="api_select"> | ||
</select> | ||
</rapi-doc> | ||
<script type="module" src="https://unpkg.com/rapidoc/dist/rapidoc-min.js"></script> | ||
<script> | ||
var $rapiDocElement = document.getElementById('rapidoc_element'); | ||
var $select = document.getElementById('api_select'); | ||
|
||
// List of APIs | ||
var apis = <%= | ||
@vars[:urls].map do |u| | ||
{ url: u, name: u.gsub(Apicraft::Web::Router.namespace, "") } | ||
end.to_json | ||
%> | ||
|
||
$rapiDocElement.setAttribute('spec-url', apis[0].url); | ||
$rapiDocElement.setAttribute('style', "display: block;"); | ||
|
||
// Function to handle API selection change | ||
function onSelectChange() { | ||
var url = this.value; | ||
$rapiDocElement.setAttribute('spec-url', url); | ||
} | ||
|
||
// Dynamically building the select dropdown options | ||
apis.forEach(function(api) { | ||
var $option = document.createElement('option'); | ||
$option.setAttribute('value', api.url); | ||
$option.innerText = api.name; | ||
$select.appendChild($option); | ||
}); | ||
|
||
// Adding event listener for select dropdown change | ||
$select.addEventListener('change', onSelectChange); | ||
$select.setAttribute('style', "display: block;"); | ||
</script> | ||
<style> | ||
.header-title { | ||
display: none !important; | ||
} | ||
</style> | ||
</body> | ||
</html> |
Oops, something went wrong.