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 6
6
</ head >
7
7
< body >
8
8
{% block header %}{% endblock %}
9
+ {% include "partials/v2-alert.html" %}
9
10
{% block body %}{% endblock %}
10
11
{% block scripts %}{% include "partials/scripts.html" %}{% endblock %}
11
12
</ body >
Original file line number Diff line number Diff line change 1
1
< script src ="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js " crossorigin ="anonymous "> </ script >
2
+ < script src ="/static/js/v2-alert.js "> </ script >
2
3
< script src ="/static/js/highlight.min.js "> </ script >
3
4
< script >
4
5
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