当前位置: 首页 > news >正文

个人博客网站前端页面的实现

博客网站前端页面的实现

博客登录页

相关代码

login.html

<!DOCTYPE html>
<html lang="en">
<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>博客登录页</title><link rel="stylesheet" href="../css/commom.css"><link rel="stylesheet" href="../css/login.css">
</head>
<body><div class="nav"><img src="../img/logo.png" alt="图片没加载出来"><span>我的博客系统</span><span class="space"></span><div><a href="blog_list.html">主页</a><a href="blog_edit.html">写博客</a><a href="http://www.baidu.com/">注销</a></div></div><div class="login_container"><!-- 登录页面 --><div class="login_dialog"><h3>登录</h3><div class="row"><span>用户名</span><input class="username" type="text"></div><div class="row"><span>密码</span><input class="password" type="password"></div><div class="row"><button>提交</button> </div></div></div></body>
</html>

login.css

* {padding: 0px;margin: 0px;box-sizing: border-box;
}
.login_container {height: calc(100% - 50px);width: 100%;display: flex;justify-content: center;align-items: center;
}
.login_dialog {width: 400px;height: 400px;background-color: rgba(255, 255, 255, 0.8);border-radius: 14px;
}
h3 {text-align: center;margin-top: 50px;margin-bottom: 30px;font-size: 25px;
}
.row {display: flex;justify-content: center;align-items: center;height: 80px;
}
.row span {font-size: 20px;width: 90px;
}
.row input {height: 40px;width: 240px;font-size: 20px;border-radius: 9px;border: none;
}
.row button {background-color: #a3dff1;width: 330px;height: 40px;border-radius: 8px;border:none;
}




页面实现效果

Snipaste_2024-03-11_17-11-56




博客列表页

相关代码

blog_list.html

<!DOCTYPE html>
<html lang="en">
<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>博客列表页</title><link rel="stylesheet" href="../css/commom.css">
</head>
<body><div class="nav"><img src="../img/logo.png" alt="图片没加载出来"><span>我的博客系统</span><span class="space"></span><div><a href="blog_list.html">主页</a><a href="blog_edit.html">写博客</a><a href="http://www.baidu.com/">注销</a></div></div><div class="container"><div class="container-left"><!-- 个人信息 --><div class="card"><img src="../img/touxiang.jpg" alt="图片没加载出来"><h3>姐姐</h3><a href="https://gitee.com/liao-feiyangsss">github地址</a><div class="counter"><span>文章</span><span>分类</span></div><div class="counter"><span>1</span><span>2</span></div></div></div><div class="container-right"><!-- 博客列表 --><div class="blog"><div class="title">这是第一篇博客 </div><div class="date">2024-03-11</div><div class="desc"><p>山风微微,像月光下晃动的海浪,温和而柔软,停留在时光的背后,变成小时候听过的故事。在遥远的城市,陌生的地方,有他未曾见过的山和海</p></div><a class="detail" href="blog_content.html?blogId=5">查看全文&gt;&gt;</a></div><div class="blog"><div class="title">这是第二篇博客 </div><div class="date">2024-03-13</div><div class="desc"><p>生活中,不需要太多的刻意,一切顺其自然,或许是最好的结果……如果有一天,你看见整天都在疯狂的人,那绝不是我。因为做一个快乐简单的人,一生简单快乐!</p></div><a class="detail" href="blog_content.html?blogId=2">查看全文&gt;&gt;</a></div><div class="blog"><div class="title">这是第三篇博客 </div><div class="date">2024-03-15</div><div class="desc"><p>太阳冉冉升起,清风柔柔吹起。花儿伸伸懒腰,喜鹊唧唧鸣唱。当你睁开眼睛时,世界的美好送给你。清扬的闹铃响起时,我美好的祝福呈现给你。</p></div><a class="detail" href="blog_content.html?blogId=3">查看全文&gt;&gt;</a></div><div class="blog"><div class="title">这是第四篇博客 </div><div class="date">2024-03-17</div><div class="desc"><p>如果你认为自己会被击倒,你就会被击倒。如果你认为自己没有希望,你就会没有希望。如果你对自己的生活持消极态度,你的生活就真的会变得很消极。如果你积极对待生活,你就会发现,生活是如此美好。</p></div><a class="detail" href="blog_content.html?blogId=4">查看全文&gt;&gt;</a></div><div class="blog"><div class="title">这是第五篇博客 </div><div class="date">2024-03-19</div><div class="desc"><p>每个人都有自己的幸福,仰望别人的幸福时,别人也在仰望你的幸福。难得糊涂,容易幸福;知足常乐,更容易获得幸福。幸福需要感觉,感觉幸福就是幸福。我们拼命地追求幸福,因为幸福就在身边;我们设高的要求,因为我们害怕失望。</p></div><a class="detail" href="blog_content.html?blogId=5">查看全文&gt;&gt;</a></div><div class="blog"><div class="title">这是第六篇博客 </div><div class="date">2024-03-21</div><div class="desc"><p>如果难过,就努力抬头望天空吧,望着望着就忘了……它那么大,一定可以包容你的所有委屈。</p></div><a class="detail" href="blog_content.html?blogId=5">查看全文&gt;&gt;</a></div><div class="blog"><div class="title">这是第七篇博客 </div><div class="date">2024-03-23</div><div class="desc"><p>记忆像是倒在掌心的水,不论你摊开还是紧握,终究还是会从指缝中一滴一滴流淌干净</p></div><a class="detail" href="blog_content.html?blogId=5">查看全文&gt;&gt;</a></div><div class="blog"><div class="title">这是第八篇博客 </div><div class="date">2024-03-25</div><div class="desc"><p>人生就像一座山,重要的不是它的高低,而在于灵秀;人生就像一场雨,重要的不是它的大小,而在于及时。</p></div><a class="detail" href="blog_content.html?blogId=1">查看全文&gt;&gt;</a></div></div></div>
</body>
</html>

