From ec598c5bbc692fc473fbed411d05b07d137b8e14 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Thu, 22 Jun 2017 01:31:18 +0200 Subject: more css :) --- client/components/Paintings.jsx | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'client/components/Paintings.jsx') diff --git a/client/components/Paintings.jsx b/client/components/Paintings.jsx index 93b24eb..a2eb601 100644 --- a/client/components/Paintings.jsx +++ b/client/components/Paintings.jsx @@ -1,6 +1,6 @@ import { h, Component } from 'preact' import { Link } from 'react-router-dom' -import util from '../util' +import { randrange } from '../util' export default class Paintings extends Component { constructor() { @@ -8,10 +8,13 @@ export default class Paintings extends Component { } render() { const paintings = this.props.data.painting.map( (painting, i) => { + painting.style = painting.style || 'background-color:hsl(' + randrange(300,460) + ',50%,98%)' return ( -
+
-
+ +
+
@@ -33,9 +36,13 @@ export default class Paintings extends Component { const page = (
-
+ +
+ +
+
+
-
) return ( -- cgit v1.2.3-70-g09d2