From db0a295904cf54c03023a9f64b458cdcddf363c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=A6=8C=EA=A6=AB=EA=A6=B6=EA=A6=8F=EA=A7=80=EA=A6=A6?= =?UTF-8?q?=EA=A6=BF=EA=A6=A7=EA=A6=AE=EA=A6=91=EA=A6=A9=EA=A6=AD=EA=A7=80?= Date: Tue, 21 Mar 2023 17:33:20 +0800 Subject: Reorganise auth, primary button, and reuse --- Authentication.qrc | 6 + Authentication/SignIn.ui.qml | 231 +++++++++++++++++++++++++++++++++ Authentication/SignUp.ui.qml | 262 +++++++++++++++++++++++++++++++++++++ Bootstrap.qrc | 3 - Bootstrap/Button/Primary.ui.qml | 20 --- Bootstrap/LICENSE.md | 21 +++ Bootstrap/icons/LICENSE.md | 21 --- Button/Primary.ui.qml | 20 +++ Eduport.qrc | 9 ++ SignIn.ui.qml | 228 -------------------------------- SignUp.ui.qml | 281 ---------------------------------------- imports/Bootstrap/Bootstrap.qml | 10 +- imports/Eduport/Eduport.qml | 15 +++ imports/Eduport/qmldir | 2 + 14 files changed, 574 insertions(+), 555 deletions(-) create mode 100644 Authentication.qrc create mode 100644 Authentication/SignIn.ui.qml create mode 100644 Authentication/SignUp.ui.qml delete mode 100644 Bootstrap/Button/Primary.ui.qml create mode 100644 Bootstrap/LICENSE.md delete mode 100644 Bootstrap/icons/LICENSE.md create mode 100644 Button/Primary.ui.qml create mode 100644 Eduport.qrc delete mode 100644 SignIn.ui.qml delete mode 100644 SignUp.ui.qml create mode 100644 imports/Eduport/Eduport.qml create mode 100644 imports/Eduport/qmldir diff --git a/Authentication.qrc b/Authentication.qrc new file mode 100644 index 0000000..99389b7 --- /dev/null +++ b/Authentication.qrc @@ -0,0 +1,6 @@ + + + Authentication/SignIn.ui.qml + Authentication/SignUp.ui.qml + + diff --git a/Authentication/SignIn.ui.qml b/Authentication/SignIn.ui.qml new file mode 100644 index 0000000..a0915d6 --- /dev/null +++ b/Authentication/SignIn.ui.qml @@ -0,0 +1,231 @@ +import QtQuick 2.15 +import QtQuick.Controls 2.15 +import QtQuick.Layouts 1.15 +import Bootstrap 5.3 +import Eduport 1.0 +import "../Button" as BsBtn + +Flickable { + property string titleHeader: qsTr("Login into Eduport!") + property alias titleParagraph: titleParagraph + property string emailLabel: qsTr("Email address *") + property string emailImage: "../Bootstrap/icons/envelope-fill.svg" + property alias email: email + property alias password: password + property alias button: button + property alias signUp: signUp + contentHeight: container.height + + GridLayout { + id: container + anchors { + top: parent.top + left: parent.left + right: parent.right + } + + ColumnLayout { + Layout.rightMargin: 16 + Layout.leftMargin: 16 + + ColumnLayout { + spacing: 16 + ColumnLayout { + id: columnLayout + + Label { + Layout.fillWidth: true + text: titleHeader + wrapMode: Label.Wrap + font { + family: Eduport.hFont + .family + pointSize: 21.75 + + .013125 + * columnLayout + .width + } + } + + Label { + id: titleParagraph + text: qsTr("Nice to see you! Please log in with your account.") + wrapMode: Label.Wrap + color: "#6c757d" + Layout.fillWidth: true + font { + family: Bootstrap + .bodyFont.family + pointSize: Eduport + .fontSizeLead + } + } + } + + ColumnLayout { + Label { + text: emailLabel + font { + family: Bootstrap + .bodyFont.family + pointSize: Bootstrap + .bodyFont + .pointSize + } + } + + Rectangle { + implicitHeight: 56 + color: "#f5f7f9" + radius: 8 + border.width: 0 + Layout.fillWidth: true + + RowLayout { + anchors.fill: parent + Image { + source: emailImage + Layout.maximumHeight: 24 + Layout.maximumWidth: 24 + Layout.margins: 16 + } + + TextField { + id: email + placeholderText: qsTr("E-mail") + font { + family: Bootstrap.bodyFont.family + pointSize: Eduport.fontSizeFormControl + } + Layout.fillWidth: true + Layout.fillHeight: true + background: Rectangle { + color: "transparent" + } + } + } + } + } + + ColumnLayout { + + Label { + text: qsTr("Password *") + font { + family: Bootstrap + .bodyFont.family + pointSize: Bootstrap + .bodyFont + .pointSize + } + } + + Rectangle { + implicitHeight: 56 + color: "#f5f7f9" + radius: 8 + border.width: 0 + Layout.fillWidth: true + + RowLayout { + anchors.fill: parent + Image { + source: "../Font-Awesome/svgs/solid/lock.svg" + Layout.maximumHeight: 24 + Layout.maximumWidth: 24 + Layout.margins: 16 + } + + TextField { + id: password + placeholderText: qsTr("password") + echoMode: TextInput.Password + font { + family: Bootstrap.bodyFont.family + pointSize: Eduport.fontSizeFormControl + } + Layout.fillWidth: true + Layout.fillHeight: true + background: Rectangle { + color: "transparent" + } + } + } + } + } + + Label { + id: passwordHelper + text: qsTr("Your password must be 8 characters at least") + font { + family: Bootstrap.bodyFont + .family + pointSize: Eduport + .fontSizeFormText + } + color: "#6c757d" + } + RowLayout { + Layout.fillWidth: true + CheckBox { + id: rememberCheckBox + text: qsTr("Remember me") + font { + family: Bootstrap.bodyFont.family + pointSize: Bootstrap.bodyFont.pointSize + } + Layout.fillWidth: true + contentItem: Text { + color: "#6c757d" + text: rememberCheckBox.text + font: rememberCheckBox.font + verticalAlignment: Text.AlignVCenter + leftPadding: rememberCheckBox.indicator.width + rememberCheckBox.spacing + } + } + Text { + id: forgotPassword + text: "Forgot password?" + font { + family: Bootstrap.bodyFont.family + pointSize: Bootstrap.bodyFont.pointSize + } + horizontalAlignment: Text.AlignRight + Layout.fillWidth: true + linkColor: Qt.rgba(.0235, .416, .788, 1.0) + } + } + + BsBtn.Primary { + id: button + text: qsTr("Login") + implicitHeight: 40 + Layout.fillWidth: true + } + } + + RowLayout { + Layout.alignment: Qt.AlignHCenter + + Label { + text: qsTr("Don't have an account?") + font { + family: Bootstrap.bodyFont.family + pointSize: Bootstrap.bodyFont.pointSize + } + } + + Text { + id: signUp + text: "Signup here" + font { + family: Bootstrap.bodyFont.family + pointSize: Bootstrap.bodyFont.pointSize + underline: false + } + linkColor: Qt.rgba(.0235, .416, .788, 1.0) + } + } + } + } +} diff --git a/Authentication/SignUp.ui.qml b/Authentication/SignUp.ui.qml new file mode 100644 index 0000000..e1a3932 --- /dev/null +++ b/Authentication/SignUp.ui.qml @@ -0,0 +1,262 @@ +import QtQuick 2.15 +import QtQuick.Controls 2.15 +import QtQuick.Layouts 1.15 +import Bootstrap 5.3 +import Eduport 1.0 +import "../Button" as BsBtn + +Flickable { + property string titleHeader: qsTr("Sign up for your account!") + property alias titleParagraph: titleParagraph + property string emailLabel: qsTr("Email address *") + property string emailImage: "../Bootstrap/icons/envelope-fill.svg" + property alias email: email + property alias password: password + property alias confirmPassword: confirmPassword + property alias button: button + property alias signIn: signIn + contentHeight: container.height + + GridLayout { + id: container + anchors { + top: parent.top + left: parent.left + right: parent.right + } + + ColumnLayout { + Layout.margins: 16 + + ColumnLayout { + spacing: 16 + + ColumnLayout { + id: columnLayout + + Label { + Layout.fillWidth: true + text: titleHeader + wrapMode: Label.Wrap + font { + family: Eduport.hFont + .family + pointSize: 21.75 + + .013125 + * columnLayout + .width + } + } + + Label { + id: titleParagraph + color: "#6c757d" + text: qsTr("Nice to see you! Please Sign up with your account.") + wrapMode: Label.Wrap + Layout.fillWidth: true + font { + family: Bootstrap + .bodyFont.family + pointSize: Eduport + .fontSizeLead + } + } + } + + ColumnLayout { + + Label { + text: emailLabel + font { + family: Bootstrap + .bodyFont.family + pointSize: Bootstrap + .bodyFont + .pointSize + } + } + + Rectangle { + implicitHeight: 56 + color: "#f5f7f9" + radius: 8 + border.width: 0 + Layout.fillWidth: true + + RowLayout { + anchors.fill: parent + + Image { + source: emailImage + Layout.maximumHeight: 24 + Layout.maximumWidth: 24 + Layout.margins: 16 + } + + TextField { + id: email + placeholderText: qsTr("E-mail") + font { + family: Bootstrap.bodyFont.family + pointSize: Eduport.fontSizeFormControl + } + Layout.fillWidth: true + Layout.fillHeight: true + background: Rectangle { + color: "transparent" + } + } + } + } + } + + ColumnLayout { + + Label { + text: qsTr("Password *") + font { + family: Bootstrap + .bodyFont.family + pointSize: Bootstrap + .bodyFont + .pointSize + } + } + + Rectangle { + implicitHeight: 56 + color: "#f5f7f9" + radius: 8 + border.width: 0 + Layout.fillWidth: true + + RowLayout { + anchors.fill: parent + + Image { + source: "../Font-Awesome/svgs/solid/lock.svg" + Layout.maximumHeight: 24 + Layout.maximumWidth: 24 + Layout.margins: 16 + } + + TextField { + id: password + placeholderText: "*********" + echoMode: TextInput.Password + font { + family: Bootstrap.bodyFont.family + pointSize: Eduport.fontSizeFormControl + } + Layout.fillWidth: true + Layout.fillHeight: true + background: Rectangle { + color: "transparent" + } + } + } + } + } + + ColumnLayout { + + Label { + text: qsTr("Confirm Password *") + font { + family: Bootstrap + .bodyFont.family + pointSize: Bootstrap + .bodyFont + .pointSize + } + } + + Rectangle { + implicitHeight: 56 + color: "#f5f7f9" + radius: 8 + border.width: 0 + Layout.fillWidth: true + + RowLayout { + anchors.fill: parent + + Image { + source: "../Font-Awesome/svgs/solid/lock.svg" + Layout.maximumHeight: 24 + Layout.maximumWidth: 24 + Layout.margins: 16 + } + + TextField { + id: confirmPassword + placeholderText: "*********" + echoMode: TextInput.Password + font { + family: Bootstrap.bodyFont.family + pointSize: Eduport.fontSizeFormControl + } + Layout.fillWidth: true + Layout.fillHeight: true + background: Rectangle { + color: "transparent" + } + } + } + } + } + + RowLayout { + Layout.fillWidth: true + + CheckBox { + id: agreementCheckBox + text: "By signing up, you agree to the terms of service" + font { + family: Bootstrap.bodyFont.family + pointSize: Bootstrap.bodyFont.pointSize + } + Layout.fillWidth: true + contentItem: Text { + color: "#6c757d" + text: agreementCheckBox.text + font: agreementCheckBox.font + verticalAlignment: Text.AlignVCenter + leftPadding: agreementCheckBox.indicator.width + agreementCheckBox.spacing + } + } + } + + BsBtn.Primary { + id: button + text: qsTr("Sign Up") + implicitHeight: 40 + Layout.fillWidth: true + } + } + + RowLayout { + Layout.alignment: Qt.AlignHCenter + + Label { + text: qsTr("Already have an account?") + font { + family: Bootstrap.bodyFont.family + pointSize: Bootstrap.bodyFont.pointSize + } + } + + Text { + id: signIn + text: "Sign in here" + font { + family: Bootstrap.bodyFont.family + pointSize: Bootstrap.bodyFont.pointSize + underline: false + } + linkColor: Qt.rgba(.0235, .416, .788, 1.0) + } + } + } + } +} diff --git a/Bootstrap.qrc b/Bootstrap.qrc index 5eaf642..2a98d8e 100644 --- a/Bootstrap.qrc +++ b/Bootstrap.qrc @@ -1,8 +1,5 @@ - imports/Bootstrap/Bootstrap.qml - imports/Bootstrap/qmldir - Bootstrap/Button/Primary.ui.qml Bootstrap/icons/patch-check-fill.svg Bootstrap/icons/envelope-fill.svg diff --git a/Bootstrap/Button/Primary.ui.qml b/Bootstrap/Button/Primary.ui.qml deleted file mode 100644 index e99f56b..0000000 --- a/Bootstrap/Button/Primary.ui.qml +++ /dev/null @@ -1,20 +0,0 @@ -import QtQuick 2.15 -import QtQuick.Controls 2.15 -import Bootstrap 5.3 - -Button { - id: button - font: Bootstrap.btnFont - contentItem: Text { - text: button.text - font: button.font - color: Bootstrap.btnColor - horizontalAlignment: Text.AlignHCenter - verticalAlignment: Text.AlignVCenter - } - background: Rectangle { - color: button.down ? Bootstrap.btnActiveBG : button.enabled - ? Bootstrap.btnBg : Bootstrap.btnDisabledBg - radius: 8 - } -} diff --git a/Bootstrap/LICENSE.md b/Bootstrap/LICENSE.md new file mode 100644 index 0000000..47f06b6 --- /dev/null +++ b/Bootstrap/LICENSE.md @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2019-2021 The Bootstrap Authors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/Bootstrap/icons/LICENSE.md b/Bootstrap/icons/LICENSE.md deleted file mode 100644 index 47f06b6..0000000 --- a/Bootstrap/icons/LICENSE.md +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2019-2021 The Bootstrap Authors - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/Button/Primary.ui.qml b/Button/Primary.ui.qml new file mode 100644 index 0000000..e99f56b --- /dev/null +++ b/Button/Primary.ui.qml @@ -0,0 +1,20 @@ +import QtQuick 2.15 +import QtQuick.Controls 2.15 +import Bootstrap 5.3 + +Button { + id: button + font: Bootstrap.btnFont + contentItem: Text { + text: button.text + font: button.font + color: Bootstrap.btnColor + horizontalAlignment: Text.AlignHCenter + verticalAlignment: Text.AlignVCenter + } + background: Rectangle { + color: button.down ? Bootstrap.btnActiveBG : button.enabled + ? Bootstrap.btnBg : Bootstrap.btnDisabledBg + radius: 8 + } +} diff --git a/Eduport.qrc b/Eduport.qrc new file mode 100644 index 0000000..d529e0e --- /dev/null +++ b/Eduport.qrc @@ -0,0 +1,9 @@ + + + imports/Bootstrap/Bootstrap.qml + imports/Bootstrap/qmldir + imports/Eduport/Eduport.qml + imports/Eduport/qmldir + Button/Primary.ui.qml + + diff --git a/SignIn.ui.qml b/SignIn.ui.qml deleted file mode 100644 index 6d910dd..0000000 --- a/SignIn.ui.qml +++ /dev/null @@ -1,228 +0,0 @@ -import QtQuick 2.15 -import QtQuick.Controls 2.15 -import QtQuick.Layouts 1.15 -import "Bootstrap/Button" as BsBtn - -Flickable { - property string titleHeader: qsTr("Login into Eduport!") - property alias titleParagraph: titleParagraph - property string emailLabel: qsTr("Email address *") - property string emailImage: "Bootstrap/icons/envelope-fill.svg" - property alias email: email - property alias password: password - property alias button: button - property alias signUp: signUp - readonly property bool doesntEmbed: Qt.platform.os === "android" - || Qt.platform.os === "linux" - || Qt.platform.os === "osx" - || Qt.platform.os === "unix" - || Qt.platform.os === "windows" - contentHeight: container.height - - FontLoader { - id: heebo - source: "Heebo/Heebo-Bold.ttf" - } - - FontLoader { - id: medium - source: doesntEmbed ? "" : "Roboto/Roboto-Medium.ttf" - } - - FontLoader { - id: regular - source: doesntEmbed ? "" : "Roboto/Roboto-Regular.ttf" - } - - GridLayout { - id: container - anchors { - top: parent.top - left: parent.left - right: parent.right - } - - ColumnLayout { - Layout.rightMargin: 16 - Layout.leftMargin: 16 - - ColumnLayout { - spacing: 16 - ColumnLayout { - id: columnLayout - - Label { - text: titleHeader - wrapMode: Text.Wrap - Layout.fillWidth: true - font { - family: heebo.name - pointSize: 21.75 + .013125 * columnLayout.width - } - } - - Label { - id: titleParagraph - text: qsTr("Nice to see you! Please log in with your account.") - color: "#6c757d" - wrapMode: Text.Wrap - Layout.fillWidth: true - font { - pointSize: 18.75 - family: doesntEmbed ? "Roboto" : regular.name - } - } - } - ColumnLayout { - Label { - text: emailLabel - font { - pointSize: 15 - family: doesntEmbed ? "Roboto" : regular.name - } - } - - Rectangle { - implicitHeight: 56 - color: "#f5f7f9" - radius: 8 - border.width: 0 - Layout.fillWidth: true - - RowLayout { - anchors.fill: parent - Image { - source: emailImage - Layout.maximumHeight: 24 - Layout.maximumWidth: 24 - Layout.margins: 16 - } - TextField { - id: email - placeholderText: qsTr("E-mail") - font { - pointSize: 16 - family: doesntEmbed ? "Roboto" : regular.name - } - Layout.fillWidth: true - Layout.fillHeight: true - background: Rectangle { - color: "transparent" - } - } - } - } - } - - ColumnLayout { - Label { - text: qsTr("Password *") - font { - pointSize: 15 - family: doesntEmbed ? "Roboto" : regular.name - } - } - - Rectangle { - implicitHeight: 56 - color: "#f5f7f9" - radius: 8 - border.width: 0 - Layout.fillWidth: true - - RowLayout { - anchors.fill: parent - Image { - source: "Font-Awesome/svgs/solid/lock.svg" - Layout.maximumHeight: 24 - Layout.maximumWidth: 24 - Layout.margins: 16 - } - TextField { - id: password - placeholderText: qsTr("password") - echoMode: TextInput.Password - font { - pointSize: 16 - family: doesntEmbed ? "Roboto" : regular.name - } - Layout.fillWidth: true - Layout.fillHeight: true - background: Rectangle { - color: "transparent" - } - } - } - } - } - Label { - id: passwordHelper - text: "Your password must be 8 characters at least" - font { - pointSize: 14 - family: doesntEmbed ? "Roboto" : regular.name - } - color: "#6c757d" - } - RowLayout { - Layout.fillWidth: true - CheckBox { - id: rememberCheckBox - text: qsTr("Remember me") - font { - pointSize: 15 - family: doesntEmbed ? "Roboto" : regular.name - } - Layout.fillWidth: true - contentItem: Text { - color: "#6c757d" - text: rememberCheckBox.text - font: rememberCheckBox.font - verticalAlignment: Text.AlignVCenter - leftPadding: rememberCheckBox.indicator.width + rememberCheckBox.spacing - } - } - Text { - id: forgotPassword - text: "Forgot password?" - font { - pointSize: 15 - family: doesntEmbed ? "Roboto" : regular.name - } - horizontalAlignment: Text.AlignRight - Layout.fillWidth: true - linkColor: Qt.rgba(.0235, .416, .788, 1.0) - } - } - - BsBtn.Primary { - id: button - text: qsTr("Login") - implicitHeight: 40 - Layout.fillWidth: true - } - } - - RowLayout { - Layout.alignment: Qt.AlignHCenter - Label { - text: qsTr("Don't have an account?") - font { - pointSize: 15 - family: doesntEmbed ? "Roboto" : regular.name - } - } - Text { - id: signUp - text: "Signup here" - font { - pointSize: 15 - family: doesntEmbed ? "Roboto" : regular.name - underline: false - } - linkColor: Qt.rgba(.0235, .416, .788, 1.0) - } - } - } - } -} diff --git a/SignUp.ui.qml b/SignUp.ui.qml deleted file mode 100644 index 92bcd9b..0000000 --- a/SignUp.ui.qml +++ /dev/null @@ -1,281 +0,0 @@ -import QtQuick 2.15 -import QtQuick.Controls 2.15 -import QtQuick.Layouts 1.15 - -Flickable { - property string titleHeader: qsTr("Sign up for your account!") - property alias titleParagraph: titleParagraph - property string emailLabel: qsTr("Email address *") - property string emailImage: "Bootstrap/icons/envelope-fill.svg" - property alias email: email - property alias password: password - property alias confirmPassword: confirmPassword - property alias button: button - property alias signIn: signIn - readonly property bool doesntEmbed: Qt.platform.os === "android" - || Qt.platform.os === "linux" - || Qt.platform.os === "osx" - || Qt.platform.os === "unix" - || Qt.platform.os === "windows" - contentHeight: container.height - - FontLoader { - id: heebo - source: "Heebo/Heebo-Bold.ttf" - } - - FontLoader { - id: medium - source: doesntEmbed ? "" : "Roboto/Roboto-Medium.ttf" - } - - FontLoader { - id: regular - source: doesntEmbed ? "" : "Roboto/Roboto-Regular.ttf" - } - - GridLayout { - id: container - anchors { - top: parent.top - left: parent.left - right: parent.right - } - - ColumnLayout { - Layout.margins: 16 - - ColumnLayout { - spacing: 16 - - ColumnLayout { - id: columnLayout - - Label { - text: titleHeader - wrapMode: Text.Wrap - Layout.fillWidth: true - font { - family: heebo.name - pointSize: 21.75 + .013125 * columnLayout.width - } - } - - Label { - id: titleParagraph - color: "#6c757d" - text: qsTr("Nice to see you! Please Sign up with your account.") - wrapMode: Text.Wrap - Layout.fillWidth: true - font { - pointSize: 18.75 - family: doesntEmbed ? "Roboto" : regular.name - } - } - } - - ColumnLayout { - - Label { - text: emailLabel - font { - pointSize: 15 - family: doesntEmbed ? "Roboto" : regular.name - } - } - - Rectangle { - implicitHeight: 56 - color: "#f5f7f9" - radius: 8 - border.width: 0 - Layout.fillWidth: true - - RowLayout { - anchors.fill: parent - - Image { - source: emailImage - Layout.maximumHeight: 24 - Layout.maximumWidth: 24 - Layout.margins: 16 - } - - TextField { - id: email - placeholderText: qsTr("E-mail") - font { - pointSize: 16 - family: doesntEmbed ? "Roboto" : regular.name - } - Layout.fillWidth: true - Layout.fillHeight: true - background: Rectangle { - color: "transparent" - } - } - } - } - } - - ColumnLayout { - - Label { - text: qsTr("Password *") - font { - pointSize: 15 - family: doesntEmbed ? "Roboto" : regular.name - } - } - - Rectangle { - implicitHeight: 56 - color: "#f5f7f9" - radius: 8 - border.width: 0 - Layout.fillWidth: true - - RowLayout { - anchors.fill: parent - - Image { - source: "Font-Awesome/svgs/solid/lock.svg" - Layout.maximumHeight: 24 - Layout.maximumWidth: 24 - Layout.margins: 16 - } - - TextField { - id: password - placeholderText: "*********" - echoMode: TextInput.Password - font { - pointSize: 16 - family: doesntEmbed ? "Roboto" : regular.name - } - Layout.fillWidth: true - Layout.fillHeight: true - background: Rectangle { - color: "transparent" - } - } - } - } - } - - ColumnLayout { - - Label { - text: qsTr("Confirm Password *") - font { - pointSize: 15 - family: doesntEmbed ? "Roboto" : regular.name - } - } - - Rectangle { - implicitHeight: 56 - color: "#f5f7f9" - radius: 8 - border.width: 0 - Layout.fillWidth: true - - RowLayout { - anchors.fill: parent - - Image { - source: "Font-Awesome/svgs/solid/lock.svg" - Layout.maximumHeight: 24 - Layout.maximumWidth: 24 - Layout.margins: 16 - } - - TextField { - id: confirmPassword - placeholderText: "*********" - echoMode: TextInput.Password - font { - pointSize: 16 - family: doesntEmbed ? "Roboto" : regular.name - } - Layout.fillWidth: true - Layout.fillHeight: true - background: Rectangle { - color: "transparent" - } - } - } - } - } - - RowLayout { - Layout.fillWidth: true - - CheckBox { - id: agreementCheckBox - text: "By signing up, you agree to the terms of service" - font { - pointSize: 15 - family: doesntEmbed ? "Roboto" : regular.name - } - Layout.fillWidth: true - contentItem: Text { - color: "#6c757d" - text: agreementCheckBox.text - font: agreementCheckBox.font - verticalAlignment: Text.AlignVCenter - leftPadding: agreementCheckBox.indicator.width + agreementCheckBox.spacing - } - } - } - - Button { - id: button - text: qsTr("Sign Up") - implicitHeight: 40 - Layout.fillWidth: true - - contentItem: Text { - color: "#ffffff" - text: button.text - horizontalAlignment: Text.AlignHCenter - verticalAlignment: Text.AlignVCenter - font { - pointSize: 15 - family: doesntEmbed ? "Roboto" : medium.name - weight: Font.Medium - } - } - - background: Rectangle { - color: button.down ? "#0555a1" : button.enabled ? "#066ac9" : "#a6066ac9" - radius: 8 - } - } - } - - RowLayout { - Layout.alignment: Qt.AlignHCenter - - Label { - text: qsTr("Already have an account?") - font { - pointSize: 15 - family: doesntEmbed ? "Roboto" : regular.name - } - } - - Text { - id: signIn - text: "Sign in here" - font { - pointSize: 15 - family: doesntEmbed ? "Roboto" : regular.name - underline: false - } - linkColor: Qt.rgba(.0235, .416, .788, 1.0) - } - } - } - } -} diff --git a/imports/Bootstrap/Bootstrap.qml b/imports/Bootstrap/Bootstrap.qml index 321eedf..3afa941 100644 --- a/imports/Bootstrap/Bootstrap.qml +++ b/imports/Bootstrap/Bootstrap.qml @@ -1,5 +1,4 @@ pragma Singleton - import QtQuick 2.15 QtObject { @@ -16,9 +15,16 @@ QtObject { readonly property FontLoader medium: FontLoader { source: haveRoboto ? "" : "../../Roboto/Roboto-Medium.ttf" } + readonly property FontLoader regular: FontLoader { + source: haveRoboto ? "" : "../../Roboto/Roboto-Regular.ttf" + } + readonly property font bodyFont: Qt.font({ + family: haveRoboto ? "Roboto" : regular.name, + pointSize: 15 + }) readonly property font btnFont: Qt.font({ - pointSize: 15, family: haveRoboto ? "Roboto" : medium.name, + pointSize: 15, weight: Font.Medium }) } diff --git a/imports/Eduport/Eduport.qml b/imports/Eduport/Eduport.qml new file mode 100644 index 0000000..b966920 --- /dev/null +++ b/imports/Eduport/Eduport.qml @@ -0,0 +1,15 @@ +pragma Singleton +import QtQuick 2.15 + +QtObject { + readonly property real fontSizeLead: 18.75 + readonly property real fontSizeFormControl: 16 + readonly property real fontSizeFormText: 14 + + readonly property FontLoader heebo: FontLoader { + source: "../../Heebo/Heebo-Bold.ttf" + } + readonly property font hFont: Qt.font({ + family: heebo.name + }) +} diff --git a/imports/Eduport/qmldir b/imports/Eduport/qmldir new file mode 100644 index 0000000..4318031 --- /dev/null +++ b/imports/Eduport/qmldir @@ -0,0 +1,2 @@ +module Eduport +singleton Eduport 1.0 Eduport.qml -- cgit v1.2.3