diff --git a/src/config.tsx b/src/config.tsx index dcd472e..bf0770c 100644 --- a/src/config.tsx +++ b/src/config.tsx @@ -1,4 +1,4 @@ -import {Checkbox, Form} from 'semantic-ui-react'; +import {Item, Checkbox, Form, Header} from 'semantic-ui-react'; import {FormattedMessage} from 'react-intl'; import {ParsedQuery} from 'query-string'; @@ -44,64 +44,68 @@ export function ConfigPanel(props: { onChange: (config: Config) => void; }) { return ( - <> -
-
-
- -
- - - } - name="checkboxRadioGroup" - value="none" - checked={props.config.color === ChartColors.NO_COLOR} - onClick={() => props.onChange({color: ChartColors.NO_COLOR})} - /> - - - - } - name="checkboxRadioGroup" - value="generation" - checked={props.config.color === ChartColors.COLOR_BY_GENERATION} - onClick={() => - props.onChange({color: ChartColors.COLOR_BY_GENERATION}) - } - /> - - - - } - name="checkboxRadioGroup" - value="gender" - checked={props.config.color === ChartColors.COLOR_BY_SEX} - onClick={() => props.onChange({color: ChartColors.COLOR_BY_SEX})} - /> - -
-
- +
+ + + +
+ +
+ + + } + name="checkboxRadioGroup" + value="none" + checked={props.config.color === ChartColors.NO_COLOR} + onClick={() => props.onChange({color: ChartColors.NO_COLOR})} + /> + + + + } + name="checkboxRadioGroup" + value="generation" + checked={props.config.color === ChartColors.COLOR_BY_GENERATION} + onClick={() => + props.onChange({color: ChartColors.COLOR_BY_GENERATION}) + } + /> + + + + } + name="checkboxRadioGroup" + value="gender" + checked={props.config.color === ChartColors.COLOR_BY_SEX} + onClick={() => + props.onChange({color: ChartColors.COLOR_BY_SEX}) + } + /> + +
+
+
+
); } diff --git a/src/details/details.tsx b/src/details/details.tsx index 79023db..7cae7a6 100644 --- a/src/details/details.tsx +++ b/src/details/details.tsx @@ -4,6 +4,7 @@ import {Events} from './events'; import {GedcomEntry} from 'parse-gedcom'; import {MultilineText} from './multiline-text'; import {TranslatedTag} from './translated-tag'; +import {Header, Item} from 'semantic-ui-react'; const EXCLUDED_TAGS = [ 'BIRT', @@ -36,9 +37,9 @@ function dataDetails(entry: GedcomEntry) { } return ( <> -
+
-
+ @@ -58,7 +59,7 @@ function noteDetails(entry: GedcomEntry) { function nameDetails(entry: GedcomEntry) { return ( -

+
{entry.data .split('/') .filter((name) => !!name) @@ -68,7 +69,7 @@ function nameDetails(entry: GedcomEntry) {
))} -

+ ); } @@ -84,9 +85,9 @@ function getDetails( ) .filter((element) => element !== null) .map((element, index) => ( -
- {element} -
+ + {element} + )); } @@ -106,9 +107,9 @@ function getOtherDetails(entries: GedcomEntry[]) { .map((entry) => dataDetails(entry)) .filter((element) => element !== null) .map((element, index) => ( -
- {element} -
+ + {element} + )); } @@ -124,11 +125,13 @@ export function Details(props: Props) { .filter(hasData); return ( -
- {getDetails(entries, ['NAME'], nameDetails)} - - {getOtherDetails(entriesWithData)} - {getDetails(entriesWithData, ['NOTE'], noteDetails)} +
+ + {getDetails(entries, ['NAME'], nameDetails)} + + {getOtherDetails(entriesWithData)} + {getDetails(entriesWithData, ['NOTE'], noteDetails)} +
); } diff --git a/src/details/events.tsx b/src/details/events.tsx index 2eacac4..904070c 100644 --- a/src/details/events.tsx +++ b/src/details/events.tsx @@ -10,6 +10,7 @@ import {Link, useLocation} from 'react-router-dom'; import {MultilineText} from './multiline-text'; import {pointerToId} from '../util/gedcom_util'; import {TranslatedTag} from './translated-tag'; +import {Header, Item} from 'semantic-ui-react'; function PersonLink(props: {person: GedcomEntry}) { const location = useLocation(); @@ -23,11 +24,11 @@ function PersonLink(props: {person: GedcomEntry}) { search['indi'] = pointerToId(props.person.pointer); return ( -
+ {name} -
+ ); } @@ -62,14 +63,14 @@ const FAMILY_EVENT_TAGS = ['MARR', 'DIV']; function EventHeader(props: {event: EventData}) { const intl = useIntl(); return ( -
- +
+
- +
{props.event.date ? ( - +
{formatDateOrRange(props.event.date, intl)} - +
) : null}
); @@ -176,18 +177,18 @@ function toFamilyEvents( function Event(props: {event: EventData}) { return ( -
-
+ + - {!!props.event.age &&
{props.event.age}
} + {!!props.event.age && {props.event.age}} {!!props.event.personLink && ( )} {!!props.event.place && ( -
{props.event.place}
+ {props.event.place} )} {!!props.event.notes.length && ( -
+ {props.event.notes.map((note, index) => (
))} -
+ )} -
-
+ + ); } @@ -216,11 +217,11 @@ export function Events(props: Props) { ); if (events.length) { return ( -
+ <> {events.map((event, index) => ( ))} -
+ ); } return null; diff --git a/src/index.css b/src/index.css index b60bc26..2fd0ab0 100644 --- a/src/index.css +++ b/src/index.css @@ -143,9 +143,25 @@ div.zoom { margin-top: 0px; } -.ui.segments.details { - margin: 0px !important; - border: 0px !important; +.details { + padding: 15px 0px; + border-bottom: 1px solid rgba(34,36,38,.15); +} + +.details .ui.items .item .content { + padding: 0 15px; +} + +.details .event-header { + justify-content: space-between; + display: flex; + word-break: break-word; +} + +.details .event-header .header { + text-transform: uppercase; + margin: 0; + min-width: 40%; } .ui.form .field.no-margin {