common.css

* {margin: 0px;padding: 0px;box-sizing: border-box;
}
html,body {height: 100%;width: 100%;background-image: url(../img/background.jpg);background-repeat: no-repeat;background-size: cover;
}
.nav {width: 100%;height: 60px;background-color:  gray;display: flex;justify-content: left;align-items: center;color: white;
}
.nav img {width: 50px;height: 50px;border-radius: 50%;/* margin-top: 4px; */margin-left: 4px;margin-right: 8px;
}.nav .space {width: 75%;
}.nav a {color: white;text-decoration: none;/* margin-left: 10px; */margin-right: 15px;
}
.nav div {display: flex;justify-content: right;align-items: center;width: 15%;
}
.container {display: flex;justify-content: space-between;align-items: center;margin: 0 auto;height: calc(100% - 50px);width: 100%;
}.container .container-left {height: 100%;width: 30%;background-color: rgba(255,255,255,0.8);
}.container .container-right {height: 100%;width: 70%;background-color: rgba(255,255,255,0.8);overflow: auto;
}
.card {margin-top: 10px;width: 60%;height: 44%;background-color: rgba(255,255,255,0.8);margin-left: 200px;margin-right: 10px;border-radius: 15px;
}
.card img {width: 120px;height: 120px;border-radius: 50%;margin-left: 90px;margin-top: 35px;
}
.card h3 {text-align: center;margin-top: 8px;margin-bottom: 8px;
}
.card a {display: block;text-align: center;color: grey;text-decoration: none;margin-bottom: 20px;
}
.card .counter {display: flex;justify-content: space-around;margin-top: 22px;
}.blog {width: 100%;background-color:rgba(255,255,255,0.8);border-radius: 15px;margin-top: 12px;
}.blog .title {font-size: 20px;font-weight: 700;text-align: center;padding-top: 20px;
}
.blog .date {color: rgb(47, 213, 255);padding-bottom: 10px;padding-top: 20px;text-align: center;
}
.blog .desc {text-indent: 2em;line-height: 30px;margin-top: 8px;
}.blog .detail {color: black;text-align: center;display: block;width: 140px;height: 30px;margin: 10px auto 0px auto;border: 2px solid rgb(20, 24, 24);line-height: 22px;text-decoration: none;
}.blog .detail:active {color: blue;
}



页面实现效果

Snipaste_2024-03-11_17-11-39




博客正文页

相关代码

blog_content.html

