File tree Expand file tree Collapse file tree 3 files changed +19
-9
lines changed Expand file tree Collapse file tree 3 files changed +19
-9
lines changed Original file line number Diff line number Diff line change 1515 margin : 0 0 20px ;
1616 border-left : 5px solid # eee ;
1717}
18+ .articleViewer a {
19+ color : # 3498db ;
20+ text-decoration : none;
21+ }
22+ .articleViewer a : hover {
23+ color : # 0056b3 ;
24+ text-decoration : none;
25+ }
Original file line number Diff line number Diff line change @@ -23,7 +23,8 @@ const theme: Theme = {
2323
2424export default function App ( ) {
2525 const [ nowFeature , setNowFeature ] = useState < number > ( 0 ) ;
26- const NowFeatureComponent = Features [ nowFeature ] [ 1 ] ;
26+ const NowFeatureComponent =
27+ nowFeature >= 0 ? Features [ nowFeature ] [ 1 ] : React . Fragment ;
2728
2829 const [ myInfo , setMyInfo ] = useState < UserSummary | null > ( null ) ;
2930 const [ fetchError , setFetchError ] = useState < unknown | undefined > ( undefined ) ;
@@ -38,6 +39,9 @@ export default function App() {
3839 } ) ;
3940 return ( ) => void ( ignore = true ) ;
4041 } , [ ] ) ;
42+ useEffect ( ( ) => {
43+ if ( nowFeature < 0 ) setNowFeature ( - nowFeature - 1 ) ;
44+ } ) ;
4145
4246 return (
4347 < FluentProvider theme = { theme } >
@@ -64,7 +68,8 @@ export default function App() {
6468 < div >
6569 { Features . map ( ( s , i ) => (
6670 < button
67- onClick = { ( ) => setNowFeature ( i ) }
71+ type = "button"
72+ onClick = { ( ) => setNowFeature ( - i - 1 ) }
6873 key = { i }
6974 className = "nav-item"
7075 style = { { fontWeight : nowFeature === i ? 'bold' : 'normal' } }
Original file line number Diff line number Diff line change 1- a {
2- color : # 3498db ;
3- text-decoration : none;
4- }
51.root {
62 display : flex;
73 flex-direction : column;
139 overflow : hidden;
1410 tab-size : 4 ;
1511}
16- nav {
12+ . root > nav {
1713 height : 4em ;
1814 align-items : center;
1915 display : flex;
2218 border-bottom : 1px solid # f0f0f0 ;
2319 background-color : white;
2420}
25- .nav-item {
21+ .root > nav . nav-item {
2622 margin-left : 1em ;
2723 margin-right : 1em ;
2824 cursor : pointer;
3228 padding : unset;
3329}
3430.feature {
35- flex : auto ;
31+ flex : 1 ;
3632 overflow : hidden;
3733}
3834a : focus ,
@@ -45,6 +41,7 @@ a:hover {
4541 font-size : 16px ;
4642 font-weight : bold;
4743 text-align : center;
44+ text-decoration : none;
4845}
4946.username-badge {
5047 display : inline-block;
You can’t perform that action at this time.
0 commit comments