我的网站包含一个带有各种选项和页脚的导航栏, 我想将导航栏和页脚包含在不同的文件中,以便我可以在所有其他网页中使用。我在开发中使用Flask
这是我的导航栏代码
<nav class="navbar navbar-expand-sm bg-dark navbar-dark">
<!-- Brand -->
<a class="navbar-brand" href="#"> SpiritUs</a>
<!-- Links -->
<ul class="navbar-nav">
<!-- Dropdown -->
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbardrop" data-toggle="dropdown">
Beer
</a>
<div class="dropdown-menu">
<a class="dropdown-item" href="{{ url_for('indianBeer') }}">Indian Beer</a>
<a class="dropdown-item" href="{{ url_for('importedBeer') }}">Imported Beer</a>
</div>
</li>
</ul>
</nav>
这是我的页脚
<div class="Footer">
<div class="container">
<div class="row centered">
<h4 style="text-transform:uppercase;"><em>
<span style="border-bottom: 2px solid #dd7700;"> Get your favourite liquior at your doorstep! </span>
<span style="border-bottom: 2px solid #dd2210;"> Contact Us</span>
</em></h4>
<p><strong>© Mahin Malhotra, Kunal Sharma and Anshu Bansal</strong></p>
<a href="https://twitter.com" target="_blank"><i class="fa fa-twitter"></i></a>
<a href="https://facebook.com" target="_blank"><i class="fa fa-facebook"></i></a>
</div><!-- row -->
</div><!-- container -->
</div><!-- Footer -->