summaryrefslogtreecommitdiff
path: root/DefaultHomeFlickable.ui.qml
diff options
context:
space:
mode:
authorꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id>2023-01-19 11:40:04 +0800
committerꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id>2023-01-19 11:40:04 +0800
commit803290ba32e28cd3d5a28712a0f355042e8b35fe (patch)
treead7a221c519bc702b967476b7be754644ddba029 /DefaultHomeFlickable.ui.qml
parentc8c1fa67020f7e30203cce192a16a308b4d5c90b (diff)
Add Flickable suffix for consistency
Diffstat (limited to 'DefaultHomeFlickable.ui.qml')
-rw-r--r--DefaultHomeFlickable.ui.qml74
1 files changed, 74 insertions, 0 deletions
diff --git a/DefaultHomeFlickable.ui.qml b/DefaultHomeFlickable.ui.qml
new file mode 100644
index 0000000..d83e5a5
--- /dev/null
+++ b/DefaultHomeFlickable.ui.qml
@@ -0,0 +1,74 @@
+import QtQuick 2.15
+import QtQuick.Controls 2.15
+
+Flickable {
+ property alias counter: counter
+ property alias popularCourseTabsContent: popularCourseTabsContent
+ contentHeight: counter.height + popularCourseTabsContent.height
+
+ GridView {
+ id: counter
+ interactive: false
+
+ model: ListModel {
+ ListElement {
+ icon: "Font-Awesome/svgs/solid/tv.svg"
+ count: "10K"
+ title: qsTr("Online Courses")
+ bgColor: "#26f7c32e"
+ }
+ ListElement {
+ 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"
+ count: "60K+"
+ title: qsTr("Online Students")
+ bgColor: "#1a6f42c1"
+ }
+ ListElement {
+ icon: "Bootstrap/icons/patch-check-fill.svg"
+ count: "6K+"
+ title: qsTr("Certified Courses")
+ bgColor: "#1a17a2b8"
+ }
+ }
+
+ cellWidth: width < 576 ? width : width < 768 ? width / 2
+ : width < 992 ? width / 3 : width / 4
+ cellHeight: 125.6
+
+ height: width < 576 ? cellHeight * 4
+ : width < 768 ? cellHeight * 3
+ : width < 992 ? cellHeight * 2 : cellHeight
+ anchors {
+ top: parent.top
+ left: parent.left
+ right: parent.right
+ }
+ }
+
+ GridView {
+ id: popularCourseTabsContent
+ interactive: false
+
+ cellWidth: width < 576 ? width
+ : width < 768 ? width / 2
+ : width < 992 ? width / 3
+ : width / 4
+ cellHeight: cellWidth * 1.3
+
+ height: width < 576 ? cellHeight * count
+ : width < 768 ? cellHeight * count / 2
+ : width < 992 ? cellHeight * count / 3
+ : cellHeight * count / 4
+ anchors {
+ top: counter.bottom
+ left: parent.left
+ right: parent.right
+ }
+ }
+}