From b0e61967f50b075928028502a9308cc94e06d105 Mon Sep 17 00:00:00 2001 From: Erik Prabowo Kamal Date: Fri, 12 Dec 2025 17:39:13 +0800 Subject: Capitalise shop & cart folder initial letters and reindent as needed. --- Shop/Cart/Alert.ui.qml | 67 ++++++++++++++++ Shop/Cart/CartTotal.ui.qml | 156 ++++++++++++++++++++++++++++++++++++++ Shop/Cart/Table/CourseItem.ui.qml | 52 +++++++++++++ 3 files changed, 275 insertions(+) create mode 100644 Shop/Cart/Alert.ui.qml create mode 100644 Shop/Cart/CartTotal.ui.qml create mode 100644 Shop/Cart/Table/CourseItem.ui.qml (limited to 'Shop/Cart') diff --git a/Shop/Cart/Alert.ui.qml b/Shop/Cart/Alert.ui.qml new file mode 100644 index 0000000..4e306c3 --- /dev/null +++ b/Shop/Cart/Alert.ui.qml @@ -0,0 +1,67 @@ +import QtQuick +import QtQuick.Controls +import QtQuick.Layouts +import Eduport +import "../../TextField" as TxtFld +import "../../Label" as Lbl +import "../../Button" as Btn + +Rectangle { + id: alertContainer + color: "#f8d7da" + border.color: "#f1aeb5" + height: alertContent.height + width: alertContent.width + radius: 8 + RowLayout { + id: alertContent + anchors.fill: parent + spacing: 0 + Label { + id: alertEmoji + text: "🔥" + Layout.bottomMargin: 16 + Layout.rightMargin: 8 + Layout.topMargin: 16 + Layout.leftMargin: 16 + font.pointSize: 21 + } + Label { + id: alertText + color: "#b02a37" + text: "These courses are at a limited discount, please checkout within" + wrapMode: Text.Wrap + Layout.bottomMargin: 16 + Layout.topMargin: 16 + Layout.rightMargin: 4 + font.pointSize: 21 + } + Label { + id: alertTime + color: "#d6293e" + text: "2 days and 18 hours" + Layout.rightMargin: 8 + Layout.bottomMargin: 16 + Layout.topMargin: 16 + font.styleName: "Bold" + font.pointSize: 21 + font.family: "Roboto" + } + Button { + width: 40 + icon.source: "../../Bootstrap/icons/x.svg" + flat: true + checkable: true + display: AbstractButton.IconOnly + Layout.bottomMargin: 16 + Layout.topMargin: 16 + Layout.rightMargin: 8 + Layout.maximumHeight: 40 + Layout.maximumWidth: 40 + Layout.preferredHeight: 40 + Layout.preferredWidth: 40 + Layout.minimumHeight: 40 + Layout.minimumWidth: 40 + } + } +} diff --git a/Shop/Cart/CartTotal.ui.qml b/Shop/Cart/CartTotal.ui.qml new file mode 100644 index 0000000..f7ff2ba --- /dev/null +++ b/Shop/Cart/CartTotal.ui.qml @@ -0,0 +1,156 @@ +import QtQuick +import QtQuick.Controls +import QtQuick.Layouts +import Qt5Compat.GraphicalEffects + +Item { + id: cartTotal + DropShadow { + color: "#4d000000" + source: cartTotalCard + verticalOffset: 4 + radius: 40 + samples: 81 + anchors.fill: cartTotalCard + } + Rectangle { + id: cartTotalCard + anchors.fill: parent + ColumnLayout { + id: cardBody + anchors.fill: parent + spacing: 0 + Label { + id: title + color: "#000000" + text: qsTr("Cart total") + Layout.rightMargin: 20 + Layout.leftMargin: 20 + Layout.topMargin: 20 + Layout.margins: 8 + Layout.fillHeight: false + Layout.alignment: Qt.AlignLeft | Qt.AlignTop + Layout.fillWidth: true + font.pointSize: 22 + font.styleName: "Medium" + font.family: "Roboto" + } + + RowLayout { + id: price + Layout.rightMargin: 20 + Layout.leftMargin: 20 + Layout.bottomMargin: 0 + Layout.fillHeight: true + Layout.alignment: Qt.AlignLeft | Qt.AlignTop + Layout.fillWidth: true + anchors.top: title.bottom + anchors.topMargin: 16 + Label { + color: "#000000" + text: qsTr("Original price") + Layout.fillHeight: false + font.family: "Roboto" + font.pointSize: 14 + Layout.fillWidth: true + } + Label { + color: "#000000" + text: qsTr("$500") + horizontalAlignment: Text.AlignRight + Layout.fillHeight: false + font.weight: Font.Medium + font.pointSize: 14 + Layout.fillWidth: true + } + } + + RowLayout { + id: discount + Layout.rightMargin: 20 + Layout.leftMargin: 20 + Layout.alignment: Qt.AlignLeft | Qt.AlignTop + Layout.fillWidth: true + anchors.top: price.bottom + anchors.topMargin: 16 + Label { + color: "#000000" + text: qsTr("Coupon discount") + Layout.fillHeight: false + Layout.fillWidth: true + font.family: "Roboto" + font.pointSize: 14 + } + Label { + color: "#000000" + text: qsTr("-$500") + horizontalAlignment: Text.AlignRight + Layout.fillHeight: false + Layout.fillWidth: true + font.weight: Font.Medium + } + } + + RowLayout { + id: total + Layout.rightMargin: 20 + Layout.leftMargin: 20 + Layout.alignment: Qt.AlignLeft | Qt.AlignTop + Layout.fillWidth: true + anchors.top: discount.bottom + Label { + color: "#000000" + text: qsTr("Total") + Layout.fillHeight: false + font.family: "Roboto" + font.styleName: "Medium" + font.pointSize: 22 + Layout.fillWidth: true + } + Label { + color: "#000000" + text: qsTr("$480") + horizontalAlignment: Text.AlignRight + Layout.fillHeight: false + font.styleName: "Medium" + font.pointSize: 22 + font.family: "Roboto" + Layout.fillWidth: true + } + } + + Button { + id: proceedButton + text: qsTr("Proceed to checkout") + Layout.rightMargin: 20 + Layout.leftMargin: 20 + Layout.fillHeight: false + anchors.top: total.bottom + anchors.topMargin: 16 + Layout.topMargin: 0 + font.weight: Font.Medium + font.pointSize: 14 + font.family: "Roboto" + Layout.fillWidth: true + flat: false + display: AbstractButton.TextOnly + } + + Label { + id: consent + color: "#80000000" + text: "By completing your purchase, you agree to these Terms of Service" + wrapMode: Text.Wrap + anchors.topMargin: 16 + Layout.bottomMargin: 20 + Layout.rightMargin: 20 + Layout.leftMargin: 20 + Layout.fillHeight: false + Layout.fillWidth: true + anchors.top: proceedButton.bottom + font.pointSize: 12 + font.family: "Roboto" + } + } + } +} diff --git a/Shop/Cart/Table/CourseItem.ui.qml b/Shop/Cart/Table/CourseItem.ui.qml new file mode 100644 index 0000000..a2f5d70 --- /dev/null +++ b/Shop/Cart/Table/CourseItem.ui.qml @@ -0,0 +1,52 @@ +import QtQuick +import QtQuick.Controls +import QtQuick.Layouts +import Qt5Compat.GraphicalEffects +import Bootstrap +import Eduport +import "../../../TextField" +import "../../../Button" + +GridLayout { + rows: width < 990 ? 2 : 1 + columns: width < 990 ? 1 : 2 + rowSpacing: 8 + columnSpacing: 8 + Rectangle { + id: courseItemImage + width: 100 + height: 75 + Layout.maximumWidth: width + Layout.maximumHeight: height + radius: 8 + Layout.rightMargin: 8 + Layout.bottomMargin: 16 + Layout.topMargin: 16 + Layout.leftMargin: 8 + Layout.alignment: Qt.AlignLeft | Qt.AlignTop + Image { + id: courseItemImageSource + anchors.fill: parent + visible: false + source: "https://eduport.webestica.com/assets/images/courses/4by3/08.jpg" + } + OpacityMask { + id: coursetemImageMask + anchors.fill: courseItemImage + source: courseItemImageSource + maskSource: courseItemImage + } + } + + Label { + id: courseItemTitle + text: "Course Item Title" + wrapMode: Label.Wrap + Bootstrap.heading: 6 + Layout.maximumHeight: courseItemImage.height + Layout.alignment: parent.width < 990 ? Qt.AlignTop | Qt.AlignHCenter : Qt.AlignLeft + | Qt.AlignVCenter + Layout.fillWidth: true + Layout.fillHeight: parent.width < 990 ? true : false + } +} -- cgit v1.2.3