Merge pull request #580 from poanetwork/link-to-button-api-doc

Turned links into buttons and styled
pull/575/head
Sebastian Abondano 6 years ago committed by GitHub
commit 3459b817c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      apps/block_scout_web/assets/css/components/_tile.scss
  2. 23
      apps/block_scout_web/lib/block_scout_web/templates/api_docs/_action_tile.html.eex
  3. 72
      apps/block_scout_web/priv/gettext/default.pot
  4. 72
      apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po

@ -66,6 +66,10 @@
&-api-documentation { &-api-documentation {
border-left: 4px solid $primary; border-left: 4px solid $primary;
background-color: transparent;
width: 100%;
text-align: left;
padding: 15px;
.tile-label { .tile-label {
color: $primary; color: $primary;

@ -1,14 +1,17 @@
<a class="nounderline" data-toggle="collapse" href="#<%= action_tile_id(@module_name, @action.name) %>" role="button" aria-expanded="false" aria-controls="<%= action_tile_id(@module_name, @action.name) %>">
<div class="tile tile-type-api-documentation">
<h3> <div>
<span class="badge badge-secondary tile-badge float-right"><%= gettext "POST" %></span> <button class="nounderline tile tile-type-api-documentation" data-toggle="collapse" href="#<%= action_tile_id(@module_name, @action.name) %>" role="button" aria-expanded="false" aria-controls="<%= action_tile_id(@module_name, @action.name) %>">
<span class="badge badge-primary tile-badge float-right mr-1"><%= gettext "GET" %></span> <h3>
<strong class="tile-label"><%= @action.name %></strong> <span class="badge badge-secondary tile-badge float-right"><%= gettext "POST" %></span>
</h3> <span class="badge badge-primary tile-badge float-right mr-1"><%= gettext "GET" %></span>
<h4 class="text-dark"><%= @action.description %></h4> <strong class="tile-label"><%= @action.name %></strong>
<code><%= raw query_params(@module_name, @action) %></code> </h3>
<h4 class="text-dark"><%= @action.description %></h4>
<code><%= raw query_params(@module_name, @action) %></code>
</button>
</div> </div>
</a>
<div class="row mt-2"> <div class="row mt-2">
<div class="col"> <div class="col">

@ -501,8 +501,8 @@ msgstr ""
#: lib/block_scout_web/templates/address_read_contract/index.html.eex:27 #: lib/block_scout_web/templates/address_read_contract/index.html.eex:27
#: lib/block_scout_web/templates/address_transaction/index.html.eex:31 #: lib/block_scout_web/templates/address_transaction/index.html.eex:31
#: lib/block_scout_web/templates/address_transaction/index.html.eex:69 #: lib/block_scout_web/templates/address_transaction/index.html.eex:69
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:121 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:124
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:140 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:143
msgid "Code" msgid "Code"
msgstr "" msgstr ""
@ -842,25 +842,25 @@ msgid "Token Holdings"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:35 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:38
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:50 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:53
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:66 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:69
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:80 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:83
msgid "(query)" msgid "(query)"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:53 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:56
msgid "A string with the name of the action to be invoked." msgid "A string with the name of the action to be invoked."
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:38 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:41
msgid "A string with the name of the module to be invoked." msgid "A string with the name of the module to be invoked."
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:45 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:48
msgid "Action" msgid "Action"
msgstr "" msgstr ""
@ -870,95 +870,95 @@ msgid "Base URL:"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:19 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:22
msgid "Cancel" msgid "Cancel"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:94 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:97
msgid "Clear" msgid "Clear"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:105 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:108
msgid "Curl" msgid "Curl"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:25 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:28
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:141 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:144
msgid "Description" msgid "Description"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:122 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:125
msgid "Details" msgid "Details"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:162 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:165
msgid "Example Value" msgid "Example Value"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:91 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:94
msgid "Execute" msgid "Execute"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:5 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:7
msgid "GET" msgid "GET"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:175 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:178
msgid "Model" msgid "Model"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:30 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:33
msgid "Module" msgid "Module"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:39 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:42
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:54 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:57
msgid "Must be set to:" msgid "Must be set to:"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:24 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:27
msgid "Name" msgid "Name"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:4 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:6
msgid "POST" msgid "POST"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:17 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:20
msgid "Parameters" msgid "Parameters"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:112 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:115
msgid "Request URL" msgid "Request URL"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:128 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:131
msgid "Response Body" msgid "Response Body"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:101 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:104
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:138 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:141
msgid "Responses" msgid "Responses"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:119 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:122
msgid "Server Response" msgid "Server Response"
msgstr "" msgstr ""
@ -968,19 +968,19 @@ msgid "This API is provided for developers transitioning their applications from
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:18 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:21
msgid "Try it out" msgid "Try it out"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:32 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:35
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:47 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:50
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:63 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:66
msgid "required" msgid "required"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:35 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:38
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:50 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:53
msgid "string" msgid "string"
msgstr "" msgstr ""

@ -513,8 +513,8 @@ msgstr ""
#: lib/block_scout_web/templates/address_read_contract/index.html.eex:27 #: lib/block_scout_web/templates/address_read_contract/index.html.eex:27
#: lib/block_scout_web/templates/address_transaction/index.html.eex:31 #: lib/block_scout_web/templates/address_transaction/index.html.eex:31
#: lib/block_scout_web/templates/address_transaction/index.html.eex:69 #: lib/block_scout_web/templates/address_transaction/index.html.eex:69
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:121 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:124
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:140 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:143
msgid "Code" msgid "Code"
msgstr "" msgstr ""
@ -854,25 +854,25 @@ msgid "Token Holdings"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:35 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:38
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:50 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:53
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:66 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:69
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:80 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:83
msgid "(query)" msgid "(query)"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:53 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:56
msgid "A string with the name of the action to be invoked." msgid "A string with the name of the action to be invoked."
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:38 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:41
msgid "A string with the name of the module to be invoked." msgid "A string with the name of the module to be invoked."
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:45 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:48
msgid "Action" msgid "Action"
msgstr "" msgstr ""
@ -882,95 +882,95 @@ msgid "Base URL:"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:19 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:22
msgid "Cancel" msgid "Cancel"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:94 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:97
msgid "Clear" msgid "Clear"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:105 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:108
msgid "Curl" msgid "Curl"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:25 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:28
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:141 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:144
msgid "Description" msgid "Description"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:122 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:125
msgid "Details" msgid "Details"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:162 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:165
msgid "Example Value" msgid "Example Value"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:91 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:94
msgid "Execute" msgid "Execute"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:5 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:7
msgid "GET" msgid "GET"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:175 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:178
msgid "Model" msgid "Model"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:30 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:33
msgid "Module" msgid "Module"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:39 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:42
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:54 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:57
msgid "Must be set to:" msgid "Must be set to:"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:24 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:27
msgid "Name" msgid "Name"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:4 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:6
msgid "POST" msgid "POST"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:17 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:20
msgid "Parameters" msgid "Parameters"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:112 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:115
msgid "Request URL" msgid "Request URL"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:128 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:131
msgid "Response Body" msgid "Response Body"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:101 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:104
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:138 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:141
msgid "Responses" msgid "Responses"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:119 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:122
msgid "Server Response" msgid "Server Response"
msgstr "" msgstr ""
@ -980,19 +980,19 @@ msgid "This API is provided for developers transitioning their applications from
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:18 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:21
msgid "Try it out" msgid "Try it out"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:32 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:35
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:47 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:50
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:63 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:66
msgid "required" msgid "required"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:35 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:38
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:50 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:53
msgid "string" msgid "string"
msgstr "" msgstr ""

Loading…
Cancel
Save