Skip to content

Commit 04e6a87

Browse files
committed
Demo video base added
1 parent ad04082 commit 04e6a87

5 files changed

Lines changed: 63 additions & 24 deletions

File tree

src/pages/index-styles.css

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,3 +111,45 @@
111111
transform: scale3d(1, 1, 1);
112112
}
113113
}
114+
115+
.homeBoxText {
116+
transform: translate(-50%, -50%);
117+
position: fixed;
118+
top: calc(50% + 65px);
119+
left: calc(50% - calc(calc(400px + 10px) / 2));
120+
background-color: #ffffff;
121+
border-radius: 5px;
122+
box-shadow: 0 0px 30px black;
123+
padding: 15px 15px;
124+
125+
max-width: 630px;
126+
max-height: 90vh;
127+
min-width: 325px;
128+
129+
display: inline-block;
130+
overflow-wrap: break-word;
131+
}
132+
133+
.homeVideoBox {
134+
position: absolute;
135+
right: -10px;
136+
top: 0px;
137+
transform: translate(100%,0%);
138+
pointer-events: none;
139+
140+
border-radius: 5px;
141+
padding: 3px 3px;
142+
box-sizing: border-box;
143+
144+
width: 400px;
145+
height: 300px;
146+
}
147+
148+
.homeVideoBox > video {
149+
border-radius: 4px;
150+
pointer-events: none;
151+
width: 100%;
152+
height: 100%;
153+
background-color: rgb(0, 0, 0);
154+
box-shadow: 0 0px 30px black;
155+
}

src/pages/index.js

Lines changed: 18 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -156,23 +156,7 @@ var elementJSON = [
156156
},
157157
{
158158
element: "div",
159-
style: {
160-
transform: "translate(-50%, -50%)",
161-
position: "fixed",
162-
top: "calc(50% + 50px)",
163-
left: "50%",
164-
backgroundColor: "#ffffff",
165-
borderRadius: "5px",
166-
boxShadow: "0 0px 30px black",
167-
padding: "15px 15px",
168-
169-
maxWidth: "90vw", // Set a maximum width based on viewport width (e.g., 90% of the viewport)
170-
maxHeight: "90vh",
171-
minWidth: "325px",
172-
173-
display: "inline-block",
174-
overflowWrap: "break-word",
175-
},
159+
className: "homeBoxText",
176160
children: [
177161
{
178162
element: "div",
@@ -192,6 +176,7 @@ var elementJSON = [
192176
transform: "translate(-50%, -100%)",
193177
transformOrigin: "bottom",
194178
filter: "drop-shadow(4px 4px 3px rgba(0, 0, 0, 0.2))",
179+
height: "100px",
195180
},
196181
GPWhenCreated: function (elm) {
197182
elm.animate(
@@ -212,6 +197,19 @@ var elementJSON = [
212197
},
213198
],
214199
},
200+
{
201+
element: "div",
202+
className: "homeVideoBox",
203+
children: [
204+
{
205+
element: "video",
206+
src: "videos/home-video.webm",
207+
muted: true,
208+
autoplay: true,
209+
loop: true,
210+
}
211+
]
212+
},
215213
require("./sitenews-notice.js"),
216214
{
217215
element: "div",
@@ -225,7 +223,7 @@ var elementJSON = [
225223
element: "div",
226224
className: "fadeIn delay-3",
227225
style: {
228-
fontSize: "40px",
226+
fontSize: "38px",
229227
color: returnRandomValueFromArray(getRainbowHexes(2, 100, 70)),
230228
fontFamily: "Fredoka",
231229
overflowWrap: "break-word",
@@ -234,9 +232,6 @@ var elementJSON = [
234232
textContent:
235233
"“" + returnRandomValueFromArray(randomQuotes).trim() + "”",
236234
},
237-
{
238-
element: "br",
239-
},
240235
{
241236
element: "div",
242237
style: {
@@ -253,11 +248,11 @@ var elementJSON = [
253248
style: {
254249
maxHeight: "70px",
255250
width: "100%",
251+
padding: "0px 0px",
256252
},
257253
},
258254
],
259255
},
260-
{ element: "br" },
261256
//For people that always look at the center of the site for stuff, here is some "useful" links that you may need.
262257

263258
{
@@ -442,7 +437,7 @@ var elementJSON = [
442437
href: "/signup",
443438
},
444439
", join a room, and start the discussion.",
445-
"Whether you're collaborating on a project or sharing ideas, Random Rants + is",
440+
"Whether you're collaborating on a project or sharing ideas, Random Rants + is ",
446441
{
447442
element: "span",
448443
style: { fontWeight: "bold" },

webpackhtml/base.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
<link rel="manifest" href="manifest.webmanifest" />
77
<link rel="icon" href="favicon.png?n=1" />
88

9+
<link rel="preload" href="videos/home-video.webm" />
10+
911
<meta name="description" content="<%= htmlWebpackPlugin.options.description %>" />
1012
<meta itemprop="name" content="<%= htmlWebpackPlugin.options.title %>" />
1113
<meta itemprop="description" content="<%= htmlWebpackPlugin.options.description %>" />

wpstatic/version.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"timestamp":"1772467181288"}
1+
{"timestamp":"1775844965086"}

wpstatic/videos/home-video.webm

213 KB
Binary file not shown.

0 commit comments

Comments
 (0)