);
}
diff --git a/src/components/presentational/CardTags.js b/src/components/presentational/CardTags.js
index 46088cb..6841cd4 100644
--- a/src/components/presentational/CardTags.js
+++ b/src/components/presentational/CardTags.js
@@ -3,27 +3,35 @@ import React from 'react';
import copy from '../../js/data/copy.json';
const CardTags = ({ tags, language }) => {
- const label = copy[language].cardstack.people;
+ const tags_lang = copy[language].cardstack.tags;
+ const no_tags_lang = copy[language].cardstack.notags;
- return (
-
-
{label}
-
{
- tags.map((tag, idx) => {
- return (
-
- {tag.name}
- {
- (idx < tags.length - 1)
+ if (tags.length > 0) {
+ return (
+
+
{tags_lang}:
+
+ {tags.map((tag, idx) => {
+ return (
+
+ {tag.name}
+ {(idx < tags.length - 1)
? ','
- : ''
- }
-
- );
- })
- }
+ : ''}
+
+ );
+ })}
+
+
+ );
+ }
+ return (
+
+
{tags_lang}
+
{no_tags_lang}
-);
+ );
+
}
export default CardTags;
diff --git a/src/components/presentational/CardTimestamp.js b/src/components/presentational/CardTimestamp.js
index 4c4d594..0317896 100644
--- a/src/components/presentational/CardTimestamp.js
+++ b/src/components/presentational/CardTimestamp.js
@@ -12,16 +12,20 @@ const CardTimestamp = ({ makeTimelabel, language, timestamp }) => {
if (isNotNullNorUndefined(timestamp)) {
const timelabel = makeTimelabel(timestamp);
return (
-
-
{daytime_lang}
- {timelabel}
+
+
+ today
+ {timelabel}
+
);
} else {
return (
-
-
{daytime_lang}
- {unknown_lang}
+
+
+ today
+ {unknown_lang}
+
);
}
diff --git a/src/js/data/copy.json b/src/js/data/copy.json
index 66efb16..5fd1890 100644
--- a/src/js/data/copy.json
+++ b/src/js/data/copy.json
@@ -133,10 +133,12 @@
"unknown_time": "Unknown time",
"location": "Localization",
"incident_type": "Type of action",
- "description": "Summary of facts",
- "people": "People involved",
+ "description": "Summary",
+ "tags": "Tags",
+ "notags": "No known tags for this event.",
"source": "Source",
- "category": "According to",
+ "unknown_source": "Unknown source. The relability of this event cannot be confirmed.",
+ "category": "Category",
"communication": "Communication",
"transmitter": "Transmitter",
"receiver": "Receiver",
diff --git a/src/js/utilities.js b/src/js/utilities.js
index c9c9309..c51596c 100644
--- a/src/js/utilities.js
+++ b/src/js/utilities.js
@@ -36,6 +36,14 @@ export function isNotNullNorUndefined(variable) {
return (typeof variable !== 'undefined' && variable !== null);
}
+/*
+* Capitalizes _only_ the first letter of a string
+* Taken from: https://stackoverflow.com/questions/1026069/how-do-i-make-the-first-letter-of-a-string-uppercase-in-javascript
+*/
+export function capitalizeFirstLetter(string) {
+ return string.charAt(0).toUpperCase() + string.slice(1);
+}
+
/**
* Return a Date object given a datetime string of the format: "2016-09-10T07:00:00"
* @param {string} datetime
diff --git a/src/scss/_colors.scss b/src/scss/_colors.scss
index 5b8f0e2..fa96ae6 100644
--- a/src/scss/_colors.scss
+++ b/src/scss/_colors.scss
@@ -1,6 +1,7 @@
$event_default: red;
$offwhite: #efefef;
+$lightwhite: #dfdfdf;
$midwhite: #a0a0a0;
$darkwhite: darken($midwhite, 15%);
$yellow: #ffd800;
diff --git a/src/scss/card.scss b/src/scss/card.scss
index 186508a..2afcb63 100644
--- a/src/scss/card.scss
+++ b/src/scss/card.scss
@@ -10,27 +10,16 @@
box-shadow: 0 19px 19px rgba(0, 0, 0, 0.3), 0 15px 12px rgba(0, 0, 0, 0.22);
font-size: $large;
line-height: $xxlarge;
- transition: 0.2s ease;
height: auto;
-
- &:hover {
- border: 1px solid $yellow;
- }
-
- .card-bottomhalf {
- transition: 0.4s ease;
- height: auto;
-
- &.folded {
- transition: 0.4s ease;
- height: 0;
- overflow: hidden;
- }
- }
+ opacity: 0.9;
h4 {
- text-transform: normal;
margin-bottom: 0;
+ margin-right: 5px;
+ text-transform: uppercase;
+ font-size: $xsmall;
+ color: $darkwhite;
+ font-weight: 100;
&:first-child {
margin-top: 0;
@@ -41,19 +30,57 @@
margin: 0;
}
- .event-card-section {
- margin-bottom: 10px;
+ .material-icons {
+ font-size: $normal;
+ color: $darkwhite;
+ margin-right: 5px;
+ }
+ .card-row {
+ display: flex;
+ flex-direction: row;
+ border-bottom: 1px solid $lightwhite;
+ margin: 5px 0 10px 0;
+ padding-bottom: 10px;
+
+ .card-cell {
+ flex: 1;
+ }
+
+ h4 {
+ min-width: 80px;
+ max-width: 80px;
+ }
+ }
+
+ .card-cell {
+ a {
+ transition: color 0.2s;
+ }
a:hover {
- color: $red;
+ color: $darkwhite;
cursor: pointer;
+ transition: color 0.2s;
}
a.disabled {
color: $midgrey;
+ font-weight: normal;
cursor: default;
}
}
+
+ .card-bottomhalf {
+ transition: 0.4s ease;
+ height: auto;
+
+ &.folded {
+ transition: 0.4s ease;
+ height: 0;
+ overflow: hidden;
+ }
+ }
+
.card-toggle p {
text-align: center;
cursor: pointer;
@@ -106,28 +133,19 @@
}
.category {
+ margin-bottom: 5px;
+
.color-category {
width: 12px;
height: 12px;
border-radius: 20px;
display: inline-block;
- margin: 0px 5px 0 0;
+ margin: 0 0 0 5px;
}
- }
- .event-type {
- margin: 0 0 10px 0;
-
- span {
- display: inline-block;
- margin: 0 5px 2px 0;
- color: $darkgrey;
-
- &.flagged {
- background: $red;
- color: $offwhite;
- padding: 0 5px;
- }
+ p {
+ text-align: right;
+ flex: 1;
}
}
@@ -145,49 +163,4 @@
margin: 0;
margin-right: 5px;
}
-
- /*
- https://github.com/tobiasahlin/SpinKit/blob/master/LICENSE
- */
- .spinner {
- width: 40px;
- height: 40px;
-
- position: relative;
- margin: 20px auto;
- }
-
- .double-bounce1, .double-bounce2 {
- width: 100%;
- height: 100%;
- border-radius: 50%;
- background-color: $darkgrey;
- opacity: 0.6;
- position: absolute;
- top: 0;
- left: 0;
-
- -webkit-animation: sk-bounce 3.0s infinite ease-in-out;
- animation: sk-bounce 3.0s infinite ease-in-out;
- }
-
- .double-bounce2 {
- -webkit-animation-delay: -1.0s;
- animation-delay: -1.0s;
- }
-
- @-webkit-keyframes sk-bounce {
- 0%, 100% { -webkit-transform: scale(0.0) }
- 50% { -webkit-transform: scale(1.0) }
- }
-
- @keyframes sk-bounce {
- 0%, 100% {
- transform: scale(0.0);
- -webkit-transform: scale(0.0);
- } 50% {
- transform: scale(1.0);
- -webkit-transform: scale(1.0);
- }
- }
}
diff --git a/src/scss/loading.scss b/src/scss/loading.scss
index 1ccd109..dee8697 100644
--- a/src/scss/loading.scss
+++ b/src/scss/loading.scss
@@ -31,50 +31,49 @@
opacity: 0;
z-index: $hidden;
}
+}
-
- /*
+/*
https://github.com/tobiasahlin/SpinKit/blob/master/LICENSE
- */
- .spinner {
- width: 40px;
- height: 40px;
+*/
+.spinner {
+ width: 40px;
+ height: 40px;
- position: relative;
- margin: 20px auto;
- }
+ position: relative;
+ margin: 20px auto;
+}
- .double-bounce1, .double-bounce2 {
- width: 100%;
- height: 100%;
- border-radius: 50%;
- background-color: $offwhite;
- opacity: 0.6;
- position: absolute;
- top: 0;
- left: 0;
+.double-bounce1, .double-bounce2 {
+ width: 100%;
+ height: 100%;
+ border-radius: 50%;
+ background-color: $offwhite;
+ opacity: 0.6;
+ position: absolute;
+ top: 0;
+ left: 0;
- -webkit-animation: sk-bounce 3.0s infinite ease-in-out;
- animation: sk-bounce 3.0s infinite ease-in-out;
- }
+ -webkit-animation: sk-bounce 3.0s infinite ease-in-out;
+ animation: sk-bounce 3.0s infinite ease-in-out;
+}
- .double-bounce2 {
- -webkit-animation-delay: -1.0s;
- animation-delay: -1.0s;
- }
+.double-bounce2 {
+ -webkit-animation-delay: -1.0s;
+ animation-delay: -1.0s;
+}
- @-webkit-keyframes sk-bounce {
- 0%, 100% { -webkit-transform: scale(0.0) }
- 50% { -webkit-transform: scale(1.0) }
- }
+@-webkit-keyframes sk-bounce {
+ 0%, 100% { -webkit-transform: scale(0.0) }
+ 50% { -webkit-transform: scale(1.0) }
+}
- @keyframes sk-bounce {
- 0%, 100% {
- transform: scale(0.0);
- -webkit-transform: scale(0.0);
- } 50% {
- transform: scale(1.0);
- -webkit-transform: scale(1.0);
- }
+@keyframes sk-bounce {
+ 0%, 100% {
+ transform: scale(0.0);
+ -webkit-transform: scale(0.0);
+ } 50% {
+ transform: scale(1.0);
+ -webkit-transform: scale(1.0);
}
}
diff --git a/src/scss/timeline.scss b/src/scss/timeline.scss
index 2ffda13..6e8cddf 100644
--- a/src/scss/timeline.scss
+++ b/src/scss/timeline.scss
@@ -78,7 +78,7 @@
&:first-child {
text-transform: none;
font-size: $normal;
- letter-spacing: 0.05;
+ letter-spacing: 0.05em;
}
}
}
diff --git a/src/store/initial.js b/src/store/initial.js
index c387910..d487022 100644
--- a/src/store/initial.js
+++ b/src/store/initial.js
@@ -106,8 +106,8 @@ const initial = {
categories: {
default: 'red',
// Add here other categories to differentiate by color, like:
- alpha: '#c73e1d',
- beta: '#f40000',
+ alpha: '#00ff00',
+ beta: '#ff0000',
other: '#f3de2c'
},