@leuffen/themejs1 3.0.2 → 3.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/embed.scss CHANGED
@@ -1,19 +1,2 @@
1
1
  @import "src/default/loader";
2
2
 
3
- body {
4
- min-height: 5000vh; // 3000vh is enough to make sure the page scrolls to correct position on reload
5
- opacity: 0;
6
- transition: opacity 0.25s;
7
- }
8
-
9
- body.loaded {
10
- min-height: unset;
11
- opacity: 1;
12
- }
13
-
14
- body > * {
15
- display: none;
16
- }
17
- body.loaded > * {
18
- display: block;
19
- }
package/embed.ts ADDED
@@ -0,0 +1,3 @@
1
+ import {initLoader} from "./src/helper/loader";
2
+
3
+ initLoader()
package/index.dev.ts CHANGED
@@ -1,3 +1,6 @@
1
1
 
2
- import "./themes/styles.dev"
2
+ import "./theme1.scss"
3
+ import "./src.dev/dev.scss"
3
4
 
5
+ import "./themes/theme1/theme1.dev"
6
+ import "@micx/lib-js";
package/index.scss CHANGED
@@ -1,6 +1,5 @@
1
1
  @import "sections/defaults";
2
2
  @import "sections/sections";
3
3
  @import "elements/elements";
4
- @import "themes/_general/root-format";
5
4
  @import "@leuffen/isl-base/style";
6
5
 
package/index.ts CHANGED
@@ -1,5 +1,7 @@
1
- import "@leuffen/jodastyle";
2
1
  export * from "./sections/sections";
3
2
  export * from "./elements/elements";
4
3
  export * from "@leuffen/isl-base";
4
+ import "@leuffen/jodastyle";
5
+
6
+
5
7
 
