This repository was archived by the owner on May 11, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 6 files changed +93
-3
lines changed
Expand file tree Collapse file tree 6 files changed +93
-3
lines changed Original file line number Diff line number Diff line change 66
77.Editor {
88 width : 100vw ;
9- height : calc (100vh - 64px );
9+ height : calc (100vh - 64px - 30 px );
1010 overflow : auto;
1111}
1212
4343.ConfigBar .ConfigBarWidgetLabel {
4444 padding-right : 10px ;
4545 color : # 777 ;
46+ }
47+
48+ .Footer {
49+ height : 30px ;
50+ line-height : 30px ;
51+ padding : 0 10px ;
52+ background : # fff ;
53+ font-size : 13px ;
54+ border-top : 1px solid # e8e8e8 ;
55+ }
56+
57+ .GitHubIcon {
58+ color : # ccc ;
59+ font-size : 20px ;
60+ }
61+
62+ .GitHubIcon : hover {
63+ color : # 333 ;
64+ }
65+
66+ .LemonUnitIcon {
67+ position : relative;
68+ }
69+
70+ .LemonUnitIcon img {
71+ top : -1px ;
72+ position : relative;
73+ height : 24px ;
74+ opacity : 0.4 ;
75+ transition : opacity 0.4s ease-out;
76+ }
77+
78+ .LemonUnitIcon : hover img {
79+ opacity : 1 ;
4680}
Original file line number Diff line number Diff line change 11import React , { Component } from "react" ;
22
33import { Navigation } from "./components/Navigation" ;
4+ import { Footer } from "./components/Footer" ;
5+
46import { SourceItems } from "./editors/types" ;
57import { CSVEditor } from "./editors/CSVEditor" ;
68import { JSONEditor } from "./editors/JSONEditor" ;
@@ -55,6 +57,7 @@ export class App extends Component<AppProps, AppState> {
5557 source = { this . state . source }
5658 />
5759 </ main >
60+ < Footer />
5861 </ div >
5962 )
6063 }
Original file line number Diff line number Diff line change 1+ import React , { Component } from "react" ;
2+ import { Icon , Row , Col } from "antd" ;
3+
4+ interface Props { }
5+ interface State { }
6+
7+ export const FOOTER_HEIGHT = 30 ;
8+
9+ export class Footer extends Component < Props , State > {
10+ renderGithubLink = ( ) => {
11+ return (
12+ < a
13+ href = "https://github.com/LemonUnit/csv-editor-online"
14+ target = "_blank"
15+ className = "GitHubIcon"
16+ title = "Go to CSV Editor Online page on GitHub"
17+ >
18+ < Icon type = "github" />
19+ </ a >
20+
21+ ) ;
22+ }
23+
24+ renderLemonUnitLink = ( ) => {
25+ return (
26+ < a
27+ href = "https://lemonunit.com/"
28+ target = "_blank"
29+ className = "LemonUnitIcon"
30+ title = "Go to LemonUnit home page"
31+ >
32+ < img src = "lemonunit-logo.png" alt = "LemonUnit logo" />
33+ </ a >
34+ ) ;
35+ }
36+
37+ render ( ) {
38+ return (
39+ < footer className = "Footer" >
40+ < Row >
41+ < Col span = { 12 } >
42+ { this . renderLemonUnitLink ( ) }
43+ </ Col >
44+ < Col span = { 12 } style = { { textAlign : 'right' } } >
45+ { this . renderGithubLink ( ) }
46+ </ Col >
47+ </ Row >
48+ </ footer >
49+ )
50+ }
51+ }
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ import "brace/mode/json";
1111
1212import { EditorProps } from "./types" ;
1313import { NAVIGATION_HEIGHT , CONFIG_BAR_HEIGHT } from "../components/Navigation" ;
14+ import { FOOTER_HEIGHT } from "../components/Footer" ;
1415
1516enum CSVDelimiter {
1617 SEMICOLON = ";" ,
@@ -54,7 +55,7 @@ export class CSVEditor extends Component<Props, State> {
5455 }
5556
5657 updateEditorHeight = ( ) => this . setState ( {
57- editorHeight : window . innerHeight - NAVIGATION_HEIGHT - CONFIG_BAR_HEIGHT
58+ editorHeight : window . innerHeight - NAVIGATION_HEIGHT - FOOTER_HEIGHT - CONFIG_BAR_HEIGHT
5859 } )
5960
6061 parseSourceItemsToCsv = ( ) => this . setState ( {
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ import "brace/mode/json";
77
88import { EditorProps } from "./types" ;
99import { NAVIGATION_HEIGHT } from "../components/Navigation" ;
10+ import { FOOTER_HEIGHT } from "../components/Footer" ;
1011
1112interface Props extends EditorProps { }
1213
@@ -37,7 +38,7 @@ export class JSONEditor extends Component<Props, State> {
3738 }
3839
3940 updateEditorHeight = ( ) => this . setState ( {
40- editorHeight : window . innerHeight - NAVIGATION_HEIGHT
41+ editorHeight : window . innerHeight - FOOTER_HEIGHT - NAVIGATION_HEIGHT
4142 } )
4243
4344 parseSourceItemsToJson = ( ) => this . setState ( {
You can’t perform that action at this time.
0 commit comments