summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Home/Default.ui.qml (renamed from HomeDefault.ui.qml)64
-rw-r--r--Home/Default/Counter.ui.qml (renamed from Counter.ui.qml)21
-rw-r--r--HomeDefault.qrc6
-rw-r--r--Qeduport.qmlproject2
-rw-r--r--imports/Eduport/Eduport.qml11
5 files changed, 48 insertions, 56 deletions
diff --git a/HomeDefault.ui.qml b/Home/Default.ui.qml
index 39cdc7b..fc3de8c 100644
--- a/HomeDefault.ui.qml
+++ b/Home/Default.ui.qml
@@ -2,6 +2,10 @@ import QtQuick 2.15
import QtQuick.Controls 2.15
import QtQuick.Layouts 1.15
import QtGraphicalEffects 1.15
+import Bootstrap 5.3
+import Eduport 1.0
+import ".."
+import "Default" as Default
Flickable {
property string bannerTitleText: qsTr("Limitless learning at your fingertips")
@@ -11,18 +15,8 @@ Flickable {
property alias tabs: tabs
property alias tabsContent: tabsContent
property alias getStarted: getStarted
- property bool doesntEmbed: Qt.platform.os === "android"
- || Qt.platform.os === "linux"
- || Qt.platform.os === "osx"
- || Qt.platform.os === "unix"
- || Qt.platform.os === "windows"
contentHeight: body.height
- FontLoader {
- id: regular
- source: doesntEmbed ? "" : "Roboto/Roboto-Regular.ttf"
- }
-
ColumnLayout {
id: body
anchors {
@@ -47,11 +41,6 @@ Flickable {
Layout.maximumWidth: body.width < 992
? body.width : body.width / 2
- FontLoader {
- id: heebo
- source: "Heebo/Heebo-Bold.ttf"
- }
-
Label {
text: bannerTitleText
color: "#24292d"
@@ -59,17 +48,11 @@ Flickable {
wrapMode: Text.Wrap
Layout.fillWidth: true
font {
- family: heebo.name
+ family: Eduport.hFont.family
pointSize: 23.6 + .0432 * width
}
}
- FontLoader {
- id: medium
- source: doesntEmbed ? ""
- : "Roboto/Roboto-Medium.ttf"
- }
-
Label {
text: bannerContentText
color: "#747579"
@@ -77,9 +60,9 @@ Flickable {
wrapMode: Text.Wrap
Layout.fillWidth: true
font {
- family: doesntEmbed ? "Roboto"
- : medium.name
- pointSize: 18.75
+ family: Bootstrap.bodyFont
+ .family
+ pointSize: Eduport.fontSizeLead
}
}
@@ -101,10 +84,12 @@ Flickable {
verticalAlignment: Text
.AlignVCenter
font {
- family: doesntEmbed
- ? "Roboto"
- : medium.name
- pixelSize: 16
+ family: Bootstrap
+ .btnFont
+ .family
+ pointSize: Bootstrap
+ .btnFont
+ .pointSize
weight: Font.Medium
}
}
@@ -180,32 +165,32 @@ Flickable {
model: ListModel {
ListElement {
- icon: "Font-Awesome/svgs/solid/tv.svg"
+ icon: "../../Font-Awesome/svgs/solid/tv.svg"
count: "10K"
title: qsTr("Online Courses")
bgColor: "#26f7c32e"
}
ListElement {
- icon: "Font-Awesome/svgs/solid/user-tie.svg"
+ icon: "../../Font-Awesome/svgs/solid/user-tie.svg"
count: "200+"
title: qsTr("Expert Tutors")
bgColor: "#1a1d3b53"
}
ListElement {
- icon: "Font-Awesome/svgs/solid/user-graduate.svg"
+ icon: "../../Font-Awesome/svgs/solid/user-graduate.svg"
count: "60K+"
title: qsTr("Online Students")
bgColor: "#1a6f42c1"
}
ListElement {
- icon: "Bootstrap/icons/patch-check-fill.svg"
+ icon: "../../Bootstrap/icons/patch-check-fill.svg"
count: "6K+"
title: qsTr("Certified Courses")
bgColor: "#1a17a2b8"
}
}
- delegate: Counter {
+ delegate: Default.Counter {
implicitWidth: counter.cellWidth
implicitHeight: counter.cellHeight
}
@@ -228,8 +213,9 @@ Flickable {
Layout.fillWidth: true
Layout.bottomMargin: 8
font {
- family: heebo.name
- pointSize: 22.5 + .01875 * parent.width
+ family: Eduport.hFont.family
+ pointSize: 22.5 + .01875
+ * parent.width
}
}
@@ -240,8 +226,10 @@ Flickable {
wrapMode: Text.Wrap
Layout.fillWidth: true
font {
- family: doesntEmbed ? "Roboto" : medium.name
- pointSize: 15
+ family: Bootstrap.bodyFont
+ .family
+ pointSize: Bootstrap.bodyFont
+ .pointSize
}
}
}
diff --git a/Counter.ui.qml b/Home/Default/Counter.ui.qml
index f75b2ce..293b9ef 100644
--- a/Counter.ui.qml
+++ b/Home/Default/Counter.ui.qml
@@ -1,6 +1,7 @@
import QtQuick 2.15
import QtQuick.Controls 2.15
import QtQuick.Layouts 1.15
+import Eduport 1.0
Item {
Rectangle {
@@ -36,32 +37,22 @@ Item {
leftMargin: 25.6
}
- FontLoader {
- id: bold
- source: "Heebo/Heebo-Bold.ttf"
- }
-
Label {
text: count
font {
- family: bold.name
+ family: Eduport.hFont.family
pointSize: 20.1
- weight: Font.Bold
+ + .00075 * parent.width
}
Layout.fillWidth: true
}
- FontLoader {
- id: medium
- source: "Heebo/Heebo-Medium.ttf"
- }
-
Label {
text: title
font {
- family: medium.name
- pointSize: 15
- weight: Font.Medium
+ family: Eduport.normalFont
+ .family
+ pointSize: h6FontSize
}
Layout.fillWidth: true
}
diff --git a/HomeDefault.qrc b/HomeDefault.qrc
new file mode 100644
index 0000000..843290c
--- /dev/null
+++ b/HomeDefault.qrc
@@ -0,0 +1,6 @@
+<!DOCTYPE RCC><RCC version="1.0">
+ <qresource prefix="qeduport">
+ <file>Home/Default.ui.qml</file>
+ <file>Home/Default/Counter.ui.qml</file>
+ </qresource>
+</RCC>
diff --git a/Qeduport.qmlproject b/Qeduport.qmlproject
index b88797b..6677499 100644
--- a/Qeduport.qmlproject
+++ b/Qeduport.qmlproject
@@ -1,7 +1,7 @@
import QmlProject 1.1
Project {
- mainUiFile: "HomeDefault.ui.qml"
+ mainUiFile: "Home/Default.ui.qml"
QmlFiles {
directory: "."
diff --git a/imports/Eduport/Eduport.qml b/imports/Eduport/Eduport.qml
index b966920..e2dbed3 100644
--- a/imports/Eduport/Eduport.qml
+++ b/imports/Eduport/Eduport.qml
@@ -4,12 +4,19 @@ import QtQuick 2.15
QtObject {
readonly property real fontSizeLead: 18.75
readonly property real fontSizeFormControl: 16
+ readonly property real h6FontSize: 15
readonly property real fontSizeFormText: 14
- readonly property FontLoader heebo: FontLoader {
+ readonly property FontLoader bold: FontLoader {
source: "../../Heebo/Heebo-Bold.ttf"
}
+ readonly property FontLoader medium: FontLoader {
+ source: "../../Heebo/Heebo-Medium.ttf"
+ }
readonly property font hFont: Qt.font({
- family: heebo.name
+ family: bold.name
+ })
+ readonly property font normalFont: Qt.font({
+ family: medium.name
})
}