summaryrefslogtreecommitdiff
path: root/Course/Detail/Classic/Content/Sidebar/Video-alt.ui.qml
blob: 7d7d368bf3b7da77e4e3e6f04396d8dda84b02a9 (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
170
171
172
173
174
175
176
177
178
179
180
181
182
183
import QtQuick
import QtQuick.Controls
import QtQuick.Layouts
import QtQuick.Effects

Item {
	width: 350
	height: 450
	MultiEffect {
		source: courseVideoCard
		anchors.fill: courseVideoCard
		shadowEnabled: true
		shadowColor: "#4d0000"
		shadowVerticalOffset: 4
	}
	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
					sourceSize {
						width: parent.width
						height: parent.height
					}
					layer {
						enabled: true
						effect: MultiEffect {
							maskEnabled: true
							maskSource: maskRectangle
						}
					}
					Rectangle {
						id: maskRectangle
						width: courseVideoImage.sourceSize.width
						height: courseVideoImage.sourceSize.height
						radius: 8
						layer.enabled: true
						visible: false
					}
				}
				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
				}
				MultiEffect {
					source: playVideoButton
					anchors.fill: playVideoButton
					brightness: 1.0
					colorization: 1.0
					colorizationColor: "#800000"
				}
			}
			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
					layer {
						enabled: true
						effect: MultiEffect {
							brightness: 1.0
							colorization: 1.0
							colorizationColor: "#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
				}
			}
		}
	}
}