templates/api/index.html.twig line 1

Open in your IDE?
  1. {% extends 'api/base.html.twig' %}
  2. {% block stylesheets %}
  3. <style>
  4. .card-ctm{
  5.     background-color: #fff !important;
  6. }
  7. .card-ctm:hover{
  8.     background-color: #007bff !important;
  9.     color: #fff;
  10.     cursor: pointer;
  11. }
  12. </style>
  13. {% endblock %}
  14. {% block body %}
  15. <nav class="navbar navbar-dark" style="background-color: #9E0A0A;">
  16.     <a class="navbar-brand" href="#">
  17.         <img src="{{ asset('assets/logo/kota_kediri.png') }}" height="30" class="d-inline-block align-top" alt="">
  18.         <img src="{{ asset('assets/logo/logo_masbup.png') }}" height="30" class="d-inline-block align-top" alt="">
  19.         API Documentation
  20.     </a>
  21. </nav>
  22. <div class="container-fluid">
  23.     <div class="row">
  24.         <div class="col-lg-12">
  25.             <h3>OPEN DATA KEDIRI API Documentation</h3><br>
  26.         </div>
  27.     </div>
  28.     <div class="row">
  29.         <div class="col-lg-12">
  30.             <div class="card">
  31.                 <h5 class="card-header">
  32.                     {{ publikasi.judul }}
  33.                 </h5>
  34.                 <div class="card-body">
  35.                     <div class="card border-primary mb-3">
  36.                         <div class="card-header card-ctm" data-toggle="collapse" data-target="#collapseExample" aria-expanded="false" aria-controls="collapseExample">
  37.                             {# <h6><span class="badge badge-primary">GET</span> {{app.request.getSchemeAndHttpHost()}}{{ path('api_get', {id: publikasi.id}) }}</h6> #}
  38.                             <h6><span class="badge badge-primary">GET</span> {{url}}{{ path('api_get', {id: publikasi.id}) }}</h6>
  39.                         </div>
  40.                         <div class="collapse" id="collapseExample">
  41.                             <div class="card-body">
  42.                                 <table class="table table-bordered table-striped">
  43.                                     <tbody>
  44.                                         <tr>
  45.                                             <th width="20%">URL</th>
  46.                                             {# <td>{{app.request.getSchemeAndHttpHost()}}{{ path('api_get', {id: publikasi.id}) }}</td> #}
  47.                                             <td>{{url}}{{ path('api_get', {id: publikasi.id}) }}</td>
  48.                                         </tr>
  49.                                         <tr>
  50.                                             <th width="20%">Limit</th>
  51.                                             <td>Limit value is number. ex : ?limit=100</td>
  52.                                         </tr>
  53.                                         <tr>
  54.                                             <th width="20%">Skip</th>
  55.                                             <td>Skip value is number. ex : ?skip=100</td>
  56.                                         </tr>
  57.                                     </tbody>
  58.                                 </table>
  59.                             </div>
  60.                         </div>
  61.                     </div>
  62.                     <div class="card border-primary mb-3">
  63.                         <div class="card-header card-ctm" data-toggle="collapse" data-target="#collapseExample1" aria-expanded="false" aria-controls="collapseExample1">
  64.                             <h6><span class="badge badge-primary">GET</span> {{url}}{{ path('api_get', {id: publikasi.id}) ~ "/{id}" }}</h6>
  65.                         </div>
  66.                         <div class="collapse" id="collapseExample1">
  67.                             <div class="card-body">
  68.                                 <table class="table table-bordered table-striped">
  69.                                     <tbody>
  70.                                         <tr>
  71.                                             <th width="20%">URL</th>
  72.                                             <td>{{url}}{{ path('api_get', {id: publikasi.id}) ~ "/{id}" }}</td>
  73.                                         </tr>
  74.                                         <tr>
  75.                                             <th width="20%">ID</th>
  76.                                             <td>ID value is number <em class="text-danger">* required</em></td>
  77.                                         </tr>
  78.                                     </tbody>
  79.                                 </table>
  80.                             </div>
  81.                         </div>
  82.                     </div>
  83.                 </div>
  84.             </div>
  85.         </div>
  86.     </div>
  87. </div>
  88. {% endblock %}