Skip to content

Commit

Permalink
fix #47
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Apr 26, 2021
1 parent d4ea35a commit 8c841d1
Show file tree
Hide file tree
Showing 5 changed files with 135 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
node_modules
oscnews*
oscnews*/
build*
dist*

Expand Down
2 changes: 1 addition & 1 deletion src/Route.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

import Blank from './pages/Blank';
import Github from './pages/Github';
// import Github from './pages/Github';
import Historys from './pages/History';
import Documents from './pages/Document';
import Navigation from './pages/Navigation';
Expand Down
131 changes: 131 additions & 0 deletions src/component/OSCNews.module.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
.warpper {
height: 100%;
overflow: auto;
:global {
.active {
font-weight: bold;
color: #0e693c;
}
}
.tabs {
flex-direction: row;
display: flex;
padding: 0 10px;
border-bottom: 1px solid #f1f1f1;
div {
padding: 10px 5px;
cursor: pointer;
&:hover {
color: #0e693c;
}
}
}
}

.newList {
font-size: 14px;
padding: 10px 10px 15px;
:global {
.item {
padding: 8px 5px;
border-bottom: 1px dashed #ececec;
background-color: #fff;
transition: all .3s;
&:hover {
background: #f7f7f7;
.summary:after {
background: linear-gradient(to right, rgba(255, 255, 255, 0), #f7f7f7 96%);
}
}
.title {
font-size: 14px;
line-height: 18px;
text-decoration: none;
font-weight: bold;
color: #333;
display: block;
transition: color .3s;
&:hover {
color: #0e693c;
}
.text-ellipsis {
display: block;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
position: relative;
}
}
.summary {
font-size: 12px;
max-height: 3em;
margin: 8px 0;
color: #a0a0a0;
position: relative;
overflow: hidden;
&:after {
position: absolute;
bottom: 0;
content: '';
right: 0;
display: block;
width: 160px;
height: 20px;
background: linear-gradient(to right, rgba(255, 255, 255, 0), #fff 96%);
}
}
.thumb {
max-width: 150px;
margin-top: -38px;
margin-left: 11px;
position: relative;
z-index: 9;
float: right;
img {
max-height: 40px;
overflow: hidden;
}
}
.from {
a, img, span, svg:not([class~=hide]) {
display: inline-block;
vertical-align: middle;
}
svg {
width: 14px !important;
height: 12px !important;
vertical-align: middle;
path {
fill: #868686;
}
}
.avatar {
overflow: hidden;
display: block;
width: 14px;
min-width: 14px;
max-width: 14px;
height: 14px;
border-radius: 12px;
}
.mr {
margin-right: 15px;
font-size: .75rem;
color: #9d9d9d;
font-weight: normal;
vertical-align: middle;
a {
vertical-align: initial;
color: #a0a0a0;
&:hover {
color: #0e693c;
}
}
}
a {
text-decoration: none;
}
}
}
}
}
3 changes: 1 addition & 2 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import 'babel-polyfill';
import React from 'react';
import ReactDOM from 'react-dom';
import Root from './Root';
Expand Down Expand Up @@ -75,7 +74,7 @@ storage.get(['oscconfig', 'visible', 'conf', 'dbs', 'todo'], (items) => {
if (!items.conf.selectSubType) items.conf.selectSubType = ''; // 为空默认数组第一个

items.storage = storage;
if (!/#normal$/.test(location.hash) && items.conf.isNewTab === false) {
if (!/#normal$/.test(window.location.hash) && items.conf.isNewTab === false) {
// eslint-disable-next-line
chrome.tabs.update({ url: 'chrome-search://local-ntp/local-ntp.html' });
} else {
Expand Down
1 change: 1 addition & 0 deletions src/pages/Navigation/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ export default class Navigation extends Component {
);
})}
{navContent.length < 18 && (
// eslint-disable-next-line jsx-a11y/anchor-is-valid
<a className={styles.addIcon} onClick={this.onShowEdit.bind(this)}>
<img alt="" src={addIcon} />
</a>
Expand Down

0 comments on commit 8c841d1

Please sign in to comment.