@everymatrix/casino-403 1.0.16 → 1.1.1

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everymatrix/casino-403",
3
- "version": "1.0.16",
3
+ "version": "1.1.1",
4
4
  "main": "dist/casino-403.js",
5
5
  "svelte": "src/index.ts",
6
6
  "scripts": {
@@ -36,5 +36,5 @@
36
36
  "publishConfig": {
37
37
  "access": "public"
38
38
  },
39
- "gitHead": "526e9d4877d11a6372af0e39b2c9db7c8b640737"
39
+ "gitHead": "4324ea4b38266eb153f1ab89685cdf0f9bcade16"
40
40
  }
@@ -5,6 +5,10 @@
5
5
  import { Translations } from './translations';
6
6
 
7
7
  export let lang:string = 'en';
8
+ export let clientstyling:string = '';
9
+ export let clientstylingurl:string = '';
10
+
11
+ let customStylingContainer:HTMLElement;
8
12
  export let translationUrl:string = '';
9
13
 
10
14
  const setTranslationUrl = ():void => {
@@ -32,11 +36,32 @@
32
36
  setLocale(lang);
33
37
  }
34
38
 
39
+ const setClientStyling = ():void => {
40
+ let sheet = document.createElement('style');
41
+ sheet.innerHTML = clientstyling;
42
+ customStylingContainer.appendChild(sheet);
43
+ }
44
+
45
+ const setClientStylingURL = ():void => {
46
+ let url:URL = new URL(clientstylingurl);
47
+ let cssFile:HTMLElement = document.createElement('style');
48
+
49
+ fetch(url.href)
50
+ .then((res:any) => res.text())
51
+ .then((data:any) => {
52
+ cssFile.innerHTML = data
53
+
54
+ setTimeout(() => { customStylingContainer.appendChild(cssFile) }, 1);
55
+ });
56
+ }
57
+
35
58
  $: lang && setActiveLanguage();
59
+ $: clientstyling && customStylingContainer && setClientStyling();
60
+ $: clientstylingurl && customStylingContainer && setClientStylingURL();
36
61
  $: translationUrl && setTranslationUrl();
37
62
  </script>
38
63
 
39
- <div class="PageWrapper">
64
+ <div class="PageWrapper" bind:this={customStylingContainer}>
40
65
  <div class="NotFoundPage">
41
66
  <svg xmlns="http://www.w3.org/2000/svg" width="130.345" height="130.345" viewBox="0 0 130.345 130.345"><g transform="translate(-9.37 -9.34)"><path class="a" d="M22.819,139.685H126.266a13.422,13.422,0,0,0,13.449-13.449V22.789A13.422,13.422,0,0,0,126.266,9.34H22.819A13.422,13.422,0,0,0,9.37,22.789V126.236A13.422,13.422,0,0,0,22.819,139.685Zm-7.241-116.9a7.2,7.2,0,0,1,7.241-7.241H126.266a7.2,7.2,0,0,1,7.241,7.241V38.3H15.572Zm0,21.725H133.513v81.723a7.2,7.2,0,0,1-7.241,7.241H22.824a7.2,7.2,0,0,1-7.241-7.241Z"/><path class="a" d="M147.866,140.62h-4.138a3.1,3.1,0,0,0,0,6.207h4.138a3.1,3.1,0,0,0,0-6.207Z" transform="translate(-116.772 -116.794)"/><path class="a" d="M297.866,140.62h-4.138a3.1,3.1,0,1,0,0,6.207h4.138a3.1,3.1,0,0,0,0-6.207Z" transform="translate(-250.22 -116.794)"/><path class="a" d="M199.816,81.307h-1.765V74.5c0-8.132-5.863-14.5-14.247-14.5s-14.12,6.493-14.12,14.5v6.745h-1.765a7.156,7.156,0,0,0-7.123,7.123v21.307a7.156,7.156,0,0,0,7.123,7.123h31.9a7.156,7.156,0,0,0,7.123-7.123V88.367a7.1,7.1,0,0,0-7.123-7.06Zm-26.6,0V74.5c0-6.052,4.16-10.969,10.59-10.969,6.367,0,10.716,4.791,10.716,10.969v6.745H173.215v.063Zm30.132,28.367a3.524,3.524,0,0,1-3.53,3.53h-31.9a3.524,3.524,0,0,1-3.53-3.53V88.367a3.524,3.524,0,0,1,3.53-3.53h31.9a3.524,3.524,0,0,1,3.53,3.53ZM187.4,95.49a3.548,3.548,0,0,1-1.765,3.089h0v5.8a1.765,1.765,0,1,1-3.53,0v-5.8h0a3.55,3.55,0,0,1,1.765-6.619,3.447,3.447,0,0,1,3.53,3.53Z" transform="translate(-109.326 -3.172)"/></g></svg>
42
67
  <p class="PageTitle">