From 0c8ac5f2ed2c266999025c53c45cbbf68ca25d9b Mon Sep 17 00:00:00 2001 From: XPoet Date: Fri, 20 Mar 2020 19:57:01 +0800 Subject: [PATCH] =?UTF-8?q?Add:=20=E5=B1=8F=E5=B9=95=E5=AE=BD=E5=BA=A6?= =?UTF-8?q?=E5=B0=8F=E4=BA=8E=20960px=20=E6=97=B6=EF=BC=8C=E9=9A=90?= =?UTF-8?q?=E8=97=8F=E5=B7=A6=E4=BE=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/css/index.styl | 21 ++++++++++++++++----- source/js/main.js | 9 +-------- source/js/utils.js | 4 ---- 3 files changed, 17 insertions(+), 17 deletions(-) delete mode 100644 source/js/utils.js diff --git a/source/css/index.styl b/source/css/index.styl index ed467ae..ca743e0 100644 --- a/source/css/index.styl +++ b/source/css/index.styl @@ -1,5 +1,5 @@ -left-side-width = 30% -right-side-width = 70% +$left-side-width = 30% +$right-side-width = 70% .page-container { position absolute @@ -11,15 +11,26 @@ right-side-width = 70% .page-left { float: left - width: left-side-width + width: $left-side-width height: 100% position: fixed } .page-right { float: right - width: right-side-width + width: $right-side-width height: 100% } -} \ No newline at end of file + @media screen and (max-width: 960px) { + .page-left { + display none + } + + .page-right { + width: 100% + } + } + +} + diff --git a/source/js/main.js b/source/js/main.js index c8a1fa6..f0e253b 100644 --- a/source/js/main.js +++ b/source/js/main.js @@ -1,8 +1 @@ -console.log('this is main.js'); -(() => { - // 选择分页器元素里面的 a 标签,但不包含 .page-number,给指定元素追加类 btn 和 设置属性 role=navigation - document.querySelectorAll('.home-container .paginator a:not(.page-number)').forEach(e => { - e.classList.add('btn'); - e.setAttribute('role', 'navigation'); - }); -})(); \ No newline at end of file +console.log('this is main.js'); \ No newline at end of file diff --git a/source/js/utils.js b/source/js/utils.js deleted file mode 100644 index 9173cc7..0000000 --- a/source/js/utils.js +++ /dev/null @@ -1,4 +0,0 @@ -export const addClass = (element, className) => { - element.classList.add(className) -}; -