diff --git a/src/components/PageLayout/Header/header.module.less b/src/components/PageLayout/Header/header.module.less index 0622a1ba..2465c62f 100644 --- a/src/components/PageLayout/Header/header.module.less +++ b/src/components/PageLayout/Header/header.module.less @@ -74,6 +74,7 @@ margin: 0; display: flex; } + //height: 70px; } .nav{ .flex-center(); @@ -112,7 +113,7 @@ color: #fff; } } - + } /** mobile header code */ .openMenu{ @@ -160,4 +161,20 @@ @media screen and ( max-width:768px ) { display: none; } -} \ No newline at end of file +} + +.topPadding { + height: 1.87rem; + @media screen and (max-width: 768px){ + height: 0; + } + background: @site-background-color; +} + +.bottomPadding { + height: 2.5rem; + @media screen and (max-width: 768px){ + height: 0; + } + background: white; +} diff --git a/src/components/PageLayout/Header/index.jsx b/src/components/PageLayout/Header/index.jsx index be2bffc4..c80b1555 100644 --- a/src/components/PageLayout/Header/index.jsx +++ b/src/components/PageLayout/Header/index.jsx @@ -1,6 +1,8 @@ import React, { useRef, useState } from 'react'; import { Link } from 'gatsby'; -import { Layout } from 'antd'; +import { + Layout, Affix, Col, Row, +} from 'antd'; import { library } from '@fortawesome/fontawesome-svg-core'; import { fas } from '@fortawesome/free-solid-svg-icons'; import { fab } from '@fortawesome/free-brands-svg-icons'; @@ -43,7 +45,7 @@ export default () => { }; return ( - <> +
@@ -51,6 +53,7 @@ export default () => {
MENU
+
    @@ -102,6 +105,14 @@ export default () => {
- +
+ + + +
+ + +
+ ); }; diff --git a/src/components/PageLayout/Sidebar/index.jsx b/src/components/PageLayout/Sidebar/index.jsx index d37d7356..327d6501 100644 --- a/src/components/PageLayout/Sidebar/index.jsx +++ b/src/components/PageLayout/Sidebar/index.jsx @@ -88,7 +88,7 @@ const Sidebar = (props) => { let domContent = ; if (width > 997) { domContent = ( - + ); diff --git a/src/components/PageLayout/Sidebar/sidebar.module.less b/src/components/PageLayout/Sidebar/sidebar.module.less index d09a793f..9ba15332 100644 --- a/src/components/PageLayout/Sidebar/sidebar.module.less +++ b/src/components/PageLayout/Sidebar/sidebar.module.less @@ -2,7 +2,8 @@ .content{ border-radius: @border-radius-content; margin: 0px; - min-height: 280px + min-height: 280px; + //border-top-left-radius: 0; } .sidebarContent{ @@ -115,6 +116,7 @@ .boxContent{ padding: @padding-margin-val; padding-left: 0; + padding-top: 0; @media screen and (max-width: 767px){ padding: @padding-margin-val; padding-top: 0; diff --git a/src/components/Panel/index.jsx b/src/components/Panel/index.jsx index 2f681441..3b9cde57 100644 --- a/src/components/Panel/index.jsx +++ b/src/components/Panel/index.jsx @@ -64,7 +64,7 @@ const Panel = (props) => { } return ( - <> +
Filters @@ -104,7 +104,7 @@ const Panel = (props) => { }) } - +
); }; diff --git a/src/pages/posts/index.jsx b/src/pages/posts/index.jsx index 637bda97..9b603786 100644 --- a/src/pages/posts/index.jsx +++ b/src/pages/posts/index.jsx @@ -1,7 +1,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import { graphql } from 'gatsby'; -import { Layout } from 'antd'; +import { Affix, Layout } from 'antd'; import Header from '../../components/PageLayout/Header'; import SidebarWrapper from '../../components/PageLayout/Sidebar'; @@ -20,9 +20,9 @@ const Posts = ({ data }) => ( path="posts" /> -
+

Posts

-
+
diff --git a/src/styles/global.less b/src/styles/global.less index 2e70ee33..27790cd2 100644 --- a/src/styles/global.less +++ b/src/styles/global.less @@ -1,7 +1,8 @@ @import (reference) './mixins.less'; +@import (reference) './theme.less'; body{ font-size: 16px; - background: #f0f2f5; + background: @site-background-color; overflow-y: scroll; } h1, h2, h3, h4, h5, h6 { @@ -103,6 +104,7 @@ ul{ .outerPadding { padding: 1.87rem; + padding-top: 0; @media screen and (max-width: 768px){ padding: 0.6rem; } @@ -146,4 +148,8 @@ ul{ font-size: 12px; } - +.fix-title { + background-color: white; + //padding-top: 2.5em; + //margin-bottom: 2.5rem; +} diff --git a/src/styles/theme.less b/src/styles/theme.less index 85edb85d..0fbace1d 100644 --- a/src/styles/theme.less +++ b/src/styles/theme.less @@ -12,3 +12,4 @@ @site-border-color-split: @border-color-split; @site-header-box-shadow: 0 2px 8px rgba(240, 241, 242, 65); @site-markdown-code-bg: #f2f4f5; +@site-background-color: #f0f2f5; diff --git a/src/templates/post/post.jsx b/src/templates/post/post.jsx index 251afd92..50ecf5e9 100644 --- a/src/templates/post/post.jsx +++ b/src/templates/post/post.jsx @@ -1,6 +1,6 @@ import React, { useState } from 'react'; import { - Layout, Empty, Row, Col, Input, Alert, + Layout, Empty, Row, Col, Input, Alert, Affix, } from 'antd'; import { graphql } from 'gatsby'; import Img from 'gatsby-image'; @@ -87,7 +87,7 @@ const Post = ({ data }) => { />
-
+

{title}

@@ -99,6 +99,8 @@ const Post = ({ data }) => { {title}
) : null } + +
{ state.locked ? (