package/package.json CHANGED
@@ -1,7 +1,8 @@
1
1
  {
2
2
  "name": "@leuffen/themejs1",
3
- "version": "3.0.2",
3
+ "version": "3.0.4",
4
4
  "description": "",
5
+ "license": "proprietary",
5
6
  "main": "./dist/index.js",
6
7
  "module": "./dist/index.module.js",
7
8
  "directories": {
@@ -24,13 +25,14 @@
24
25
  ],
25
26
  "author": "",
26
27
  "dependencies": {
27
- "@leuffen/jodastyle": "^1.0.7",
28
+ "@leuffen/jodastyle": "^1.0.8",
28
29
  "@kasimirjs/embed": "^1.0.8",
29
30
  "@leuffen/isl-base": "^1.0.5",
30
31
  "bootstrap": "^5.3.0"
31
32
  },
32
33
  "devDependencies": {
33
-
34
+ "@micx/lib-js": "^1.0.18",
35
+ "@kasimirjs/kit-bootstrap": "^1.0.4",
34
36
  "markdown-it": "^13.0.1",
35
37
  "markdown-it-attrs": "^4.1.6",
36
38
  "css-loader": "^6.7.1",
@@ -10,6 +10,10 @@
10
10
  --t-text-color-accent: var(--bs-gray-900);
11
11
  --t-text-color-primary: var(--bs-primary);
12
12
 
13
+ --t-navbar-height: 88px;
14
+
15
+ /* What to substract from 100vh to start the next elemment after fullsize header */
16
+ --t-fullsize-modifier: 150px;
13
17
 
14
18
  --t-header-margin: 0 0 20px 0;
15
19
  --t-paragraf-margin: 0 0 20px 0;
@@ -40,7 +40,7 @@
40
40
 
41
41
  position: relative;
42
42
  &.tjs__hero-max--autoheight {
43
- height: calc(100vh - 200px);
43
+ height: calc(100vh - var(--t-fullsize-modifier, 200px));
44
44
  min-height: var(--layout-min-height, 400px);
45
45
  max-height: var(--layout-max-height, 1000px);
46
46
  }
@@ -1,7 +1,7 @@
1
1
 
2
2
 
3
3
  .tjs__navbar-blox {
4
- --height: 65px;
4
+ --height: var(--t-navbar-height, 64px);
5
5
  position: relative;
6
6
  top: 0;
7
7
  width: 100%;
@@ -12,7 +12,7 @@ Joda.registerTemplate("sec-card-2col",
12
12
  <slot></slot>
13
13
  </div>
14
14
  <div class="tjs__sec-card-2col--col-end col-12 col-md-6 image-side order-1 order-md-2">
15
- <slot data-select="img, .children > .section-hr.aside" data-replace></slot>
15
+ <slot data-select="img, .children > .section-hr.aside" data-replace data-limit="1"></slot>
16
16
  </div>
17
17
  </div>
18
18
  </div>
@@ -1,53 +1,98 @@
1
- html.loader::before {
2
- content: "";
3
- font-family: sans-serif;
4
- font-size: 12px;
5
- line-height: 10px;
6
- position: fixed;
7
- text-align: center;
8
- color: white;
9
- margin-top: 1px;
10
- z-index: 2;
11
- -webkit-animation: leu--site-loader 60s ease-out;
12
- animation: leu--site-loader 30s ease-out;
13
- display: block;
14
- background-color: indianred;
15
- height: 3px;
16
- width: 35%;
1
+ body > .loader > .loader-bar {
2
+ position: relative;
3
+ display: block;
4
+ background-color: lightgrey;
5
+ height: 3px;
6
+ width: 70vw;
7
+ max-width: 500px;
17
8
  top: 0;
9
+ z-index: 1;
10
+ margin-top: 25vh;
11
+ &::before {
12
+ content: "";
13
+ font-family: sans-serif;
14
+ font-size: 12px;
15
+ line-height: 10px;
16
+ position: relative;
17
+ text-align: center;
18
+ color: white;
19
+
20
+ z-index: 2;
21
+ -webkit-animation: leu--site-loader 60s ease-out;
22
+ animation: leu--site-loader 30s ease-out;
23
+ display: block;
24
+ background-color: indianred;
25
+ height: 100%;
26
+ width: 35%;
27
+ top: 0;
28
+ }
29
+ }
30
+
31
+
32
+ @keyframes leu--site-loader {
33
+ 3% {
34
+ width: 75%;
35
+
36
+ }
37
+ 5% {
38
+ width: 90%;
39
+ }
40
+ 10% {
41
+ width: 95%;
42
+ }
43
+ 100% {
44
+ width: 100%;
45
+ }
46
+ }
47
+
48
+
49
+ body {
50
+ min-height: 5000vh; // 3000vh is enough to make sure the page scrolls to correct position on reload
51
+ }
52
+
53
+ body.loaded {
54
+ min-height: unset;
55
+ }
56
+
57
+ body > joda-content {
58
+ opacity: 0;
59
+ transition: opacity 0.10s;
18
60
  }
61
+ body.loaded > joda-content {
62
+ opacity: 1;
63
+ }
64
+
19
65
 
20
- html.loader::after {
21
- content: "";
22
- font-family: sans-serif;
23
- font-size: 12px;
24
- line-height: 10px;
66
+ body > .loader {
25
67
  position: fixed;
26
- text-align: center;
27
- color: white;
28
- margin-top: 1px;
29
- -webkit-animation: leu--site-loader 60s ease-out;
30
- animation: leu--site-loader 60s ease-out;
31
- display: block;
32
- background-color: darkgray;
33
- height: 3px;
68
+ z-index: -99;
34
69
  top: 0;
70
+ left: 0;
35
71
  width: 100%;
36
- right: 0;
72
+ height: 100%;
73
+ background: #fff;
74
+ transition: opacity 0.15s;
75
+ display: flex !important;
76
+
77
+ align-items: center;
78
+ align-content: center;
79
+ justify-content: center;
80
+ opacity: 1;
81
+ flex-wrap: wrap;
82
+ flex-direction: column;
83
+
84
+ & > img {
85
+ flex-direction: column;
86
+ display: block !important;
87
+ height: auto !important;
88
+ width: 70vw !important;
89
+ max-width: 500px;
90
+
91
+ }
37
92
  }
38
93
 
39
- @keyframes leu--site-loader {
40
- 3% {
41
- width: 75%;
42
-
43
- }
44
- 5% {
45
- width: 90%;
46
- }
47
- 10% {
48
- width: 95%;
49
- }
50
- 100% {
51
- width: 100%;
52
- }
94
+ body.loaded > .loader {
95
+ opacity: 0;
96
+ //display: none !important;
97
+ z-index: -99;
53
98
  }
@@ -0,0 +1,27 @@
1
+ import {hitIndex} from "../hit-index";
2
+
3
+ console.time("loader");
4
+ export function initLoader() {
5
+ let interval = setInterval(() => {
6
+ // Detect if body is loaded
7
+ if (document.querySelector("body")) {
8
+ // Cancel interval
9
+ clearInterval(interval);
10
+
11
+ let img = document.querySelector("img").cloneNode(true) as HTMLImageElement;
12
+ let loader = document.createElement("div");
13
+ loader.classList.add("loader");
14
+ loader.appendChild(img);
15
+ img.setAttribute("class", "");
16
+ img.setAttribute("loading", "eager");
17
+
18
+ let loaderBar = document.createElement("div");
19
+ loaderBar.classList.add("loader-bar");
20
+ loader.appendChild(loaderBar);
21
+
22
+ document.querySelector("body").appendChild(loader);
23
+ }
24
+ }, hitIndex === 1 ? 10 : 350); // Wait 350 on subsequent requests to prevent flickering
25
+ }
26
+
27
+
@@ -0,0 +1,8 @@
1
+ const indexName = "themejs_hit_index";
2
+ let state = sessionStorage.getItem(indexName);
3
+ if (state === null) {
4
+ sessionStorage.setItem(indexName, "0");
5
+ }
6
+ sessionStorage.setItem(indexName, "" + (parseInt(sessionStorage.getItem(indexName) ?? "0") + 1));
7
+
8
+ export const hitIndex = parseInt(sessionStorage.getItem(indexName) ?? "0");
@@ -1,51 +1,11 @@
1
-
2
-
3
- .tjs__root-format {
4
-
5
-
6
-
7
- color: var(--t-text-color);
8
- background: var(--t-background);
9
-
10
- // General Section padding
11
- section:last-of-type > * {
12
- padding-bottom: 0;
13
- }
14
-
1
+ @mixin default-element-format() {
15
2
  section h2 {
16
3
  text-transform: uppercase;
17
- // font-weight: bold;
4
+ // font-weight: bold;
18
5
 
19
6
  margin: var(--t-paragraf-margin);
20
7
  }
21
8
 
22
- .tjs__section-text {
23
- h2 {
24
- text-transform: uppercase;
25
- font-weight: bold;
26
- font-size: 16px;
27
- color: var(--t-text-color-primary) !important;
28
- margin: var(--t-paragraf-margin);
29
- }
30
- blockquote > p {
31
- font-size: 2.1em;
32
- line-height: 1.2em;
33
- color: var(--t-text-color) !important;
34
- margin: var(--t-header-margin, 0 0 20px 0);
35
- hyphens: manual;
36
- }
37
-
38
- .table {
39
- --bs-table-color: var(--t-text-color);
40
- }
41
-
42
- *:last-child {
43
- margin-bottom: 0;
44
- }
45
- }
46
-
47
-
48
-
49
9
  ul > li {
50
10
  color: var(--t-text-color);
51
11
  * {
@@ -106,5 +66,8 @@
106
66
  margin: 0;
107
67
  }
108
68
  }
69
+ section:last-of-type > * {
70
+ padding-bottom: 0;
71
+ }
109
72
 
110
73
  }
@@ -1,8 +1,15 @@
1
+ @import "../../variables";
2
+ @import "../_mixins/default-element-format";
1
3
 
2
4
  :root {
3
5
  --layout-container: container;
4
6
  }
5
7
  .theme1 {
8
+ @include default-element-format();
9
+
10
+ color: var(--t-text-color);
11
+ background: var(--t-background);
12
+
6
13
 
7
14
  h1,h2,h3,h4,h5 {
8
15
  color: var(--t-text-color);
@@ -23,6 +30,30 @@
23
30
  line-height: 1.4em;
24
31
  }
25
32
 
33
+ .tjs__section-text {
34
+ h2 {
35
+ text-transform: uppercase;
36
+ font-weight: bold;
37
+ font-size: 16px;
38
+ color: var(--t-text-color-primary) !important;
39
+ margin: var(--t-paragraf-margin);
40
+ }
41
+ blockquote > p {
42
+ font-size: 2.1em;
43
+ line-height: 1.2em;
44
+ color: var(--t-text-color) !important;
45
+ margin: var(--t-header-margin, 0 0 20px 0);
46
+ hyphens: manual;
47
+ }
48
+
49
+ .table {
50
+ --bs-table-color: var(--t-text-color);
51
+ }
52
+
53
+ *:last-child {
54
+ margin-bottom: 0;
55
+ }
56
+ }
26
57
 
27
58
  .section {
28
59
  blockquote p {
@@ -44,7 +75,7 @@
44
75
  --t-background-footer: #fff;
45
76
  --t-section-background: transparent;
46
77
  --t-section-background-accent: #e7e7eb;
47
- --t-section-background-primary: #D6EED9;
78
+ --t-section-background-primary: #{$background-primary};
48
79
  --t-text-background: #fff;
49
80
  --t-text-color: #707070;
50
81
  --t-text-background-light: var(--t-background);
@@ -0,0 +1,127 @@
1
+ import {JodaDescriptionManager} from "@leuffen/jodastyle";
2
+
3
+ let html =`
4
+
5
+ <nav layout="use: #navbar-blox">
6
+ <div class="brand">Logo</div>
7
+ <ul class="nav-bar-main">
8
+ <li><a href="#home">Hello World</a></li>
9
+ </ul>
10
+ <ul class="nav-menu">
11
+ <li><a href="#home">Home</a></li>
12
+ </ul>
13
+ </ul>
14
+ </nav>
15
+
16
+ # Willkommen bei <br>Dr. med. XXX XXX
17
+ {: layout="use: #hero-max"}
18
+
19
+
20
+ ![Neuronen Hintergrundbild](https://cdn.leuffen.de//leu-stock/v2/7/121-46_gfedcba/AdobeStock_354842358.webp)
21
+
22
+ Facharzt für Neurologie <br> Facharzt für Psychiatrie
23
+
24
+
25
+ ## Hero Section
26
+ {: layout="use: #hero-ribbon"}
27
+
28
+
29
+
30
+
31
+ ### Notfall?
32
+
33
+ Sie erreichen den ärztlichen Notdienst unter der Telefon-Nr: [116 117](tel:+49116117)
34
+
35
+ ### Termine & Rezeptabholung
36
+
37
+ Wir sind eine **Terminpraxis**. Für Terminvergaben, Anfragen und Rezeptabholungen beachten Sie bitte
38
+ die Öffnungszeiten des Empfangs.
39
+
40
+ ### Öffnungszeiten Empfang
41
+
42
+ {% include el/openhours.html %}
43
+
44
+
45
+ ## Über mich
46
+ {: layout="use: #sec-card-2col"}
47
+
48
+ > Dr. med. X. Kelloggs
49
+
50
+ ![Bild Dr. med. XXX Kelloggs](https://cdn.leuffen.de//leu-stock/v2/26/c_gfedcba/AdobeStock_172186647.webp){: style="padding: 4rem"}
51
+
52
+ ### Werdegang
53
+
54
+ Berufstätigkeit in der Neurologie, Psychiatrie, Inneren Medizin und Orthopädie.
55
+
56
+ Zuletzt klinisch tätig als Oberarzt einer neurologischen Rehaklinik. Seit 2001 tätig als niedergelassener Neurologe
57
+ und Psychiater.
58
+
59
+ Focus Empfehlung: 2017, 2018, 2019
60
+
61
+
62
+
63
+ ## Medizinischer Schwerpunkt
64
+ {: layout="use: #sec-multi-card; cols:2"}
65
+
66
+ ### Neurologie
67
+
68
+ Interessengebiete:
69
+
70
+ - Schlaganfall und Arteriosklerose
71
+ - Parkinsonerkrankung
72
+ - Gedächtnisstörung
73
+ - Prävention und Ernährungsmedizin bei neurologischen Erkrankungen
74
+
75
+ *Bitte beachten: Bei speziellen Medikamenten für Multiple Sklerose und Myasthenie wenden Sie sich bitte an ein
76
+ spezialisiertes neurologisches Zentrum.*
77
+
78
+ Apparative Untersuchungen:
79
+
80
+ - Farbduplexsonographie der hirnversorgenden Halsgefäße
81
+ - Messung der Nervenleitgeschwindigkeit bei Verdacht auf Karpaltunnelsyndrom, Polyneuropathie und Ulnaris-Neuropathie
82
+
83
+ Beispiele für häufigere Beschwerden: Schwäche und Lähmung. Taubheit und Missempfindungen. Schwindel,
84
+ Gleichgewichtsstörungen und Gangstörungen. Bewusstseinsstörung. Zittern. Kopfschmerzen und sonstige Schmerzen. Änderung des
85
+ Denkvermögens und der Sprache.
86
+
87
+
88
+ ### Psychiatrie
89
+
90
+ - Psychiatrische Diagnostik und Behandlung
91
+ - Interessengebiet: Prävention und Ernährungsmedizin bei psychischen Erkrankungen
92
+
93
+ Beispiele für häufigere Beschwerden: Anspannung, Unruhe, Reizbarkeit, aufdrängende Gedanken, Grübeln,
94
+ Vermeidung, Ängste, Panikanfälle. Vegetative Beschwerden wie Herzklopfen, Atembeschwerden, Schwitzen, Schwindel, usw. Schlafstörungen.
95
+ Änderung der Stimmung, des Antriebs, des Denkvermögens, der Wahrnehmung und des Verhaltens.
96
+
97
+ ---
98
+ {: .hr}
99
+
100
+ Bei Vorliegen einer Notlage und akuter Beschwerden: wenden Sie sich bitte direkt an die Aufnahme einer
101
+ Klinik. Empfehlung für weitere Informationen: [www.neurologen-und-psychiater-im-netz.org](https://www.neurologen-und-psychiater-im-netz.org)
102
+
103
+
104
+
105
+
106
+
107
+
108
+
109
+
110
+ ## Kontakt aufnehmen
111
+ {: layout="use: #cta-base"}
112
+
113
+ [Kontakt](/kontakt)
114
+
115
+
116
+ `;
117
+
118
+ JodaDescriptionManager.addClass("page",
119
+ "theme1",
120
+ "theme1",
121
+ html,
122
+ []
123
+ ,
124
+ {
125
+ bodyClasses: ["theme1"]
126
+ }
127
+ );