summaryrefslogtreecommitdiff
path: root/Course/Detail/Classic/Content/Sidebar/Video-alt.ui.qml
blob: f715a949a8587387ec581e96c7ad265cd4b548e4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
import QtQuick 2.15
import QtQuick.Controls 2.15
import QtQuick.Layouts 1.15
import QtGraphicalEffects 1.15

Item {
	width: 350
	height: 450
	DropShadow {
		color: "#4d000000"
		source: courseVideoCard
		verticalOffset: 4
		radius: 12
		samples: 12
		anchors.fill: courseVideoCard
	}
	Rectangle {
		id: courseVideoCard
		radius: 8
		anchors.fill: parent
		anchors.rightMargin: 8
		anchors.leftMargin: 8
		anchors.bottomMargin: 8
		anchors.topMargin: 8
		ColumnLayout {
			id: courseDetailVideo
			anchors.fill: parent
			Rectangle {
				id: courseVideoThumbnail
				radius: 8
				Layout.rightMargin: 8
				Layout.leftMargin: 8
				Layout.bottomMargin: 0
				Layout.topMargin: 8
				Layout.fillHeight: true
				Layout.fillWidth: true
				Image {
					id: courseVideoImage
					source: "https://eduport.webestica.com/assets/images/courses/4by3/01.jpg"
					fillMode: Image.PreserveAspectCrop
					width: parent.width
					height: parent.height
					visible: false
				}
				OpacityMask {
					id: courseVideoMask
					anchors.fill: courseVideoThumbnail
					source: courseVideoImage
					maskSource: courseVideoThumbnail
				}
				ColorOverlay {
					anchors.fill: courseVideoMask
					source: courseVideoMask
					color: "#80000000"
				}
				Button {
					id: playVideoButton
					width: 44
					height: 44
					anchors.verticalCenter: parent.verticalCenter
					icon.height: 44
					icon.width: 44
					icon.color: "#ffffff"
					flat: true
					icon.source: "Font-Awesome/svgs/solid/circle-play.svg"
					display: AbstractButton.IconOnly
					anchors.horizontalCenter: parent.horizontalCenter
				}
			}
			RowLayout {
				id: priceAndTime
				spacing: 8
				Layout.rightMargin: 16
				Layout.leftMargin: 16
				Layout.topMargin: 8
				Layout.bottomMargin: 4
				Label {
					id: publishedPrice
					color: "#000000"
					text: "$150"
					font.weight: Font.Medium
					verticalAlignment: Text.AlignVCenter
					font.pointSize: 32
					font.family: "Roboto"
				}
				Label {
					id: originalPrice
					color: "#80000000"
					text: "$150"
					font.strikeout: true
					font.weight: Font.Medium
					verticalAlignment: Text.AlignVCenter
					font.pointSize: 16
					font.family: "Roboto"
				}
				Label {
					id: discount
					color: "#ffffff"
					text: "60% off"
					horizontalAlignment: Text.AlignHCenter
					verticalAlignment: Text.AlignVCenter
					font.pointSize: 12
					rightPadding: 8
					leftPadding: 8
					bottomPadding: 4
					topPadding: 4
					font.family: "Roboto"
					background: Rectangle {
						width: discount.width
						height: discount.height
						color: "#fd7e14"
						radius: 4
					}
				}
			}
			RowLayout {
				id: timerContent
				Layout.topMargin: 4
				Layout.bottomMargin: 8
				Layout.rightMargin: 16
				Layout.leftMargin: 16
				spacing: 8
				Image {
					id: timerIcon
					source: "Material/svg/filled/timer.svg"
					sourceSize.height: 24
					sourceSize.width: 24
					ColorOverlay {
						anchors.fill: timerIcon
						source: timerIcon
						color: "#d6293e"
					}
				}

				Label {
					color: "#d6293e"
					text: "5 days left at this price"
					font.family: "Roboto"
					font.pointSize: 14
					font.styleName: "Regular"
				}
			}
			RowLayout {
				id: cardFooterButton
				Layout.topMargin: 8
				Layout.margins: 16
				spacing: 8

				Button {
					id: freeTrialButton
					text: qsTr("Free trial")
					font.styleName: "Medium"
					font.pointSize: 14
					font.family: "Roboto"
					Layout.fillWidth: true
				}

				Button {
					id: buyButton
					text: qsTr("Buy course")
					font.styleName: "Medium"
					font.pointSize: 14
					font.family: "Roboto"
					Layout.fillWidth: true
				}
			}
		}
	}
}