From 8bcd7c252110912b1a0ea4541142d429451287de Mon Sep 17 00:00:00 2001 From: Allard Oelen Date: Thu, 8 Apr 2021 16:37:34 +0200 Subject: [PATCH 01/10] refactor: update theme variables --- src/assets/scss/ThemeVariables.scss | 47 +++++++++++------------------ 1 file changed, 18 insertions(+), 29 deletions(-) diff --git a/src/assets/scss/ThemeVariables.scss b/src/assets/scss/ThemeVariables.scss index ff2614c87..4e1d2490b 100644 --- a/src/assets/scss/ThemeVariables.scss +++ b/src/assets/scss/ThemeVariables.scss @@ -1,37 +1,29 @@ -// ORKG theme variables -$ORKG-border-radius: 6px; // General border radius on inputs, buttons, boxes etc. -$ORKG-primary-color: #e86161; // Primary color for buttons, icons, links etc. -$ORKG-border-width: 1px; // Width of border for buttons, inputs - // Theme variables -$primary: $ORKG-primary-color; -$darkblue: #80869b; -$darkblueDarker: darken($darkblue, 20%); -//$secondary: #3C4C58; -$light: #e9ecef; -$ultra-light-blue: #f8f9fb; -$ultra-light-blue-darker: #dbdde5; +$primary: #e86161; +$primary-darker: darken($primary, 20%); +$secondary: #80869b; +$secondary-darker: darken($darkblue, 20%); +$light: #e9ebf2; +$light-lighter: #f8f9fb; +$light-darker: #dbdde5; +$dark: #5b6176; $body-bg: #e9ebf2; -$body-color: #4f4f4f; //#646464; -$border-width: $ORKG-border-width; -$border-radius: $ORKG-border-radius; - -// Add a new theme color +$body-color: #4f4f4f; +$border-width: 1px; +$border-radius: 6px; $theme-colors: ( - lightblue: $body-bg, - darkblue: $darkblue, - darkblueDarker: $darkblueDarker, - primaryDarker: darken($ORKG-primary-color, 20%) + primary-darker: $primary-darker, + secondary-darker: $secondary-darker ); // Forms $form-feedback-font-size: 90%; // Inputs -$input-border-radius: $ORKG-border-radius; -$input-border-radius-sm: $ORKG-border-radius; -$btn-border-radius: $ORKG-border-radius; -$btn-border-radius: $ORKG-border-radius; +$input-border-radius: $border-radius; +$input-border-radius-sm: $border-radius; +$btn-border-radius: $border-radius; +$btn-border-radius: $border-radius; $btn-border-radius-sm: $btn-border-radius; $btn-border-radius-lg: $btn-border-radius; $input-bg: #f7f7f7; @@ -55,8 +47,5 @@ $badge-font-weight: 500; $badge-padding-y: 0.3rem; $badge-padding-x: 0.8rem; -// Bootstrap Vars +// List group $list-group-border-color: rgba(0, 0, 0, 0.125); - -$button-dark: #5b6176; -$avatar-border-color: #676d81; From a38fa818fc9d1e8b499362b4f9f9800f1c939fb0 Mon Sep 17 00:00:00 2001 From: Allard Oelen Date: Thu, 8 Apr 2021 17:16:09 +0200 Subject: [PATCH 02/10] Replace darkblueDarker --- src/components/Comparison/PropertyValue.js | 4 ++-- src/components/Comparison/styled.js | 2 +- .../ContributionEditor/TableHeaderColumn.js | 2 +- src/components/Home/TrendingProblems.js | 2 +- src/components/LastUpdatesBox/styled.js | 2 +- src/components/Layout/Footer.js | 6 +++--- src/components/Layout/Header/Header.js | 2 +- src/components/PdfAnnotation/TableSelect.js | 2 +- src/components/PdfAnnotation/Toolbar.js | 12 ++++++------ src/components/ResearchProblem/styled.js | 2 +- src/components/Templates/TemplateEditorHeaderBar.js | 2 +- src/components/Utils/AuthorsInput.js | 2 +- .../ViewPaper/PaperHeaderBar/PaperHeaderBar.js | 2 +- .../ViewPaper/PaperHeaderBar/PaperMenuBar.js | 2 +- src/components/ViewPaper/SimilarContributions.js | 4 ++-- src/pages/Classes/ClassDetails.js | 2 +- src/pages/Properties/Property.js | 2 +- src/pages/Resources/Resource.js | 2 +- src/pages/Templates/Template.js | 2 +- src/testUtils.js | 4 ++-- 20 files changed, 30 insertions(+), 30 deletions(-) diff --git a/src/components/Comparison/PropertyValue.js b/src/components/Comparison/PropertyValue.js index 28cbfb3a8..283f1a1b6 100644 --- a/src/components/Comparison/PropertyValue.js +++ b/src/components/Comparison/PropertyValue.js @@ -19,7 +19,7 @@ const FilterButton = styled(Button)` color: ${props => props.theme.ultraLightBlueDarker}; &:hover, &.active { - color: ${props => props.theme.darkblueDarker}; + color: ${props => props.theme.secondaryDarker}; } & .cross { @@ -39,7 +39,7 @@ const FilterButton = styled(Button)` content: ' '; height: 12px; width: 2px; - background-color: ${props => props.theme.darkblueDarker}; + background-color: ${props => props.theme.secondaryDarker}; } & .cross:before { transform: rotate(45deg); diff --git a/src/components/Comparison/styled.js b/src/components/Comparison/styled.js index 2c0e4d236..ee9a0cf33 100644 --- a/src/components/Comparison/styled.js +++ b/src/components/Comparison/styled.js @@ -236,7 +236,7 @@ export const Delete = styled.button` right: -5px; background: ${props => props.theme.themeColors.darkblue}; &:hover { - background: ${props => props.theme.themeColors.darkblueDarker}; + background: ${props => props.theme.secondaryDarker}; } } `; diff --git a/src/components/ContributionEditor/TableHeaderColumn.js b/src/components/ContributionEditor/TableHeaderColumn.js index fcd2a386d..1d20d4c4e 100644 --- a/src/components/ContributionEditor/TableHeaderColumn.js +++ b/src/components/ContributionEditor/TableHeaderColumn.js @@ -44,7 +44,7 @@ const TableHeaderColumn = ({ contribution, paper }) => { - diff --git a/src/components/Home/TrendingProblems.js b/src/components/Home/TrendingProblems.js index 1dfdb6aed..47aef89e4 100644 --- a/src/components/Home/TrendingProblems.js +++ b/src/components/Home/TrendingProblems.js @@ -28,7 +28,7 @@ const List = styled.div` font-size: 145%; min-height: 40px; a { - color: ${props => props.theme.darkblueDarker}!important; + color: ${props => props.theme.secondaryDarker}!important; } } .item-1, diff --git a/src/components/LastUpdatesBox/styled.js b/src/components/LastUpdatesBox/styled.js index 703848745..f682c95df 100644 --- a/src/components/LastUpdatesBox/styled.js +++ b/src/components/LastUpdatesBox/styled.js @@ -6,7 +6,7 @@ export const StyledActivity = styled.div` position: relative; font-size: 15px; .time { - color: ${props => props.theme.darkblueDarker}; + color: ${props => props.theme.secondaryDarker}; margin-top: -0.2rem; margin-bottom: 0.2rem; font-size: 16px; diff --git a/src/components/Layout/Footer.js b/src/components/Layout/Footer.js index 623d08f88..f9943ae99 100644 --- a/src/components/Layout/Footer.js +++ b/src/components/Layout/Footer.js @@ -19,21 +19,21 @@ const FooterWrapper = styled.div` `; const FooterCol = styled(Col)` - color: ${props => props.theme.darkblueDarker}; + color: ${props => props.theme.secondaryDarker}; margin: 10px 0; font-size: 0.95rem; h5 { font-weight: 500; text-transform: uppercase; - color: ${props => props.theme.darkblueDarker}; + color: ${props => props.theme.secondaryDarker}; font-size: 1.1rem; } .description { font-size: 0.85rem; } a { - color: ${props => props.theme.darkblueDarker}; + color: ${props => props.theme.secondaryDarker}; } `; diff --git a/src/components/Layout/Header/Header.js b/src/components/Layout/Header/Header.js index 2df3c5879..029cf4488 100644 --- a/src/components/Layout/Header/Header.js +++ b/src/components/Layout/Header/Header.js @@ -115,7 +115,7 @@ const StyledAuthTooltip = styled(Tooltip)` background-color: ${props => props.theme.buttonDark}; &:hover { - background-color: ${props => props.theme.darkblueDarker}; + background-color: ${props => props.theme.secondaryDarker}; } } } diff --git a/src/components/PdfAnnotation/TableSelect.js b/src/components/PdfAnnotation/TableSelect.js index 2ef814a36..0b6fbf5fd 100644 --- a/src/components/PdfAnnotation/TableSelect.js +++ b/src/components/PdfAnnotation/TableSelect.js @@ -67,7 +67,7 @@ const TableSelect = props => { const { region } = tableRegions[key]; return ( - deleteRegion(e, key)}> + deleteRegion(e, key)}> - {pdf && ( - )} diff --git a/src/components/ResearchProblem/styled.js b/src/components/ResearchProblem/styled.js index f948af7d4..bc5bf2aeb 100644 --- a/src/components/ResearchProblem/styled.js +++ b/src/components/ResearchProblem/styled.js @@ -11,7 +11,7 @@ export const PageHeaderBarContainer = styled.div` border-bottom: 1px #d1d3d9 solid; box-shadow: 0 2px 8px -2px rgba(0, 0, 0, 0.13); & .title { - color: ${props => props.theme.darkblueDarker}; + color: ${props => props.theme.secondaryDarker}; font-size: 1.1rem; flex-grow: 1; } diff --git a/src/components/Templates/TemplateEditorHeaderBar.js b/src/components/Templates/TemplateEditorHeaderBar.js index 0e7ec0c81..ec36cf5b2 100644 --- a/src/components/Templates/TemplateEditorHeaderBar.js +++ b/src/components/Templates/TemplateEditorHeaderBar.js @@ -18,7 +18,7 @@ const PaperHeaderBarContainer = styled.div` border-bottom: 1px #d1d3d9 solid; box-shadow: 0 2px 8px -2px rgba(0, 0, 0, 0.13); & .title { - color: ${props => props.theme.darkblueDarker}; + color: ${props => props.theme.secondaryDarker}; } `; diff --git a/src/components/Utils/AuthorsInput.js b/src/components/Utils/AuthorsInput.js index ef7648422..436ac5077 100644 --- a/src/components/Utils/AuthorsInput.js +++ b/src/components/Utils/AuthorsInput.js @@ -25,7 +25,7 @@ const AddAuthor = styled(Button)` margin: 0 0 2px 0; &:hover { background-color: #e9ecef; - color: ${props => props.theme.darkblueDarker}; + color: ${props => props.theme.secondaryDarker}; } `; diff --git a/src/components/ViewPaper/PaperHeaderBar/PaperHeaderBar.js b/src/components/ViewPaper/PaperHeaderBar/PaperHeaderBar.js index 672b8de73..6ef4053c4 100644 --- a/src/components/ViewPaper/PaperHeaderBar/PaperHeaderBar.js +++ b/src/components/ViewPaper/PaperHeaderBar/PaperHeaderBar.js @@ -14,7 +14,7 @@ const PaperHeaderBarContainer = styled.div` border-bottom: 1px #d1d3d9 solid; box-shadow: 0 2px 8px -2px rgba(0, 0, 0, 0.13); & .title { - color: ${props => props.theme.darkblueDarker}; + color: ${props => props.theme.secondaryDarker}; } `; diff --git a/src/components/ViewPaper/PaperHeaderBar/PaperMenuBar.js b/src/components/ViewPaper/PaperHeaderBar/PaperMenuBar.js index c12d5760f..891da9272 100644 --- a/src/components/ViewPaper/PaperHeaderBar/PaperMenuBar.js +++ b/src/components/ViewPaper/PaperHeaderBar/PaperMenuBar.js @@ -38,7 +38,7 @@ function PaperMenuBar(props) { )} diff --git a/src/pages/Properties/Property.js b/src/pages/Properties/Property.js index 66be99b59..835c55e70 100644 --- a/src/pages/Properties/Property.js +++ b/src/pages/Properties/Property.js @@ -59,7 +59,7 @@ function Property(props) { Edit ) : ( - )} diff --git a/src/pages/Resources/Resource.js b/src/pages/Resources/Resource.js index 525c0d188..805b35dae 100644 --- a/src/pages/Resources/Resource.js +++ b/src/pages/Resources/Resource.js @@ -238,7 +238,7 @@ function Resource(props) { Edit ) : ( - ) diff --git a/src/pages/Templates/Template.js b/src/pages/Templates/Template.js index 331446903..724379b08 100644 --- a/src/pages/Templates/Template.js +++ b/src/pages/Templates/Template.js @@ -145,7 +145,7 @@ class Template extends Component { diff --git a/src/components/AddPaper/Contributions/styled.js b/src/components/AddPaper/Contributions/styled.js index f4f868672..f6dcfc465 100644 --- a/src/components/AddPaper/Contributions/styled.js +++ b/src/components/AddPaper/Contributions/styled.js @@ -161,8 +161,8 @@ export const StyledStatementItem = styled(ListGroupItem)` } &.statementActive { - background-color: ${props => props.theme.darkblue} !important; - border-color: ${props => props.theme.darkblue} !important; + background-color: ${props => props.theme.secondary} !important; + border-color: ${props => props.theme.secondary} !important; color: #fff; & .deletePredicate { diff --git a/src/components/ClassInstances/ClassInstances.js b/src/components/ClassInstances/ClassInstances.js index 957d8758f..b282d7f40 100644 --- a/src/components/ClassInstances/ClassInstances.js +++ b/src/components/ClassInstances/ClassInstances.js @@ -80,7 +80,7 @@ const ClassInstances = props => { return (
- diff --git a/src/components/Comparison/ComparisonMetaData.js b/src/components/Comparison/ComparisonMetaData.js index 7f34c1c37..a060a326a 100644 --- a/src/components/Comparison/ComparisonMetaData.js +++ b/src/components/Comparison/ComparisonMetaData.js @@ -54,7 +54,7 @@ function ComparisonMetaData(props) { ) : ( - {author.label} + {author.label} ) )} diff --git a/src/components/Comparison/Filters/AppliedRule.js b/src/components/Comparison/Filters/AppliedRule.js index bed472a3a..2c6e7d4a4 100644 --- a/src/components/Comparison/Filters/AppliedRule.js +++ b/src/components/Comparison/Filters/AppliedRule.js @@ -7,7 +7,7 @@ import styled from 'styled-components'; const DeleteButton = styled(Button)` &&& { - color: ${props => props.theme.darkblue}; + color: ${props => props.theme.secondary}; padding: 0; line-height: 1; border: 0; diff --git a/src/components/Comparison/Filters/FilterModalFooter.js b/src/components/Comparison/Filters/FilterModalFooter.js index 7a84eb775..e0437a7c8 100644 --- a/src/components/Comparison/Filters/FilterModalFooter.js +++ b/src/components/Comparison/Filters/FilterModalFooter.js @@ -7,7 +7,7 @@ function FilterModalFooter({ handleApply, handleCancel, handleReset }) { return (
diff --git a/src/components/Comparison/styled.js b/src/components/Comparison/styled.js index ee9a0cf33..096c5e557 100644 --- a/src/components/Comparison/styled.js +++ b/src/components/Comparison/styled.js @@ -2,7 +2,7 @@ import styled from 'styled-components'; import { Container, Button } from 'reactstrap'; export const SubtitleSeparator = styled.div` - background: ${props => props.theme.darkblue}; + background: ${props => props.theme.secondary}; width: 2px; height: 30px; margin: 0 15px; @@ -40,7 +40,7 @@ export const ComparisonTypeButton = styled(Button)` export const ScrollButton = styled(Button)` &&& { border-radius: 30px; - color: ${props => props.theme.darkblue}; + color: ${props => props.theme.secondary}; width: 30px; height: 30px; cursor: pointer; @@ -209,7 +209,7 @@ export const Contribution = styled.div` color: #ffa5a5; font-size: 85%; &.contribution-editor { - color: ${props => props.theme.themeColors.darkblue}; + color: ${props => props.theme.secondary}; } `; @@ -234,7 +234,7 @@ export const Delete = styled.button` &.contribution-editor { color: ${props => props.theme.themeColors.lightblue}; right: -5px; - background: ${props => props.theme.themeColors.darkblue}; + background: ${props => props.theme.secondary}; &:hover { background: ${props => props.theme.secondaryDarker}; } diff --git a/src/components/ConfirmBulkImport/PaperList.js b/src/components/ConfirmBulkImport/PaperList.js index 8d0de74cd..eb1b88550 100644 --- a/src/components/ConfirmBulkImport/PaperList.js +++ b/src/components/ConfirmBulkImport/PaperList.js @@ -49,11 +49,11 @@ const PaperList = props => { <>
{showContributions.length === 0 ? ( - ) : ( - )} diff --git a/src/components/ContributionEditor/CreateProperty.js b/src/components/ContributionEditor/CreateProperty.js index fa87e3e07..0f406b516 100644 --- a/src/components/ContributionEditor/CreateProperty.js +++ b/src/components/ContributionEditor/CreateProperty.js @@ -33,7 +33,7 @@ export const CreateProperty = () => { }; return !isCreating ? ( - ) : ( diff --git a/src/components/CreatePaperModal/DoiItem.js b/src/components/CreatePaperModal/DoiItem.js index c1eb32f0d..e51b87bde 100644 --- a/src/components/CreatePaperModal/DoiItem.js +++ b/src/components/CreatePaperModal/DoiItem.js @@ -90,7 +90,7 @@ const DoiItem = ({ toggleItem, isExpanded, value, onChange, onPopulateMetadata, onChange(e.target.value)} disabled={isLoading} valid={isValid} invalid={isValid === false} /> - diff --git a/src/components/EditableHeader.js b/src/components/EditableHeader.js index f2843054e..9b718b23d 100644 --- a/src/components/EditableHeader.js +++ b/src/components/EditableHeader.js @@ -56,7 +56,7 @@ class EditableHeader extends Component { No label )} - diff --git a/src/components/HeaderSearchButton/HeaderSearchButton.js b/src/components/HeaderSearchButton/HeaderSearchButton.js index 0868e75d0..d044df030 100644 --- a/src/components/HeaderSearchButton/HeaderSearchButton.js +++ b/src/components/HeaderSearchButton/HeaderSearchButton.js @@ -87,7 +87,7 @@ const HeaderSearchButton = ({ placeholder, type }) => { }; return isSearchOpen ? ( - + { ) : ( - ); diff --git a/src/components/Home/Benefits.js b/src/components/Home/Benefits.js index 3a4711c56..2920b99b7 100644 --- a/src/components/Home/Benefits.js +++ b/src/components/Home/Benefits.js @@ -148,7 +148,7 @@ export default function Benefits() {
{!!!user && ( diff --git a/src/components/ObservatoriesCarousel/ObservatoriesCarousel.js b/src/components/ObservatoriesCarousel/ObservatoriesCarousel.js index b574919dc..0c7ab97d4 100644 --- a/src/components/ObservatoriesCarousel/ObservatoriesCarousel.js +++ b/src/components/ObservatoriesCarousel/ObservatoriesCarousel.js @@ -49,7 +49,7 @@ const CarouselIndicatorsStyled = styled(CarouselIndicators)` `; const StyledGravatar = styled(Gravatar)` - border: 2px solid ${props => props.theme.darkblue}; + border: 2px solid ${props => props.theme.secondary}; cursor: pointer; &:hover { border: 2px solid ${props => props.theme.primaryColor}; diff --git a/src/components/Observatory/RelatedResourcesCard.js b/src/components/Observatory/RelatedResourcesCard.js index 3d8337b66..e2b4ae13d 100644 --- a/src/components/Observatory/RelatedResourcesCard.js +++ b/src/components/Observatory/RelatedResourcesCard.js @@ -102,12 +102,12 @@ class RelatedResourcesCard extends Component { requestToChangeActive={this.onChange} rightChevron={ } leftChevron={ } chevronWidth={CHEVRON_WIDTH} diff --git a/src/components/PdfAnnotation/ExtractionModal.js b/src/components/PdfAnnotation/ExtractionModal.js index 0a8dbf90d..5f73b223c 100644 --- a/src/components/PdfAnnotation/ExtractionModal.js +++ b/src/components/PdfAnnotation/ExtractionModal.js @@ -69,16 +69,16 @@ const ExtractionModal = props => { <>
- {' '} - {' '} - {' '} -
diff --git a/src/components/PdfAnnotation/Toolbar.js b/src/components/PdfAnnotation/Toolbar.js index bcfcfa8a5..266cca500 100644 --- a/src/components/PdfAnnotation/Toolbar.js +++ b/src/components/PdfAnnotation/Toolbar.js @@ -11,7 +11,7 @@ import Tippy from '@tippyjs/react'; import HelpModal from 'components/PdfAnnotation/HelpModal'; const ToolbarStyled = styled.div` - background: ${props => props.theme.darkblue}; + background: ${props => props.theme.secondary}; position: fixed; width: 100%; top: 72px; diff --git a/src/components/PdfTextAnnotation/AnnotationTooltipNew.js b/src/components/PdfTextAnnotation/AnnotationTooltipNew.js index 09b82b31f..81a9b2b01 100644 --- a/src/components/PdfTextAnnotation/AnnotationTooltipNew.js +++ b/src/components/PdfTextAnnotation/AnnotationTooltipNew.js @@ -131,7 +131,7 @@ const AnnotationTooltipNew = props => { className="rounded-pill mr-2 mb-1" style={{ paddingTop: 2, paddingBottom: 2 }} size="sm" - color="darkblue" + color="secondary" key={suggestion.iri} onClick={() => handleSuggestionClick(suggestion.iri, suggestion.label)} > diff --git a/src/components/PdfTextAnnotation/ZoomBar.js b/src/components/PdfTextAnnotation/ZoomBar.js index 76bdc71b5..77894cf0f 100644 --- a/src/components/PdfTextAnnotation/ZoomBar.js +++ b/src/components/PdfTextAnnotation/ZoomBar.js @@ -26,10 +26,10 @@ const ZoomBar = () => { return ( - - diff --git a/src/components/PropertyStatements/PropertyStatements.js b/src/components/PropertyStatements/PropertyStatements.js index e63acb469..245402337 100644 --- a/src/components/PropertyStatements/PropertyStatements.js +++ b/src/components/PropertyStatements/PropertyStatements.js @@ -24,7 +24,7 @@ const PropertyStatements = ({ propertyId }) => { return (
- diff --git a/src/components/RDFDataCube/RDFDataCube.js b/src/components/RDFDataCube/RDFDataCube.js index 37e3da292..aca24baa8 100644 --- a/src/components/RDFDataCube/RDFDataCube.js +++ b/src/components/RDFDataCube/RDFDataCube.js @@ -345,7 +345,7 @@ const RDFDataCube = props => { {!isDataCubeLoading && !isDataCubeFailedLoading && ( <> - + Options diff --git a/src/components/RelativeBreadcrumbs/RelativeBreadcrumbs.js b/src/components/RelativeBreadcrumbs/RelativeBreadcrumbs.js index 9ca7bef9e..265bdb64b 100644 --- a/src/components/RelativeBreadcrumbs/RelativeBreadcrumbs.js +++ b/src/components/RelativeBreadcrumbs/RelativeBreadcrumbs.js @@ -29,7 +29,7 @@ const BreadcrumbStyled = styled.ul` } } & > a { - color: ${props => props.theme.darkblue}; + color: ${props => props.theme.secondary}; display: block; background: ${props => props.theme.ultraLightBlueDarker}; text-decoration: none; diff --git a/src/components/ResearchField/Comparisons.js b/src/components/ResearchField/Comparisons.js index 063212bef..1fc121f87 100644 --- a/src/components/ResearchField/Comparisons.js +++ b/src/components/ResearchField/Comparisons.js @@ -87,7 +87,7 @@ const Comparisons = ({ id, boxShadow }) => { } > - diff --git a/src/components/ResearchField/Papers.js b/src/components/ResearchField/Papers.js index 48bf61b9b..cfe51ebbf 100644 --- a/src/components/ResearchField/Papers.js +++ b/src/components/ResearchField/Papers.js @@ -87,7 +87,7 @@ const Papers = ({ id, boxShadow, showBreadcrumbs }) => { } > - diff --git a/src/components/ResearchField/ResearchFieldHeader.js b/src/components/ResearchField/ResearchFieldHeader.js index 451143556..d41b5639e 100644 --- a/src/components/ResearchField/ResearchFieldHeader.js +++ b/src/components/ResearchField/ResearchFieldHeader.js @@ -106,14 +106,14 @@ const ResearchFieldHeader = ({ id }) => { setEditMode(v => !v)} > Edit setMenuOpen(v => !v)} nav inNavbar> - + diff --git a/src/components/ResearchFieldSelector/ResearchFieldSelector.js b/src/components/ResearchFieldSelector/ResearchFieldSelector.js index fbdec5c72..c361bed4a 100644 --- a/src/components/ResearchFieldSelector/ResearchFieldSelector.js +++ b/src/components/ResearchFieldSelector/ResearchFieldSelector.js @@ -24,7 +24,7 @@ const FieldItem = styled(Button)` transition: none; &.active { - background: ${props => props.theme.darkblue}; + background: ${props => props.theme.secondary}; color: #fff; } } @@ -48,7 +48,7 @@ const IndicatorContainer = styled.div` const CollapseButton = styled(Button)` && { - color: ${props => props.theme.darkblue}; + color: ${props => props.theme.secondary}; } `; @@ -180,7 +180,7 @@ const ResearchFieldSelector = ({ selectedResearchField, researchFields, updateRe
handleFieldClick(e, field.id, false)}> {field.hasChildren && ( - + )} {find(parents, p => p.id === field.id) ? {field.label} : field.label} diff --git a/src/components/ResearchProblem/ResearchProblemHeader.js b/src/components/ResearchProblem/ResearchProblemHeader.js index b4cd449f7..70c21e02f 100644 --- a/src/components/ResearchProblem/ResearchProblemHeader.js +++ b/src/components/ResearchProblem/ResearchProblemHeader.js @@ -116,14 +116,14 @@ const ResearchProblemHeader = ({ id }) => { setEditMode(v => !v)} > Edit setMenuOpen(v => !v)} nav inNavbar> - + diff --git a/src/components/StatementBrowser/AddProperty/AddPropertyTemplate.js b/src/components/StatementBrowser/AddProperty/AddPropertyTemplate.js index 9bb5d2b19..3d9a18a72 100644 --- a/src/components/StatementBrowser/AddProperty/AddPropertyTemplate.js +++ b/src/components/StatementBrowser/AddProperty/AddPropertyTemplate.js @@ -27,7 +27,7 @@ export default function AddPropertyTemplate(props) { > ) : ( - )} diff --git a/src/components/UserAvatar/UserAvatar.js b/src/components/UserAvatar/UserAvatar.js index 97ca4956c..6fbfee768 100644 --- a/src/components/UserAvatar/UserAvatar.js +++ b/src/components/UserAvatar/UserAvatar.js @@ -24,7 +24,7 @@ const StyledSpinnerGravatar = styled.div` display: inline-block; text-align: center; line-height: 28px; - color: ${props => props.theme.darkblue}; + color: ${props => props.theme.secondary}; border: 2px solid ${props => props.theme.ultraLightBlueDarker}; cursor: pointer; vertical-align: sub; diff --git a/src/components/ViewPaper/EditDialog/EditItem.js b/src/components/ViewPaper/EditDialog/EditItem.js index d337fbcf2..eb4521bf8 100644 --- a/src/components/ViewPaper/EditDialog/EditItem.js +++ b/src/components/ViewPaper/EditDialog/EditItem.js @@ -107,7 +107,7 @@ const EditItem = props => { inputValue={inputValue} /> - diff --git a/src/components/ViewPaper/EditDialog/styled.js b/src/components/ViewPaper/EditDialog/styled.js index da04a8cad..9702863d6 100644 --- a/src/components/ViewPaper/EditDialog/styled.js +++ b/src/components/ViewPaper/EditDialog/styled.js @@ -51,8 +51,8 @@ export const StyledStatementItem = styled(ListGroupItem)` } &.statementActive { - background-color: ${props => props.theme.darkblue} !important; - border-color: ${props => props.theme.darkblue} !important; + background-color: ${props => props.theme.secondary} !important; + border-color: ${props => props.theme.secondary} !important; color: #fff; & .deletePredicate { diff --git a/src/components/ViewPaper/GraphView/GizmoGraphViewModal.js b/src/components/ViewPaper/GraphView/GizmoGraphViewModal.js index 34fe001e3..b46b25c1b 100644 --- a/src/components/ViewPaper/GraphView/GizmoGraphViewModal.js +++ b/src/components/ViewPaper/GraphView/GizmoGraphViewModal.js @@ -488,7 +488,7 @@ class GraphView extends Component { )}
- + Layout: { ) : ( - {author.label} + {author.label} ) )} @@ -114,7 +114,7 @@ const PaperHeader = props => {
{props.editMode && ( - )}{' '} diff --git a/src/components/ViewPaper/PaperHeaderBar/PaperMenuBar.js b/src/components/ViewPaper/PaperHeaderBar/PaperMenuBar.js index 891da9272..a369a5747 100644 --- a/src/components/ViewPaper/PaperHeaderBar/PaperMenuBar.js +++ b/src/components/ViewPaper/PaperHeaderBar/PaperMenuBar.js @@ -15,11 +15,17 @@ function PaperMenuBar(props) { <> {props.paperLink && ( - + View paper )} - @@ -28,7 +34,7 @@ function PaperMenuBar(props) { component={Button} className="flex-shrink-0" style={{ marginLeft: 1 }} - color="darkblue" + color="secondary" size="sm" onClick={() => props.toggle('editMode')} > @@ -46,7 +52,7 @@ function PaperMenuBar(props) { )} setMenuOpen(v => !v)} nav inNavbar> - + diff --git a/src/components/ViewPaper/SimilarContributions.js b/src/components/ViewPaper/SimilarContributions.js index cae70b906..dc32435cb 100644 --- a/src/components/ViewPaper/SimilarContributions.js +++ b/src/components/ViewPaper/SimilarContributions.js @@ -19,7 +19,7 @@ const Card = styled(Link)` margin: 0 0; flex: 1; border-radius: 11px; - background: ${props => props.theme.darkblue}; + background: ${props => props.theme.secondary}; cursor: pointer; font-size: 95%; padding: 10px 5px; diff --git a/src/components/VisualizationCard/VisualizationCard.js b/src/components/VisualizationCard/VisualizationCard.js index 897e80579..fc64265c9 100644 --- a/src/components/VisualizationCard/VisualizationCard.js +++ b/src/components/VisualizationCard/VisualizationCard.js @@ -25,7 +25,7 @@ const PreviewContainer = styled.div` height: 100px; display: flex; align-items: center; - border: 1px ${props => props.theme.darkblue} solid; + border: 1px ${props => props.theme.secondary} solid; border-radius: 5px; overflow: hidden; transition: box-shadow 0.5s; diff --git a/src/components/styled.js b/src/components/styled.js index 27f1e152b..06fe07529 100644 --- a/src/components/styled.js +++ b/src/components/styled.js @@ -2,7 +2,7 @@ import styled from 'styled-components'; import Gravatar from 'react-gravatar'; export const SubtitleSeparator = styled.div` - background: ${props => props.theme.darkblue}; + background: ${props => props.theme.secondary}; width: 2px; height: 24px; margin: 0 15px; @@ -32,7 +32,7 @@ export const StyledDotGravatar = styled.div` display: inline-block; text-align: center; line-height: 48px; - color: ${props => props.theme.darkblue}; + color: ${props => props.theme.secondary}; border: 2px solid ${props => props.theme.ultraLightBlueDarker}; cursor: pointer; vertical-align: sub; diff --git a/src/libs/selfVisModel/ComparisonComponents/AddVisualizationModal.js b/src/libs/selfVisModel/ComparisonComponents/AddVisualizationModal.js index cee509812..88b9b32e7 100644 --- a/src/libs/selfVisModel/ComparisonComponents/AddVisualizationModal.js +++ b/src/libs/selfVisModel/ComparisonComponents/AddVisualizationModal.js @@ -132,7 +132,7 @@ function AddVisualizationModal(props) { Create comparison visualization - diff --git a/src/pages/CsvImport.js b/src/pages/CsvImport.js index 2e3343617..80656425d 100644 --- a/src/pages/CsvImport.js +++ b/src/pages/CsvImport.js @@ -15,7 +15,7 @@ const TableContainerStyled = styled.div` background: ${props => props.theme.ultraLightBlue}; font-size: 90%; max-height: 500px; - border: 2px solid ${props => props.theme.darkblue}; + border: 2px solid ${props => props.theme.secondary}; border-radius: ${props => props.theme.borderRadius}; `; @@ -67,7 +67,7 @@ const CsvImport = () => { className="p-0" onClick={() => setIsHelpModalOpen(true)} > - + diff --git a/src/pages/FeaturedComparisons.js b/src/pages/FeaturedComparisons.js index 1134bd3ec..edd8bebfa 100644 --- a/src/pages/FeaturedComparisons.js +++ b/src/pages/FeaturedComparisons.js @@ -126,7 +126,7 @@ const FeaturedComparisons = () => {

Featured paper comparisons

- + View all comparisons diff --git a/src/pages/Observatories/Observatory.js b/src/pages/Observatories/Observatory.js index 83c7414e9..c19f1109d 100644 --- a/src/pages/Observatories/Observatory.js +++ b/src/pages/Observatories/Observatory.js @@ -82,7 +82,7 @@ const Observatory = () => { {!!user && user.isCurationAllowed && ( - diff --git a/src/pages/Organizations/OrganizationDetails.js b/src/pages/Organizations/OrganizationDetails.js index 970fadb73..079b9fbfd 100644 --- a/src/pages/Organizations/OrganizationDetails.js +++ b/src/pages/Organizations/OrganizationDetails.js @@ -95,10 +95,10 @@ const OrganizationDetails = () => { {!!user && (user.id === createdBy || user.isCurationAllowed) && ( - - diff --git a/src/pages/Organizations/Organizations.js b/src/pages/Organizations/Organizations.js index 092a616fd..d8ed384ac 100644 --- a/src/pages/Organizations/Organizations.js +++ b/src/pages/Organizations/Organizations.js @@ -56,9 +56,9 @@ class Organizations extends Component { {!!this.props.user && this.props.user.isCurationAllowed && ( Create new organization diff --git a/src/pages/Papers.js b/src/pages/Papers.js index c0b89ef92..27527b8af 100644 --- a/src/pages/Papers.js +++ b/src/pages/Papers.js @@ -108,7 +108,7 @@ const Papers = () => { {!!user && user.isCurationAllowed && ( - + {verified === true && 'Verified'} {verified === false && 'Unverified'} {verified === null && 'All'} diff --git a/src/pages/Properties/Properties.js b/src/pages/Properties/Properties.js index 5dff4ed72..300fe72c3 100644 --- a/src/pages/Properties/Properties.js +++ b/src/pages/Properties/Properties.js @@ -60,7 +60,7 @@ const Properties = () => {
- + Create property diff --git a/src/pages/Properties/Property.js b/src/pages/Properties/Property.js index 835c55e70..33970102c 100644 --- a/src/pages/Properties/Property.js +++ b/src/pages/Properties/Property.js @@ -52,7 +52,7 @@ function Property(props) { setEditMode(v => !v)} > diff --git a/src/pages/ResearchFields/ResearchFields.js b/src/pages/ResearchFields/ResearchFields.js index 8e1472c0f..cf9f0269e 100644 --- a/src/pages/ResearchFields/ResearchFields.js +++ b/src/pages/ResearchFields/ResearchFields.js @@ -49,7 +49,7 @@ const ResearchFields = () => {

Research fields taxonomy

setMenuOpen(v => !v)} nav inNavbar> - + diff --git a/src/pages/Resources/Resource.js b/src/pages/Resources/Resource.js index 805b35dae..a6339aa6b 100644 --- a/src/pages/Resources/Resource.js +++ b/src/pages/Resources/Resource.js @@ -205,7 +205,7 @@ function Resource(props) { {dedicatedLink && (
{!this.props.editMode && !this.props.isSaving ? ( - this.props.setEditMode(true)}> + this.props.setEditMode(true)}> Edit ) : ( @@ -166,7 +166,7 @@ class Template extends Component { nav inNavbar > - + diff --git a/src/pages/Templates/Templates.js b/src/pages/Templates/Templates.js index 4efe048f5..eaabf8b0c 100644 --- a/src/pages/Templates/Templates.js +++ b/src/pages/Templates/Templates.js @@ -164,9 +164,9 @@ const Templates = () => {
Create template diff --git a/src/pages/VenuePage.js b/src/pages/VenuePage.js index 466e09446..23577e397 100644 --- a/src/pages/VenuePage.js +++ b/src/pages/VenuePage.js @@ -131,7 +131,7 @@ class VenuePage extends Component { nav inNavbar > - + diff --git a/src/testUtils.js b/src/testUtils.js index de98222b4..9c7799441 100644 --- a/src/testUtils.js +++ b/src/testUtils.js @@ -11,7 +11,7 @@ export const theme = { orkgPrimaryColor: 'rgb(232, 97, 97)', orkgBorderWidth: '1px', primary: 'rgb(232, 97, 97)', - darkblue: 'rgb(128, 134, 155)', + secondary: 'rgb(128, 134, 155)', secondaryDarker: 'rgb(80, 85, 101)', light: 'rgb(233, 236, 239)', ultraLightBlue: 'rgb(248, 249, 251)', @@ -22,7 +22,7 @@ export const theme = { borderRadius: '6px', themeColors: { lightblue: 'rgb(233, 235, 242)', - darkblue: 'rgb(128, 134, 155)', + secondary: 'rgb(128, 134, 155)', secondaryDarker: 'rgb(80, 85, 101)', primaryDarker: 'rgb(198, 29, 29)' }, From 93e619330f4a71275551a5e17d6d4c0d89d05357 Mon Sep 17 00:00:00 2001 From: Allard Oelen Date: Thu, 8 Apr 2021 17:21:19 +0200 Subject: [PATCH 04/10] Replace ultra-light-blue-darker --- .../AddPaper/Abstract/AbstractAnnotatorView.js | 2 +- src/components/AddPaper/Contributions/styled.js | 8 ++++---- src/components/Comparison/PropertyValue.js | 2 +- src/components/Home/FeaturedItemsBox.js | 2 +- src/components/LastUpdatesBox/styled.js | 4 ++-- src/components/Layout/Header/AddNew.js | 2 +- .../RelativeBreadcrumbs/RelativeBreadcrumbs.js | 6 +++--- .../StatementOptionButton/StatementOptionButton.js | 2 +- src/components/StatementBrowser/styled.js | 10 +++++----- src/components/UserAvatar/UserAvatar.js | 6 +++--- src/components/ViewPaper/EditDialog/styled.js | 2 +- src/components/styled.js | 6 +++--- .../ComparisonComponents/AddVisualizationModal.js | 4 ++-- .../selfVisModel/VisRenderer/VisualizationWidget.js | 2 +- src/pages/Observatories/Observatories.js | 2 +- src/pages/Tools.js | 4 ++-- src/pages/ViewPaper.js | 2 +- src/testUtils.js | 2 +- 18 files changed, 34 insertions(+), 34 deletions(-) diff --git a/src/components/AddPaper/Abstract/AbstractAnnotatorView.js b/src/components/AddPaper/Abstract/AbstractAnnotatorView.js index 53817fa38..9858347f4 100644 --- a/src/components/AddPaper/Abstract/AbstractAnnotatorView.js +++ b/src/components/AddPaper/Abstract/AbstractAnnotatorView.js @@ -121,7 +121,7 @@ class AbstractAnnotatorView extends Component { width: '100%', background: getTrackBackground({ values: this.props.certaintyThreshold, - colors: [this.props.theme.orkgPrimaryColor, this.props.theme.ultraLightBlueDarker], + colors: [this.props.theme.orkgPrimaryColor, this.props.theme.lightDarker], min: 0, max: 1 }) diff --git a/src/components/AddPaper/Contributions/styled.js b/src/components/AddPaper/Contributions/styled.js index f6dcfc465..6eb0f025d 100644 --- a/src/components/AddPaper/Contributions/styled.js +++ b/src/components/AddPaper/Contributions/styled.js @@ -5,7 +5,7 @@ import { Button, ListGroupItem } from 'reactstrap'; export const StyledHorizontalContribution = styled.div` border-radius: ${props => props.theme.borderRadius}; border-width: ${props => props.theme.borderWidth}; - border-color: ${props => props.theme.ultraLightBlueDarker}; + border-color: ${props => props.theme.lightDarker}; border-style: solid; border-top-left-radius: 0; padding: 25px 30px; @@ -35,7 +35,7 @@ export const StyledHorizontalContributionsList = styled.ul` margin-right: 2px; .contribution-item { - border: 1px solid ${props => props.theme.ultraLightBlueDarker}; + border: 1px solid ${props => props.theme.lightDarker}; border-bottom: 0; background-color: ${props => props.theme.ultraLightBlue}; position: relative; @@ -69,7 +69,7 @@ export const StyledHorizontalContributionsList = styled.ul` export const AddContribution = styled(Button)` &&& { padding: 0; - border: 1px solid ${props => props.theme.ultraLightBlueDarker}; + border: 1px solid ${props => props.theme.lightDarker}; background-color: ${props => props.theme.ultraLightBlue}; border-radius: 60px; margin: 0 5px; @@ -132,7 +132,7 @@ export const StyledStatementItem = styled(ListGroupItem)` padding: 0.5rem 0.75rem !important; cursor: default; background-color: ${props => props.theme.ultraLightBlue} !important; - border-color: ${props => props.theme.ultraLightBlueDarker} !important; + border-color: ${props => props.theme.lightDarker} !important; overflow-wrap: break-word; word-break: break-all; flex: 1; diff --git a/src/components/Comparison/PropertyValue.js b/src/components/Comparison/PropertyValue.js index 283f1a1b6..2459f36c0 100644 --- a/src/components/Comparison/PropertyValue.js +++ b/src/components/Comparison/PropertyValue.js @@ -16,7 +16,7 @@ import classNames from 'classnames'; const FilterButton = styled(Button)` &&& { padding: 0 5px; - color: ${props => props.theme.ultraLightBlueDarker}; + color: ${props => props.theme.lightDarker}; &:hover, &.active { color: ${props => props.theme.secondaryDarker}; diff --git a/src/components/Home/FeaturedItemsBox.js b/src/components/Home/FeaturedItemsBox.js index 48d969865..83e4b1b17 100644 --- a/src/components/Home/FeaturedItemsBox.js +++ b/src/components/Home/FeaturedItemsBox.js @@ -23,7 +23,7 @@ const FeaturedTabs = styled.div` padding: 15px; color: #bebbac; cursor: pointer; - border-bottom: 2px solid ${props => props.theme.ultraLightBlueDarker}; + border-bottom: 2px solid ${props => props.theme.lightDarker}; -webkit-transition: border 500ms ease-out; -moz-transition: border 500ms ease-out; -o-transition: border 500ms ease-out; diff --git a/src/components/LastUpdatesBox/styled.js b/src/components/LastUpdatesBox/styled.js index f682c95df..f2b35c2b7 100644 --- a/src/components/LastUpdatesBox/styled.js +++ b/src/components/LastUpdatesBox/styled.js @@ -1,7 +1,7 @@ import styled from 'styled-components'; export const StyledActivity = styled.div` - border-left: 3px solid ${props => props.theme.ultraLightBlueDarker}; + border-left: 3px solid ${props => props.theme.lightDarker}; color: ${props => props.theme.bodyColor}; position: relative; font-size: 15px; @@ -18,7 +18,7 @@ export const StyledActivity = styled.div` margin-right: 0.5rem; border-radius: 14px; content: ''; - background-color: ${props => props.theme.ultraLightBlueDarker}; + background-color: ${props => props.theme.lightDarker}; display: inline-block; position: absolute; margin-top: 3px; diff --git a/src/components/Layout/Header/AddNew.js b/src/components/Layout/Header/AddNew.js index 729e113e8..99789f9f4 100644 --- a/src/components/Layout/Header/AddNew.js +++ b/src/components/Layout/Header/AddNew.js @@ -32,7 +32,7 @@ const ToolContainer = styled(Link)` text-align: center; color: inherit; border-radius: 0; - border-bottom: 2px solid ${props => props.theme.ultraLightBlueDarker}; + border-bottom: 2px solid ${props => props.theme.lightDarker}; position: relative; &:last-of-type { border-bottom: 0; diff --git a/src/components/RelativeBreadcrumbs/RelativeBreadcrumbs.js b/src/components/RelativeBreadcrumbs/RelativeBreadcrumbs.js index 265bdb64b..9c66ff023 100644 --- a/src/components/RelativeBreadcrumbs/RelativeBreadcrumbs.js +++ b/src/components/RelativeBreadcrumbs/RelativeBreadcrumbs.js @@ -31,7 +31,7 @@ const BreadcrumbStyled = styled.ul` & > a { color: ${props => props.theme.secondary}; display: block; - background: ${props => props.theme.ultraLightBlueDarker}; + background: ${props => props.theme.lightDarker}; text-decoration: none; position: relative; line-height: 20px; @@ -65,7 +65,7 @@ const BreadcrumbStyled = styled.ul` content: ''; position: absolute; top: 0; - border: 0 solid ${props => props.theme.ultraLightBlueDarker}; + border: 0 solid ${props => props.theme.lightDarker}; border-width: 10px 6px; width: 0; height: 0; @@ -77,7 +77,7 @@ const BreadcrumbStyled = styled.ul` &:after { left: 100%; border-color: transparent; - border-left-color: ${props => props.theme.ultraLightBlueDarker}; + border-left-color: ${props => props.theme.lightDarker}; } &:hover, &:active { diff --git a/src/components/StatementBrowser/StatementOptionButton/StatementOptionButton.js b/src/components/StatementBrowser/StatementOptionButton/StatementOptionButton.js index 63608b077..f394c78f2 100644 --- a/src/components/StatementBrowser/StatementOptionButton/StatementOptionButton.js +++ b/src/components/StatementBrowser/StatementOptionButton/StatementOptionButton.js @@ -10,7 +10,7 @@ export const OptionButton = styled(Button)` margin: 0 2px !important; display: inline-block !important; border-radius: 100% !important; - background-color: ${props => props.theme.ultraLightBlueDarker}!important; + background-color: ${props => props.theme.lightDarker}!important; color: ${props => props.theme.buttonDark}!important; & .icon-wrapper { diff --git a/src/components/StatementBrowser/styled.js b/src/components/StatementBrowser/styled.js index cb671ed28..26ee5ca92 100644 --- a/src/components/StatementBrowser/styled.js +++ b/src/components/StatementBrowser/styled.js @@ -6,7 +6,7 @@ export const StyledStatementItem = styled(ListGroupItem)` padding: 0.5rem 0.75rem !important; cursor: default; background-color: ${props => props.theme.ultraLightBlue} !important; - border-color: ${props => props.theme.ultraLightBlueDarker} !important; + border-color: ${props => props.theme.lightDarker} !important; overflow-wrap: break-word; word-break: break-all; flex: 1; @@ -84,7 +84,7 @@ export const StyledDropdownItem = styled(DropdownItem)` export const StyledButton = styled(Button)` border-color: #ced4da !important; color: ${props => props.theme.buttonDark} !important; - background: ${props => props.theme.ultraLightBlueDarker} !important; + background: ${props => props.theme.lightDarker} !important; &:hover { color: #fff !important; background-color: ${props => props.theme.secondary} !important; @@ -99,7 +99,7 @@ export const StyledDropdownToggle = styled(DropdownToggle).withConfig({ border-bottom-left-radius: ${props => (props.disableBorderRadiusLeft ? '0' : '4px !important')}; border-top-right-radius: ${props => (props.disableBorderRadiusRight ? '0' : '4px !important')}; border-bottom-right-radius: ${props => (props.disableBorderRadiusRight ? '0' : '4px !important')}; - background: ${props => props.theme.ultraLightBlueDarker} !important; + background: ${props => props.theme.lightDarker} !important; color: ${props => props.theme.buttonDark} !important; border-color: #ced4da !important; &:hover { @@ -363,13 +363,13 @@ export const TemplateHeaderStyle = styled.div` &:focus { outline: 0; - border: 1px dashed ${props => props.theme.ultraLightBlueDarker}; + border: 1px dashed ${props => props.theme.lightDarker}; box-shadow: none; } } & .type { font-size: 0.9rem; - color: ${props => props.theme.ultraLightBlueDarker}; + color: ${props => props.theme.lightDarker}; opacity: 0.9; .span { background-color: ${props => props.theme.buttonDark}; diff --git a/src/components/UserAvatar/UserAvatar.js b/src/components/UserAvatar/UserAvatar.js index 6fbfee768..1b30cdf28 100644 --- a/src/components/UserAvatar/UserAvatar.js +++ b/src/components/UserAvatar/UserAvatar.js @@ -11,7 +11,7 @@ import Tippy from '@tippyjs/react'; import PropTypes from 'prop-types'; const StyledGravatar = styled(Gravatar)` - border: 2px solid ${props => props.theme.ultraLightBlueDarker}; + border: 2px solid ${props => props.theme.lightDarker}; cursor: pointer; &:hover { border: 2px solid ${props => props.theme.primary}; @@ -25,14 +25,14 @@ const StyledSpinnerGravatar = styled.div` text-align: center; line-height: 28px; color: ${props => props.theme.secondary}; - border: 2px solid ${props => props.theme.ultraLightBlueDarker}; + border: 2px solid ${props => props.theme.lightDarker}; cursor: pointer; vertical-align: sub; &:hover { border: 2px solid ${props => props.theme.primary}; } - background-color: ${props => props.theme.ultraLightBlueDarker}; + background-color: ${props => props.theme.lightDarker}; `; const UserAvatar = ({ userId }) => { diff --git a/src/components/ViewPaper/EditDialog/styled.js b/src/components/ViewPaper/EditDialog/styled.js index 9702863d6..0b17b94b4 100644 --- a/src/components/ViewPaper/EditDialog/styled.js +++ b/src/components/ViewPaper/EditDialog/styled.js @@ -22,7 +22,7 @@ export const StyledStatementItem = styled(ListGroupItem)` padding: 0.5rem 0.75rem !important; cursor: default; background-color: ${props => props.theme.ultraLightBlue} !important; - border-color: ${props => props.theme.ultraLightBlueDarker} !important; + border-color: ${props => props.theme.lightDarker} !important; overflow-wrap: break-word; word-break: break-all; flex: 1; diff --git a/src/components/styled.js b/src/components/styled.js index 06fe07529..1c93b9135 100644 --- a/src/components/styled.js +++ b/src/components/styled.js @@ -19,7 +19,7 @@ export const SubTitle = styled.div` `; export const StyledGravatar = styled(Gravatar)` - border: 2px solid ${props => props.theme.ultraLightBlueDarker}; + border: 2px solid ${props => props.theme.lightDarker}; cursor: pointer; &:hover { border: 2px solid ${props => props.theme.primary}; @@ -33,14 +33,14 @@ export const StyledDotGravatar = styled.div` text-align: center; line-height: 48px; color: ${props => props.theme.secondary}; - border: 2px solid ${props => props.theme.ultraLightBlueDarker}; + border: 2px solid ${props => props.theme.lightDarker}; cursor: pointer; vertical-align: sub; &:hover { border: 2px solid ${props => props.theme.primary}; } - background-color: ${props => props.theme.ultraLightBlueDarker}; + background-color: ${props => props.theme.lightDarker}; `; export const ContributorsAvatars = styled.div` diff --git a/src/libs/selfVisModel/ComparisonComponents/AddVisualizationModal.js b/src/libs/selfVisModel/ComparisonComponents/AddVisualizationModal.js index 88b9b32e7..c673c590c 100644 --- a/src/libs/selfVisModel/ComparisonComponents/AddVisualizationModal.js +++ b/src/libs/selfVisModel/ComparisonComponents/AddVisualizationModal.js @@ -15,14 +15,14 @@ import { FontAwesomeIcon as Icon } from '@fortawesome/react-fontawesome'; import { faQuestionCircle } from '@fortawesome/free-solid-svg-icons'; const TabButtons = styled(Row)` - border-bottom: 2px solid ${props => props.theme.ultraLightBlueDarker}; + border-bottom: 2px solid ${props => props.theme.lightDarker}; `; const TabButton = styled.div` cursor: pointer; padding: 4px 20px; background-color: ${props => (props.active ? props.theme.primary : props.theme.themeColors.lightblue)}; - border: ${props => (props.active ? 'none' : '1px solid ' + props.theme.ultraLightBlueDarker)}; + border: ${props => (props.active ? 'none' : '1px solid ' + props.theme.lightDarker)}; border-bottom: 0; color: ${props => (props.active ? '#ffffff' : '')}; font-size: 18px; diff --git a/src/libs/selfVisModel/VisRenderer/VisualizationWidget.js b/src/libs/selfVisModel/VisRenderer/VisualizationWidget.js index a3f95a5ff..08a9609d2 100644 --- a/src/libs/selfVisModel/VisRenderer/VisualizationWidget.js +++ b/src/libs/selfVisModel/VisRenderer/VisualizationWidget.js @@ -222,6 +222,6 @@ const SideBar = styled.div` min-width: 320px; overflow: auto; background-color: ${props => props.theme.ultraLightBlue} !important; - border: 1px solid ${props => props.theme.ultraLightBlueDarker} !important; + border: 1px solid ${props => props.theme.lightDarker} !important; border-radius: ${props => props.theme.borderRadius}; `; diff --git a/src/pages/Observatories/Observatories.js b/src/pages/Observatories/Observatories.js index 6fe2ff17b..049c95838 100644 --- a/src/pages/Observatories/Observatories.js +++ b/src/pages/Observatories/Observatories.js @@ -34,7 +34,7 @@ const StyledResearchFieldItem = styled(NavLink)` transition: 0.3s background; border-top-left-radius: ${props => props.theme.borderRadius}; border-bottom-left-radius: ${props => props.theme.borderRadius}; - border: 1px solid ${props => props.theme.ultraLightBlueDarker}; + border: 1px solid ${props => props.theme.lightDarker}; background-color: ${props => props.theme.ultraLightBlue}; color: inherit; diff --git a/src/pages/Tools.js b/src/pages/Tools.js index 833e4330b..ebfcc9cee 100644 --- a/src/pages/Tools.js +++ b/src/pages/Tools.js @@ -43,8 +43,8 @@ const ToolContainer = styled(Link)` `; const ImgContainer = styled.div` - border-top: 2px solid ${props => props.theme.ultraLightBlueDarker}; - border-bottom: 2px solid ${props => props.theme.ultraLightBlueDarker}; + border-top: 2px solid ${props => props.theme.lightDarker}; + border-bottom: 2px solid ${props => props.theme.lightDarker}; height: 160px; display: flex; align-items: center; diff --git a/src/pages/ViewPaper.js b/src/pages/ViewPaper.js index 488299908..0d6acffdc 100644 --- a/src/pages/ViewPaper.js +++ b/src/pages/ViewPaper.js @@ -40,7 +40,7 @@ export const Title = styled.div` flex-grow: 1; & span { font-size: small; - color: ${props => props.theme.ultraLightBlueDarker}; + color: ${props => props.theme.lightDarker}; } `; diff --git a/src/testUtils.js b/src/testUtils.js index 9c7799441..658e6de04 100644 --- a/src/testUtils.js +++ b/src/testUtils.js @@ -15,7 +15,7 @@ export const theme = { secondaryDarker: 'rgb(80, 85, 101)', light: 'rgb(233, 236, 239)', ultraLightBlue: 'rgb(248, 249, 251)', - ultraLightBlueDarker: 'rgb(219, 221, 229)', + lightDarker: 'rgb(219, 221, 229)', bodyBg: 'rgb(233, 235, 242)', bodyColor: 'rgb(79, 79, 79)', borderWidth: '1px', From 07197508881d0bd4eb7bf732060bbfd5eeb89c3e Mon Sep 17 00:00:00 2001 From: Allard Oelen Date: Thu, 8 Apr 2021 17:22:54 +0200 Subject: [PATCH 05/10] Replace ultra-light-blue --- src/components/AddPaper/Contributions/styled.js | 6 +++--- src/components/Home/Benefits.js | 2 +- src/components/Home/ObservatoriesCarousel.js | 4 ++-- src/components/Layout/Header/AddNew.js | 2 +- .../ObservatoriesCarousel/ObservatoriesCarousel.js | 4 ++-- src/components/StatementBrowser/Template/styled.js | 2 +- src/components/StatementBrowser/styled.js | 6 +++--- src/components/ViewPaper/EditDialog/styled.js | 2 +- src/libs/selfVisModel/VisRenderer/VisualizationWidget.js | 2 +- src/pages/CsvImport.js | 2 +- src/pages/Observatories/Observatories.js | 2 +- src/testUtils.js | 2 +- 12 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/components/AddPaper/Contributions/styled.js b/src/components/AddPaper/Contributions/styled.js index 6eb0f025d..a3d1f8f51 100644 --- a/src/components/AddPaper/Contributions/styled.js +++ b/src/components/AddPaper/Contributions/styled.js @@ -37,7 +37,7 @@ export const StyledHorizontalContributionsList = styled.ul` .contribution-item { border: 1px solid ${props => props.theme.lightDarker}; border-bottom: 0; - background-color: ${props => props.theme.ultraLightBlue}; + background-color: ${props => props.theme.lightLighter}; position: relative; box-sizing: border-box; padding: 7px 15px 7px 15px; @@ -70,7 +70,7 @@ export const AddContribution = styled(Button)` &&& { padding: 0; border: 1px solid ${props => props.theme.lightDarker}; - background-color: ${props => props.theme.ultraLightBlue}; + background-color: ${props => props.theme.lightLighter}; border-radius: 60px; margin: 0 5px; cursor: pointer; @@ -131,7 +131,7 @@ export const StyledResearchFieldBrowser = styled.div` export const StyledStatementItem = styled(ListGroupItem)` padding: 0.5rem 0.75rem !important; cursor: default; - background-color: ${props => props.theme.ultraLightBlue} !important; + background-color: ${props => props.theme.lightLighter} !important; border-color: ${props => props.theme.lightDarker} !important; overflow-wrap: break-word; word-break: break-all; diff --git a/src/components/Home/Benefits.js b/src/components/Home/Benefits.js index 2920b99b7..64d74a043 100644 --- a/src/components/Home/Benefits.js +++ b/src/components/Home/Benefits.js @@ -44,7 +44,7 @@ const CarouselIndicatorsStyled = styled(CarouselIndicators)` margin: 0; } - background: ${props => props.theme.ultraLightBlue}; + background: ${props => props.theme.lightLighter}; `; const ITEMS = [ diff --git a/src/components/Home/ObservatoriesCarousel.js b/src/components/Home/ObservatoriesCarousel.js index 77b4a69b4..295de4b0e 100644 --- a/src/components/Home/ObservatoriesCarousel.js +++ b/src/components/Home/ObservatoriesCarousel.js @@ -45,7 +45,7 @@ const CarouselIndicatorsStyled = styled(CarouselIndicators)` margin: 0; } - background: ${props => props.theme.ultraLightBlue}; + background: ${props => props.theme.lightLighter}; `; const StyledGravatar = styled(Gravatar)` @@ -58,7 +58,7 @@ const StyledGravatar = styled(Gravatar)` const CardFooterStyled = styled(CardFooter)` && { - background: ${props => props.theme.ultraLightBlue}; + background: ${props => props.theme.lightLighter}; } `; diff --git a/src/components/Layout/Header/AddNew.js b/src/components/Layout/Header/AddNew.js index 99789f9f4..3b7e2b586 100644 --- a/src/components/Layout/Header/AddNew.js +++ b/src/components/Layout/Header/AddNew.js @@ -45,7 +45,7 @@ const ToolContainer = styled(Link)` } &:hover { - background-color: ${props => props.theme.ultraLightBlue}; + background-color: ${props => props.theme.lightLighter}; color: inherit; text-decoration: none; } diff --git a/src/components/ObservatoriesCarousel/ObservatoriesCarousel.js b/src/components/ObservatoriesCarousel/ObservatoriesCarousel.js index 0c7ab97d4..bc59aeaaa 100644 --- a/src/components/ObservatoriesCarousel/ObservatoriesCarousel.js +++ b/src/components/ObservatoriesCarousel/ObservatoriesCarousel.js @@ -45,7 +45,7 @@ const CarouselIndicatorsStyled = styled(CarouselIndicators)` margin: 0; } - background: ${props => props.theme.ultraLightBlue}; + background: ${props => props.theme.lightLighter}; `; const StyledGravatar = styled(Gravatar)` @@ -58,7 +58,7 @@ const StyledGravatar = styled(Gravatar)` const CardFooterStyled = styled(CardFooter)` && { - background: ${props => props.theme.ultraLightBlue}; + background: ${props => props.theme.lightLighter}; } `; diff --git a/src/components/StatementBrowser/Template/styled.js b/src/components/StatementBrowser/Template/styled.js index 4ac0c0c47..3f7b55dfe 100644 --- a/src/components/StatementBrowser/Template/styled.js +++ b/src/components/StatementBrowser/Template/styled.js @@ -9,7 +9,7 @@ export const AddPropertyWrapper = styled(ListGroupItem)` border-bottom-right-radius: 4px !important; & .propertyHolder { height: 20px; - background-color: ${props => props.theme.ultraLightBlue}; + background-color: ${props => props.theme.lightLighter}; } `; diff --git a/src/components/StatementBrowser/styled.js b/src/components/StatementBrowser/styled.js index 26ee5ca92..432306d1a 100644 --- a/src/components/StatementBrowser/styled.js +++ b/src/components/StatementBrowser/styled.js @@ -5,7 +5,7 @@ import { ListGroupItem, DropdownItem, Button, DropdownToggle } from 'reactstrap' export const StyledStatementItem = styled(ListGroupItem)` padding: 0.5rem 0.75rem !important; cursor: default; - background-color: ${props => props.theme.ultraLightBlue} !important; + background-color: ${props => props.theme.lightLighter} !important; border-color: ${props => props.theme.lightDarker} !important; overflow-wrap: break-word; word-break: break-all; @@ -228,7 +228,7 @@ export const AddPropertyFormStyle = styled.div` } .input-group-prepend { - background-color: ${props => props.theme.ultraLightBlue}; + background-color: ${props => props.theme.lightLighter}; cursor: default; display: flex; border: 1px solid rgba(0, 0, 0, 0.125); @@ -263,7 +263,7 @@ export const StatementsGroupStyle = styled(ListGroupItem)` `; export const PropertyStyle = styled.div` - background-color: ${props => props.theme.ultraLightBlue}; + background-color: ${props => props.theme.lightLighter}; overflow-wrap: break-word; border-radius: 3px 0 0 3px; diff --git a/src/components/ViewPaper/EditDialog/styled.js b/src/components/ViewPaper/EditDialog/styled.js index 0b17b94b4..6fe2ac936 100644 --- a/src/components/ViewPaper/EditDialog/styled.js +++ b/src/components/ViewPaper/EditDialog/styled.js @@ -21,7 +21,7 @@ export const StyledListGroupOpen = styled(Collapse)` export const StyledStatementItem = styled(ListGroupItem)` padding: 0.5rem 0.75rem !important; cursor: default; - background-color: ${props => props.theme.ultraLightBlue} !important; + background-color: ${props => props.theme.lightLighter} !important; border-color: ${props => props.theme.lightDarker} !important; overflow-wrap: break-word; word-break: break-all; diff --git a/src/libs/selfVisModel/VisRenderer/VisualizationWidget.js b/src/libs/selfVisModel/VisRenderer/VisualizationWidget.js index 08a9609d2..3f9726384 100644 --- a/src/libs/selfVisModel/VisRenderer/VisualizationWidget.js +++ b/src/libs/selfVisModel/VisRenderer/VisualizationWidget.js @@ -221,7 +221,7 @@ const SideBar = styled.div` width: 320px; min-width: 320px; overflow: auto; - background-color: ${props => props.theme.ultraLightBlue} !important; + background-color: ${props => props.theme.lightLighter} !important; border: 1px solid ${props => props.theme.lightDarker} !important; border-radius: ${props => props.theme.borderRadius}; `; diff --git a/src/pages/CsvImport.js b/src/pages/CsvImport.js index 80656425d..bab0dbe29 100644 --- a/src/pages/CsvImport.js +++ b/src/pages/CsvImport.js @@ -12,7 +12,7 @@ import { faQuestionCircle } from '@fortawesome/free-solid-svg-icons'; const TableContainerStyled = styled.div` overflow: auto; - background: ${props => props.theme.ultraLightBlue}; + background: ${props => props.theme.lightLighter}; font-size: 90%; max-height: 500px; border: 2px solid ${props => props.theme.secondary}; diff --git a/src/pages/Observatories/Observatories.js b/src/pages/Observatories/Observatories.js index 049c95838..8408a4777 100644 --- a/src/pages/Observatories/Observatories.js +++ b/src/pages/Observatories/Observatories.js @@ -35,7 +35,7 @@ const StyledResearchFieldItem = styled(NavLink)` border-top-left-radius: ${props => props.theme.borderRadius}; border-bottom-left-radius: ${props => props.theme.borderRadius}; border: 1px solid ${props => props.theme.lightDarker}; - background-color: ${props => props.theme.ultraLightBlue}; + background-color: ${props => props.theme.lightLighter}; color: inherit; cursor: pointer !important; diff --git a/src/testUtils.js b/src/testUtils.js index 658e6de04..4f9577a2e 100644 --- a/src/testUtils.js +++ b/src/testUtils.js @@ -14,7 +14,7 @@ export const theme = { secondary: 'rgb(128, 134, 155)', secondaryDarker: 'rgb(80, 85, 101)', light: 'rgb(233, 236, 239)', - ultraLightBlue: 'rgb(248, 249, 251)', + lightLighter: 'rgb(248, 249, 251)', lightDarker: 'rgb(219, 221, 229)', bodyBg: 'rgb(233, 235, 242)', bodyColor: 'rgb(79, 79, 79)', From 5e52e30e3c9c70cde2e070708622bb83dcebe05d Mon Sep 17 00:00:00 2001 From: Allard Oelen Date: Thu, 8 Apr 2021 17:24:19 +0200 Subject: [PATCH 06/10] Replace lightblue --- src/assets/scss/CustomBootstrap.scss | 2 +- .../Comparison/AddContribution/AddContribution.js | 2 +- src/components/Comparison/ComparisonMetaData.js | 8 ++++---- src/components/Comparison/Filters/AppliedRule.js | 2 +- src/components/Comparison/ProvenanceBox/ObservatoryBox.js | 2 +- src/components/Comparison/SelectProperties.js | 2 +- src/components/Comparison/styled.js | 4 ++-- .../FeaturedComparisons/FeaturedComparisonsItem.js | 2 +- src/components/Home/FeaturedComparisons.js | 4 ++-- src/components/Home/FeaturedPapers.js | 4 ++-- src/components/Home/ResearchProblemsBox.js | 2 +- src/components/LastUpdatesBox/LastUpdatesBox.js | 2 +- src/components/ObjectStatements/ObjectStatements.js | 2 +- src/components/Observatory/MembersBox.js | 2 +- src/components/Observatory/ResearchProblemsBox.js | 2 +- src/components/PropertyStatements/PropertyStatements.js | 2 +- src/components/ResearchField/ResearchFieldHeader.js | 4 ++-- src/components/ResearchProblem/ResearchProblemHeader.js | 4 ++-- .../ResearchProblemsBox/ProblemsDropdownFilter.js | 4 ++-- src/components/ResearchProblemsBox/ResearchProblemsBox.js | 2 +- src/components/TopAuthors/AuthorsBox.js | 2 +- src/components/TopContributors/ContributorsBox.js | 2 +- .../TopContributors/ContributorsDropdownFilter.js | 4 ++-- src/components/ViewPaper/PaperHeader.js | 8 ++++---- .../ComparisonComponents/AddVisualizationModal.js | 2 +- .../ComparisonComponents/SingleVisualizationComponent.js | 6 +++--- src/testUtils.js | 2 +- 27 files changed, 42 insertions(+), 42 deletions(-) diff --git a/src/assets/scss/CustomBootstrap.scss b/src/assets/scss/CustomBootstrap.scss index 898859cac..93b9db2fb 100644 --- a/src/assets/scss/CustomBootstrap.scss +++ b/src/assets/scss/CustomBootstrap.scss @@ -6,7 +6,7 @@ .dropdown-item { outline: 0 !important; // bootstrap menus are accessible by keyboard, the background changes (so no outline needed) } -.badge-lightblue { +.badge-light { color: #5c6873; // it is not possible using theme variables to set the text color } diff --git a/src/components/Comparison/AddContribution/AddContribution.js b/src/components/Comparison/AddContribution/AddContribution.js index 488213fb6..572cb7b6c 100644 --- a/src/components/Comparison/AddContribution/AddContribution.js +++ b/src/components/Comparison/AddContribution/AddContribution.js @@ -322,7 +322,7 @@ export default function AddContribution(props) { {props.allowCreate && (
-
diff --git a/src/components/Comparison/ComparisonMetaData.js b/src/components/Comparison/ComparisonMetaData.js index a060a326a..6ea3fea94 100644 --- a/src/components/Comparison/ComparisonMetaData.js +++ b/src/components/Comparison/ComparisonMetaData.js @@ -21,7 +21,7 @@ function ComparisonMetaData(props) { )}
{props.metaData.createdAt ? ( - + {' '} {props.metaData.createdAt ? moment(props.metaData.createdAt).format('MMMM') : ''}{' '} {props.metaData.createdAt ? moment(props.metaData.createdAt).format('YYYY') : ''} @@ -35,7 +35,7 @@ function ComparisonMetaData(props) { {props.authors.map((author, index) => author.id && author.id !== '' && author.orcid && author.orcid !== '' ? ( - + {author.label} @@ -48,12 +48,12 @@ function ComparisonMetaData(props) { rel="noopener noreferrer" key={index} > - + {author.label} ) : ( - + {author.label} ) diff --git a/src/components/Comparison/Filters/AppliedRule.js b/src/components/Comparison/Filters/AppliedRule.js index 2c6e7d4a4..b68b9aa00 100644 --- a/src/components/Comparison/Filters/AppliedRule.js +++ b/src/components/Comparison/Filters/AppliedRule.js @@ -23,7 +23,7 @@ const AppliedRule = props => { const { propertyName, type, value, removeRule } = data; return ( - + {propertyName}  {stringifyType(type)}   diff --git a/src/components/Comparison/ProvenanceBox/ObservatoryBox.js b/src/components/Comparison/ProvenanceBox/ObservatoryBox.js index 81100faf8..dd0d8e5cd 100644 --- a/src/components/Comparison/ProvenanceBox/ObservatoryBox.js +++ b/src/components/Comparison/ProvenanceBox/ObservatoryBox.js @@ -6,7 +6,7 @@ import styled from 'styled-components'; const ObservatoryBoxStyled = styled.div` float: right; - border: 2px solid ${props => props.theme.themeColors.lightblue}; + border: 2px solid ${props => props.theme.light}; border-radius: 5px; display: flex; padding: 5px 20px; diff --git a/src/components/Comparison/SelectProperties.js b/src/components/Comparison/SelectProperties.js index e2532b560..a44e3e266 100644 --- a/src/components/Comparison/SelectProperties.js +++ b/src/components/Comparison/SelectProperties.js @@ -42,7 +42,7 @@ function SelectProperties(props) { checked={property.active} /> - {property.contributionAmount} + {property.contributionAmount} )); diff --git a/src/components/Comparison/styled.js b/src/components/Comparison/styled.js index 096c5e557..bb0c0a5b2 100644 --- a/src/components/Comparison/styled.js +++ b/src/components/Comparison/styled.js @@ -201,7 +201,7 @@ export const ItemHeaderInner = styled.div` color: #fff !important; } &.contribution-editor { - background: ${props => props.theme.themeColors.lightblue}; + background: ${props => props.theme.light}; } `; @@ -232,7 +232,7 @@ export const Delete = styled.button` background: #fff; } &.contribution-editor { - color: ${props => props.theme.themeColors.lightblue}; + color: ${props => props.theme.light}; right: -5px; background: ${props => props.theme.secondary}; &:hover { diff --git a/src/components/FeaturedComparisons/FeaturedComparisonsItem.js b/src/components/FeaturedComparisons/FeaturedComparisonsItem.js index 6d1c16ecf..8558a0e02 100644 --- a/src/components/FeaturedComparisons/FeaturedComparisonsItem.js +++ b/src/components/FeaturedComparisons/FeaturedComparisonsItem.js @@ -63,7 +63,7 @@ class FeaturedComparisonsItem extends Component { {this.props.title} {this.props.description} - {contributionsLength} contributions + {contributionsLength} contributions diff --git a/src/components/Home/FeaturedComparisons.js b/src/components/Home/FeaturedComparisons.js index d6ee95890..68b2c999a 100644 --- a/src/components/Home/FeaturedComparisons.js +++ b/src/components/Home/FeaturedComparisons.js @@ -36,7 +36,7 @@ const FeaturedComparisons = ({ researchFieldId }) => {
{researchFieldId === MISC.RESEARCH_FIELD_MAIN && ( - + {stringifySort(sort)} @@ -99,7 +99,7 @@ const FeaturedComparisons = ({ researchFieldId }) => { } > - diff --git a/src/components/Home/FeaturedPapers.js b/src/components/Home/FeaturedPapers.js index 1328d41c3..651400f9c 100644 --- a/src/components/Home/FeaturedPapers.js +++ b/src/components/Home/FeaturedPapers.js @@ -36,7 +36,7 @@ const FeaturedPapers = ({ researchFieldId }) => {
{researchFieldId === MISC.RESEARCH_FIELD_MAIN && ( - + {stringifySort(sort)} @@ -99,7 +99,7 @@ const FeaturedPapers = ({ researchFieldId }) => { } > - diff --git a/src/components/Home/ResearchProblemsBox.js b/src/components/Home/ResearchProblemsBox.js index 489485525..7bdaadcfe 100644 --- a/src/components/Home/ResearchProblemsBox.js +++ b/src/components/Home/ResearchProblemsBox.js @@ -32,7 +32,7 @@ const ResearchProblemsBox = ({ id }) => {
{researchProblems.length > 5 && (
-
diff --git a/src/components/LastUpdatesBox/LastUpdatesBox.js b/src/components/LastUpdatesBox/LastUpdatesBox.js index 95029d933..2c0e6f573 100644 --- a/src/components/LastUpdatesBox/LastUpdatesBox.js +++ b/src/components/LastUpdatesBox/LastUpdatesBox.js @@ -36,7 +36,7 @@ const LastUpdatesBox = ({ researchFieldId }) => { {!isLoading && activities.length > 3 && (
-
diff --git a/src/components/ObjectStatements/ObjectStatements.js b/src/components/ObjectStatements/ObjectStatements.js index 25e36c890..3a794ebf6 100644 --- a/src/components/ObjectStatements/ObjectStatements.js +++ b/src/components/ObjectStatements/ObjectStatements.js @@ -98,7 +98,7 @@ const ObjectStatements = props => { {!isLoading && hasNextPage && ( - diff --git a/src/components/Observatory/MembersBox.js b/src/components/Observatory/MembersBox.js index 76de40bbc..dd599b7c0 100644 --- a/src/components/Observatory/MembersBox.js +++ b/src/components/Observatory/MembersBox.js @@ -48,7 +48,7 @@ const MembersBox = ({ observatoryId, organizationsList }) => { })} {!isLoadingMembers && members?.length > 4 && (
- {openModal && ( diff --git a/src/components/Observatory/ResearchProblemsBox.js b/src/components/Observatory/ResearchProblemsBox.js index 5eb06f72d..317e191f0 100644 --- a/src/components/Observatory/ResearchProblemsBox.js +++ b/src/components/Observatory/ResearchProblemsBox.js @@ -72,7 +72,7 @@ const ResearchProblemsBox = ({ observatoryId, organizationsList }) => { )} {problemsList?.length > 5 && (
- {openModal && ( diff --git a/src/components/PropertyStatements/PropertyStatements.js b/src/components/PropertyStatements/PropertyStatements.js index 245402337..0f78680db 100644 --- a/src/components/PropertyStatements/PropertyStatements.js +++ b/src/components/PropertyStatements/PropertyStatements.js @@ -58,7 +58,7 @@ const PropertyStatements = ({ propertyId }) => { {!isLoading && hasNextPage && ( - diff --git a/src/components/ResearchField/ResearchFieldHeader.js b/src/components/ResearchField/ResearchFieldHeader.js index d41b5639e..99ea43b57 100644 --- a/src/components/ResearchField/ResearchFieldHeader.js +++ b/src/components/ResearchField/ResearchFieldHeader.js @@ -151,7 +151,7 @@ const ResearchFieldHeader = ({ id }) => { slug: subfield.label })} > - + {subfield.label} @@ -166,7 +166,7 @@ const ResearchFieldHeader = ({ id }) => { slug: subfield.label })} > - + {subfield.label} diff --git a/src/components/ResearchProblem/ResearchProblemHeader.js b/src/components/ResearchProblem/ResearchProblemHeader.js index 70c21e02f..1df7b5ec1 100644 --- a/src/components/ResearchProblem/ResearchProblemHeader.js +++ b/src/components/ResearchProblem/ResearchProblemHeader.js @@ -161,7 +161,7 @@ const ResearchProblemHeader = ({ id }) => { slug: subfield.label })} > - + {subfield.label} @@ -176,7 +176,7 @@ const ResearchProblemHeader = ({ id }) => { slug: subfield.label })} > - + {subfield.label} diff --git a/src/components/ResearchProblemsBox/ProblemsDropdownFilter.js b/src/components/ResearchProblemsBox/ProblemsDropdownFilter.js index ed777cc96..e2149a677 100644 --- a/src/components/ResearchProblemsBox/ProblemsDropdownFilter.js +++ b/src/components/ResearchProblemsBox/ProblemsDropdownFilter.js @@ -12,7 +12,7 @@ const ProblemsDropdownFilter = ({ sort, isLoading, includeSubFields, setSort, se <> {sort === 'top' && ( - + {stringifySort(sort)} @@ -70,7 +70,7 @@ const ProblemsDropdownFilter = ({ sort, isLoading, includeSubFields, setSort, se } > - diff --git a/src/components/ResearchProblemsBox/ResearchProblemsBox.js b/src/components/ResearchProblemsBox/ResearchProblemsBox.js index 63d99bb93..e11dfc8de 100644 --- a/src/components/ResearchProblemsBox/ResearchProblemsBox.js +++ b/src/components/ResearchProblemsBox/ResearchProblemsBox.js @@ -52,7 +52,7 @@ const ResearchProblemsBox = ({ researchFieldId }) => { )} {totalElements > 5 && (
- {openModal && } diff --git a/src/components/TopAuthors/AuthorsBox.js b/src/components/TopAuthors/AuthorsBox.js index 3cec20d7f..cd3259cf7 100644 --- a/src/components/TopAuthors/AuthorsBox.js +++ b/src/components/TopAuthors/AuthorsBox.js @@ -31,7 +31,7 @@ const AuthorsBox = ({ researchProblemId }) => { {!isLoading && authors?.length === 0 &&
No authors in this research problem yet.
} {!isLoading && authors?.length > 3 && (
- {openModal && } diff --git a/src/components/TopContributors/ContributorsBox.js b/src/components/TopContributors/ContributorsBox.js index a8844e714..a6f31dc53 100644 --- a/src/components/TopContributors/ContributorsBox.js +++ b/src/components/TopContributors/ContributorsBox.js @@ -42,7 +42,7 @@ const ContributorsBox = ({ researchFieldId }) => { )} {!isLoading && contributors?.length > 4 && (
- {openModal && } diff --git a/src/components/TopContributors/ContributorsDropdownFilter.js b/src/components/TopContributors/ContributorsDropdownFilter.js index d1f030f0b..e6329c15a 100644 --- a/src/components/TopContributors/ContributorsDropdownFilter.js +++ b/src/components/TopContributors/ContributorsDropdownFilter.js @@ -12,7 +12,7 @@ const ContributorsDropdownFilter = ({ sort, isLoading, includeSubFields, setSort <> {sort === 'top' && ( - + {stringifySort(sort)} @@ -70,7 +70,7 @@ const ContributorsDropdownFilter = ({ sort, isLoading, includeSubFields, setSort } > - diff --git a/src/components/ViewPaper/PaperHeader.js b/src/components/ViewPaper/PaperHeader.js index 787de8769..62dfe3f39 100644 --- a/src/components/ViewPaper/PaperHeader.js +++ b/src/components/ViewPaper/PaperHeader.js @@ -55,7 +55,7 @@ const PaperHeader = props => {
{viewPaper.publicationMonth || viewPaper.publicationYear ? ( - + {' '} {viewPaper.publicationMonth ? moment(viewPaper.publicationMonth, 'M').format('MMMM') : ''}{' '} {viewPaper.publicationYear ? viewPaper.publicationYear : ''} @@ -67,7 +67,7 @@ const PaperHeader = props => { - + {viewPaper.researchField.label} @@ -75,12 +75,12 @@ const PaperHeader = props => { {viewPaper.authors.map((author, index) => author.classes && author.classes.includes(CLASSES.AUTHOR) ? ( - + {author.label} ) : ( - + {author.label} ) diff --git a/src/libs/selfVisModel/ComparisonComponents/AddVisualizationModal.js b/src/libs/selfVisModel/ComparisonComponents/AddVisualizationModal.js index c673c590c..bbe706e79 100644 --- a/src/libs/selfVisModel/ComparisonComponents/AddVisualizationModal.js +++ b/src/libs/selfVisModel/ComparisonComponents/AddVisualizationModal.js @@ -21,7 +21,7 @@ const TabButtons = styled(Row)` const TabButton = styled.div` cursor: pointer; padding: 4px 20px; - background-color: ${props => (props.active ? props.theme.primary : props.theme.themeColors.lightblue)}; + background-color: ${props => (props.active ? props.theme.primary : props.theme.light)}; border: ${props => (props.active ? 'none' : '1px solid ' + props.theme.lightDarker)}; border-bottom: 0; color: ${props => (props.active ? '#ffffff' : '')}; diff --git a/src/libs/selfVisModel/ComparisonComponents/SingleVisualizationComponent.js b/src/libs/selfVisModel/ComparisonComponents/SingleVisualizationComponent.js index 307d2b1b0..1247fc41b 100644 --- a/src/libs/selfVisModel/ComparisonComponents/SingleVisualizationComponent.js +++ b/src/libs/selfVisModel/ComparisonComponents/SingleVisualizationComponent.js @@ -113,7 +113,7 @@ const SingleVisualizationComponent = props => { Meta Information:
Created on: - + {' '} {props.input.created_at ? moment(props.input.created_at).format('dddd, MMMM Do YYYY') : ''} @@ -129,14 +129,14 @@ const SingleVisualizationComponent = props => { to={reverse(ROUTES.AUTHOR_PAGE, { authorId: author.id })} key={`author${author.id}`} > - + {author.label} ); } else { return ( - + {author.label} ); diff --git a/src/testUtils.js b/src/testUtils.js index 4f9577a2e..588e97fc1 100644 --- a/src/testUtils.js +++ b/src/testUtils.js @@ -21,7 +21,7 @@ export const theme = { borderWidth: '1px', borderRadius: '6px', themeColors: { - lightblue: 'rgb(233, 235, 242)', + light: 'rgb(233, 235, 242)', secondary: 'rgb(128, 134, 155)', secondaryDarker: 'rgb(80, 85, 101)', primaryDarker: 'rgb(198, 29, 29)' From bdce0e515cc9c90f404ea7cbeb28d9017ebea8f6 Mon Sep 17 00:00:00 2001 From: Allard Oelen Date: Thu, 8 Apr 2021 17:27:05 +0200 Subject: [PATCH 07/10] Replace button dark and avatar border --- src/components/ComparisonPopup/ComparisonPopup.js | 6 +++--- src/components/ContributorCard/ContributorCard.js | 2 +- src/components/Layout/Header/Header.js | 4 ++-- .../StatementOptionButton/StatementOptionButton.js | 2 +- src/components/StatementBrowser/styled.js | 10 +++++----- src/components/UserSettings/GeneralSettings.js | 2 +- src/pages/UserProfile.js | 2 +- src/testUtils.js | 4 ++-- 8 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/components/ComparisonPopup/ComparisonPopup.js b/src/components/ComparisonPopup/ComparisonPopup.js index 29dde6651..c4ef1259a 100644 --- a/src/components/ComparisonPopup/ComparisonPopup.js +++ b/src/components/ComparisonPopup/ComparisonPopup.js @@ -93,7 +93,7 @@ class ComparisonPopup extends Component { {!this.state.showComparisonBox ? ( - + {contributionAmount} {' '} Compare contributions @@ -101,7 +101,7 @@ class ComparisonPopup extends Component { ) : (
- + {contributionAmount} {' '} Compare contributions @@ -146,7 +146,7 @@ class ComparisonPopup extends Component {
- + Start comparison diff --git a/src/components/ContributorCard/ContributorCard.js b/src/components/ContributorCard/ContributorCard.js index 2486c41da..5a9cdb9f3 100644 --- a/src/components/ContributorCard/ContributorCard.js +++ b/src/components/ContributorCard/ContributorCard.js @@ -6,7 +6,7 @@ import styled from 'styled-components'; import PropTypes from 'prop-types'; const StyledGravatar = styled(Gravatar)` - border: 3px solid ${props => props.theme.avatarBorderColor}; + border: 3px solid ${props => props.theme.dark}; cursor: pointer; `; diff --git a/src/components/Layout/Header/Header.js b/src/components/Layout/Header/Header.js index 007cdffd1..c8181a2ee 100644 --- a/src/components/Layout/Header/Header.js +++ b/src/components/Layout/Header/Header.js @@ -80,7 +80,7 @@ const StyledLink = styled(Link)` `; const StyledGravatar = styled(Gravatar)` - border: 3px solid ${props => props.theme.avatarBorderColor}; + border: 3px solid ${props => props.theme.dark}; cursor: pointer; `; @@ -112,7 +112,7 @@ const StyledAuthTooltip = styled(Tooltip)` .btn { border-color: ${props => props.theme.secondary}; - background-color: ${props => props.theme.buttonDark}; + background-color: ${props => props.theme.dark}; &:hover { background-color: ${props => props.theme.secondaryDarker}; diff --git a/src/components/StatementBrowser/StatementOptionButton/StatementOptionButton.js b/src/components/StatementBrowser/StatementOptionButton/StatementOptionButton.js index f394c78f2..6584e0d4f 100644 --- a/src/components/StatementBrowser/StatementOptionButton/StatementOptionButton.js +++ b/src/components/StatementBrowser/StatementOptionButton/StatementOptionButton.js @@ -11,7 +11,7 @@ export const OptionButton = styled(Button)` display: inline-block !important; border-radius: 100% !important; background-color: ${props => props.theme.lightDarker}!important; - color: ${props => props.theme.buttonDark}!important; + color: ${props => props.theme.dark}!important; & .icon-wrapper { display: flex !important; diff --git a/src/components/StatementBrowser/styled.js b/src/components/StatementBrowser/styled.js index 432306d1a..19c671448 100644 --- a/src/components/StatementBrowser/styled.js +++ b/src/components/StatementBrowser/styled.js @@ -83,7 +83,7 @@ export const StyledDropdownItem = styled(DropdownItem)` /* Template Wizard */ export const StyledButton = styled(Button)` border-color: #ced4da !important; - color: ${props => props.theme.buttonDark} !important; + color: ${props => props.theme.dark} !important; background: ${props => props.theme.lightDarker} !important; &:hover { color: #fff !important; @@ -100,7 +100,7 @@ export const StyledDropdownToggle = styled(DropdownToggle).withConfig({ border-top-right-radius: ${props => (props.disableBorderRadiusRight ? '0' : '4px !important')}; border-bottom-right-radius: ${props => (props.disableBorderRadiusRight ? '0' : '4px !important')}; background: ${props => props.theme.lightDarker} !important; - color: ${props => props.theme.buttonDark} !important; + color: ${props => props.theme.dark} !important; border-color: #ced4da !important; &:hover { color: #fff !important; @@ -304,14 +304,14 @@ export const PropertyStyle = styled.div` visibility: visible; opacity: 1; span { - color: ${props => props.theme.buttonDark}; + color: ${props => props.theme.dark}; } } &:focus-within .propertyOption { visibility: visible; opacity: 1; span { - color: ${props => props.theme.buttonDark}; + color: ${props => props.theme.dark}; } } `; @@ -372,7 +372,7 @@ export const TemplateHeaderStyle = styled.div` color: ${props => props.theme.lightDarker}; opacity: 0.9; .span { - background-color: ${props => props.theme.buttonDark}; + background-color: ${props => props.theme.dark}; color: ${props => props.theme.secondary}; } } diff --git a/src/components/UserSettings/GeneralSettings.js b/src/components/UserSettings/GeneralSettings.js index 2ebc1ccc2..710432207 100644 --- a/src/components/UserSettings/GeneralSettings.js +++ b/src/components/UserSettings/GeneralSettings.js @@ -12,7 +12,7 @@ import Gravatar from 'react-gravatar'; import styled from 'styled-components'; const StyledGravatar = styled(Gravatar)` - border: 3px solid ${props => props.theme.avatarBorderColor}; + border: 3px solid ${props => props.theme.dark}; `; class GeneralSettings extends Component { diff --git a/src/pages/UserProfile.js b/src/pages/UserProfile.js index 5e7472060..231ecdbc9 100644 --- a/src/pages/UserProfile.js +++ b/src/pages/UserProfile.js @@ -16,7 +16,7 @@ import { Link } from 'react-router-dom'; import PropTypes from 'prop-types'; const StyledGravatar = styled(Gravatar)` - border: 3px solid ${props => props.theme.avatarBorderColor}; + border: 3px solid ${props => props.theme.dark}; `; const StyledOrganizationCard = styled.div` diff --git a/src/testUtils.js b/src/testUtils.js index 588e97fc1..840386ce1 100644 --- a/src/testUtils.js +++ b/src/testUtils.js @@ -47,8 +47,8 @@ export const theme = { badgePaddingY: '0.3rem', badgePaddingX: '0.8rem', listGroupBorderColor: 'rgba(0, 0, 0, 0.125)', - buttonDark: 'rgb(91, 97, 118)', - avatarBorderColor: 'rgb(103, 109, 129)' + dark: 'rgb(91, 97, 118)', + dark: 'rgb(103, 109, 129)' }; // wrap the components with the required providers From e6095e4f3863304e208e1f8187cc305d5c6b41a1 Mon Sep 17 00:00:00 2001 From: Allard Oelen Date: Thu, 8 Apr 2021 17:36:38 +0200 Subject: [PATCH 08/10] Replace ORKG-primary-color --- .../AddPaper/Abstract/AbstractAnnotatorView.js | 2 +- .../AddPaper/Contributions/ContributionItemList.js | 4 ++-- .../AddPaper/Contributions/ContributionsHelpTour.js | 2 +- src/components/AddPaper/Contributions/styled.js | 10 +++++----- src/components/AddPaper/GeneralData/GeneralData.js | 4 ++-- src/components/Comparison/ComparisonVersions.js | 2 +- src/components/ComparisonPopup/styled.js | 2 +- src/components/Home/Benefits.js | 2 +- src/components/Home/ObservatoriesCarousel.js | 2 +- src/components/LastUpdatesBox/styled.js | 2 +- .../ObservatoriesCarousel/ObservatoriesCarousel.js | 2 +- src/components/PdfTextAnnotation/Help.js | 4 ++-- src/components/StatementBrowser/styled.js | 2 +- src/components/ViewPaper/EditDialog/styled.js | 2 +- .../RenderingComponents/styledComponents.js | 4 ++-- src/pages/AddPaper.js | 2 +- src/pages/Observatories/Observatories.js | 6 +++--- src/pages/UserProfile.js | 2 +- src/pages/UserSettings.js | 2 +- src/testUtils.js | 2 +- 20 files changed, 30 insertions(+), 30 deletions(-) diff --git a/src/components/AddPaper/Abstract/AbstractAnnotatorView.js b/src/components/AddPaper/Abstract/AbstractAnnotatorView.js index 9858347f4..d1bf786aa 100644 --- a/src/components/AddPaper/Abstract/AbstractAnnotatorView.js +++ b/src/components/AddPaper/Abstract/AbstractAnnotatorView.js @@ -121,7 +121,7 @@ class AbstractAnnotatorView extends Component { width: '100%', background: getTrackBackground({ values: this.props.certaintyThreshold, - colors: [this.props.theme.orkgPrimaryColor, this.props.theme.lightDarker], + colors: [this.props.theme.primary, this.props.theme.lightDarker], min: 0, max: 1 }) diff --git a/src/components/AddPaper/Contributions/ContributionItemList.js b/src/components/AddPaper/Contributions/ContributionItemList.js index aeb8fa5a0..e338e0412 100644 --- a/src/components/AddPaper/Contributions/ContributionItemList.js +++ b/src/components/AddPaper/Contributions/ContributionItemList.js @@ -15,7 +15,7 @@ import { ActionButton } from 'components/AddPaper/Contributions/styled'; export const StyledInput = styled(Input)` background: #fff; - color: ${props => props.theme.orkgPrimaryColor}; + color: ${props => props.theme.primary}; outline: 0; border: dotted 2px ${props => props.theme.listGroupBorderColor}; border-radius: 0; @@ -25,7 +25,7 @@ export const StyledInput = styled(Input)` &:focus { background: #fff; - color: ${props => props.theme.orkgPrimaryColor}; + color: ${props => props.theme.primary}; outline: 0; border: dotted 2px ${props => props.theme.listGroupBorderColor}; padding: 0 4px; diff --git a/src/components/AddPaper/Contributions/ContributionsHelpTour.js b/src/components/AddPaper/Contributions/ContributionsHelpTour.js index a480c4aff..de4c38f9a 100644 --- a/src/components/AddPaper/Contributions/ContributionsHelpTour.js +++ b/src/components/AddPaper/Contributions/ContributionsHelpTour.js @@ -136,7 +136,7 @@ class ContributionsHelpTour extends Component { : []) ]} showNumber={false} - accentColor={this.props.theme.orkgPrimaryColor} + accentColor={this.props.theme.primary} rounded={10} onRequestClose={this.requestCloseTour} isOpen={this.props.isTourOpen} diff --git a/src/components/AddPaper/Contributions/styled.js b/src/components/AddPaper/Contributions/styled.js index a3d1f8f51..6ea16ca26 100644 --- a/src/components/AddPaper/Contributions/styled.js +++ b/src/components/AddPaper/Contributions/styled.js @@ -54,8 +54,8 @@ export const StyledHorizontalContributionsList = styled.ul` text-decoration: none; } &.active-contribution { - background: ${props => props.theme.orkgPrimaryColor}; - border: 1px solid ${props => props.theme.orkgPrimaryColor}; + background: ${props => props.theme.primary}; + border: 1px solid ${props => props.theme.primary}; color: #fff; cursor: initial !important; } @@ -86,8 +86,8 @@ export const AddContribution = styled(Button)` } &:hover { - background-color: ${props => props.theme.orkgPrimaryColor}; - border: 1px solid ${props => props.theme.orkgPrimaryColor}; + background-color: ${props => props.theme.primary}; + border: 1px solid ${props => props.theme.primary}; color: #fff; } } @@ -144,7 +144,7 @@ export const StyledStatementItem = styled(ListGroupItem)` & > .statementItemIcon { font-size: 18px; margin-top: 3px; - color: ${props => props.theme.orkgPrimaryColor}; + color: ${props => props.theme.primary}; &.open { color: #fff; diff --git a/src/components/AddPaper/GeneralData/GeneralData.js b/src/components/AddPaper/GeneralData/GeneralData.js index d84dfae2b..edf2c24ef 100644 --- a/src/components/AddPaper/GeneralData/GeneralData.js +++ b/src/components/AddPaper/GeneralData/GeneralData.js @@ -558,7 +558,7 @@ const GeneralData = () => { } ]} showNumber={false} - accentColor={theme.orkgPrimaryColor} + accentColor={theme.primary} rounded={10} onRequestClose={requestCloseTour} isOpen={isTourOpen} @@ -579,7 +579,7 @@ const GeneralData = () => { } ]} showNumber={false} - accentColor={theme.orkgPrimaryColor} + accentColor={theme.primary} rounded={10} onRequestClose={() => { setShowHelpButton(false); diff --git a/src/components/Comparison/ComparisonVersions.js b/src/components/Comparison/ComparisonVersions.js index 288fbf9d2..2bf3e6904 100644 --- a/src/components/Comparison/ComparisonVersions.js +++ b/src/components/Comparison/ComparisonVersions.js @@ -26,7 +26,7 @@ const StyledActivity = styled.div` display: inline-block; } a { - color: ${props => props.theme.ORKGPrimaryColor}; + color: ${props => props.theme.primary}; } &:last-child { diff --git a/src/components/ComparisonPopup/styled.js b/src/components/ComparisonPopup/styled.js index f59f2a736..87ce6c374 100644 --- a/src/components/ComparisonPopup/styled.js +++ b/src/components/ComparisonPopup/styled.js @@ -11,7 +11,7 @@ export const ComparisonBoxButton = styled(Button)` `; export const ComparisonBox = styled.div` - background: ${props => props.theme.orkgPrimaryColor}; + background: ${props => props.theme.primary}; border-radius: 11px 11px 0 0; width: 340px; min-height: 390px; diff --git a/src/components/Home/Benefits.js b/src/components/Home/Benefits.js index 64d74a043..eee0bca11 100644 --- a/src/components/Home/Benefits.js +++ b/src/components/Home/Benefits.js @@ -18,7 +18,7 @@ const CarouselContainer = styled.div` width: 10px !important; height: 10px !important; border-radius: 100% !important; - background-color: ${props => props.theme.orkgPrimaryColor} !important; + background-color: ${props => props.theme.primary} !important; } `; diff --git a/src/components/Home/ObservatoriesCarousel.js b/src/components/Home/ObservatoriesCarousel.js index 295de4b0e..1f33734d3 100644 --- a/src/components/Home/ObservatoriesCarousel.js +++ b/src/components/Home/ObservatoriesCarousel.js @@ -19,7 +19,7 @@ const CarouselContainer = styled.div` width: 10px !important; height: 10px !important; border-radius: 100% !important; - background-color: ${props => props.theme.orkgPrimaryColor} !important; + background-color: ${props => props.theme.primary} !important; } `; diff --git a/src/components/LastUpdatesBox/styled.js b/src/components/LastUpdatesBox/styled.js index f2b35c2b7..e11bb32b4 100644 --- a/src/components/LastUpdatesBox/styled.js +++ b/src/components/LastUpdatesBox/styled.js @@ -24,7 +24,7 @@ export const StyledActivity = styled.div` margin-top: 3px; } a { - color: ${props => props.theme.ORKGPrimaryColor}; + color: ${props => props.theme.primary}; } &:last-child { diff --git a/src/components/ObservatoriesCarousel/ObservatoriesCarousel.js b/src/components/ObservatoriesCarousel/ObservatoriesCarousel.js index bc59aeaaa..b0f39d959 100644 --- a/src/components/ObservatoriesCarousel/ObservatoriesCarousel.js +++ b/src/components/ObservatoriesCarousel/ObservatoriesCarousel.js @@ -19,7 +19,7 @@ const CarouselContainer = styled.div` width: 10px !important; height: 10px !important; border-radius: 100% !important; - background-color: ${props => props.theme.orkgPrimaryColor} !important; + background-color: ${props => props.theme.primary} !important; } `; diff --git a/src/components/PdfTextAnnotation/Help.js b/src/components/PdfTextAnnotation/Help.js index db4420b11..d30b56a68 100644 --- a/src/components/PdfTextAnnotation/Help.js +++ b/src/components/PdfTextAnnotation/Help.js @@ -19,7 +19,7 @@ const Help = props => { props.setIsOpen(false); }; - const tourStyle = { borderTop: `4px solid ${themeContext.orkgPrimaryColor}` }; + const tourStyle = { borderTop: `4px solid ${themeContext.primary}` }; const tourSteps = [ { @@ -115,7 +115,7 @@ const Help = props => { onAfterOpen={disableBody} onBeforeClose={enableBody} showNumber={false} - accentColor={themeContext.orkgPrimaryColor} + accentColor={themeContext.primary} rounded={10} onRequestClose={handleCloseTour} isOpen={props.isOpen} diff --git a/src/components/StatementBrowser/styled.js b/src/components/StatementBrowser/styled.js index 19c671448..2c775f35f 100644 --- a/src/components/StatementBrowser/styled.js +++ b/src/components/StatementBrowser/styled.js @@ -18,7 +18,7 @@ export const StyledStatementItem = styled(ListGroupItem)` & > .statementItemIcon { font-size: 18px; margin-top: 3px; - color: ${props => props.theme.orkgPrimaryColor}; + color: ${props => props.theme.primary}; &.open { color: #fff; diff --git a/src/components/ViewPaper/EditDialog/styled.js b/src/components/ViewPaper/EditDialog/styled.js index 6fe2ac936..db4284220 100644 --- a/src/components/ViewPaper/EditDialog/styled.js +++ b/src/components/ViewPaper/EditDialog/styled.js @@ -34,7 +34,7 @@ export const StyledStatementItem = styled(ListGroupItem)` & > .statementItemIcon { font-size: 18px; margin-top: 3px; - color: ${props => props.theme.orkgPrimaryColor}; + color: ${props => props.theme.primary}; &.open { color: #fff; diff --git a/src/libs/selfVisModel/RenderingComponents/styledComponents.js b/src/libs/selfVisModel/RenderingComponents/styledComponents.js index 407fc8dc1..bd702c067 100644 --- a/src/libs/selfVisModel/RenderingComponents/styledComponents.js +++ b/src/libs/selfVisModel/RenderingComponents/styledComponents.js @@ -125,7 +125,7 @@ export const MetaMapperSelectorSimple = styled.div` export const PropertyCellInput = styled(Input)` background: #fff; - color: ${props => props.theme.orkgPrimaryColor}; + color: ${props => props.theme.primary}; outline: 0; border: dotted 2px ${props => props.theme.listGroupBorderColor}; border-radius: 0; @@ -137,7 +137,7 @@ export const PropertyCellInput = styled(Input)` &:focus { background: #fff; - color: ${props => props.theme.orkgPrimaryColor}; + color: ${props => props.theme.primary}; outline: 0; border: dotted 2px ${props => props.theme.listGroupBorderColor}; padding: 0 4px; diff --git a/src/pages/AddPaper.js b/src/pages/AddPaper.js index e81ded1df..e4fcf4da2 100644 --- a/src/pages/AddPaper.js +++ b/src/pages/AddPaper.js @@ -51,7 +51,7 @@ const HelpIcon = styled(Icon)` height: 48px; width: 48px !important; z-index: 9999; - background-color: ${props => props.theme.orkgPrimaryColor}; + background-color: ${props => props.theme.primary}; display: inline-flex; -webkit-justify-content: center; justify-content: center; diff --git a/src/pages/Observatories/Observatories.js b/src/pages/Observatories/Observatories.js index 8408a4777..069aef443 100644 --- a/src/pages/Observatories/Observatories.js +++ b/src/pages/Observatories/Observatories.js @@ -18,7 +18,7 @@ const TabPaneStyled = styled(TabPane)` export const StyledResearchFieldWrapper = styled.div` border-radius: ${props => props.theme.borderRadius}; - border: ${props => props.theme.borderWidth} solid ${props => props.theme.orkgPrimaryColor}; + border: ${props => props.theme.borderWidth} solid ${props => props.theme.primary}; padding: 15px 30px; `; @@ -45,10 +45,10 @@ const StyledResearchFieldItem = styled(NavLink)` } &.active { - background: ${props => props.theme.orkgPrimaryColor}; + background: ${props => props.theme.primary}; color: #fff; cursor: initial !important; - border-color: ${props => props.theme.orkgPrimaryColor}; + border-color: ${props => props.theme.primary}; } `; diff --git a/src/pages/UserProfile.js b/src/pages/UserProfile.js index 231ecdbc9..ebc51392e 100644 --- a/src/pages/UserProfile.js +++ b/src/pages/UserProfile.js @@ -70,7 +70,7 @@ const StyledActivity = styled.div` display: inline-block; } a { - color: ${props => props.theme.ORKGPrimaryColor}; + color: ${props => props.theme.primary}; } &:last-child { diff --git a/src/pages/UserSettings.js b/src/pages/UserSettings.js index 74d6cf139..7d66da24a 100644 --- a/src/pages/UserSettings.js +++ b/src/pages/UserSettings.js @@ -19,7 +19,7 @@ export const StyledSettingsMenu = styled.div` &.active, &:hover { - background: ${props => props.theme.orkgPrimaryColor}; + background: ${props => props.theme.primary}; color: #fff; } &.active a { diff --git a/src/testUtils.js b/src/testUtils.js index 840386ce1..e188b8c61 100644 --- a/src/testUtils.js +++ b/src/testUtils.js @@ -8,7 +8,7 @@ import { ThemeProvider } from 'styled-components'; // https://github.com/adamgruber/sass-extract-js/issues/12 export const theme = { orkgBorderRadius: '6px', - orkgPrimaryColor: 'rgb(232, 97, 97)', + primary: 'rgb(232, 97, 97)', orkgBorderWidth: '1px', primary: 'rgb(232, 97, 97)', secondary: 'rgb(128, 134, 155)', From 6ad6257fa1dda62b334912f6345f6d7d985d491a Mon Sep 17 00:00:00 2001 From: Kheir Eddine Farfar Date: Fri, 9 Apr 2021 11:09:26 +0200 Subject: [PATCH 09/10] update theme colors in testUtils --- src/assets/scss/ThemeVariables.scss | 2 +- src/testUtils.js | 17 ++++++----------- 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/src/assets/scss/ThemeVariables.scss b/src/assets/scss/ThemeVariables.scss index e9ddc2214..92dcd6b97 100644 --- a/src/assets/scss/ThemeVariables.scss +++ b/src/assets/scss/ThemeVariables.scss @@ -7,7 +7,7 @@ $light: #e9ebf2; $light-lighter: #f8f9fb; $light-darker: #dbdde5; $dark: #5b6176; -$body-bg: #e9ebf2; +$body-bg: $light; $body-color: #4f4f4f; $border-width: 1px; $border-radius: 6px; diff --git a/src/testUtils.js b/src/testUtils.js index e188b8c61..0db931d2c 100644 --- a/src/testUtils.js +++ b/src/testUtils.js @@ -7,24 +7,21 @@ import { ThemeProvider } from 'styled-components'; // https://github.com/adamgruber/sass-extract-js/issues/12 export const theme = { - orkgBorderRadius: '6px', - primary: 'rgb(232, 97, 97)', - orkgBorderWidth: '1px', primary: 'rgb(232, 97, 97)', + primaryDarker: 'rgb(198, 29, 29)', secondary: 'rgb(128, 134, 155)', secondaryDarker: 'rgb(80, 85, 101)', - light: 'rgb(233, 236, 239)', + light: 'rgb(233, 235, 242)', lightLighter: 'rgb(248, 249, 251)', lightDarker: 'rgb(219, 221, 229)', + dark: 'rgb(91, 97, 118)', bodyBg: 'rgb(233, 235, 242)', bodyColor: 'rgb(79, 79, 79)', borderWidth: '1px', borderRadius: '6px', themeColors: { - light: 'rgb(233, 235, 242)', - secondary: 'rgb(128, 134, 155)', - secondaryDarker: 'rgb(80, 85, 101)', - primaryDarker: 'rgb(198, 29, 29)' + primaryDarker: 'rgb(198, 29, 29)', + secondaryDarker: 'rgb(80, 85, 101)' }, formFeedbackFontSize: '90%', inputBorderRadius: '6px', @@ -46,9 +43,7 @@ export const theme = { badgeFontWeight: 500, badgePaddingY: '0.3rem', badgePaddingX: '0.8rem', - listGroupBorderColor: 'rgba(0, 0, 0, 0.125)', - dark: 'rgb(91, 97, 118)', - dark: 'rgb(103, 109, 129)' + listGroupBorderColor: 'rgba(0, 0, 0, 0.125)' }; // wrap the components with the required providers From 9e2dfd3fdbfaad53403450c84925553edbad27c3 Mon Sep 17 00:00:00 2001 From: Kheir Eddine Farfar Date: Fri, 9 Apr 2021 11:38:27 +0200 Subject: [PATCH 10/10] chore --- src/utils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils.js b/src/utils.js index c53d98707..82c4c0075 100644 --- a/src/utils.js +++ b/src/utils.js @@ -554,7 +554,7 @@ export const similarPropertiesByLabel = (propertyLabel, propertyData) => { /** * Compare input value to select options - * Builtins https://github.com/JedWatson/react-select/blob/d2a820efc70835adf864169eebc76947783a15e2/packages/react-select/src/Creatable.js + * Built-ins https://github.com/JedWatson/react-select/blob/d2a820efc70835adf864169eebc76947783a15e2/packages/react-select/src/Creatable.js * @param {String} inputValue candidate label * @param {Object} option option */