<!DOCTYPE html>
<html lang="en"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>博客正文页</title><link rel="stylesheet" href="../css/content.css">
</head><body><div class="nav"><img src="../img/logo.png" alt="图片没加载出来"><span>我的博客系统</span><span class="space"></span><div><a href="blog_list.html">主页</a><a href="blog_edit.html">写博客</a><a href="http://www.baidu.com/">注销</a></div></div><div class="container"><div class="container-left"><!-- 个人信息 --><div class="card"><img src="../img/touxiang.jpg" alt="图片没加载出来"><h3>姐姐</h3><a href="https://gitee.com/liao-feiyangsss">github地址</a><div class="counter"><span>文章</span><span>分类</span></div><div class="counter"><span>1</span><span>2</span></div></div></div><div class="container-right"><!-- 博客列表 --><div class="blog"><div class="title">《春天的早晨》</div><div class="date">2024-03-11</div><div class="desc"><p>春天的早晨,是一首充满生机的诗篇。它轻轻地掀开夜幕,洒下一片淡淡的金色,像细沙般温柔地抚摸着沉睡的大地。万物在这温暖的光芒中苏醒,仿佛经过了一个冬天的沉寂,都迫不及待地想要展现出自己最美的姿态。</p><P>柳树披上了嫩绿的新装,柔软的枝条在微风中摇曳,好似少女的长发,飘逸而动人。河水也被这春色感染,变得碧波荡漾,宛如一面镜子,映照着蓝天白云和岸边的繁花。空气中弥漫着淡淡的花香,那是桃花、杏花和樱花争相绽放的香气,它们交织在一起,形成了一种独特的春天的味道。这种味道让人心旷神怡,仿佛置身于一个梦幻般的仙境。远处的小鸟开始欢快地歌唱,它们的歌声清脆悦耳,仿佛在庆祝春天的到来。小路上,早起的行人踏着轻快的步伐,脸上洋溢着笑容,他们也被这美好的春色所感染,心中充满了希望和期待。</P><p>春天的早晨,是一首充满希望和生机的诗篇。它让人感受到大自然的神奇和美丽,也让人对未来充满了无限的憧憬和期待。在这美好的时刻,我们仿佛可以感受到整个世界都在为我们而歌唱,为我们而绽放。</p></div></div>
</body>
</html>

content.css

* {margin: 0px;padding: 0px;box-sizing: border-box;
}
html,body {height: 100%;width: 100%;background-image: url(../img/background.jpg);background-repeat: no-repeat;background-size: cover;
}
.nav {width: 100%;height: 60px;background-color:  gray;display: flex;justify-content: left;align-items: center;color: white;
}
.nav img {width: 50px;height: 50px;border-radius: 50%;/* margin-top: 4px; */margin-left: 4px;margin-right: 8px;
}.nav .space {width: 75%;
}.nav a {color: white;text-decoration: none;/* margin-left: 10px; */margin-right: 15px;
}
.nav div {display: flex;justify-content: right;align-items: center;width: 15%;
}
.container {display: flex;justify-content: space-between;align-items: center;margin: 0 auto;height: calc(100% - 50px);width: 100%;
}.container .container-left {height: 100%;width: 30%;background-color: rgba(255,255,255,0.8);
}.container .container-right {height: 100%;width: 70%;background-color: rgba(255,255,255,0.8);overflow: auto;
}
.card {margin-top: 10px;width: 60%;height: 44%;background-color: rgba(255,255,255,0.8);margin-left: 200px;margin-right: 10px;border-radius: 15px;
}
.card img {width: 120px;height: 120px;border-radius: 50%;margin-left: 90px;margin-top: 35px;
}
.card h3 {text-align: center;margin-top: 8px;margin-bottom: 8px;
}
.card a {display: block;text-align: center;color: grey;text-decoration: none;margin-bottom: 20px;
}
.card .counter {display: flex;justify-content: space-around;margin-top: 22px;
}.blog {width: 100%;background-color:rgba(255,255,255,0.8);border-radius: 15px;margin-top: 12px;height: calc(100% - 30px);overflow: auto;
}.blog .title {font-size: 20px;font-weight: 700;text-align: center;padding-top: 20px;
}
.blog .date {color: rgb(47, 213, 255);padding-bottom: 10px;padding-top: 20px;text-align: center;
}
.blog .desc {text-indent: 2em;line-height: 30px;margin-top: 8px;
}.blog .detail {color: black;text-align: center;display: block;width: 140px;height: 30px;margin: 10px auto 0px auto;border: 2px solid rgb(20, 24, 24);line-height: 22px;text-decoration: none;
}




页面实现效果

Snipaste_2024-03-11_17-11-24




博客编辑页

相关代码

blog_edit.html

<!DOCTYPE html>
<html lang="en">
<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>博客编辑页</title><link rel="stylesheet" href="../css/commom.css"><link rel="stylesheet" href="../css/edit.css"><link rel="stylesheet" href="editor.md/css/editormd.min.css"/>
</head>
<body><div class="nav"><img src="../img/logo.png" alt="图片没加载出来"><span>我的博客系统</span><span class="space"></span><div><a href="blog_list.html">主页</a><a href="blog_edit.html">写博客</a><a href="http://www.baidu.com/">注销</a></div></div><div class="edit_blog_container"><div class="title"><input type="text"><button>发布文章</button></div><div id="editor"></div></div>
</body><!-- 引入 editor.md 的依赖 --><script src="js/jquery.min.js"></script><script src="editor.md/lib/marked.min.js"></script><script src="editor.md/lib/prettify.min.js"></script><script src="editor.md/editormd.js"></script><script>let edit = editormd('editor', {width:"100%",height:"100%",markdown:"###开始编写博客",path:"./editor.md/lib/"}) </script>
</html>

edit.css

.edit_blog_container {height: calc(100% - 50px);width: 100%;
}
input {width: 1000px;height: 60px;margin-top: 5px;border-radius: 8px;border: none;
}
button {width: 200px;height: 60px;margin-top: 5px;margin-left: 5px;border-radius: 8px;background-color: #afefd6;border: none;color: white;font-size: 20px;margin-top: 5px;
}button:active {background-color: gray;
}
.title {display: flex;justify-content: center;align-items: center;
}
#editor {margin-top: 5px;
}




页面实现效果

Snipaste_2024-03-11_17-11-09

相关文章:

  • 鸿蒙实战开发:【分布式软总线组件】
  • 电源ATE自动测试系统为您提供一站式自动化测试解决方案
  • 有趣之matlab-烟花
  • Element-Plus: Select组件实现滚动分页加载
  • Python笔记|字符串的转义
  • 09-设计模式 企业场景 面试题
  • PTA L1-079 天梯赛的善良(C++)
  • MySQL一些命令记录
  • R在直方图上添加一个更平滑的密度曲线
  • PCM和I2S区别
  • 实现真正的高性能高并发的上亿级别秒杀系统!!!
  • 姿态旋转的哥氏定理以及速度微分的推导
  • 蓝桥杯---棋盘(典型的二维差分问题)
  • 利用 Python 处理遥感影像数据:计算年度平均影像
  • Word中解决插入脚注导致的分页位置错误问题
  • 深入了解以太坊
  • “Material Design”设计规范在 ComponentOne For WinForm 的全新尝试!
  • 【从零开始安装kubernetes-1.7.3】2.flannel、docker以及Harbor的配置以及作用
  • CSS进阶篇--用CSS开启硬件加速来提高网站性能
  • JavaScript 是如何工作的:WebRTC 和对等网络的机制!
  • JavaScript设计模式与开发实践系列之策略模式
  • js学习笔记
  • SOFAMosn配置模型
  • vue从创建到完整的饿了么(18)购物车详细信息的展示与删除
  • vue和cordova项目整合打包,并实现vue调用android的相机的demo
  • 从输入URL到页面加载发生了什么
  • 订阅Forge Viewer所有的事件
  • 构建二叉树进行数值数组的去重及优化
  • 技术发展面试
  • 译自由幺半群
  • ​力扣解法汇总1802. 有界数组中指定下标处的最大值
  • ​直流电和交流电有什么区别为什么这个时候又要变成直流电呢?交流转换到直流(整流器)直流变交流(逆变器)​
  • # 20155222 2016-2017-2 《Java程序设计》第5周学习总结
  • # Java NIO(一)FileChannel
  • #基础#使用Jupyter进行Notebook的转换 .ipynb文件导出为.md文件
  • (+4)2.2UML建模图
  • (Redis使用系列) Springboot 实现Redis消息的订阅与分布 四
  • (ZT) 理解系统底层的概念是多么重要(by趋势科技邹飞)
  • (附源码)springboot教学评价 毕业设计 641310
  • (附源码)ssm高校升本考试管理系统 毕业设计 201631
  • (生成器)yield与(迭代器)generator
  • (四)汇编语言——简单程序
  • (算法)Travel Information Center
  • (一)pytest自动化测试框架之生成测试报告(mac系统)
  • (转)shell调试方法
  • .NET 4.0中的泛型协变和反变
  • .net core 微服务_.NET Core 3.0中用 Code-First 方式创建 gRPC 服务与客户端
  • .NET 使用 ILMerge 合并多个程序集,避免引入额外的依赖
  • [ C++ ] 继承
  • []我的函数库
  • [Android]一个简单使用Handler做Timer的例子
  • [BUAA软工]第一次博客作业---阅读《构建之法》
  • [ISCTF 2023]——Web、Misc较全详细Writeup、Re、Crypto部分Writeup
  • [Lucas定理]【学习笔记】
  • [MYSQL]mysql常用操作命令