@@ -188,6 +188,34 @@ <h5>Page Text (Markdown)</h5>
188188 style ="white-space: pre-wrap; display: none; "
189189 > </ div >
190190 </ div >
191+
192+ <!-- New Classification Banner Section -->
193+ < div class ="card p-3 mb-3 ">
194+ < h5 > Classification Banner</ h5 >
195+ < div class ="form-check form-switch mb-2 ">
196+ < input class ="form-check-input " type ="checkbox " id ="classification_banner_enabled " name ="classification_banner_enabled "
197+ {% if settings.classification_banner_enabled %}checked{% endif %} >
198+ < label class ="form-check-label ms-2 " for ="classification_banner_enabled ">
199+ Enable Classification Banner
200+ </ label >
201+ </ div >
202+ < div class ="mb-2 ">
203+ < label for ="classification_banner_text " class ="form-label "> Banner Text</ label >
204+ < input type ="text " class ="form-control " id ="classification_banner_text " name ="classification_banner_text "
205+ value ="{{ settings.classification_banner_text }} ">
206+ </ div >
207+ < div class ="mb-2 ">
208+ < label for ="classification_banner_color " class ="form-label "> Banner Color</ label >
209+ < input type ="color " class ="form-control form-control-color " id ="classification_banner_color " name ="classification_banner_color "
210+ value ="{{ settings.classification_banner_color or '#ffc107' }} " style ="width: 3rem; height: 2rem; ">
211+ </ div >
212+ < div class ="mb-2 ">
213+ < span id ="classification-banner-preview "
214+ style ="display:inline-block; padding:0.5em 1em; border-radius:0.3em; font-weight:bold; color:#212529; background:{{ settings.classification_banner_color or '#ffc107' }}; ">
215+ {{ settings.classification_banner_text or 'Banner Preview' }}
216+ </ span >
217+ </ div >
218+ </ div >
191219 </ div >
192220
193221
@@ -746,7 +774,7 @@ <h5>Video Indexer Settings</h5>
746774 value ="{{ settings.video_indexer_api_key or '' }} ">
747775 < button type ="button " class ="btn btn-outline-secondary "
748776 id ="toggle_video_indexer_api_key "> Show</ button >
749- </ div >
777+ </ div >
750778 </ div >
751779
752780 < div class ="mb-3 ">
@@ -1685,6 +1713,22 @@ <h5>File Processing Logs</h5>
16851713 </ form >
16861714</ div >
16871715{% endblock %}
1716+ < script >
1717+ // Live preview for banner in admin
1718+ document . addEventListener ( 'DOMContentLoaded' , function ( ) {
1719+ const textInput = document . getElementById ( 'classification_banner_text' ) ;
1720+ const colorInput = document . getElementById ( 'classification_banner_color' ) ;
1721+ const preview = document . getElementById ( 'classification-banner-preview' ) ;
1722+ function updatePreview ( ) {
1723+ preview . textContent = textInput . value || 'Banner Preview' ;
1724+ preview . style . background = colorInput . value ;
1725+ }
1726+ if ( textInput && colorInput && preview ) {
1727+ textInput . addEventListener ( 'input' , updatePreview ) ;
1728+ colorInput . addEventListener ( 'input' , updatePreview ) ;
1729+ }
1730+ } ) ;
1731+ </ script >
16881732
16891733{% block scripts %}
16901734
0 commit comments