~breatheoutbreathein/u4u

62f752fb494b44ad00d3c9695c466ae81d007aaa — Joseph Turner 2 years ago 9861160
use PeopleSvg.props.d in bannerBackgroundGenerator
1 files changed, 3 insertions(+), 1 deletions(-)

M src/utils/stylesGenerators.ts
M src/utils/stylesGenerators.ts => src/utils/stylesGenerators.ts +3 -1
@@ 16,6 16,8 @@
  You should have received a copy of the GNU Affero General Public License
  along with U4U.  If not, see <https://www.gnu.org/licenses/>.
*/
import { PeopleSvg } from '../components/AllShapes'

export function bannerBackgroundGenerator (color: string, darkMode: boolean): {
  backgroundImageAuthorColor: string
  backgroundImageColorFG: string


@@ 37,7 39,7 @@ export function bannerBackgroundGenerator (color: string, darkMode: boolean): {
function makeBannerBackground (fillColor: string, strokeColor: string): string {
  // var() can not be interpolated in url() in CSS, so we have to
  // create a new url in javascript
  return `url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' height='450' width='450' preserveAspectRatio='none'> <path d='M391.908 347.474c-2.816 9.508-9.271 16.797-23.376 21.095 0 0-73.876 28.625-143.069 0-69.194-28.627-143.066 0-143.066 0-12.913 0-23.378-9.44-23.378-21.095V89.287c5.229-11.555 12.51-17.483 23.469-21.826 0 0 64.284-31.412 142.975.73 78.504 32.068 143.069 0 143.069 0 12.911 0 23.376 9.446 23.376 21.096z' fill='${fillColor}' stroke='${strokeColor}' stroke-width='1.5' vector-effect='non-scaling-stroke'/></svg>")`
  return `url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' preserveAspectRatio='none'> <path d='${PeopleSvg().props.d as string}' fill='${fillColor}' stroke='${strokeColor}' stroke-width='1.5' vector-effect='non-scaling-stroke'/></svg>")`
}

export function expandedRegionStylesGenerator (expandedRegion: string | null): {