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) -}; -