Skip to content
Snippets Groups Projects
Commit e5169897 authored by chris's avatar chris
Browse files

Merge branch 'font' into temp

parents 87b2cb93 0e717b00
No related branches found
No related tags found
1 merge request!174Theme
import React from 'react'; import React from 'react';
import { grid } from '@pubsweet/ui-toolkit'; import { grid, th } from '@pubsweet/ui-toolkit';
import styled from 'styled-components'; import styled, { css } from 'styled-components';
import NoteNumber from './NoteNumber'; import NoteNumber from './NoteNumber';
const fontWriting = css`
font-family: ${th('fontWriting')};
font-size: ${th('fontSizeBase')};
color: ${th('colorText')};
`;
const NoteEditorContainerStyled = styled.div` const NoteEditorContainerStyled = styled.div`
display: flex; display: flex;
flex-direction: row; flex-direction: row;
...@@ -10,7 +17,9 @@ const NoteEditorContainerStyled = styled.div` ...@@ -10,7 +17,9 @@ const NoteEditorContainerStyled = styled.div`
width: 90%; width: 90%;
position: relative; position: relative;
margin-bottom: 5px; margin-bottom: 5px;
padding-left: ${grid(10)}; padding-left: ${grid(10)};
${fontWriting};
`; `;
const NoteStyled = styled.div` const NoteStyled = styled.div`
......
...@@ -37,6 +37,7 @@ const Wrapper = styled.button.attrs(props => ({ ...@@ -37,6 +37,7 @@ const Wrapper = styled.button.attrs(props => ({
border-radius: 2px; border-radius: 2px;
cursor: pointer; cursor: pointer;
font-family: ${th('fontInterface')}; font-family: ${th('fontInterface')};
font-size: ${th('fontSizeBase')};
height: 28px; height: 28px;
outline: none; outline: none;
padding: 2px; padding: 2px;
......
...@@ -4,12 +4,17 @@ import { th } from '@pubsweet/ui-toolkit'; ...@@ -4,12 +4,17 @@ import { th } from '@pubsweet/ui-toolkit';
/* All styles regarding ProseMirror surface and elements */ /* All styles regarding ProseMirror surface and elements */
const fontWriting = css`
font-family: ${th('fontWriting')};
font-size: ${th('fontSizeBase')};
color: ${th('colorText')};
`;
export default css` export default css`
.ProseMirror { .ProseMirror {
background: white; background: white;
counter-reset: footnote; counter-reset: footnote;
font-family: ${th('fontWriting')}; ${fontWriting}
color: ${th('colorText')};
p::selection, p::selection,
h1::selection, h1::selection,
......
...@@ -31,6 +31,7 @@ const divider = css` ...@@ -31,6 +31,7 @@ const divider = css`
const Wrapper = styled.div` const Wrapper = styled.div`
background: ${th('colorBackground')}; background: ${th('colorBackground')};
font-family: ${th('fontInterface')}; font-family: ${th('fontInterface')};
font-size: ${th('fontSizeBase')};
display: flex; display: flex;
flex-direction: column; flex-direction: column;
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
}, },
"dependencies": { "dependencies": {
"@pubsweet/ui-toolkit": "^2.2.13", "@pubsweet/ui-toolkit": "^2.2.13",
"cokourier-prime-sans": "git+https://gitlab.coko.foundation/julientaq/cokourier-sans-prime.git", "fontsource-merriweather": "^3.0.9",
"typeface-fira-sans-condensed": "^0.0.54", "typeface-fira-sans-condensed": "^0.0.54",
"typeface-vollkorn": "^0.0.54" "typeface-vollkorn": "^0.0.54"
} }
......
/* eslint-disable import/extensions */ /* eslint-disable import/extensions */
import 'typeface-fira-sans-condensed'; import 'typeface-fira-sans-condensed';
import 'typeface-vollkorn'; import 'fontsource-merriweather';
// import 'typeface-vollkorn';
import { css } from 'styled-components'; import { css } from 'styled-components';
...@@ -20,19 +21,17 @@ const cokoTheme = { ...@@ -20,19 +21,17 @@ const cokoTheme = {
colorWarning: '#ffc107', colorWarning: '#ffc107',
colorBackgroundToolBar: '#D9D9D9', colorBackgroundToolBar: '#D9D9D9',
/*Buttons*/
colorButton: '#777',
/* Text variables */ /* Text variables */
// fonts // fonts
fontInterface: 'Fira Sans Condensed', fontInterface: 'Fira Sans Condensed',
fontHeading: 'Fira Sans Condensed', fontHeading: 'Fira Sans Condensed',
fontReading: 'Vollkorn', fontReading: 'Vollkorn',
fontWriting: 'Vollkorn', fontWriting: 'Merriweather',
// font sizes // font sizes
fontSizeBase: '16px', fontSizeBase: '14px',
fontSizeBaseSmall: '14px', fontSizeBaseSmall: '12px',
fontSizeHeading1: '40px', fontSizeHeading1: '40px',
fontSizeHeading2: '36px', fontSizeHeading2: '36px',
fontSizeHeading3: '28px', fontSizeHeading3: '28px',
......
...@@ -5360,12 +5360,6 @@ code-point-at@^1.0.0: ...@@ -5360,12 +5360,6 @@ code-point-at@^1.0.0:
resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77"
integrity sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c= integrity sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=
   
"cokourier-prime-sans@git+https://gitlab.coko.foundation/julientaq/cokourier-sans-prime.git":
version "0.0.1"
resolved "git+https://gitlab.coko.foundation/julientaq/cokourier-sans-prime.git#55aa30adce0193baac1ea026cf4409be9dd93a10"
dependencies:
typeface-open-sans "0.0.35"
collapse-white-space@^1.0.0, collapse-white-space@^1.0.2: collapse-white-space@^1.0.0, collapse-white-space@^1.0.2:
version "1.0.6" version "1.0.6"
resolved "https://registry.yarnpkg.com/collapse-white-space/-/collapse-white-space-1.0.6.tgz#e63629c0016665792060dbbeb79c42239d2c5287" resolved "https://registry.yarnpkg.com/collapse-white-space/-/collapse-white-space-1.0.6.tgz#e63629c0016665792060dbbeb79c42239d2c5287"
...@@ -8186,6 +8180,11 @@ follow-redirects@^1.0.0: ...@@ -8186,6 +8180,11 @@ follow-redirects@^1.0.0:
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.12.1.tgz#de54a6205311b93d60398ebc01cf7015682312b6" resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.12.1.tgz#de54a6205311b93d60398ebc01cf7015682312b6"
integrity sha512-tmRv0AVuR7ZyouUHLeNSiO6pqulF7dYa3s19c6t+wz9LD69/uSzdMxJ2S91nTI9U3rt/IldxpzMOFejp6f0hjg== integrity sha512-tmRv0AVuR7ZyouUHLeNSiO6pqulF7dYa3s19c6t+wz9LD69/uSzdMxJ2S91nTI9U3rt/IldxpzMOFejp6f0hjg==
   
fontsource-merriweather@^3.0.9:
version "3.0.9"
resolved "https://registry.yarnpkg.com/fontsource-merriweather/-/fontsource-merriweather-3.0.9.tgz#c170a179e332a530c5308274fe4a7fde7cf7e3ab"
integrity sha512-ugq1m28EGWW1oNltVs0Ewl5p6KTX/8yNqMzBQ26G8S4hs4gLkKuSi+3nogM4PwF0AkGtT9PobSUkNUf4Noxg9w==
for-in@^0.1.3: for-in@^0.1.3:
version "0.1.8" version "0.1.8"
resolved "https://registry.yarnpkg.com/for-in/-/for-in-0.1.8.tgz#d8773908e31256109952b1fdb9b3fa867d2775e1" resolved "https://registry.yarnpkg.com/for-in/-/for-in-0.1.8.tgz#d8773908e31256109952b1fdb9b3fa867d2775e1"
...@@ -16769,7 +16768,7 @@ style-to-object@^0.2.1: ...@@ -16769,7 +16768,7 @@ style-to-object@^0.2.1:
dependencies: dependencies:
inline-style-parser "0.1.1" inline-style-parser "0.1.1"
   
styled-components@^4.1.1, styled-components@^4.2.0: styled-components@4.2.0, styled-components@^4.1.1, styled-components@^4.2.0:
version "4.2.0" version "4.2.0"
resolved "https://registry.yarnpkg.com/styled-components/-/styled-components-4.2.0.tgz#811fbbec4d64c7189f6c7482b9eb6fefa7fefef7" resolved "https://registry.yarnpkg.com/styled-components/-/styled-components-4.2.0.tgz#811fbbec4d64c7189f6c7482b9eb6fefa7fefef7"
integrity sha512-L/LzkL3ZbBhqIVHdR7DbYujy4tqvTNRfc+4JWDCYyhTatI+8CRRQUmdaR0+ARl03DWsfKLhjewll5uNLrqrl4A== integrity sha512-L/LzkL3ZbBhqIVHdR7DbYujy4tqvTNRfc+4JWDCYyhTatI+8CRRQUmdaR0+ARl03DWsfKLhjewll5uNLrqrl4A==
...@@ -17476,11 +17475,6 @@ typeface-fira-sans-condensed@^0.0.54: ...@@ -17476,11 +17475,6 @@ typeface-fira-sans-condensed@^0.0.54:
resolved "https://registry.yarnpkg.com/typeface-fira-sans-condensed/-/typeface-fira-sans-condensed-0.0.54.tgz#5fe692b4d1ec4083f198e22b8bb1e8b1ed541db0" resolved "https://registry.yarnpkg.com/typeface-fira-sans-condensed/-/typeface-fira-sans-condensed-0.0.54.tgz#5fe692b4d1ec4083f198e22b8bb1e8b1ed541db0"
integrity sha512-Y/+UOdN75s1hpOoJhSavN1eTfmXLrUPHDeo2syCpnq18PAKQpglvRRM+3pDWtCjsFbni8N/1brgEV94Z9FNI9g== integrity sha512-Y/+UOdN75s1hpOoJhSavN1eTfmXLrUPHDeo2syCpnq18PAKQpglvRRM+3pDWtCjsFbni8N/1brgEV94Z9FNI9g==
   
typeface-open-sans@0.0.35:
version "0.0.35"
resolved "https://registry.yarnpkg.com/typeface-open-sans/-/typeface-open-sans-0.0.35.tgz#170dc36bbbd63829c9ea64b991c2b0fd65017708"
integrity sha512-lNrL3aaatdSkSb8rH1R9GXS27xyD5H4h9NctEm9B5Uk/pKwCzDrUcZhbhYi5Yih5FcMa8ZTtdY5K1ziMxo6EEg==
typeface-vollkorn@^0.0.54: typeface-vollkorn@^0.0.54:
version "0.0.54" version "0.0.54"
resolved "https://registry.yarnpkg.com/typeface-vollkorn/-/typeface-vollkorn-0.0.54.tgz#1288bcd7d81c3dd7cd419e4448580d2a0b0640b2" resolved "https://registry.yarnpkg.com/typeface-vollkorn/-/typeface-vollkorn-0.0.54.tgz#1288bcd7d81c3dd7cd419e4448580d2a0b0640b2"
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment