搭建自己的博客(七):使用bootstrap框架美化导航栏
前面发现自己写css代码以及很多功能太麻烦,故希望在自己的博客中引入bootstrap框架,bootstrap是一个非常强大的前端框架,简单易学容易上手。附上官网地址:bootstrap官网
我使用的bootstrap版本是bootstrap4.1。
1、和之前一样先上变化的部分:
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAXQAAAIuCAYAAACvnvNfAAAABHNCSVQICAgIfAhkiAAAABl0RVh0U29mdHdhcmUAZ25vbWUtc2NyZWVuc2hvdO8Dvz4AACAASURBVHic7d1pcBVnfu/x35EwBondLAEsYbANHkAYg21gbMdLbt0ZB3syi5PB8dxxamqWmsmtTCV5k6JIHFcc3/smcyu5NZW5d2qqZoltPOXEs4CBO2O8YIMxNmA2GwEGScMmxI4QFtLRfaG0aLV63053n++nikLndPfTj86Bnx49/Zz+l+69/8E+IZIxo0epp6dHHR2nVVdfX+nu5A6vX7bx/mSb+f2pqXRniuBS52WNHj1aUp96e3sr3Z3c4fXLNt6fbDO/PwR6DMrlsjo7L2vKlCnq6uqqdHdyh9cv23h/ss38/qQS6E+tWhnLPnGdKwmdnZ0aObJOw6+7Tj09VyvShzzj9cu2ON6f2XObJEnLH3t8yB9EY7w/w8wv5pXLnTrw4V61Hj5Uwa45e2rVSj39zLOptBN0nz5JFy9d1JQpU9Ta2qrRY65zPdb6jzjrr33SeP2yLej7YzV7bpNunTtfzft2J9PBKme8P6X/8b//75CLovv37tLBD/f6bswYFVsD0Ol5r3asnNoN0nZaJk2cqJMnT6int6zhw4c77uc0Kgn62kfl5z0K+j5GkbfXLw5pvr5R+X1/zIwwl6S1L71g+96tfekF22Pnr+h/bfaszuZrk0b/gpzDdsplzrwFtr8Wef16ZA7aMFMf5n/QTz/z7MBja1tZ/od/4eJFTZ48WVe6uqS+4AuIwr72Yfl5LdN8vSv1+lVqqk6K5/VNq/9B3x9zmIeR1SA3+O2fEcpJnkOShoU+i4O4/2E9/cyzemrVytimW5L2ySefqL6uTuPGjVPXlS5df/2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UQDgX5RAz848QQ7808uzK90FAHDEB4sAoCAIdAAoCAIdAAqCQAeAgiDQAaAgCrvKZfbcJjXv263ljz0+ZNval16oQI8AIFmFHKHPntukW+fOr2gfvn/b1IoeD6D6/H8E7CO/+cF8QgAAAABJRU5ErkJggg==" alt="" />
2、解释:
图中红色的文件是bootstrap4.1版本需要的文件。
bootstrap4.1文件下载:下载地址
3、变化文件内容:
body, * {
margin: 0;
padding: 0;
}
base.css
{# 引用模板 #}
{% extends 'base.html' %} {# 标题 #}
{% block title %}
{{ blog.title }}
{% endblock %} {# 内容#}
{% block content %}
<h3>{{ blog.title }}</h3>
<p>作者:{{ blog.author }}</p>
{# 时间过滤器让时间按照自己需要的格式过滤 #}
<p>发布日期:{{ blog.created_time|date:"Y-m-d H:n:s" }}</p>
<p>分类:
<a href="{% url 'blogs_with_type' blog.blog_type.pk %}">
{{ blog.blog_type }}
</a>
</p>
<p>{{ blog.content }}</p>
{% endblock %} {% block js %}
<script>
$(".nav-blog").addClass("active").siblings().removeClass("active");
</script>
{% endblock %}
blog_detail.html
{% extends 'base.html' %} {# 标题 #}
{% block title %}
felix Blog
{% endblock %} {# 内容#}
{% block content %}
{% for blog in blogs %}
<a href="{% url 'blog_detail' blog.pk %}"><h3>{{ blog.title }}</h3></a>
{# 添加过滤器 文章太长时只显示前30个字符 #}
<p>{{ blog.content|truncatechars:30 }}</p>
{% empty %}
<p>--暂无博客,敬请期待--</p>
{% endfor %}
{# 过滤器统计博客数量 #}
<p>一共有{{ blogs|length }}篇博客</p>
{% endblock %} {% block js %}
<script>
$(".nav-blog").addClass("active").siblings().removeClass("active");
</script>
{% endblock %}
blog_list.html
{% extends 'base.html' %} {# 标题 #}
{% block title %}
{{ blog_type.type_name }}
{% endblock %} {# 内容#}
{% block content %}
<h3>标签名:{{ blog_type.type_name }}</h3>
{% for blog in blogs %}
<a href="{% url 'blog_detail' blog.pk %}"><h3>{{ blog.title }}</h3></a>
{# 添加过滤器 文章太长时只显示前30个字符 #}
<p>{{ blog.content|truncatechars:30 }}</p>
{% empty %}
<p>--暂无博客,敬请期待--</p>
{% endfor %}
{# 过滤器统计博客数量 #}
<p>一共有{{ blogs|length }}篇博客</p>
{% endblock %} {% block js %}
<script>
$(".nav-blog").addClass("active").siblings().removeClass("active");
</script>
{% endblock %}
blog_with_type
{% load staticfiles %} <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<!-- 根据屏幕自动响应布局 -->
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>
{# 用来放标题 #}
{% block title %} {% endblock %}
</title>
{# 加载css代码 #}
<link rel="stylesheet" href="{% static 'bootstrap4.1/bootstrap.min.css' %}">
<link rel="stylesheet" href="{% static 'css/base.css' %}"> {% block header_extends %}
{# 用来做头部扩展,如加载某些静态文件 #}
{% endblock %}
</head>
<body> {# 导航栏 #}
<nav class="navbar navbar-expand-lg navbar-light bg-light sticky-top">
<a class="navbar-brand" href="{% url 'home' %}">Felix Blog</a> <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent"
aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button> <div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav mr-auto">
<li class="nav-item nav-home"><a href="{% url 'home' %}" class="nav-link">首页</a></li>
<li class="nav-item nav-blog"><a href="{% url 'blog_list' %}" class="nav-link">博客</a></li>
</ul>
</div> </nav> {# 用来放内容 #}
{% block content %} {% endblock %} {# js代码放在后面可以增加性能 #}
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="{% static 'js/jquery-3.3.1.min.js' %}"></script>
<script src="{% static 'bootstrap4.1/popper.min.js' %}"></script>
<script src="{% static 'bootstrap4.1/bootstrap.min.js' %}"></script> {# 导入资源建议放在js代码前 #}
{# 用来放js代码 #}
{% block js %} {% endblock %} </body>
</html>
base.html
{% extends 'base.html' %}
{% load staticfiles %} {% block header_extends %}
<link rel="stylesheet" href="{% static 'css/home.css' %}">
{% endblock %} {% block title %}
我的博客|首页
{% endblock %} {% block content %}
<h1 class="home-content">欢迎访问我的博客</h1>
{% endblock %} {% block js %}
{# 将首页这个按钮设置激活状态 #}
<script>
$(".nav-home").addClass("active").siblings().removeClass("active");
</script>
{% endblock %}
home.html
4、注意点梳理
bootstrap框架是个很好的框架,需要多查文档---》官方文档
使用bootstrap的时候js文件的引入顺序一定是jQuery->Popper.js-> Bootstrap,不然可能会出问题。
搭建自己的博客(七):使用bootstrap框架美化导航栏的更多相关文章
- github+hexo搭建自己的博客网站(七)注意事项(避免read.me,CNAME文件的覆盖,手动改github page的域名)
详细的可以查看hexo博客的演示:https://saucxs.github.io/ 绑定域名可以查看:http://www.chengxinsong.cn 可以查看在github上生成的静态文件(如 ...
- 使用WordPress搭建自己的博客
突然间发现自己在阿里上有一个免费的虚拟云空间,好像是什么时候阿里云搞活动赠送的.看了看还有不少时间,就决定自己搭建一个博客系统.说到搭建自己的博客,第一时间就想到WordPress,这个用起来应该是最 ...
- 如何搭建一个独立博客——简明Github Pages与Hexo教程
摘要:这是一篇很详尽的独立博客搭建教程,里面介绍了域名注册.DNS设置.github和Hexo设置等过程,这是我写得最长的一篇教程.我想将我搭建独立博客的过程在一篇文章中尽可能详细地写出来,希望能给后 ...
- github+hexo搭建自己的博客网站(六)进阶配置(搜索引擎收录,优化你的url)
详细的可以查看hexo博客的演示:https://saucxs.github.io/ 绑定了域名: http://www.chengxinsong.cn hexo+github博客网站源码(可以clo ...
- 设计node.js搭建多人博客的思路(不讲数据库)
1.1.4:搭建多人博客 1.功能分析 搭建一个简单的多人注册,登录,发表文章及登出功能的博客 2.设计目标 未登录:主页左侧导航显示home.login.register,右侧显示已发表文章,发表日 ...
- 转--利用hexo搭建个人静态博客
引用地址 可谓图文并茂,可以配合 七牛云存储(做图片等文件服务器),搭建好看的个人博客 hexo 官方指导文档 主题 官网教程 问题集锦 简书 http://blog.csdn.net/wx_9624 ...
- 使用Docker快速搭建Halo个人博客到阿里云服务器上[附加主题和使用域名访问]
一.前言 小编买了一个服务器也是一直想整个网站,一直在摸索,看了能够快速搭建博客系统的教程.总结了有以下几种方式,大家按照自己喜欢的去搭建: halo wordpress hexo vuepress ...
- 一步步搭建自己的博客 .NET版(2、评论功能)
前言 这次开发的博客主要功能或特点: 第一:可以兼容各终端,特别是手机端. 第二:到时会用到大量html5,炫啊. 第三:导入博客园的精华文章,并做分类.(不要封我) 第四:做 ...
- 基于hexo+github搭建一个独立博客
一直听说用hexo搭建一个拥有自己域名的博客是很酷炫的事情~,在这十一花上半个小时整个hexo博客岂不美哉. 使用Hexo吸引我的是,其简单优雅, 而且风格多变, 适合程序员搭建个人博客,而且支持多平 ...
随机推荐
- 处理ajax数据;数据渲染(细节)
AJAX 是一种在无需重新加载整个网页的情况下,能够更新部分网页的技术. 什么是 AJAX ? AJAX = 异步 JavaScript 和 XML. AJAX 是一种用于创建快速动态网页的技术. 通 ...
- linux查看系统未被挂载的磁盘空间的方法
原文URL:https://www.cnblogs.com/lemon-flm/p/7597403.html 解决AWS 挂载.解决挂载完重启就消失等问题 linux上的盘和window的有区别,磁盘 ...
- Singer House CodeForces - 830D (组合计数,dp)
大意: 一个$k$层完全二叉树, 每个节点向它祖先连边, 就得到一个$k$房子, 求$k$房子的所有简单路径数. $DP$好题. 首先设$dp_{i,j}$表示$i$房子, 分出$j$条简单路径的方案 ...
- 面试题目<转载>
1:检测一个变量是否有设置的函数是否?是否为空的函数是?(2分) 2:echo(),print(),print_r()的区别(3分) 3:表单中 get与post提交方法的 ...
- vue 百度云上传文件PostObject
百度云上传文件 API(PostObject) PostObject接口 : 接口描述 此接口使用HTML表单上传文件到指定bucket,用于实现通过浏览器上传文件到bucket.在PutObjec ...
- PHP 的闭包
匿名函数 提到闭包就不得不想起匿名函数,也叫闭包函数(closures),貌似PHP闭包实现主要就是靠它.声明一个匿名函数是这样: 1 $func = function() { 2 3 }; //带结 ...
- 本文可能是国内第一篇介绍C/4HANA Foundation的中文博客
SAP C/4HANA从去年发布已经过去了一年多的时间,C/4HANA的从业者,对于这五朵云里包含的产品集,想必都有了一些了解. Jerry注意到,SAP C/4HANA Foundation这个概念 ...
- Windows Server 2008 用户管理
默认用户和组 默认用户 默认只有来宾用户(Guest)和管理员(Administrator) 默认组 创建账户 图形界面创建用户 创建用户选项解析 对于公司新员工,分配给他的电脑,应该让其有一定的自主 ...
- 【转】通过BeanNameAutoProxyCreator改变臃肿代码
https://www.cnblogs.com/zdd-java/p/7861824.html 前言: 最近接手了一个项目,大概过了下需求,然后打开项目准备开搞的时候发现一个问题,这个项目是提供res ...
- element-ui 限制只能输入number
element-ui <el-form-item label="大于等于:"> <el-input @keyup.native="number" ...