Fix Login Page and Update Hero Slider
This commit is contained in:
8 files changed
+1092
-945
No files matched your search
+30
-9
@@ -1,4 +1,5 @@
|
|||||||
<svg width="1536" height="140" viewBox="0 0 1536 140" fill="none" xmlns="http://www.w3.org/2000/svg">
|
<svg width="1536" height="140" viewBox="0 0 1536 140" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<mask id="mask0_103_17" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="0" y="0" width="1536" height="140">
|
||||||
<path d="M53.5075 139.735C44.3971 139.735 35.9283 137.682 28.101 133.576C20.2738 129.342 13.858 123.568 8.85375 116.254C3.84946 108.94 0.898207 100.856 0 92.0021H7.1215C8.0197 99.5727 10.6502 106.502 15.0129 112.789C19.3756 118.948 24.8932 123.824 31.5656 127.417C38.3663 130.882 45.6802 132.614 53.5075 132.614C62.1046 132.614 69.996 130.497 77.1816 126.262C84.3673 122.028 90.0773 116.19 94.3117 108.747C98.5461 101.305 100.663 92.9644 100.663 83.7257V10.0086H40.6118V2.88709H107.592V83.7257C107.592 94.2476 105.154 103.807 100.278 112.404C95.5307 120.873 88.9866 127.545 80.6461 132.421C72.434 137.297 63.3877 139.735 53.5075 139.735Z" fill="white"/>
|
<path d="M53.5075 139.735C44.3971 139.735 35.9283 137.682 28.101 133.576C20.2738 129.342 13.858 123.568 8.85375 116.254C3.84946 108.94 0.898207 100.856 0 92.0021H7.1215C8.0197 99.5727 10.6502 106.502 15.0129 112.789C19.3756 118.948 24.8932 123.824 31.5656 127.417C38.3663 130.882 45.6802 132.614 53.5075 132.614C62.1046 132.614 69.996 130.497 77.1816 126.262C84.3673 122.028 90.0773 116.19 94.3117 108.747C98.5461 101.305 100.663 92.9644 100.663 83.7257V10.0086H40.6118V2.88709H107.592V83.7257C107.592 94.2476 105.154 103.807 100.278 112.404C95.5307 120.873 88.9866 127.545 80.6461 132.421C72.434 137.297 63.3877 139.735 53.5075 139.735Z" fill="white"/>
|
||||||
<path d="M152.099 2.88709H246.41V10.0086H159.22V64.286H235.055V71.4075H159.22V129.727H246.41V136.848H152.099V2.88709Z" fill="white"/>
|
<path d="M152.099 2.88709H246.41V10.0086H159.22V64.286H235.055V71.4075H159.22V129.727H246.41V136.848H152.099V2.88709Z" fill="white"/>
|
||||||
<path d="M299.386 136.848V2.88709H306.507V129.727H399.856V136.848H299.386Z" fill="white"/>
|
<path d="M299.386 136.848V2.88709H306.507V129.727H399.856V136.848H299.386Z" fill="white"/>
|
||||||
@@ -8,20 +9,40 @@
|
|||||||
<path d="M869.286 136.848V2.88709H876.407V129.727H969.757V136.848H869.286Z" fill="white"/>
|
<path d="M869.286 136.848V2.88709H876.407V129.727H969.757V136.848H869.286Z" fill="white"/>
|
||||||
<path d="M1148.27 2.88709L1195.81 74.487L1242.97 2.88709H1251.43L1199.27 81.9935V136.848H1192.15V81.9935L1139.8 2.88709H1148.27Z" fill="white"/>
|
<path d="M1148.27 2.88709L1195.81 74.487L1242.97 2.88709H1251.43L1199.27 81.9935V136.848H1192.15V81.9935L1139.8 2.88709H1148.27Z" fill="white"/>
|
||||||
<path d="M1291.9 2.88709H1386.21V10.0086H1299.02V64.286H1374.86V71.4075H1299.02V129.727H1386.21V136.848H1291.9V2.88709Z" fill="white"/>
|
<path d="M1291.9 2.88709H1386.21V10.0086H1299.02V64.286H1374.86V71.4075H1299.02V129.727H1386.21V136.848H1291.9V2.88709Z" fill="white"/>
|
||||||
<path d="M1116.27 136.848H990.011L1053.14 0L1116.27 136.848Z" fill="url(#paint0_linear_22_4)"/>
|
<path d="M1116.27 136.848H990.011L1053.14 0L1116.27 136.848Z" fill="white"/>
|
||||||
<path d="M1485.19 2.88709H1433.03L1500.5 90.5C1509.87 87.9337 1519.06 81.5444 1525.22 73.7171C1531.38 65.7616 1534.46 56.7795 1534.46 46.7709C1534.46 38.687 1532.54 31.3089 1528.69 24.6365C1524.84 17.9641 1519.45 12.7032 1512.52 8.85375C1505.46 4.87598 1496.35 2.88709 1485.19 2.88709Z" fill="url(#paint1_linear_22_4)"/>
|
<path d="M1485.19 2.88709H1433.03L1500.5 90.5C1509.87 87.9337 1519.06 81.5444 1525.22 73.7171C1531.38 65.7616 1534.46 56.7795 1534.46 46.7709C1534.46 38.687 1532.54 31.3089 1528.69 24.6365C1524.84 17.9641 1519.45 12.7032 1512.52 8.85375C1505.46 4.87598 1496.35 2.88709 1485.19 2.88709Z" fill="white"/>
|
||||||
<path d="M1433.03 136.848H1536L1500.5 90.5H1433.03V136.848Z" fill="url(#paint2_linear_22_4)"/>
|
<path d="M1433.03 136.848H1536L1500.5 90.5H1433.03V136.848Z" fill="white"/>
|
||||||
|
</mask>
|
||||||
|
<style>
|
||||||
|
path {
|
||||||
|
stroke-linecap: square;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<g mask="url(#mask0_103_17)">
|
||||||
|
<path d="M1485.19 2.88708H1433.03L1500.5 90.5C1509.87 87.9337 1519.06 81.5444 1525.22 73.7171C1531.38 65.7616 1534.46 56.7795 1534.46 46.7709C1534.46 38.687 1532.54 31.3089 1528.69 24.6365C1524.84 17.9641 1519.45 12.7032 1512.52 8.85375C1505.46 4.87597 1496.35 2.88708 1485.19 2.88708Z" fill="url(#paint0_linear_103_17)"/>
|
||||||
|
<path d="M1433.03 136.848H1536L1500.5 90.5H1433.03V136.848Z" fill="url(#paint1_linear_103_17)"/>
|
||||||
|
<path d="M1386.21 6.44785H1295.46V67.8467M1295.46 67.8467H1374.85M1295.46 67.8467V133.287H1386.21" stroke="white" stroke-width="8"/>
|
||||||
|
<path d="M1144.03 2.88708L1195.81 81.9935M1195.81 81.9935L1247.2 2.88708M1195.81 81.9935L1195.71 136.848" stroke="white" stroke-width="8"/>
|
||||||
|
<path d="M1116.27 136.848H990.011L1053.14 0L1116.27 136.848Z" fill="url(#paint2_linear_103_17)"/>
|
||||||
|
<path d="M872.847 2.88708V133.287H969.757" stroke="white" stroke-width="8"/>
|
||||||
|
<path d="M727.292 92.6757H777.624C785.836 92.6757 794.69 90.7189 799.95 88.1526C806.751 84.9447 813.263 78.7856 817.369 72.3698C821.475 65.9541 823.913 57.2928 823.913 49.4655C823.913 41.7666 821.572 33.0733 817.465 26.6575C813.359 20.2417 806.976 14.4676 800.047 11.2597C794.786 8.69337 785.707 6.44785 777.624 6.44785H727.292V92.6757ZM727.292 92.6757V136.848" stroke="white" stroke-width="8"/>
|
||||||
|
<path d="M574.135 2.88708L625.91 81.9935M625.91 81.9935L677.3 2.88708M625.91 81.9935L625.814 136.848" stroke="white" stroke-width="8" stroke-miterlimit="3.99933"/>
|
||||||
|
<path d="M445.421 2.88708V133.287H542.332" stroke="white" stroke-width="8"/>
|
||||||
|
<path d="M302.946 2.88708V133.287H399.856" stroke="white" stroke-width="8"/>
|
||||||
|
<path d="M246.41 6.44785H155.659V67.8467M155.659 67.8467H235.055M155.659 67.8467V133.287H246.41" stroke="white" stroke-width="8"/>
|
||||||
|
<path d="M3.56075 92.0021C4.45895 99.5727 7.5706 108.234 11.9333 114.521C16.296 120.681 23.1609 126.904 29.8333 130.497C36.634 133.961 45.6802 136.175 53.5075 136.175C62.1046 136.175 71.7282 133.576 78.9139 129.342C86.0995 125.107 93.0606 118.018 97.2951 110.576C101.529 103.133 104.128 92.9644 104.128 83.7257V6.44785H40.6118" stroke="white" stroke-width="8"/>
|
||||||
|
</g>
|
||||||
<defs>
|
<defs>
|
||||||
<linearGradient id="paint0_linear_22_4" x1="1092.5" y1="84.5001" x2="989.5" y2="136.5" gradientUnits="userSpaceOnUse">
|
<linearGradient id="paint0_linear_103_17" x1="1525" y1="20" x2="1433" y2="137" gradientUnits="userSpaceOnUse">
|
||||||
<stop stop-color="#AA5CC3"/>
|
<stop stop-color="#B62FB9"/>
|
||||||
<stop offset="1" stop-color="#00A4DC"/>
|
<stop offset="1" stop-color="#00A4DC"/>
|
||||||
</linearGradient>
|
</linearGradient>
|
||||||
<linearGradient id="paint1_linear_22_4" x1="1520.5" y1="21.5" x2="1433" y2="137" gradientUnits="userSpaceOnUse">
|
<linearGradient id="paint1_linear_103_17" x1="1525" y1="20" x2="1433" y2="137" gradientUnits="userSpaceOnUse">
|
||||||
<stop stop-color="#AA5CC3"/>
|
<stop stop-color="#B62FB9"/>
|
||||||
<stop offset="1" stop-color="#00A4DC"/>
|
<stop offset="1" stop-color="#00A4DC"/>
|
||||||
</linearGradient>
|
</linearGradient>
|
||||||
<linearGradient id="paint2_linear_22_4" x1="1520.5" y1="21.5" x2="1433" y2="137" gradientUnits="userSpaceOnUse">
|
<linearGradient id="paint2_linear_103_17" x1="1093.5" y1="89.5" x2="990" y2="137" gradientUnits="userSpaceOnUse">
|
||||||
<stop stop-color="#AA5CC3"/>
|
<stop stop-color="#B62FB9"/>
|
||||||
<stop offset="1" stop-color="#00A4DC"/>
|
<stop offset="1" stop-color="#00A4DC"/>
|
||||||
</linearGradient>
|
</linearGradient>
|
||||||
</defs>
|
</defs>
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 5.9 KiB |
@@ -36,6 +36,8 @@ class Backend(QObject):
|
|||||||
return "openHomeTrue"
|
return "openHomeTrue"
|
||||||
else:
|
else:
|
||||||
return "serverGoTrue"
|
return "serverGoTrue"
|
||||||
|
else:
|
||||||
|
return "serverOffline"
|
||||||
else:
|
else:
|
||||||
return "serverGoFalse"
|
return "serverGoFalse"
|
||||||
|
|
||||||
|
|||||||
+918
-890
File diff suppressed because it is too large.
Load diff
@@ -3,6 +3,7 @@
|
|||||||
:root {
|
:root {
|
||||||
--main-bg: #0a1827;
|
--main-bg: #0a1827;
|
||||||
--accent-solid: #e82a5f;
|
--accent-solid: #e82a5f;
|
||||||
|
--accent-translucent-1: rgb(232 42 95 / 40%);
|
||||||
--jf-purple-light: #aa5cc3;
|
--jf-purple-light: #aa5cc3;
|
||||||
--jf-purple-dark: #3e2247;
|
--jf-purple-dark: #3e2247;
|
||||||
--jf-blue-light: #00a4dc;
|
--jf-blue-light: #00a4dc;
|
||||||
|
|||||||
+50
-4
@@ -78,7 +78,8 @@ img {
|
|||||||
position: relative;
|
position: relative;
|
||||||
background: linear-gradient(
|
background: linear-gradient(
|
||||||
45deg,
|
45deg,
|
||||||
rgba(10, 26, 51, 1) 0%,
|
rgba(10, 24, 39, 1) 0%,
|
||||||
|
rgba(10, 26, 51, 1) 32%,
|
||||||
rgba(8, 144, 149, 1) 100%
|
rgba(8, 144, 149, 1) 100%
|
||||||
);
|
);
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -106,10 +107,28 @@ img {
|
|||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
|
z-index: 0;
|
||||||
|
opacity: 0;
|
||||||
|
transition: opacity var(--transition-time-slow-2);
|
||||||
|
}
|
||||||
|
|
||||||
|
.slide .info__cont {
|
||||||
|
left: 0em;
|
||||||
|
transition: left var(--transition-time-slow-2);
|
||||||
|
}
|
||||||
|
|
||||||
|
.slide.active .info__cont {
|
||||||
|
left: 2em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.slide.active ~ .slide > .info__cont {
|
||||||
|
left: 4em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.slide.active {
|
.slide.active {
|
||||||
display: block;
|
display: block;
|
||||||
|
z-index: 10;
|
||||||
|
opacity: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.slide__background {
|
.slide__background {
|
||||||
@@ -121,6 +140,11 @@ img {
|
|||||||
-webkit-mask-image: linear-gradient(to right, transparent, black 50%);
|
-webkit-mask-image: linear-gradient(to right, transparent, black 50%);
|
||||||
-webkit-mask-composite: destination-in;
|
-webkit-mask-composite: destination-in;
|
||||||
background-size: cover !important;
|
background-size: cover !important;
|
||||||
|
opacity: 0;
|
||||||
|
transition: opacity var(--transition-time-default);
|
||||||
|
}
|
||||||
|
|
||||||
|
.slide.active .slide__background {
|
||||||
opacity: 0.5;
|
opacity: 0.5;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -156,6 +180,14 @@ canvas.placeholder {
|
|||||||
left: 2em;
|
left: 2em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.title {
|
||||||
|
width: 100%;
|
||||||
|
height: 40%;
|
||||||
|
font-size: 2.3em;
|
||||||
|
font-weight: 500;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
.title div {
|
.title div {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
@@ -165,9 +197,10 @@ canvas.placeholder {
|
|||||||
background-repeat: no-repeat !important;
|
background-repeat: no-repeat !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.title {
|
.title div span {
|
||||||
width: 100%;
|
display: inline-block;
|
||||||
height: 40%;
|
vertical-align: middle;
|
||||||
|
line-height: normal;
|
||||||
}
|
}
|
||||||
|
|
||||||
.overview {
|
.overview {
|
||||||
@@ -211,6 +244,19 @@ button.outlined {
|
|||||||
font-size: 1.5em;
|
font-size: 1.5em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.icon__image {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
font-size: 10em;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
flex-wrap: nowrap;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
color: var(--accent-solid);
|
||||||
|
background: var(--accent-translucent-1);
|
||||||
|
}
|
||||||
|
|
||||||
@media (max-width: 900px) {
|
@media (max-width: 900px) {
|
||||||
.latestMediaSlider {
|
.latestMediaSlider {
|
||||||
height: auto;
|
height: auto;
|
||||||
|
|||||||
+13
-7
@@ -70,16 +70,19 @@ window.onload = () => {
|
|||||||
|
|
||||||
window.serverOnline = await window.backend.onStartup();
|
window.serverOnline = await window.backend.onStartup();
|
||||||
if (window.serverOnline == "serverGoTrue") {
|
if (window.serverOnline == "serverGoTrue") {
|
||||||
window.getServer();
|
emitter.emit("serverGo-true");
|
||||||
} else if (window.serverOnline == "serverGoFalse") {
|
} else if (window.serverOnline == "serverGoFalse") {
|
||||||
emitter.emit("server-url", "offline");
|
emitter.emit("serverGo-false");
|
||||||
} else if(window.serverOnline == "openHomeTrue") {
|
} else if(window.serverOnline == "openHomeTrue") {
|
||||||
window.getAuthinfo();
|
window.getAuthinfo();
|
||||||
|
} else if (window.serverOnline == "serverOffline") {
|
||||||
|
emitter.emit("server-url", "offline");
|
||||||
}
|
}
|
||||||
|
|
||||||
emitter.on("get-server", async () => {
|
|
||||||
window.getServer();
|
|
||||||
});
|
});
|
||||||
|
emitter.on("get-server", async () => {
|
||||||
|
console.log('sw')
|
||||||
|
window.getServer();
|
||||||
});
|
});
|
||||||
document.querySelector(".loader").classList.add("hide");
|
document.querySelector(".loader").classList.add("hide");
|
||||||
};
|
};
|
||||||
@@ -286,6 +289,7 @@ const createEnterPassword = (userName, userImg, userId) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const sendAuthInfo = (userName, password, checkbox) => {
|
const sendAuthInfo = (userName, password, checkbox) => {
|
||||||
|
document.querySelector(".loader").classList.remove("hide");
|
||||||
var authUser;
|
var authUser;
|
||||||
const auth = async () => {
|
const auth = async () => {
|
||||||
try {
|
try {
|
||||||
@@ -295,8 +299,10 @@ const sendAuthInfo = (userName, password, checkbox) => {
|
|||||||
Pw: password
|
Pw: password
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
emitter.emit("logged-in", [window.server, userName, password ,authUser.data.AccessToken, `${base_token}, Token=${authUser.data.AccessToken}`]);
|
console.log(authUser)
|
||||||
|
emitter.emit("logged-in", [window.server, userName, password ,authUser.data.AccessToken, `${base_token}, Token=${authUser.data.AccessToken}`, authUser.data.User.Id, authUser.data.User.Name, authUser.data]);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
document.querySelector(".loader").classList.add("hide");
|
||||||
console.log(`[Err]Can't login, Reason: ${error}`);
|
console.log(`[Err]Can't login, Reason: ${error}`);
|
||||||
createAlert("error", "Invalid Username or Password entered try again", ".manual__login");
|
createAlert("error", "Invalid Username or Password entered try again", ".manual__login");
|
||||||
return "err";
|
return "err";
|
||||||
@@ -325,7 +331,7 @@ const goBack = (from, to, loginForm) => {
|
|||||||
}, 1000);
|
}, 1000);
|
||||||
};
|
};
|
||||||
emitter.on("serverGo-true", () => {
|
emitter.on("serverGo-true", () => {
|
||||||
emitter.emit('get-server-saved');
|
emitter.emit("get-server");
|
||||||
emitter.on("server-url", (server) => {
|
emitter.on("server-url", (server) => {
|
||||||
if (server != "offline") {
|
if (server != "offline") {
|
||||||
window.ax = axios.create({
|
window.ax = axios.create({
|
||||||
@@ -359,7 +365,7 @@ emitter.on("user-saved", (user) => {
|
|||||||
Pw: user[1]
|
Pw: user[1]
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
emitter.emit("logged-in", [window.server, user[0], user[1], authUser.data.AccessToken, `${base_token}, Token=${authUser.data.AccessToken}`, authUser.data.User.Id, authUser.data.User.Name]);
|
emitter.emit("logged-in", [window.server, user[0], user[1], authUser.data.AccessToken, `${base_token}, Token=${authUser.data.AccessToken}`, authUser.data.User.Id, authUser.data.User.Name, authUser.data]);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(`[Err]Can't login, Reason: ${error}`);
|
console.log(`[Err]Can't login, Reason: ${error}`);
|
||||||
createAlert("error", "Invalid Username or Password entered try again", ".manual__login");
|
createAlert("error", "Invalid Username or Password entered try again", ".manual__login");
|
||||||
|
|||||||
+70
-27
@@ -21,35 +21,33 @@ const pageTransition = (from, to, background) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const ticksToMin = (ticks) => {
|
const ticksToMin = (ticks) => {
|
||||||
return Math.round(ticks/600000000)
|
return Math.round(ticks / 600000000);
|
||||||
}
|
};
|
||||||
|
|
||||||
const sliderAnim = (slider) => {
|
const sliderAnim = (slider) => {
|
||||||
let slide;
|
let slide;
|
||||||
var slides = document.querySelectorAll(slider);
|
var slides = document.querySelectorAll(slider);
|
||||||
setInterval(() => {
|
setInterval(() => {
|
||||||
this.index = Array.prototype.indexOf.call(slides, document.querySelector(".slide.active"));
|
this.index = Array.prototype.indexOf.call(slides, document.querySelector(".slide.active"));
|
||||||
document.querySelector(".slide.active").classList.add("moveFadeOut");
|
if(this.index+1 >= slides.length) {
|
||||||
console.log(this.index);
|
|
||||||
slide = document.querySelectorAll(".slide")[this.index];
|
|
||||||
slide.classList.remove("hide");
|
|
||||||
slide.classList.add("moveFadeIn");
|
|
||||||
setTimeout(() => {
|
|
||||||
document.querySelector(".slide.active").classList.remove("moveFadeOut");
|
|
||||||
document.querySelector(".slide.active").classList.add("hide");
|
|
||||||
document.querySelector(".slide.active").classList.remove("active");
|
|
||||||
slide.classList.remove("moveFadeIn");
|
|
||||||
slide.classList.add("active");
|
|
||||||
}, 1000);
|
|
||||||
index+=1;
|
|
||||||
if(this.index == slides.length) {
|
|
||||||
this.index = 0;
|
this.index = 0;
|
||||||
}
|
}
|
||||||
|
slide = document.querySelectorAll(".slide")[this.index+1];
|
||||||
|
document.querySelector(".slide.active").classList.remove("active");
|
||||||
|
slide.classList.add("active");
|
||||||
|
// setTimeout(() => {
|
||||||
|
// document.querySelector(".slide.active").classList.remove("moveFadeOut");
|
||||||
|
// document.querySelector(".slide.active").classList.add("hide");
|
||||||
|
// document.querySelector(".slide.active").classList.remove("active");
|
||||||
|
// slide.classList.remove("moveFadeIn");
|
||||||
|
// slide.classList.add("active");
|
||||||
|
// }, 1000);
|
||||||
}, 5000);
|
}, 5000);
|
||||||
};
|
};
|
||||||
|
|
||||||
emitter.on("logged-in", async (user) => {
|
emitter.on("logged-in", async (user) => {
|
||||||
console.log(user);
|
console.log(user);
|
||||||
|
window.ab = user;
|
||||||
const UserConf = new Configuration({
|
const UserConf = new Configuration({
|
||||||
apiKey: user[4],
|
apiKey: user[4],
|
||||||
basePath: user[0],
|
basePath: user[0],
|
||||||
@@ -75,7 +73,6 @@ emitter.on("logged-in", async (user) => {
|
|||||||
<section class="menu side__menu">
|
<section class="menu side__menu">
|
||||||
<div class="user__menu">
|
<div class="user__menu">
|
||||||
<div class="image">
|
<div class="image">
|
||||||
<img src="${window.server}/Users/${user[5]}/Images/Primary"></img>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="text">Hello, ${user[6]}</div>
|
<div class="text">Hello, ${user[6]}</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -90,6 +87,14 @@ emitter.on("logged-in", async (user) => {
|
|||||||
</section>
|
</section>
|
||||||
</div>`;
|
</div>`;
|
||||||
mainPageCont.insertAdjacentHTML("beforeend", html);
|
mainPageCont.insertAdjacentHTML("beforeend", html);
|
||||||
|
document.querySelector(".loader").classList.add("hide");
|
||||||
|
if (!user[7].User.PrimaryImageTag) {
|
||||||
|
html = `<img src="../svg/avatar.svg">`;
|
||||||
|
document.querySelector(".user__menu .image").insertAdjacentHTML("afterbegin", html);
|
||||||
|
} else if (user[7].User.PrimaryImageTag) {
|
||||||
|
html = `<img src="${window.server}/Users/${user[5]}/Images/Primary">`;
|
||||||
|
document.querySelector(".user__menu .image").insertAdjacentHTML("afterbegin", html);
|
||||||
|
}
|
||||||
const mainPage = document.querySelector(".main");
|
const mainPage = document.querySelector(".main");
|
||||||
pageTransition(".login", ".main", false);
|
pageTransition(".login", ".main", false);
|
||||||
libs.forEach(item => {
|
libs.forEach(item => {
|
||||||
@@ -97,10 +102,11 @@ emitter.on("logged-in", async (user) => {
|
|||||||
document.querySelector(".submenu").querySelector("div").insertAdjacentHTML("beforeend", html);
|
document.querySelector(".submenu").querySelector("div").insertAdjacentHTML("beforeend", html);
|
||||||
});
|
});
|
||||||
latestMedia.data.forEach(async (item) => {
|
latestMedia.data.forEach(async (item) => {
|
||||||
|
if (item.ImageBlurHashes.length != undefined) {
|
||||||
html = `<div class="slide">
|
html = `<div class="slide">
|
||||||
<div class="slide__background">
|
<div class="slide__background">
|
||||||
<canvas class="placeholder" width="1080" height="720"></canvas>
|
<canvas class="placeholder" width="1080" height="720" style="width: 100%; heigth: 100%"></canvas>
|
||||||
<img src="https://jellyfin.prayagnet.tk/Items/${item.Id}/Images/Backdrop?imgTag=${item.BackdropImageTags[0]}">
|
<img src="https:/${window.server}/Items/${item.Id}/Images/Backdrop?imgTag=${item.BackdropImageTags[0]}">
|
||||||
</div>
|
</div>
|
||||||
<div class="info__cont">
|
<div class="info__cont">
|
||||||
<div class="title"></div>
|
<div class="title"></div>
|
||||||
@@ -121,15 +127,11 @@ emitter.on("logged-in", async (user) => {
|
|||||||
</div>`;
|
</div>`;
|
||||||
document.querySelector(".latestMediaSlider").insertAdjacentHTML("beforeend", html);
|
document.querySelector(".latestMediaSlider").insertAdjacentHTML("beforeend", html);
|
||||||
if (item.ImageTags.Logo) {
|
if (item.ImageTags.Logo) {
|
||||||
html = `<div style="background: url('https://jellyfin.prayagnet.tk/Items/${item.Id}/Images/Logo?imgTag=${item.ImageTags.Logo[0]}');">`
|
html = `<div style="background: url('https://${window.server}/Items/${item.Id}/Images/Logo?imgTag=${item.ImageTags.Logo[0]}');">`;
|
||||||
document.querySelector(".info__cont .title").insertAdjacentHTML("beforeend", html)
|
document.querySelector(".info__cont .title").insertAdjacentHTML("beforeend", html);
|
||||||
} else {
|
} else {
|
||||||
document.querySelector(".info__cont .title").innerHTML = item.Name
|
document.querySelector(".info__cont .title").insertAdjacentHTML("beforeend", item.Name);
|
||||||
}
|
}
|
||||||
if (latestMedia.data.indexOf(item) == 0) {
|
|
||||||
document.querySelector(".slide").classList.add("active");
|
|
||||||
}
|
|
||||||
console.log(item.ImageBlurHashes.Backdrop[0]);
|
|
||||||
backdrop = item.BackdropImageTags[0];
|
backdrop = item.BackdropImageTags[0];
|
||||||
blurhashval = decode(item.ImageBlurHashes.Backdrop[backdrop], 1080, 720);
|
blurhashval = decode(item.ImageBlurHashes.Backdrop[backdrop], 1080, 720);
|
||||||
console.log(blurhashval);
|
console.log(blurhashval);
|
||||||
@@ -138,7 +140,48 @@ emitter.on("logged-in", async (user) => {
|
|||||||
document.querySelector(".placeholder").getContext("2d").putImageData(blurhasdpix, 0, 0);
|
document.querySelector(".placeholder").getContext("2d").putImageData(blurhasdpix, 0, 0);
|
||||||
$(".slide__background img").on("load", function () {
|
$(".slide__background img").on("load", function () {
|
||||||
document.querySelector(".placeholder").setAttribute("style", "opacity: 0;");
|
document.querySelector(".placeholder").setAttribute("style", "opacity: 0;");
|
||||||
}).attr('src', `https://jellyfin.prayagnet.tk/Items/${item.Id}/Images/Backdrop?imgTag=${item.BackdropImageTags[0]}`);
|
}).attr('src', `https://${window.server}/Items/${item.Id}/Images/Backdrop?imgTag=${item.BackdropImageTags[0]}`);
|
||||||
|
} else {
|
||||||
|
if (item.Type == "AudioBook") {
|
||||||
|
html = `<div class="slide" data-index="${latestMedia.data.indexOf(item)}">
|
||||||
|
<div class="slide__background">
|
||||||
|
<canvas class="placeholder" width="1080" height="720" style="width: 100%; height: 100%"></canvas>
|
||||||
|
<div class="icon__image">
|
||||||
|
<i class="bi bi-mic-fill"></i>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="info__cont">
|
||||||
|
<div class="title"></div>
|
||||||
|
<div class="overview">
|
||||||
|
<div>${item.ProductionYear}</div>
|
||||||
|
<div><i class="bi bi-star-fill"></i>${item.CommunityRating}</div>
|
||||||
|
<div>${ticksToMin(item.RunTimeTicks)}min</div>
|
||||||
|
</div>
|
||||||
|
<div class="buttons">
|
||||||
|
<button class="filled clicky">
|
||||||
|
<span>Play</span>
|
||||||
|
</button>
|
||||||
|
<button class="outlined clicky">
|
||||||
|
<span>More Info</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>`;
|
||||||
|
document.querySelector(".latestMediaSlider").insertAdjacentHTML("beforeend", html);
|
||||||
|
if (item.ImageTags.Logo) {
|
||||||
|
html = `<div style="background: url('https://${window.server}/Items/${item.Id}/Images/Logo?imgTag=${item.ImageTags.Logo[0]}');">`;
|
||||||
|
document.querySelector(`[data-index="${latestMedia.data.indexOf(item)}"] .title`).insertAdjacentHTML("beforeend", html);
|
||||||
|
} else {
|
||||||
|
document.querySelector(`[data-index="${latestMedia.data.indexOf(item)}"] .title`).insertAdjacentHTML("beforeend", `<div>${item.Name}</div>`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// } else if (!item) { }
|
||||||
|
}
|
||||||
|
window.itm = item;
|
||||||
|
|
||||||
|
if (latestMedia.data.indexOf(item) == 0) {
|
||||||
|
document.querySelector(".slide").classList.add("active");
|
||||||
|
}
|
||||||
});
|
});
|
||||||
console.log(latestMedia.data);
|
console.log(latestMedia.data);
|
||||||
if (latestMedia.data.length > 1) {
|
if (latestMedia.data.length > 1) {
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
<path d="M11 6C11 6.79565 10.6839 7.55871 10.1213 8.12132C9.55871 8.68393 8.79565 9 8 9C7.20435 9 6.44129 8.68393 5.87868 8.12132C5.31607 7.55871 5 6.79565 5 6C5 5.20435 5.31607 4.44129 5.87868 3.87868C6.44129 3.31607 7.20435 3 8 3C8.79565 3 9.55871 3.31607 10.1213 3.87868C10.6839 4.44129 11 5.20435 11 6Z" fill="url(#paint0_linear_2_5)"/>
|
<path d="M11 6C11 6.79565 10.6839 7.55871 10.1213 8.12132C9.55871 8.68393 8.79565 9 8 9C7.20435 9 6.44129 8.68393 5.87868 8.12132C5.31607 7.55871 5 6.79565 5 6C5 5.20435 5.31607 4.44129 5.87868 3.87868C6.44129 3.31607 7.20435 3 8 3C8.79565 3 9.55871 3.31607 10.1213 3.87868C10.6839 4.44129 11 5.20435 11 6Z" fill="url(#paint0_linear_102_2)"/>
|
||||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M0 8C0 5.87827 0.842855 3.84344 2.34315 2.34315C3.84344 0.842855 5.87827 0 8 0C10.1217 0 12.1566 0.842855 13.6569 2.34315C15.1571 3.84344 16 5.87827 16 8C16 10.1217 15.1571 12.1566 13.6569 13.6569C12.1566 15.1571 10.1217 16 8 16C5.87827 16 3.84344 15.1571 2.34315 13.6569C0.842855 12.1566 0 10.1217 0 8ZM8 1C6.68178 1.00007 5.39037 1.37236 4.2744 2.07403C3.15844 2.77569 2.26328 3.77821 1.69196 4.96619C1.12065 6.15418 0.896386 7.47934 1.045 8.78916C1.19361 10.099 1.70905 11.3402 2.532 12.37C3.242 11.226 4.805 10 8 10C11.195 10 12.757 11.225 13.468 12.37C14.2909 11.3402 14.8064 10.099 14.955 8.78916C15.1036 7.47934 14.8794 6.15418 14.308 4.96619C13.7367 3.77821 12.8416 2.77569 11.7256 2.07403C10.6096 1.37236 9.31822 1.00007 8 1Z" fill="url(#paint1_linear_2_5)"/>
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M0 8C0 5.87827 0.842855 3.84344 2.34315 2.34315C3.84344 0.842855 5.87827 0 8 0C10.1217 0 12.1566 0.842855 13.6569 2.34315C15.1571 3.84344 16 5.87827 16 8C16 10.1217 15.1571 12.1566 13.6569 13.6569C12.1566 15.1571 10.1217 16 8 16C5.87827 16 3.84344 15.1571 2.34315 13.6569C0.842855 12.1566 0 10.1217 0 8ZM8 1C6.68178 1.00007 5.39037 1.37236 4.2744 2.07403C3.15844 2.77569 2.26328 3.77821 1.69196 4.96619C1.12065 6.15418 0.896386 7.47934 1.045 8.78916C1.19361 10.099 1.70905 11.3402 2.532 12.37C3.242 11.226 4.805 10 8 10C11.195 10 12.757 11.225 13.468 12.37C14.2909 11.3402 14.8064 10.099 14.955 8.78916C15.1036 7.47934 14.8794 6.15418 14.308 4.96619C13.7367 3.77821 12.8416 2.77569 11.7256 2.07403C10.6096 1.37236 9.31822 1.00007 8 1Z" fill="url(#paint1_linear_102_2)"/>
|
||||||
<defs>
|
<defs>
|
||||||
<linearGradient id="paint0_linear_2_5" x1="0" y1="0" x2="16" y2="16" gradientUnits="userSpaceOnUse">
|
<linearGradient id="paint0_linear_102_2" x1="3" y1="2.5" x2="14" y2="13.5" gradientUnits="userSpaceOnUse">
|
||||||
<stop offset="0.249497" stop-color="#3E2247"/>
|
<stop stop-color="#AA5CC3"/>
|
||||||
<stop offset="1" stop-color="#003C50"/>
|
<stop offset="1" stop-color="#00A4DC"/>
|
||||||
</linearGradient>
|
</linearGradient>
|
||||||
<linearGradient id="paint1_linear_2_5" x1="0" y1="0" x2="16" y2="16" gradientUnits="userSpaceOnUse">
|
<linearGradient id="paint1_linear_102_2" x1="3" y1="2.5" x2="14" y2="13.5" gradientUnits="userSpaceOnUse">
|
||||||
<stop offset="0.249497" stop-color="#3E2247"/>
|
<stop stop-color="#AA5CC3"/>
|
||||||
<stop offset="1" stop-color="#003C50"/>
|
<stop offset="1" stop-color="#00A4DC"/>
|
||||||
</linearGradient>
|
</linearGradient>
|
||||||
</defs>
|
</defs>
|
||||||
</svg>
|
</svg>
|
||||||
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.6 KiB |
Reference in new issue
Block a user