From 566e0772857c615e3ef493679ee67b00e824133e Mon Sep 17 00:00:00 2001 From: 1549469775 <1549469775@qq.com> Date: Sat, 25 Sep 2021 11:59:56 +0800 Subject: [PATCH] add --- src/common/__less/row.less | 47 +++++++++++++++++++++++++++++++++++++++++++ src/css/index/index.less | 4 ++++ src/html/__include/header.pug | 2 +- src/html/index.pug | 5 ++++- 4 files changed, 56 insertions(+), 2 deletions(-) create mode 100644 src/common/__less/row.less diff --git a/src/common/__less/row.less b/src/common/__less/row.less new file mode 100644 index 0000000..839a6e4 --- /dev/null +++ b/src/common/__less/row.less @@ -0,0 +1,47 @@ +@totalCell: 24; +.col-width(@col: 1, @total: @totalCell){ + percentage($col/$total) +} +.row { + @include clearfix; + @include media(xs) { + @for $i from 1 through $totalCell { + .col-xs-#{$i} { + float: left; + } + .col-xs-#{$i} { + width: col-width($i); + } + } + } + @include media(sm) { + @for $i from 1 through $totalCell { + .col-sm-#{$i} { + float: left; + } + .col-sm-#{$i} { + width: col-width($i); + } + } + } + @include media(md) { + @for $i from 1 through $totalCell { + .col-md-#{$i} { + float: left; + } + .col-md-#{$i} { + width: col-width($i); + } + } + } + @include media(lg) { + @for $i from 1 through $totalCell { + .col-lg-#{$i} { + float: left; + } + .col-lg-#{$i} { + width: col-width($i); + } + } + } +} \ No newline at end of file diff --git a/src/css/index/index.less b/src/css/index/index.less index ef0088f..ec44611 100644 --- a/src/css/index/index.less +++ b/src/css/index/index.less @@ -52,4 +52,8 @@ .motto{ text-align: center; font-size: 20px; +} + +.panel{ + } \ No newline at end of file diff --git a/src/html/__include/header.pug b/src/html/__include/header.pug index af2b9ae..b79d855 100644 --- a/src/html/__include/header.pug +++ b/src/html/__include/header.pug @@ -1,7 +1,7 @@ - var menulist = [ {text: "首页", path: "#"}, - {text: "归档", path: "#"}, + {text: "Demo", path: "/demo"}, {text: "关于", path: "/about"}, ]; var oplist = [ diff --git a/src/html/index.pug b/src/html/index.pug index 8b09f55..be727a0 100644 --- a/src/html/index.pug +++ b/src/html/index.pug @@ -2,6 +2,7 @@ extends __layout/layout.pug block title + //-标题 - var title = "今生今世" block content @@ -9,4 +10,6 @@ block content include __include/header include __include/person .line - .motto 衣带渐宽终不悔 \ No newline at end of file + .motto 衣带渐宽终不悔 + .row + .column-3.panel adsdaad \ No newline at end of file