File tree Expand file tree Collapse file tree 4 files changed +22
-0
lines changed Expand file tree Collapse file tree 4 files changed +22
-0
lines changed Original file line number Diff line number Diff line change 1+ var migrationAlertContainer = document . getElementById ( 'v2-alert-container' ) ;
2+
3+ if ( ! window . localStorage . getItem ( 'dbc-v2-alert-seen' ) ) {
4+ migrationAlertContainer . setAttribute ( 'style' , 'display:block' ) ;
5+ }
6+
7+ var migrationAlert = document . getElementById ( 'v2-alert' ) ;
8+ migrationAlert . addEventListener ( 'closed.bs.alert' , function ( ) {
9+ window . localStorage . setItem ( 'dbc-v2-alert-seen' , 'true' ) ;
10+ migrationAlertContainer . setAttribute ( 'style' , 'display:none' ) ;
11+ } ) ;
Original file line number Diff line number Diff line change 66 </ head >
77 < body >
88 {% block header %}{% endblock %}
9+ {% include "partials/v2-alert.html" %}
910 {% block body %}{% endblock %}
1011 {% block scripts %}{% include "partials/scripts.html" %}{% endblock %}
1112 </ body >
Original file line number Diff line number Diff line change 11< script src ="
https://cdn.jsdelivr.net/npm/[email protected] /dist/js/bootstrap.bundle.min.js "
crossorigin ="
anonymous "
> </ script > 2+ < script src ="/static/js/v2-alert.js "> </ script >
23< script src ="/static/js/highlight.min.js "> </ script >
34< script >
45 hljs . configure ( { ignoreUnescapedHTML : true } )
Original file line number Diff line number Diff line change 1+ < div id ="v2-alert-container " style ="display:none " class ="mt-3 px-5 ">
2+ < div id ="v2-alert " class ="alert alert-warning alert-dismissible mx-auto " style ="max-width:1000px; "
3+ role ="alert ">
4+ You are viewing the documentation for
5+ < i > dash-bootstrap-components</ i > version 2! Please check our
6+ < a href ="/changelog "> changelog</ a > for details on breaking changes.
7+ < button type ="button " class ="btn-close " data-bs-dismiss ="alert " aria-label ="Close "> </ button >
8+ </ div >
9+ </ div >
You can’t perform that action at this time.
0 commit comments