diff --git a/public/index.html b/public/index.html index 371c9e3e..8ac36934 100644 --- a/public/index.html +++ b/public/index.html @@ -4,7 +4,6 @@ - Cinny diff --git a/public/res/fonts/inter/Inter_vf_slant_weight.ttf b/public/res/fonts/inter/Inter_vf_slant_weight.ttf new file mode 100644 index 00000000..969a990f Binary files /dev/null and b/public/res/fonts/inter/Inter_vf_slant_weight.ttf differ diff --git a/public/res/fonts/roboto/LICENSE.txt b/public/res/fonts/roboto/LICENSE.txt new file mode 100644 index 00000000..d6456956 --- /dev/null +++ b/public/res/fonts/roboto/LICENSE.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/public/res/fonts/roboto/Roboto-Bold.ttf b/public/res/fonts/roboto/Roboto-Bold.ttf new file mode 100644 index 00000000..37424579 Binary files /dev/null and b/public/res/fonts/roboto/Roboto-Bold.ttf differ diff --git a/public/res/fonts/roboto/Roboto-BoldItalic.ttf b/public/res/fonts/roboto/Roboto-BoldItalic.ttf new file mode 100644 index 00000000..e85e7fb9 Binary files /dev/null and b/public/res/fonts/roboto/Roboto-BoldItalic.ttf differ diff --git a/public/res/fonts/roboto/Roboto-Italic.ttf b/public/res/fonts/roboto/Roboto-Italic.ttf new file mode 100644 index 00000000..c9df607a Binary files /dev/null and b/public/res/fonts/roboto/Roboto-Italic.ttf differ diff --git a/public/res/fonts/roboto/Roboto-Light.ttf b/public/res/fonts/roboto/Roboto-Light.ttf new file mode 100644 index 00000000..0e977514 Binary files /dev/null and b/public/res/fonts/roboto/Roboto-Light.ttf differ diff --git a/public/res/fonts/roboto/Roboto-LightItalic.ttf b/public/res/fonts/roboto/Roboto-LightItalic.ttf new file mode 100644 index 00000000..3ad14fa7 Binary files /dev/null and b/public/res/fonts/roboto/Roboto-LightItalic.ttf differ diff --git a/public/res/fonts/roboto/Roboto-Medium.ttf b/public/res/fonts/roboto/Roboto-Medium.ttf new file mode 100644 index 00000000..e89b0b79 Binary files /dev/null and b/public/res/fonts/roboto/Roboto-Medium.ttf differ diff --git a/public/res/fonts/roboto/Roboto-MediumItalic.ttf b/public/res/fonts/roboto/Roboto-MediumItalic.ttf new file mode 100644 index 00000000..a5a41d3d Binary files /dev/null and b/public/res/fonts/roboto/Roboto-MediumItalic.ttf differ diff --git a/public/res/fonts/roboto/Roboto-Regular.ttf b/public/res/fonts/roboto/Roboto-Regular.ttf new file mode 100644 index 00000000..3d6861b4 Binary files /dev/null and b/public/res/fonts/roboto/Roboto-Regular.ttf differ diff --git a/src/app/atoms/avatar/Avatar.jsx b/src/app/atoms/avatar/Avatar.jsx index eefb5752..0c84f6b0 100644 --- a/src/app/atoms/avatar/Avatar.jsx +++ b/src/app/atoms/avatar/Avatar.jsx @@ -32,7 +32,7 @@ function Avatar({ iconSrc !== null ? : text !== null && ( - + {twemojify([...text][0])} ) diff --git a/src/app/atoms/badge/NotificationBadge.jsx b/src/app/atoms/badge/NotificationBadge.jsx index c92815b7..12c1bd44 100644 --- a/src/app/atoms/badge/NotificationBadge.jsx +++ b/src/app/atoms/badge/NotificationBadge.jsx @@ -8,7 +8,7 @@ function NotificationBadge({ alert, content }) { const notificationClass = alert ? ' notification-badge--alert' : ''; return (
- {content !== null && {content}} + {content !== null && {content}}
); } diff --git a/src/app/atoms/badge/NotificationBadge.scss b/src/app/atoms/badge/NotificationBadge.scss index 1c93f964..f5cfa73f 100644 --- a/src/app/atoms/badge/NotificationBadge.scss +++ b/src/app/atoms/badge/NotificationBadge.scss @@ -8,7 +8,6 @@ .text { color: var(--tc-badge); text-align: center; - font-weight: 700; } &--alert { diff --git a/src/app/atoms/divider/Divider.jsx b/src/app/atoms/divider/Divider.jsx index 76a97315..76721241 100644 --- a/src/app/atoms/divider/Divider.jsx +++ b/src/app/atoms/divider/Divider.jsx @@ -8,7 +8,7 @@ function Divider({ text, variant, align }) { const dividerClass = ` divider--${variant} divider--${align}`; return (
- {text !== null && {text}} + {text !== null && {text}}
); } diff --git a/src/app/atoms/divider/Divider.scss b/src/app/atoms/divider/Divider.scss index a7dbbb27..0f013ff0 100644 --- a/src/app/atoms/divider/Divider.scss +++ b/src/app/atoms/divider/Divider.scss @@ -22,7 +22,6 @@ &__text { padding: 2px var(--sp-extra-tight); border-radius: calc(var(--bo-radius) / 2); - font-weight: 500; } } diff --git a/src/app/atoms/text/Text.jsx b/src/app/atoms/text/Text.jsx index cbd8d01b..9567bad1 100644 --- a/src/app/atoms/text/Text.jsx +++ b/src/app/atoms/text/Text.jsx @@ -3,25 +3,37 @@ import PropTypes from 'prop-types'; import './Text.scss'; function Text({ - id, className, variant, children, + className, variant, weight, + primary, span, children, }) { - const cName = className !== '' ? `${className} ` : ''; - if (variant === 'h1') return

{ children }

; - if (variant === 'h2') return

{ children }

; - if (variant === 's1') return

{ children }

; - return

{ children }

; + const classes = []; + if (className) classes.push(className); + + classes.push(`text text-${variant} text-${weight}`); + if (primary) classes.push('text-primary'); + + const textClass = classes.join(' '); + if (span) return { children }; + if (variant === 'h1') return

{ children }

; + if (variant === 'h2') return

{ children }

; + if (variant === 's1') return

{ children }

; + return

{ children }

; } Text.defaultProps = { - id: '', - className: '', + className: null, variant: 'b1', + weight: 'normal', + primary: false, + span: false, }; Text.propTypes = { - id: PropTypes.string, className: PropTypes.string, variant: PropTypes.oneOf(['h1', 'h2', 's1', 'b1', 'b2', 'b3']), + weight: PropTypes.oneOf(['light', 'normal', 'medium', 'bold']), + primary: PropTypes.bool, + span: PropTypes.bool, children: PropTypes.node.isRequired, }; diff --git a/src/app/atoms/text/Text.scss b/src/app/atoms/text/Text.scss index 6f685ea4..0bae5286 100644 --- a/src/app/atoms/text/Text.scss +++ b/src/app/atoms/text/Text.scss @@ -1,7 +1,5 @@ -@mixin font($type, $weight) { - +@mixin font($type) { font-size: var(--fs-#{$type}); - font-weight: $weight; letter-spacing: var(--ls-#{$type}); line-height: var(--lh-#{$type}); @@ -11,7 +9,7 @@ } } -%text { +.text { margin: 0; padding: 0; color: var(--tc-surface-high); @@ -26,30 +24,45 @@ } } +.text-primary { + font-family: var(--font-primary); + + --fw-light: var(--p-fw-light); + --fw-normal: var(--p-fw-normal); + --fw-medium: var(--p-fw-medium); + --fw-bold: var(--p-fw-bold); +} +.text-light { + font-weight: var(--fw-light); +} +.text-normal { + font-weight: var(--fw-normal); +} +.text-medium { + font-weight: var(--fw-medium); +} +.text-bold { + font-weight: var(--fw-bold); +} + .text-h1 { - @extend %text; - @include font(h1, 500); + @include font(h1); } .text-h2 { - @extend %text; - @include font(h2, 500); + @include font(h2); } .text-s1 { - @extend %text; - @include font(s1, 400); + @include font(s1); } .text-b1 { - @extend %text; - @include font(b1, 400); + @include font(b1); color: var(--tc-surface-normal); } .text-b2 { - @extend %text; - @include font(b2, 400); + @include font(b2); color: var(--tc-surface-normal); } .text-b3 { - @extend %text; - @include font(b3, 400); + @include font(b3); color: var(--tc-surface-low); } \ No newline at end of file diff --git a/src/app/molecules/dialog/Dialog.jsx b/src/app/molecules/dialog/Dialog.jsx index 1b918afd..4d67597d 100644 --- a/src/app/molecules/dialog/Dialog.jsx +++ b/src/app/molecules/dialog/Dialog.jsx @@ -27,7 +27,7 @@ function Dialog({
- {twemojify(title)} + {twemojify(title)} {contentOptions}
diff --git a/src/app/molecules/image-upload/ImageUpload.jsx b/src/app/molecules/image-upload/ImageUpload.jsx index 5beed72b..69564aa5 100644 --- a/src/app/molecules/image-upload/ImageUpload.jsx +++ b/src/app/molecules/image-upload/ImageUpload.jsx @@ -53,7 +53,7 @@ function ImageUpload({ size="large" />
- {uploadPromise === null && Upload} + {uploadPromise === null && Upload} {uploadPromise !== null && }
diff --git a/src/app/molecules/image-upload/ImageUpload.scss b/src/app/molecules/image-upload/ImageUpload.scss index 9e0f312f..3ae38bc0 100644 --- a/src/app/molecules/image-upload/ImageUpload.scss +++ b/src/app/molecules/image-upload/ImageUpload.scss @@ -24,7 +24,6 @@ z-index: 1; & .text { text-transform: uppercase; - font-weight: 600; color: white; } &--stopped { diff --git a/src/app/molecules/message/Message.jsx b/src/app/molecules/message/Message.jsx index 883fcfca..b376b7f5 100644 --- a/src/app/molecules/message/Message.jsx +++ b/src/app/molecules/message/Message.jsx @@ -70,8 +70,8 @@ const MessageHeader = React.memo(({ }) => (
- {twemojify(username)} - {twemojify(userId)} + {twemojify(username)} + {twemojify(userId)}
{time} diff --git a/src/app/molecules/message/Message.scss b/src/app/molecules/message/Message.scss index c545ab72..91b249b0 100644 --- a/src/app/molecules/message/Message.scss +++ b/src/app/molecules/message/Message.scss @@ -130,7 +130,6 @@ & > .text { color: inherit; - font-weight: 500; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; @@ -192,7 +191,7 @@ padding: 0 2px; border-radius: 4px; cursor: pointer; - font-weight: 500; + font-weight: var(--fw-medium); &:hover { background-color: hsla(0, 0%, 64%, 0.3); color: var(--tc-surface-high); diff --git a/src/app/molecules/popup-window/PopupWindow.jsx b/src/app/molecules/popup-window/PopupWindow.jsx index 016679ee..ae2a2d48 100644 --- a/src/app/molecules/popup-window/PopupWindow.jsx +++ b/src/app/molecules/popup-window/PopupWindow.jsx @@ -68,7 +68,7 @@ function PopupWindow({
- {twemojify(title)} + {twemojify(title)} {drawerOptions}
@@ -84,7 +84,7 @@ function PopupWindow({
- {twemojify(contentTitle !== null ? contentTitle : title)} + {twemojify(contentTitle !== null ? contentTitle : title)} {contentOptions}
diff --git a/src/app/molecules/popup-window/PopupWindow.scss b/src/app/molecules/popup-window/PopupWindow.scss index 6b6e3a42..0b70d7a9 100644 --- a/src/app/molecules/popup-window/PopupWindow.scss +++ b/src/app/molecules/popup-window/PopupWindow.scss @@ -53,10 +53,11 @@ & .header { padding-left: var(--sp-tight); & .header__title-wrapper { - margin: 0 var(--sp-extra-tight); + margin: 0 var(--sp-extra-tight) 0 var(--sp-ultra-tight); } [dir=rtl] & { - padding-right: var(--sp-tight); + padding-right: var(--sp-tight); + margin: 0 var(--sp-ultra-tight) 0 var(--sp-extra-tight); } } } diff --git a/src/app/molecules/room-intro/RoomIntro.jsx b/src/app/molecules/room-intro/RoomIntro.jsx index f22f8b10..2c6f944f 100644 --- a/src/app/molecules/room-intro/RoomIntro.jsx +++ b/src/app/molecules/room-intro/RoomIntro.jsx @@ -15,7 +15,7 @@ function RoomIntro({
- {twemojify(heading)} + {twemojify(heading)} {twemojify(desc, undefined, true)} { time !== null && {time}}
diff --git a/src/app/molecules/room-selector/RoomSelector.jsx b/src/app/molecules/room-selector/RoomSelector.jsx index 4966d832..ee5471fd 100644 --- a/src/app/molecules/room-selector/RoomSelector.jsx +++ b/src/app/molecules/room-selector/RoomSelector.jsx @@ -58,13 +58,13 @@ function RoomSelector({ iconSrc={iconSrc} size="extra-small" /> - + {twemojify(name)} {parentName && ( - + {' — '} {twemojify(parentName)} - + )} { isUnread && ( diff --git a/src/app/molecules/room-selector/RoomSelector.scss b/src/app/molecules/room-selector/RoomSelector.scss index 4419c07d..a0f7ed18 100644 --- a/src/app/molecules/room-selector/RoomSelector.scss +++ b/src/app/molecules/room-selector/RoomSelector.scss @@ -17,7 +17,6 @@ &--unread { .room-selector__content > .text { - font-weight: 500; color: var(--tc-surface-high); } } diff --git a/src/app/organisms/emoji-board/EmojiBoard.jsx b/src/app/organisms/emoji-board/EmojiBoard.jsx index 05f73952..9175576b 100644 --- a/src/app/organisms/emoji-board/EmojiBoard.jsx +++ b/src/app/organisms/emoji-board/EmojiBoard.jsx @@ -61,7 +61,7 @@ function EmojiGroup({ name, groupEmojis }) { return (
- {name} + {name} {groupEmojis.length !== 0 &&
{getEmojiBoard()}
}
); diff --git a/src/app/organisms/emoji-board/EmojiBoard.scss b/src/app/organisms/emoji-board/EmojiBoard.scss index f9c791ec..db64ffa5 100644 --- a/src/app/organisms/emoji-board/EmojiBoard.scss +++ b/src/app/organisms/emoji-board/EmojiBoard.scss @@ -101,7 +101,6 @@ margin-left: var(--sp-extra-tight); padding: var(--sp-extra-tight) var(--sp-ultra-tight); text-transform: uppercase; - font-weight: 600; box-shadow: 0 -4px 0 0 var(--bg-surface); border-bottom: 1px solid var(--bg-surface-border); [dir=rtl] & { diff --git a/src/app/organisms/invite-list/InviteList.jsx b/src/app/organisms/invite-list/InviteList.jsx index 28a924be..65920704 100644 --- a/src/app/organisms/invite-list/InviteList.jsx +++ b/src/app/organisms/invite-list/InviteList.jsx @@ -89,7 +89,7 @@ function InviteList({ isOpen, onRequestClose }) {
{ initMatrix.roomList.inviteDirects.size !== 0 && (
- Direct Messages + Direct Messages
)} { @@ -117,14 +117,14 @@ function InviteList({ isOpen, onRequestClose }) { } { initMatrix.roomList.inviteSpaces.size !== 0 && (
- Spaces + Spaces
)} { Array.from(initMatrix.roomList.inviteSpaces).map(renderRoomTile) } { initMatrix.roomList.inviteRooms.size !== 0 && (
- Rooms + Rooms
)} { Array.from(initMatrix.roomList.inviteRooms).map(renderRoomTile) } diff --git a/src/app/organisms/invite-list/InviteList.scss b/src/app/organisms/invite-list/InviteList.scss index 70e82c76..84d3c53b 100644 --- a/src/app/organisms/invite-list/InviteList.scss +++ b/src/app/organisms/invite-list/InviteList.scss @@ -7,7 +7,6 @@ & .text { text-transform: uppercase; - font-weight: 600; } &:first-child { margin-top: var(--sp-tight); diff --git a/src/app/organisms/navigation/Drawer.scss b/src/app/organisms/navigation/Drawer.scss index 0a33c4d8..6cb1a39f 100644 --- a/src/app/organisms/navigation/Drawer.scss +++ b/src/app/organisms/navigation/Drawer.scss @@ -18,10 +18,6 @@ border-left: 1px solid var(--bg-surface-border); } - & .header__title-wrapper .text { - font-weight: 500; - } - &__content-wrapper { @extend .drawer-flexItem; @extend .drawer-flexBox; @@ -79,6 +75,5 @@ margin: var(--sp-normal); margin-bottom: var(--sp-extra-tight); text-transform: uppercase; - font-weight: 600; } } \ No newline at end of file diff --git a/src/app/organisms/navigation/DrawerHeader.jsx b/src/app/organisms/navigation/DrawerHeader.jsx index 072397ef..51d2bed6 100644 --- a/src/app/organisms/navigation/DrawerHeader.jsx +++ b/src/app/organisms/navigation/DrawerHeader.jsx @@ -32,7 +32,7 @@ function DrawerHeader({ selectedTab, spaceId }) { return (
- {twemojify(spaceName) || tabName} + {twemojify(spaceName) || tabName} {spaceName && ( - { spaceIds.length !== 0 && Spaces } + { spaceIds.length !== 0 && Spaces } { spaceIds.map((id) => ( ))} - { roomIds.length !== 0 && Rooms } + { roomIds.length !== 0 && Rooms } { roomIds.map((id) => ( )) } - { directIds.length !== 0 && People } + { directIds.length !== 0 && People } { directIds.map((id) => (
- {twemojify(username)} + {twemojify(username)} {twemojify(userId)}
diff --git a/src/app/organisms/profile-viewer/ProfileViewer.scss b/src/app/organisms/profile-viewer/ProfileViewer.scss index b7da7c50..ac907863 100644 --- a/src/app/organisms/profile-viewer/ProfileViewer.scss +++ b/src/app/organisms/profile-viewer/ProfileViewer.scss @@ -26,9 +26,6 @@ margin: 0 var(--sp-normal); - & .text-s1 { - font-weight: 500; - } & .text { white-space: pre-wrap; word-break: break-word; diff --git a/src/app/organisms/room/PeopleDrawer.jsx b/src/app/organisms/room/PeopleDrawer.jsx index 85992f78..0a9226c2 100644 --- a/src/app/organisms/room/PeopleDrawer.jsx +++ b/src/app/organisms/room/PeopleDrawer.jsx @@ -143,7 +143,7 @@ function PeopleDrawer({ roomId }) {
- + People {`${room.getJoinedMemberCount()} members`} diff --git a/src/app/organisms/room/RoomViewHeader.jsx b/src/app/organisms/room/RoomViewHeader.jsx index a2e0d485..e9153f54 100644 --- a/src/app/organisms/room/RoomViewHeader.jsx +++ b/src/app/organisms/room/RoomViewHeader.jsx @@ -29,7 +29,7 @@ function RoomViewHeader({ roomId }) {
- {twemojify(roomName)} + {twemojify(roomName)} { typeof roomTopic !== 'undefined' &&

{twemojify(roomTopic)}

}
diff --git a/src/app/organisms/welcome/Welcome.jsx b/src/app/organisms/welcome/Welcome.jsx index 9d9eb7d7..3ffd05c4 100644 --- a/src/app/organisms/welcome/Welcome.jsx +++ b/src/app/organisms/welcome/Welcome.jsx @@ -10,7 +10,7 @@ function Welcome() {
Cinny logo - Welcome to Cinny + Welcome to Cinny Yet another matrix client
diff --git a/src/app/templates/client/Client.jsx b/src/app/templates/client/Client.jsx index 05bd43f7..3bb6055b 100644 --- a/src/app/templates/client/Client.jsx +++ b/src/app/templates/client/Client.jsx @@ -49,7 +49,7 @@ function Client() { {loadingMsg}
- Cinny + Cinny
); diff --git a/src/font-face.css b/src/font-face.css new file mode 100644 index 00000000..94fe4e31 --- /dev/null +++ b/src/font-face.css @@ -0,0 +1,59 @@ +/* ---- ROBOTO ---- */ + +@font-face { + font-family: 'Roboto'; + src: url(../public/res/fonts/roboto/Roboto-Light.ttf); + font-weight: 300; + font-display: swap; +} +@font-face { + font-family: 'Roboto'; + src: url(../public/res/fonts/roboto/Roboto-Regular.ttf); + font-weight: 400; + font-display: swap; +} +@font-face { + font-family: 'Roboto'; + src: url(../public/res/fonts/roboto/Roboto-Medium.ttf); + font-weight: 500; + font-display: swap; +} +@font-face { + font-family: 'Roboto'; + src: url(../public/res/fonts/roboto/Roboto-Bold.ttf); + font-weight: 600; + font-display: swap; +} + +/* ---- Inter ---- */ + +@font-face { + font-family: 'Inter'; + src: url(../public/res/fonts/inter/Inter_vf_slant_weight.ttf); + font-weight: 300; + font-display: swap; +} +@font-face { + font-family: 'Inter'; + src: url(../public/res/fonts/inter/Inter_vf_slant_weight.ttf); + font-weight: 380; + font-display: swap; +} +@font-face { + font-family: 'Inter'; + src: url(../public/res/fonts/inter/Inter_vf_slant_weight.ttf); + font-weight: 400; + font-display: swap; +} +@font-face { + font-family: 'Inter'; + src: url(../public/res/fonts/inter/Inter_vf_slant_weight.ttf); + font-weight: 500; + font-display: swap; +} +@font-face { + font-family: 'Inter'; + src: url(../public/res/fonts/inter/Inter_vf_slant_weight.ttf); + font-weight: 600; + font-display: swap; +} \ No newline at end of file diff --git a/src/index.scss b/src/index.scss index aed54b83..9aa8c4da 100644 --- a/src/index.scss +++ b/src/index.scss @@ -1,4 +1,4 @@ -@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,300;0,400;0,500;0,700;1,300;1,400;1,500;1,700&display=swap'); +@import url(./font-face.css); :root { @@ -43,7 +43,7 @@ --tc-surface-high: #000000; --tc-surface-normal: rgba(0, 0, 0, 78%); --tc-surface-normal-low: rgba(0, 0, 0, 60%); - --tc-surface-low: rgba(0, 0, 0, 38%); + --tc-surface-low: rgba(0, 0, 0, 48%); --tc-primary-high: #ffffff; --tc-primary-normal: rgba(255, 255, 255, 68%); @@ -113,7 +113,7 @@ --bo-radius: 8px; - /* font syles */ + /* font styles: font-size, letter-spacing, line-hight */ --fs-h1: 36px; --ls-h1: -1.5px; --lh-h1: 38px; @@ -138,6 +138,17 @@ --ls-b3: 0px; --lh-b3: 16px; + /* font-weight */ + --p-fw-light: 300; + --p-fw-normal: 400; + --p-fw-medium: 500; + --p-fw-bold: 600; + + --fw-light: 300; + --fw-normal: 400; + --fw-medium: 500; + --fw-bold: 600; + /* spacing | --sp-[space]: value */ --sp-none: 0px; @@ -162,7 +173,8 @@ /* transition curves */ --fluid-push: cubic-bezier(0, 0.8, 0.67, 0.97); - --font-family: 'Roboto', 'Supreme', sans-serif; + --font-primary: 'Roboto', sans-serif; + --font-secondary: 'Roboto', sans-serif; } .silver-theme { @@ -228,8 +240,25 @@ --bs-primary-border: inset 0 0 0 1px var(--bg-primary-border); --bs-primary-outline: 0 0 0 2px var(--bg-primary-border); + + /* font styles: font-size, letter-spacing, line-hight */ + --fs-h1: 35.6px; - --font-family: 'Supreme', 'Roboto', sans-serif; + --fs-h2: 23.6px; + + --fs-s1: 17.6px; + + --fs-b1: 14.6px; + --ls-b1: 0.14px; + + --fs-b2: 13.6px; + + --fs-b3: 11.6px; + + /* override normal font weight for dark mode */ + --fw-normal: 380; + + --font-secondary: 'Inter', 'Roboto', sans-serif; } .butter-theme { @@ -264,8 +293,9 @@ body { margin: 0; padding: 0; height: 100%; - font-family: var(--font-family); + font-family: var(--font-secondary); font-size: 16px; + font-weight: var(--fw-normal); background-color: var(--bg-surface-low); } #root { @@ -283,7 +313,7 @@ a { text-decoration: none; } b { - font-weight: 500; + font-weight: var(--fw-medium); } label { margin: 0;