mirror of
https://github.com/bellingcat/ukraine-timemap.git
synced 2026-06-12 21:38:35 +03:00
renamed js folder as common + moved hardcoded colors into global.js
This commit is contained in:
committed by
Lachlan Kermode
parent
c32dff1080
commit
7755a8fee2
@@ -1,6 +1,6 @@
|
||||
import React from 'react'
|
||||
|
||||
import { capitalizeFirstLetter } from '../../../js/utilities.js'
|
||||
import { capitalizeFirstLetter } from '../../../common/utilities.js'
|
||||
|
||||
const CardCategory = ({ categoryTitle, categoryLabel, color }) => (
|
||||
<div className='card-row card-cell category'>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import React from 'react'
|
||||
|
||||
import copy from '../../../js/data/copy.json'
|
||||
import copy from '../../../common/data/copy.json'
|
||||
|
||||
const CardLocation = ({ language, location, isPrecise }) => {
|
||||
if (location !== '') {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import React from 'react'
|
||||
|
||||
import copy from '../../../js/data/copy.json'
|
||||
import copy from '../../../common/data/copy.json'
|
||||
|
||||
const CardSummary = ({ language, description, isHighlighted }) => {
|
||||
const summary = copy[language].cardstack.description
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import React from 'react'
|
||||
|
||||
import copy from '../../../js/data/copy.json'
|
||||
import copy from '../../../common/data/copy.json'
|
||||
|
||||
const CardTags = ({ tags, language }) => {
|
||||
const tagsLang = copy[language].cardstack.tags
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import React from 'react'
|
||||
|
||||
import copy from '../../../js/data/copy.json'
|
||||
import { isNotNullNorUndefined } from '../../../js/utilities'
|
||||
import copy from '../../../common/data/copy.json'
|
||||
import { isNotNullNorUndefined } from '../../../common/utilities'
|
||||
|
||||
const CardTimestamp = ({ timelabel, language, precision }) => {
|
||||
// const daytimeLang = copy[language].cardstack.timestamp
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import React from 'react'
|
||||
import { Portal } from 'react-portal'
|
||||
import colors from '../../../common/global.js'
|
||||
|
||||
function MapEvents ({ getCategoryColor, categories, projectPoint, styleLocation, selected, narrative, onSelect, svg, locations }) {
|
||||
function getCoordinatesForPercent (radius, percent) {
|
||||
@@ -16,7 +17,7 @@ function MapEvents ({ getCategoryColor, categories, projectPoint, styleLocation,
|
||||
cx="0"
|
||||
cy="0"
|
||||
r="10"
|
||||
stroke="#ffd800"
|
||||
stroke={colors.primaryHighlight}
|
||||
fill-opacity="0.0"
|
||||
/>}
|
||||
</React.Fragment>
|
||||
@@ -30,7 +31,7 @@ function MapEvents ({ getCategoryColor, categories, projectPoint, styleLocation,
|
||||
|
||||
let styles = ({
|
||||
fill: getCategoryColor(locCategory),
|
||||
stroke: '#ffffff',
|
||||
stroke: colors.darkBackground,
|
||||
strokeWidth: 0,
|
||||
fillOpacity: 0.85,
|
||||
...extraStyles
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import React from 'react'
|
||||
import { Portal } from 'react-portal'
|
||||
import colors from '../../../common/global.js'
|
||||
|
||||
class MapSelectedEvents extends React.Component {
|
||||
renderMarker (event) {
|
||||
@@ -13,7 +14,7 @@ class MapSelectedEvents extends React.Component {
|
||||
>
|
||||
<path
|
||||
className='leaflet-interactive'
|
||||
stroke={styles ? styles.stroke : '#ffd800'}
|
||||
stroke={styles ? styles.stroke : colors.primaryHighlight}
|
||||
stroke-opacity='1'
|
||||
stroke-width={styles ? styles['stroke-width'] : 2}
|
||||
stroke-linecap=''
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import React from 'react'
|
||||
import colors from '../../../common/global.js'
|
||||
|
||||
const TimelineMarkers = ({ styles, getEventX, getCategoryY, transitionDuration, selected }) => {
|
||||
function renderMarker (event) {
|
||||
@@ -7,7 +8,7 @@ const TimelineMarkers = ({ styles, getEventX, getCategoryY, transitionDuration,
|
||||
className='timeline-marker'
|
||||
cx={0}
|
||||
cy={0}
|
||||
stroke={styles ? styles.stroke : '#ffffff'}
|
||||
stroke={styles ? styles.stroke : colors.secondaryHighlight}
|
||||
stroke-opacity='1'
|
||||
stroke-width={styles ? styles['stroke-width'] : 2}
|
||||
stroke-linecap=''
|
||||
|
||||
Reference in New Issue
Block a user