diff --git a/dist/SourceHanSansSC-Regular.otf b/dist/SourceHanSansSC-Regular.otf deleted file mode 100644 index 88e3a35..0000000 Binary files a/dist/SourceHanSansSC-Regular.otf and /dev/null differ diff --git a/dist/styles.css b/dist/styles.css index 7fa1467..fafe682 100644 --- a/dist/styles.css +++ b/dist/styles.css @@ -1,11 +1,6 @@ -@font-face { - font-family: "Source Han Sans"; - src: url("SourceHanSansSC-Regular.otf"); - } - html, body { background-color: #faf9f8; - font-family: "Source Han Sans", sans-serif; + font-family: "Source Han Sans SC Regular", "Microsoft YaHei", sans-serif; height: 100%; overflow: hidden; margin: 0; @@ -101,12 +96,15 @@ i.ms-Nav-chevron { position: relative; z-index: 10; } -nav.hide-btns .btn-group .btn { +nav.menu-on .btn-group .btn, nav.hide-btns .btn-group .btn { display: none; } -nav.hide-btns .btn-group .btn.system { +nav.menu-on .btn-group .btn.system, nav.hide-btns .btn-group .btn.system { display: inline-block; } +.btn-group .btn.system.menu-on { + color: #fff; +} .btn-group .btn:hover { background-color: #0001; } @@ -132,8 +130,8 @@ nav.hide-btns .btn-group .btn.system { background-color: #f1707a; color: #fff; } -.btn-group .btn.system.on { - color: #fff; +.btn-group .btn.inline-block-wide { + display: none; } .menu-container { @@ -242,6 +240,34 @@ img.favicon { z-index: 1; } +@media (min-width: 1721px) { + #root > nav.menu-on { + padding-left: 296px; + } + nav.menu-on .btn-group .btn { + display: inline-block; + } + .btn-group .btn.system.menu-on { + color: #000; + } + .menu-container { + width: 280px; + } + .menu-container .menu { + background-color: #edebe9; + } + .main.menu-on { + padding-left: 280px; + } + + nav.menu-on .btn-group .btn.hide-wide, .menu .btn-group .btn.hide-wide { + display: none; + } + .btn-group .btn.inline-block-wide { + display: inline-block; + } +} + .cards-feed-container { display: inline-flex; flex-wrap: wrap; diff --git a/src/components/menu.tsx b/src/components/menu.tsx index 0377a4a..8de8028 100644 --- a/src/components/menu.tsx +++ b/src/components/menu.tsx @@ -1,18 +1,17 @@ import * as React from "react" import { Icon } from "@fluentui/react/lib/Icon" import { Nav, INavLink, INavLinkGroup } from "office-ui-fabric-react/lib/Nav" -import { MenuStatus } from "../scripts/models/app" import { SourceGroup } from "../scripts/models/page" import { SourceState, RSSSource } from "../scripts/models/source" import { ALL } from "../scripts/models/feed" import { AnimationClassNames } from "@fluentui/react" export type MenuProps = { - status: MenuStatus, + status: boolean, selected: string, sources: SourceState, groups: SourceGroup[], - closeMenu: () => void, + toggleMenu: () => void, allArticles: () => void, selectSourceGroup: (group: SourceGroup, menuKey: string) => void, selectSource: (source: RSSSource) => void @@ -74,11 +73,12 @@ export class Menu extends React.Component { }) render() { - return this.props.status == MenuStatus.Hidden ? null : ( -
+ return this.props.status ? ( +
e.stopPropagation()}>
- + +
- ) + ) : null } } \ No newline at end of file diff --git a/src/components/nav.tsx b/src/components/nav.tsx index 21515bc..ccd7666 100644 --- a/src/components/nav.tsx +++ b/src/components/nav.tsx @@ -1,7 +1,7 @@ import * as React from "react" import { ipcRenderer, remote } from "electron" import { Icon } from "@fluentui/react/lib/Icon" -import { AppState, MenuStatus } from "../scripts/models/app" +import { AppState } from "../scripts/models/app" type NavProps = { state: AppState, @@ -49,8 +49,8 @@ class Nav extends React.Component { canFetch = () => this.props.state.sourceInit && this.props.state.feedInit && !this.props.state.fetchingItems fetching = () => !this.canFetch() ? " fetching" : "" - menuOn = () => this.props.state.menu == MenuStatus.Open ? " on" : "" - hideButtons = () => (this.props.state.menu == MenuStatus.Open || this.props.state.settings.display) ? "hide-btns" : "" + menuOn = () => this.props.state.menu ? " menu-on" : "" + hideButtons = () => this.props.state.settings.display ? "hide-btns" : "" fetch = () => { if (this.canFetch()) this.props.fetch() @@ -58,9 +58,9 @@ class Nav extends React.Component { render() { return ( -