diff --git a/wax-prosemirror-components/src/components/notes/NoteEditorContainer.js b/wax-prosemirror-components/src/components/notes/NoteEditorContainer.js index c9b73fbdb8cb01171ea39ffaab5444df0111d7ab..8b41a4bdda47eb06dafaa58d75bfeafe53d14395 100644 --- a/wax-prosemirror-components/src/components/notes/NoteEditorContainer.js +++ b/wax-prosemirror-components/src/components/notes/NoteEditorContainer.js @@ -1,8 +1,15 @@ import React from 'react'; -import { grid } from '@pubsweet/ui-toolkit'; -import styled from 'styled-components'; +import { grid, th } from '@pubsweet/ui-toolkit'; +import styled, { css } from 'styled-components'; + import NoteNumber from './NoteNumber'; +const fontWriting = css` + font-family: ${th('fontWriting')}; + font-size: ${th('fontSizeBase')}; + color: ${th('colorText')}; +`; + const NoteEditorContainerStyled = styled.div` display: flex; flex-direction: row; @@ -10,7 +17,9 @@ const NoteEditorContainerStyled = styled.div` width: 90%; position: relative; margin-bottom: 5px; + padding-left: ${grid(10)}; + ${fontWriting}; `; const NoteStyled = styled.div` diff --git a/wax-prosemirror-components/src/ui/buttons/MenuButton.js b/wax-prosemirror-components/src/ui/buttons/MenuButton.js index 7445f6af8bcd896feaa26e5e94a1a374a3271609..6101c3d50fcd0b31e65db6cb7c77efaa63c497f0 100644 --- a/wax-prosemirror-components/src/ui/buttons/MenuButton.js +++ b/wax-prosemirror-components/src/ui/buttons/MenuButton.js @@ -37,6 +37,7 @@ const Wrapper = styled.button.attrs(props => ({ border-radius: 2px; cursor: pointer; font-family: ${th('fontInterface')}; + font-size: ${th('fontSizeBase')}; height: 28px; outline: none; padding: 2px; diff --git a/wax-prosemirror-layouts/src/layouts/EditorElements.js b/wax-prosemirror-layouts/src/layouts/EditorElements.js index 5d4b2de16433d7c2b729fa58f10b62630374473a..9330c4424ee2cb66721fde84e07ec3a936fb6ce2 100644 --- a/wax-prosemirror-layouts/src/layouts/EditorElements.js +++ b/wax-prosemirror-layouts/src/layouts/EditorElements.js @@ -4,12 +4,17 @@ import { th } from '@pubsweet/ui-toolkit'; /* All styles regarding ProseMirror surface and elements */ +const fontWriting = css` + font-family: ${th('fontWriting')}; + font-size: ${th('fontSizeBase')}; + color: ${th('colorText')}; +`; + export default css` .ProseMirror { background: white; counter-reset: footnote; - font-family: ${th('fontWriting')}; - color: ${th('colorText')}; + ${fontWriting} p::selection, h1::selection, diff --git a/wax-prosemirror-layouts/src/layouts/EditoriaLayout.js b/wax-prosemirror-layouts/src/layouts/EditoriaLayout.js index 97870f5fb0b967d8714a87d554bd64dfec9e0a7f..6a475b8711e8e1c3d2c7a266f6bff74ec4c1330f 100644 --- a/wax-prosemirror-layouts/src/layouts/EditoriaLayout.js +++ b/wax-prosemirror-layouts/src/layouts/EditoriaLayout.js @@ -31,6 +31,7 @@ const divider = css` const Wrapper = styled.div` background: ${th('colorBackground')}; font-family: ${th('fontInterface')}; + font-size: ${th('fontSizeBase')}; display: flex; flex-direction: column; diff --git a/wax-prosemirror-themes/package.json b/wax-prosemirror-themes/package.json index b7995221b207c0098907fc2f4ff6671269e3e6a5..866b17050afea013f925c379df7659c84c352e39 100644 --- a/wax-prosemirror-themes/package.json +++ b/wax-prosemirror-themes/package.json @@ -14,7 +14,7 @@ }, "dependencies": { "@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-vollkorn": "^0.0.54" } diff --git a/wax-prosemirror-themes/src/coko-theme/index.js b/wax-prosemirror-themes/src/coko-theme/index.js index 783cf10c563160df17a937db3204bcf6a808982b..176d8e73802535d3d07b7a4d007154a0fdd2b6f2 100644 --- a/wax-prosemirror-themes/src/coko-theme/index.js +++ b/wax-prosemirror-themes/src/coko-theme/index.js @@ -1,6 +1,7 @@ /* eslint-disable import/extensions */ import 'typeface-fira-sans-condensed'; -import 'typeface-vollkorn'; +import 'fontsource-merriweather'; +// import 'typeface-vollkorn'; import { css } from 'styled-components'; @@ -20,19 +21,17 @@ const cokoTheme = { colorWarning: '#ffc107', colorBackgroundToolBar: '#D9D9D9', - /*Buttons*/ - colorButton: '#777', /* Text variables */ // fonts fontInterface: 'Fira Sans Condensed', fontHeading: 'Fira Sans Condensed', fontReading: 'Vollkorn', - fontWriting: 'Vollkorn', + fontWriting: 'Merriweather', // font sizes - fontSizeBase: '16px', - fontSizeBaseSmall: '14px', + fontSizeBase: '14px', + fontSizeBaseSmall: '12px', fontSizeHeading1: '40px', fontSizeHeading2: '36px', fontSizeHeading3: '28px', diff --git a/yarn.lock b/yarn.lock index 9235c2621dd9be14b468abe17233c41cba286951..1aa7cd780c6a0c78223d866b6e00d2b40c30ecd3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -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" 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: version "1.0.6" 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: resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.12.1.tgz#de54a6205311b93d60398ebc01cf7015682312b6" 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: version "0.1.8" resolved "https://registry.yarnpkg.com/for-in/-/for-in-0.1.8.tgz#d8773908e31256109952b1fdb9b3fa867d2775e1" @@ -16769,7 +16768,7 @@ style-to-object@^0.2.1: dependencies: 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" resolved "https://registry.yarnpkg.com/styled-components/-/styled-components-4.2.0.tgz#811fbbec4d64c7189f6c7482b9eb6fefa7fefef7" integrity sha512-L/LzkL3ZbBhqIVHdR7DbYujy4tqvTNRfc+4JWDCYyhTatI+8CRRQUmdaR0+ARl03DWsfKLhjewll5uNLrqrl4A== @@ -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" 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: version "0.0.54" resolved "https://registry.yarnpkg.com/typeface-vollkorn/-/typeface-vollkorn-0.0.54.tgz#1288bcd7d81c3dd7cd419e4448580d2a0b0640b2"