Explorar el Código

自适应手机

master
nelson hace 3 años
padre
commit
31b51ea2dd
  1. 57
      static/css/common.css
  2. 4
      static/css/common.min.css
  3. 17
      views/T.footer.tpl
  4. 2
      views/T.header.tpl
  5. 8
      views/T.nav.tpl
  6. 20
      views/blog.html
  7. 20
      views/blogs.html
  8. 8
      views/index.html

57
static/css/common.css

@ -146,6 +146,7 @@ a{
}
.blog-root a{
color: #28a3ef !important;
text-decoration: none;
}
.blog-root .blog-title{
display: block;
@ -322,12 +323,16 @@ img {
line-height: 1.5;
}
.blog-root a {
text-decoration: none;
}
.blog-root p {
margin: 1px 0 9px;
font-size: 17px;
line-height: 28px;
color: #555;
}
.index-root p{
font-size: 15px !important;
line-height: 18px !important;
}
.login-root {
@ -634,4 +639,48 @@ img {
width: 100px;
height: 30px;
line-height: 30px;
}
.home-container-list{
display: flex;
flex-wrap: wrap;
}
@media screen and (max-width: 1000px) {
.comms-left-root{
display: none;
}
.blog-root{
width: 80%;
}
}
@media screen and (max-width: 678px) {
.comms-left-root{
display: none;
}
.blog-root{
width: 98%;
}
.auto-item{
display: none !important;
}
.home-container-list-item{
min-width: 260px;
}
.friend-link{
display: none;
}
.footer-friend{
text-align: center;
height: 50px;
line-height: 25px;
}
.copyright{
display: block;
}
.auto-screen{
width: 98%;
}
}

4
static/css/common.min.css

Las diferiencias del archivo han sido suprimidas porque una o mas lineas son muy largas

17
views/T.footer.tpl

@ -3,23 +3,28 @@
<div style="flex: 1">
<div class="footer-friend">
<a href="https://gitea.aiprose.com/nelson" target="_blank" style="padding: 0 5px">码农笔录Git仓库</a>
{{/* <a href="http://pan.aiprose.com/" target="_blank" style="padding: 0 5px"></a>*/}}
<a href="http://pan.aiprose.com/" target="_blank" style="padding: 0 5px">码农笔录私有云</a>
<a href="http://maven.aiprose.com/nexus" target="_blank" style="padding: 0 5px">maven私服</a>
<a href="https://blog.csdn.net/yp090416" target="_blank" style="padding: 0 5px">码农笔录-CSDN</a>
<a href="https://www.jianshu.com/u/6baf4cdc7ce1" target="_blank" style="padding: 0 5px">码农笔录-简书</a>
</div>
<div class="footer-friend">
<span>© 2018 - © 2021
<a href="https://www.aiprose.com/">码农随笔</a> </span>
<span>版权所有&nbsp;&nbsp;&nbsp; ICP证:</span>
<a href="https://beian.miit.gov.cn/" target="_blank">陕ICP备18016846号-1</a>
<span class="copyright">
<span>© 2018 - 2021 <a href="https://www.aiprose.com/">码农随笔</a> </span>
<span>版权所有&nbsp;&nbsp;&nbsp; </span>
</span>
<span>
ICP证: <a href="https://beian.miit.gov.cn/" target="_blank">陕ICP备18016846号-1</a>
</span>
</div>
<div class="footer-friend">
<div class="footer-friend friend-link">
<span>前端QQ群: 128806068</span>
<span>/</span>
<span>golang QQ群: 189663710</span>
</div>
<div class="friend-link">
<script type="text/javascript">var cnzz_protocol = (("https:" == document.location.protocol) ? "https://" : "http://");document.write(unescape("%3Cspan id='cnzz_stat_icon_1277992374'%3E%3C/span%3E%3Cscript src='" + cnzz_protocol + "s4.cnzz.com/z_stat.php%3Fid%3D1277992374%26online%3D1%26show%3Dline' type='text/javascript'%3E%3C/script%3E"));</script>
</div>
</div>
<div class="wxcode">
<img src="/static/img/wxcode.png" alt="" width="80" height="80">

2
views/T.header.tpl

@ -8,7 +8,7 @@
{{else}}
<meta name="description" content="码农随笔,个人随笔是一个面向IT技术人员,提供个人平时工作总结和在线记录学习笔记,个人技术博客,在线云笔记,码农笔录,最新的技术博客,www.aiprose.com">
{{end}}
<link type="text/css" rel="styleSheet" href="/static/css/common.css"/>
<link type="text/css" rel="styleSheet" href="/static/css/common.min.css"/>
<script type="text/javascript" src="/static/js/vue.min.js"></script>
<link rel="stylesheet" href="/static/layui/css/layui.css">
<script type="text/javascript" src="/static/layui/layui.js"></script>

8
views/T.nav.tpl

@ -6,7 +6,7 @@
<li class="layui-nav-item">
<a href="/search"><i class="layui-icon">&#xe615;</i><span style="padding-left:8px">搜索</span></a>
</li>
<li class="layui-nav-item">
<li class="layui-nav-item auto-item">
<a href="/blog/new"><i class="layui-icon">&#xe642;</i>写文章</a>
</li>
<li class="layui-nav-item">
@ -15,11 +15,11 @@
<li class="layui-nav-item">
<a href="https://note.aiprose.com" target="_blank">免费笔记</a>
</li>
<li class="layui-nav-item">
<li class="layui-nav-item auto-item">
<a href="/me/info">个人中心</span></a>
</li>
{{if .IsLogin }}
<li class="layui-nav-item">
<li class="layui-nav-item auto-item">
<a href=""><img src="{{.HeadImg}}" class="layui-nav-img"></a>
<dl class="layui-nav-child layui-anim layui-anim-upbit">
<dd><a href="/me/info">个人中心</a></dd>
@ -28,7 +28,7 @@
</dl>
</li>
{{else}}
<li class="layui-nav-item">
<li class="layui-nav-item auto-item">
<a href="/login">登录 <span class="layui-badge-dot"></span></a>
</li>
{{end}}

20
views/blog.html

@ -42,16 +42,16 @@
<div id="vcomments" style="margin-top: 20px"></div>
</div>
</div>
<div class="comms-right-root">
<div class="_tjgyl4x3spj"></div>
<script type="text/javascript">
(window.slotbydup = window.slotbydup || []).push({
id: "u6636367",
container: "_tjgyl4x3spj",
async: true
});
</script>
</div>
<!-- <div class="comms-right-root">-->
<!-- <div class="_tjgyl4x3spj"></div>-->
<!-- <script type="text/javascript">-->
<!-- (window.slotbydup = window.slotbydup || []).push({-->
<!-- id: "u6636367",-->
<!-- container: "_tjgyl4x3spj",-->
<!-- async: true-->
<!-- });-->
<!-- </script>-->
<!-- </div>-->
<div class="comms-left-root">
<div class="_8g649xzayfg"></div>
<script type="text/javascript">

20
views/blogs.html

@ -8,20 +8,12 @@
<div class="home-container">
<div class="home-hearder">
<div style="flex: 1">
<span>
<el-select v-model="cateId" placeholder="请选择文章分类" @change="catChange" clearable>
<el-option v-for="item in cats" :key="item.Id" :label="item.Title" :value="item.Id"/>
</el-select>
</span>
<!-- <div class="layui-btn-group" style="display: inline-block;margin-top: -5px">-->
<!-- <button class="layui-btn layui-btn-sm {{if eq 0 .Flag}}active{{end}}"><a-->
<!-- href="/blogs?num=1&flag=0&cat={{.Cat}}">最新</a></button>-->
<!-- <button class="layui-btn layui-btn-sm {{if eq 1 .Flag}}active{{end}}"><a-->
<!-- href="/blogs?num=1&flag=1&cat={{.Cat}}">最热</a></button>-->
<!-- </div>-->
<el-select v-model="cateId" placeholder="请选择文章分类" @change="catChange" clearable class="auto-screen">
<el-option v-for="item in cats" :key="item.Id" :label="item.Title" :value="item.Id"/>
</el-select>
</div>
<button type="button" onclick="window.open('/blog/new')"
class="layui-btn layui-btn-radius layui-btn-danger layui-btn-sm " style="border-radius: 12px">
class="layui-btn layui-btn-radius layui-btn-danger layui-btn-sm auto-item" style="border-radius: 12px">
写文章
</button>
</div>
@ -30,7 +22,7 @@
<div class="home-content-title cursor" style="font-size: 14px">
文章标题
</div>
<div style="display: inline-block;width: 300px">
<div style="display: inline-block;width: 300px" class="auto-item">
<div class="home-content-desc">
<span style="width: 100px;font-size: 14px">类型</span>
<span style="width: 50px"> 用户</span>
@ -47,7 +39,7 @@
<div class="home-content-title cursor">
<a href="/blog/{{.Id}}" target="_blank">{{.Title}}</a>
</div>
<div style="display: inline-block;width: 300px">
<div style="display: inline-block;width: 300px" class="auto-item">
<div class="home-content-desc">
<span style="width: 100px;font-size: 12px">{{.CateName}}</span>
<span style="width: 50px;text-align: center">

8
views/index.html

@ -5,19 +5,19 @@
<body>
<div id="vue-app" style="height: 100%">
{{template "nav" .}}
<div class="blog-root">
<div class="blog-root index-root">
<div class="jumbotron" style="margin-top: 50px;margin-bottom: 10px">
<blockquote class="layui-elem-quote">码农随笔 3.0(golang + vue)版本正式上线</blockquote>
</div>
<div style="display: flex">
<div style="flex: 1">
<div class="home-container-list">
<div style="flex: 1" class="home-container-list-item">
<h5>最新发布</h5>
{{range .TimeBlog}}
<p><a href="/blog/{{.Id}}" target="_blank">{{.Title}}</a></p>
{{end}}
<p><a href="https://www.aiprose.com/blogs">查看更多...</a></p>
</div>
<div style="flex: 1">
<div style="flex: 1" class="home-container-list-item">
<h5>流量王者</h5>
{{range .BrowsBlog}}
<p><a href="/blog/{{.Id}}" target="_blank">{{.Title}}</a></p>

Cargando…
Cancelar
Guardar