44 < meta charset ="UTF-8 ">
55 < meta name ="viewport " content ="width=device-width, initial-scale=1.0 ">
66 < title > OAS Binder</ title >
7- <!-- Load the latest Swagger UI code and style -->
8- < script src ="https://cdnjs.cloudflare.com/ajax/libs/swagger-ui/5.18.2/swagger-ui-bundle.min.js " integrity ="sha512-9tBcCofqWq+PelL6USpUB7OJrCaObfefi9ht9nVZuKt1XP7eHDs7NwVljLSLVtSsErax1Tz3pG3O82eeq546Rg== " crossorigin ="anonymous " referrerpolicy ="no-referrer "> </ script >
9- < script src ="https://cdnjs.cloudflare.com/ajax/libs/swagger-ui/5.18.2/swagger-ui-standalone-preset.min.js " integrity ="sha512-RYT3vTu8lWSgdoB5zNck/WogIqUb/ap/ivTr6t2LeS+MwqxRQsnSHkHpJRKjnC4T2fH7OMTxxQoC3jh7KGd3HA== " crossorigin ="anonymous " referrerpolicy ="no-referrer "> </ script >
10- < script src ="https://cdnjs.cloudflare.com/ajax/libs/popper.js/2.11.8/umd/popper.min.js " integrity ="sha512-TPh2Oxlg1zp+kz3nFA0C5vVC6leG/6mm1z9+mA81MI5eaUVqasPLO8Cuk4gMF4gUfP5etR73rgU/8PNMsSesoQ== " crossorigin ="anonymous " referrerpolicy ="no-referrer "> </ script >
11- < script src ="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.3/js/bootstrap.min.js " integrity ="sha512-ykZ1QQr0Jy/4ZkvKuqWn4iF3lqPZyij9iRv6sGqLRdTPkY69YX6+7wvVGmsdBbiIfN/8OdsI7HABjvEok6ZopQ== " crossorigin ="anonymous " referrerpolicy ="no-referrer "> </ script >
12- < link rel ="stylesheet " href ="https://cdnjs.cloudflare.com/ajax/libs/swagger-ui/5.18.2/swagger-ui.min.css " integrity ="sha512-xRGj65XGEcpPTE7Cn6ujJWokpXVLxqLxdtNZ/n1w52+76XaCRO7UWKZl9yJHvzpk99A0EP6EW+opPcRwPDxwkA== " crossorigin ="anonymous " referrerpolicy ="no-referrer " />
7+ <!-- Load styles -->
8+ < link rel ="stylesheet " href ="https://cdnjs.cloudflare.com/ajax/libs/swagger-ui/5.26.2/swagger-ui.min.css " integrity ="sha512-FCw+cnh2A20omSXcIdoLnqQrVbcPiyAPEjKlSZdj6uIR++Xx0VIduMmFZhzYm/gf7bqmZ7dzP3+WVn2Gfr5TjQ== " crossorigin ="anonymous " referrerpolicy ="no-referrer " />
139 < link rel ="stylesheet " href ="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.3/css/bootstrap.min.css " integrity ="sha512-jnSuA4Ss2PkkikSOLtYs8BlYIeeIK1h99ty4YfvRPAlzr377vr3CXDb7sb7eEEBYjDtcYj+AjBH3FLv5uSJuXg== " crossorigin ="anonymous " referrerpolicy ="no-referrer " />
10+ < link rel ="stylesheet " href ="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-icons/1.13.1/font/bootstrap-icons.min.css " integrity ="sha512-t7Few9xlddEmgd3oKZQahkNI4dS6l80+eGEzFQiqtyVYdvcSG2D3Iub77R20BdotfRPA9caaRkg1tyaJiPmO0g== " crossorigin ="anonymous " referrerpolicy ="no-referrer " />
1411
12+ <!-- ===== CUSTOM STYLES ===== -->
1513 < style >
1614 body {
1715 display : flex;
2220 height : 100vh ;
2321 max-width : 30% ;
2422 flex : 0 0 400px ;
23+ transition : all 0.3s ease;
24+ overflow : hidden;
25+ background-color : # 000000 !important ;
26+ }
27+ .sidebar-content {
28+ height : 100% ;
29+ overflow-y : auto;
30+ padding : 10px ;
2531 }
2632 .content {
2733 flex-grow : 1 ;
2834 padding : 15px ;
29- }
30- .sidebar img {
31- max-width : 100% ;
32- margin-bottom : 15px ;
35+ transition : all 0.3s ease;
3336 }
3437 .navbar {
3538 position : fixed;
4548 font-size : 1.5rem ;
4649 font-weight : bold;
4750 }
51+ .navbar-brand-container {
52+ display : flex;
53+ align-items : center;
54+ gap : 10px ;
55+ padding-left : 15px ;
56+ }
57+ .navbar-logo {
58+ height : 30px ;
59+ width : auto;
60+ }
4861 .navbar-nav {
4962 flex-grow : 0 ;
63+ padding-right : 15px ;
5064 }
5165 .sidebar-title {
5266 text-align : center;
5367 font-weight : bold;
54- margin-bottom : 15px ;
55- font-size : 1.25rem ;
68+ margin-bottom : 10px ;
69+ font-size : 1rem ;
70+ transition : all 0.3s ease;
71+ color : white;
72+ }
73+ .service-buttons {
74+ transition : all 0.3s ease;
75+ }
76+ .sidebar .btn {
77+ font-size : 0.8rem ;
78+ padding : 0.375rem 0.75rem ;
79+ margin-bottom : 0.5rem ;
80+ width : 100% ;
81+ background-color : # f8f9fa ;
82+ border-color : # dee2e6 ;
83+ color : # 495057 ;
84+ }
85+ .sidebar .btn : hover {
86+ background-color : # e9ecef ;
87+ border-color : # adb5bd ;
88+ color : # 212529 ;
89+ }
90+ .sidebar .btn-primary {
91+ background-color : # 0d6efd ;
92+ border-color : # 0d6efd ;
93+ color : white;
94+ }
95+ .sidebar .btn-primary : hover {
96+ background-color : # 0b5ed7 ;
97+ border-color : # 0a58ca ;
98+ color : white;
99+ }
100+ .sidebar .nav-item {
101+ margin-bottom : 0.25rem ;
56102 }
57103 </ style >
58104</ head >
105+
106+ <!-- ===== BODY ===== -->
59107< body >
60- < nav class ="navbar navbar-expand-lg navbar-light bg-light ">
61- < a class ="navbar-brand " href ="# "> OAS Binder</ a >
108+ <!-- ===== NAVBAR ===== -->
109+ < nav class ="navbar navbar-expand-lg navbar-light " style ="background-color: #afddfd; ">
110+ < div class ="navbar-brand-container ">
111+ < img src ="https://cdnlogo.com/logos/o/44/openapi-wordmark.svg " alt ="OpenAPI " class ="navbar-logo ">
112+ < a class ="navbar-brand " href ="# "> OAS Binder</ a >
113+ </ div >
62114 < div class ="collapse navbar-collapse " id ="navbarNav ">
63115 < ul class ="navbar-nav ms-auto ">
64116 < li class ="nav-item ">
65- < button class ="btn btn-warning " data-bs-toggle ="modal " data-bs-target ="#modal1 "> ⚙</ button >
117+ < button class ="btn btn-warning " data-bs-toggle ="modal " data-bs-target ="#modal1 ">
118+ < i class ="bi bi-gear-fill "> </ i >
119+ </ button >
66120 </ li >
67121 < li class ="nav-item ">
68- < button class ="btn btn-warning ms-2 " data-bs-toggle ="modal " data-bs-target ="#modal2 "> ❓</ button >
122+ < button class ="btn btn-warning ms-2 " data-bs-toggle ="modal " data-bs-target ="#modal2 ">
123+ < i class ="bi bi-question-circle-fill "> </ i >
124+ </ button >
69125 </ li >
70126 </ ul >
71127 </ div >
72128 </ nav >
73- < div class ="sidebar bg-light p-3 ">
74- < img src ="https://cdnlogo.com/logos/o/44/openapi-wordmark.svg " alt ="">
75- < div class ="sidebar-title "> Select Service</ div >
76- < ul class ="nav flex-column ">
77- {{range .MicroserviceList}}
78- < li class ="nav-item ">
79- < button data-target ="{{.Endpoint}} " class ="btn {{if .Selected}}btn-primary {{else}} btn-outline-primary{{end}} mb-2 "> {{.Name}}</ button >
80- </ li >
81- {{end}}
82- </ ul >
129+
130+ <!-- ===== SIDEBAR ===== -->
131+ < div class ="sidebar ">
132+ < div class ="sidebar-content ">
133+ < div class ="sidebar-title "> Select Service</ div >
134+ < div class ="service-buttons ">
135+ < ul class ="nav flex-column ">
136+ {{range .MicroserviceList}}
137+ < li class ="nav-item ">
138+ < button data-target ="{{.Endpoint}} " class ="btn {{if .Selected}}btn-primary {{else}} btn-outline-primary{{end}} mb-2 "> {{.Name}}</ button >
139+ </ li >
140+ {{end}}
141+ </ ul >
142+ </ div >
143+ </ div >
83144 </ div >
145+
146+ <!-- ===== MAIN CONTENT ===== -->
84147 < div class ="content ">
85148 < div id ="mainContent ">
86149 < div class ="sidebar-title "> {{ .Message }}</ div >
87150 < div id ="swagger-ui "> </ div >
88151 </ div >
89152 </ div >
90153
91- <!-- Modal structures -->
154+ <!-- ===== MODALS ===== -->
155+ <!-- Configuration Modal -->
92156 < div class ="modal fade " id ="modal1 " tabindex ="-1 " aria-labelledby ="modal1Label " aria-hidden ="true ">
93157 < div class ="modal-dialog " role ="document ">
94158 < div class ="modal-content ">
@@ -108,6 +172,7 @@ <h5 class="modal-title" id="modal1Label">OAS Binder configuration</h5>
108172 </ div >
109173 </ div >
110174
175+ <!-- About Modal -->
111176 < div class ="modal fade " id ="modal2 " tabindex ="-1 " aria-labelledby ="modal2Label " aria-hidden ="true ">
112177 < div class ="modal-dialog " role ="document ">
113178 < div class ="modal-content ">
@@ -131,14 +196,17 @@ <h5 class="modal-title" id="modal2Label">About OAS Binder</h5>
131196 </ div >
132197 </ div >
133198
199+ <!-- ===== JAVASCRIPT ===== -->
134200 < script >
201+ // Service selection functionality
135202 document . querySelectorAll ( 'button[data-target]' ) . forEach ( button => {
136203 button . addEventListener ( 'click' , function ( ) {
137204 const target = button . getAttribute ( 'data-target' ) ;
138205 window . location . href = `${ window . location . origin } /${ target } ` ;
139206 } ) ;
140207 } ) ;
141208
209+ // Swagger UI initialization
142210 window . onload = function ( ) {
143211 if ( { { . DisplaySwaggerUI } } ) {
144212 const ui = SwaggerUIBundle ( {
@@ -155,5 +223,14 @@ <h5 class="modal-title" id="modal2Label">About OAS Binder</h5>
155223 }
156224 }
157225 </ script >
226+
227+ <!-- ===== EXTERNAL SCRIPTS ===== -->
228+ <!-- Swagger UI Scripts -->
229+ < script src ="https://cdnjs.cloudflare.com/ajax/libs/swagger-ui/5.26.2/swagger-ui-bundle.min.js " integrity ="sha512-5wwTumuGSEhs2cxv8qTPioOYR5ApZvDzEi8iEJ7ENTOzQ9/qLYh9tWKkMFlrYLpEcnHK+TkqvOLJxKSDGOWrfQ== " crossorigin ="anonymous " referrerpolicy ="no-referrer "> </ script >
230+ < script src ="https://cdnjs.cloudflare.com/ajax/libs/swagger-ui/5.26.2/swagger-ui-standalone-preset.min.js " integrity ="sha512-yJlD9FXQ7YaxAKXhviHSt/0KqWDCkLFdCnk0Ti23HXDMEQtHLAAWMHZ+POglC1mx/MOUB//h8kci3U1JYrywpQ== " crossorigin ="anonymous " referrerpolicy ="no-referrer "> </ script >
231+
232+ <!-- Bootstrap Dependencies -->
233+ < script src ="https://cdnjs.cloudflare.com/ajax/libs/popper.js/2.11.8/umd/popper.min.js " integrity ="sha512-TPh2Oxlg1zp+kz3nFA0C5vVC6leG/6mm1z9+mA81MI5eaUVqasPLO8Cuk4gMF4gUfP5etR73rgU/8PNMsSesoQ== " crossorigin ="anonymous " referrerpolicy ="no-referrer "> </ script >
234+ < script src ="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.3/js/bootstrap.min.js " integrity ="sha512-ykZ1QQr0Jy/4ZkvKuqWn4iF3lqPZyij9iRv6sGqLRdTPkY69YX6+7wvVGmsdBbiIfN/8OdsI7HABjvEok6ZopQ== " crossorigin ="anonymous " referrerpolicy ="no-referrer "> </ script >
158235</ body >
159236</ html >
0 commit comments