Todoism虽然程序短小,但程序设计实在设计巧妙,知识点多,要看懂也非易事!
我的问题如下:
#base.html#
<nav class="green lighten-2" role="navigation">
<div class="nav-wrapper container">
<a href="#intro" class="brand-logo">Todoism</a>
<a data-target="nav-mobile" class="sidenav-trigger button"><i class="material-icons">menu</i></a>
<ul class="right hide-on-med-and-down">
{% if current_user.is_authenticated %}
...
{% else %}
<li><a class="waves-effect waves-light btn red" href="#login">{{ _('Login') }}</a></li>
{% endif %}
<li>
<a class="waves-effect waves-light dropdown-trigger" id="locale-dropdown-btn" data-target="locale-dropdown">
<i class="material-icons">language</i>
</a>
</li>
</ul>
</div>
</nav>
<ul id="nav-mobile" class="sidenav">
{% if current_user.is_authenticated %}
.....
{% else %}
**<li><a class="waves-effect waves-light btn red sidenav-close" href="#login">{{ _('Login') }}</a></li>**
{% endif %}
</ul>
**<ul id="locale-dropdown" class="dropdown-content">**
** <li><a class="lang-btn" data-href="{{ url_for('home.set_locale', locale='zh_Hans_CN') }}">简体中文</a></li>**
** <li><a class="lang-btn" data-href="{{ url_for('home.set_locale', locale='en_US') }}">English</a></li>**
**</ul>**
#script.js
function activeM() {
$('.sidenav').sidenav();
$('ul.tabs').tabs();
$('.modal').modal();
$('tooltipped').tooltip();
$('dropdown-trigger').dropdown({
constrainWidth: false,
converTrigger: false
});
display_dashboard();
}
带**这两段怎么没执行显示呢?