@leuffen/themejs1 6.1.34 → 7.0.1

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.
@@ -1,5 +1,4 @@
1
1
 
2
- //$font-family-base: garamond,serif;
3
- $font-family-base: Ubuntu, sans-serif;
4
-
5
2
 
3
+ $accent: #9c8b58;
4
+ $primary: #354b68;
package/_variables.scss CHANGED
@@ -6,15 +6,15 @@
6
6
 
7
7
  //$font-family-base: Ubuntu-R,sans-serif;
8
8
  $font-family-base: sans-serif !default;
9
+ $font-family-header: $font-family-base !default;
9
10
 
10
-
11
+ $accent: #f19045 !default;
11
12
  $primary: #a3979b !default;
12
13
  $success: #22b573 !default;
13
14
  $danger: #bf1c0a !default;
14
15
  $warning: #bf760a !default;
15
16
  $dark: #006837 !default;
16
17
 
17
-
18
18
  $soft-primary: lighten($primary, 40%) !default;
19
19
  $soft-success: lighten($success, 40%) !default;
20
20
  $soft-danger: lighten($danger, 50%) !default;
@@ -29,6 +29,8 @@ $content-offset-top: 100px !default;
29
29
  $content-height-adjustment: 200px !default;
30
30
 
31
31
  $font-size-base: 0.9rem !default;
32
+ $font-size-header: 1.8rem !default;
33
+
32
34
  $line-height-base: 1.2 !default;
33
35
  $paragraph-margin-bottom: 1.5rem !default;
34
36
 
@@ -52,3 +54,5 @@ $border-color: #999 !default;
52
54
 
53
55
  $header-text-transform: uppercase !default;
54
56
  $hero-fullsize-modifier: 200px !default;
57
+
58
+
@@ -0,0 +1,56 @@
1
+ // language=HTML
2
+ import { Joda } from "@leuffen/jodastyle";
3
+ const html = `
4
+
5
+ <nav class="navbar-centerlogo navbar :: mobile :xl:">
6
+ <div class="navbar__wrapper [[ layout.container ]]">
7
+ <slot class="" data-select="ul.navbar-top "></slot>
8
+
9
+ <slot class="navbar__logo" data-select="[[ layout.slot_logo_selector ]]"></slot>
10
+
11
+ <div class="burger-menu" onclick="this.closest('nav').classList.toggle('sidebar')">
12
+ <div class="burger-menu__text">
13
+ [[ layout.burger_text ]]
14
+ </div>
15
+ <div class="burger-menu__burger">
16
+ <div></div>
17
+ <div></div>
18
+ <div></div>
19
+ </div>
20
+ </div>
21
+
22
+ </div>
23
+
24
+
25
+ <aside>
26
+ <div class="backdrop" onclick="this.closest('nav').classList.remove('sidebar')"></div>
27
+ <div class="menu">
28
+ <div class="menu-header">
29
+ <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-x-lg" viewBox="0 0 16 16" onclick="this.closest('nav').classList.remove('sidebar')">
30
+ <path d="M2.146 2.854a.5.5 0 1 1 .708-.708L8 7.293l5.146-5.147a.5.5 0 0 1 .708.708L8.707 8l5.147 5.146a.5.5 0 0 1-.708.708L8 8.707l-5.146 5.147a.5.5 0 0 1-.708-.708L7.293 8 2.146 2.854Z"/>
31
+ </svg>
32
+ </div>
33
+ <slot data-select="ul.navbar-main" data-copy="1" data-child-class="isl-navbar-switch1__nav--items-item"></slot>
34
+ </div>
35
+ </aside>
36
+ </nav>
37
+
38
+ `;
39
+ Joda.registerTemplate("navbar-centerlogo", html, {
40
+ slot_logo_selector: ".brand",
41
+ burger_text: "Menu",
42
+ container: "container"
43
+ }, {
44
+ "onAfterConnectedCallback": (element) => {
45
+ // If the page is scrolled down, the navbar should be sticky
46
+ // Update this on scroll event
47
+ window.addEventListener("scroll", () => {
48
+ if (window.scrollY > 1) {
49
+ element.classList.add("scrolled");
50
+ }
51
+ else {
52
+ element.classList.remove("scrolled");
53
+ }
54
+ });
55
+ }
56
+ });
@@ -1,4 +1,5 @@
1
1
  import "./navbar-blox/navbar-blox";
2
+ import "./navbar-centerlogo/navbar-centerlogo";
2
3
  import "./sec-legal-content/sec-legal-content";
3
4
  import "./sec-testimonial-ribbon/sec-testimonial-ribbon";
4
5
  import "./sec-card-2col/sec-card-2col";
@@ -1,4 +1,5 @@
1
1
  import "./navbar-blox/navbar-blox";
2
+ import "./navbar-centerlogo/navbar-centerlogo";
2
3
  import "./sec-legal-content/sec-legal-content";
3
4
  import "./sec-testimonial-ribbon/sec-testimonial-ribbon";
4
5
  import "./sec-card-2col/sec-card-2col";
@@ -0,0 +1,9 @@
1
+
2
+ @import "../themes/_vendor/font-opensans";
3
+ @import "../themes/_vendor/font-cinzel";
4
+
5
+ $font-family-base: 'Open Sans', sans-serif;
6
+ $font-size-base: 1rem !default;
7
+
8
+ $font-family-header: 'Cinzel', serif !default;
9
+ $font-size-header: 1.8rem !default;
@@ -1,5 +1,8 @@
1
1
 
2
2
  @import "../themes/_vendor/font-opensans-condensed";
3
3
 
4
- $font-family-base: 'Open Sans Condensed', sans-serif;
4
+ $font-family-base: 'Open Sans Condensed', sans-serif !default;
5
5
  $font-size-base: 1rem !default;
6
+
7
+ $font-family-headeer: $font-family-base !default;
8
+ $font-size-header: 1.8rem !default;
@@ -3,3 +3,6 @@
3
3
 
4
4
  $font-family-base: 'Open Sans', sans-serif;
5
5
  $font-size-base: 1rem !default;
6
+
7
+ $font-family-headeer: $font-family-base !default;
8
+ $font-size-header: 1.8rem !default;
package/font/ubuntu.scss CHANGED
@@ -3,3 +3,6 @@
3
3
 
4
4
  $font-family-base: 'Ubuntu', sans-serif;
5
5
  $font-size-base: 1rem !default;
6
+
7
+ $font-family-headeer: $font-family-base !default;
8
+ $font-size-header: 1.8rem !default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leuffen/themejs1",
3
- "version": "6.1.34",
3
+ "version": "7.0.1",
4
4
 
5
5
  "description": "",
6
6
  "license": "proprietary",
@@ -5,6 +5,12 @@
5
5
  --t-section-background-accent: #{$background-accent};
6
6
  --t-section-background-primary: #D6EED9;
7
7
 
8
+
9
+ --t-font-family-base: #{$font-family-base};
10
+ --t-font-family-header: #{$font-family-header};
11
+
12
+
13
+
8
14
  --t-section-border-color: #{$section-border-color};
9
15
  --t-section-border-radius: #{$section-border-radius};
10
16
 
@@ -27,5 +33,6 @@
27
33
  --t-section-padding: 40px 0;
28
34
  --t-section-inner-padding: 3rem;
29
35
 
36
+ --t-accent: #{$accent};
30
37
 
31
38
  }
@@ -0,0 +1,46 @@
1
+ .burger-menu {
2
+ position: relative;
3
+
4
+ height: 30px;
5
+
6
+
7
+ cursor: pointer;
8
+
9
+
10
+ display: flex;
11
+ flex-direction: row;
12
+ justify-content: flex-end;
13
+ align-items: center;
14
+
15
+
16
+ & > .burger-menu__text {
17
+ padding-right: 5px;
18
+ font-family: var(--t-font-family-header);
19
+ font-size: var(--t-font-size-header);
20
+ color: var(--t-text-color-primary);
21
+ @media (width < 768px) {
22
+ display: none;
23
+ }
24
+ }
25
+
26
+ & > .burger-menu__burger {
27
+ position: relative;
28
+ padding: 20px; // Make the clickable area bigger
29
+ margin: -20px; // Make the clickable area bigger
30
+ z-index: 3;
31
+ opacity: 0.6;transform: scale(1); transition: all 0.1s ease-in-out;
32
+ div {
33
+ width: 35px;
34
+ height: 3px;
35
+ background-color: var(--layout-burger-color);
36
+ margin: 6px 0;
37
+ }
38
+ }
39
+
40
+ &:hover > .burger-menu__burger {
41
+ opacity: 1;
42
+ transform: scale(1.1);
43
+
44
+ }
45
+
46
+ }
@@ -0,0 +1,175 @@
1
+ @import "bootstrap/scss/functions";
2
+
3
+ // 2. Include any default variable overrides here
4
+
5
+ // 3. Include remainder of required Bootstrap stylesheets
6
+ @import "bootstrap/scss/variables";
7
+
8
+ // 4. Include any default map overrides here
9
+
10
+ // 5. Include remainder of required parts
11
+ @import "bootstrap/scss/maps";
12
+ @import "bootstrap/scss/mixins";
13
+ @import "bootstrap/scss/root";
14
+
15
+
16
+ .navbar-centerlogo {
17
+
18
+ --layout-bg-default: transparent;
19
+ --layout-bg-sticky: #fff;
20
+ --layout-bg-sticky-shadow: 0px 1px 2px #000;
21
+ --layout-burger-color: var(--t-accent);
22
+ --layout-menu-color: var(--bs-primary);
23
+ --layout-image-height: 80px;
24
+
25
+
26
+ background-color: var(--layout-bg-default);
27
+ position: absolute;
28
+ top: 0;
29
+ width: 100vw;
30
+ height: auto;
31
+ z-index: 999;
32
+
33
+ .brand img {
34
+ height: auto;
35
+
36
+ width: 50%;
37
+ }
38
+
39
+ &.scrolled img.brand {
40
+ width: auto;
41
+ height: 80px;
42
+
43
+ }
44
+
45
+
46
+ &>.navbar__wrapper {
47
+ display: flex;
48
+ justify-content: space-between;
49
+ flex-wrap: nowrap;
50
+ flex-direction: row;
51
+
52
+ & > *{
53
+ flex-grow: 1;
54
+ display: flex;
55
+ width: 33%;
56
+ }
57
+ &>.navbar__logo {
58
+ transition: all 0.5s ease-in-out;
59
+ align-items: center;
60
+ justify-content: center;
61
+ display: flex;
62
+
63
+
64
+ img {
65
+ height: var(--layout-image-height);
66
+ transition: all 0.25s ease-in-out;
67
+ width: auto; transform: translateY(50%) scale(2);
68
+ max-width: 70vw;
69
+ }
70
+
71
+ }
72
+ @import "burger-menu";
73
+
74
+ }
75
+
76
+ transition: background-color 0.2s ease-in-out;
77
+
78
+
79
+
80
+ &.scrolled {
81
+ height: var(--layout-scrolled-height);
82
+ position: fixed;
83
+ top: 0;
84
+ width: 100vw;
85
+ background-color: var(--layout-bg-sticky);
86
+ .navbar__logo img {
87
+ transform: translateY(0) scale(1);
88
+ }
89
+ }
90
+
91
+
92
+
93
+ aside {
94
+ &>.backdrop {
95
+ position: fixed;
96
+ background-color: var(--nav-sidbar-backgrond-color, $primary);
97
+ opacity: 0.4;
98
+ top:0; bottom: 0; left: 0; right: 0;
99
+ width: 100%;
100
+ height: 100%;
101
+ transform: scale(0%);
102
+ -webkit-transform: scale(0, 0);
103
+ transition: all 0.1s ease-in-out;
104
+ z-index:9998;
105
+ }
106
+ &>.menu {
107
+
108
+
109
+ position: fixed;
110
+ top: 0; bottom: 0; right: 0;
111
+ width: 90vw;
112
+ max-width: 300px;
113
+ z-index: 9999;
114
+ transform: translateX(100%);
115
+ background-color: var(--nav-sidbar-backgrond-color, $primary);
116
+ // Do big black shadow
117
+ box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
118
+ transition: all 0.2s ease-in-out;
119
+
120
+ ul {
121
+ padding: 0;
122
+ margin: 0;
123
+ &>li {
124
+ list-style: none;
125
+ width: 100%;
126
+ &>a {
127
+ &:hover {
128
+ background-color: var(--nav-sidbar-backgrond-color-hover, darken($primary, 10%));
129
+ }
130
+
131
+ display: block;
132
+ text-decoration: none;
133
+ width: 100%;
134
+ padding: 15px;
135
+ color: $white;
136
+ border-bottom: 1px solid rgba(255, 255, 255, 0.5);
137
+ }
138
+ }
139
+ }
140
+
141
+ &>.menu-header {
142
+ width: 100%;
143
+ border-bottom: 1px solid rgba(255, 255,255,0.5);
144
+ display: flex;
145
+ align-content: center;
146
+ justify-content: end;
147
+
148
+ &>svg {
149
+ cursor: pointer;
150
+ margin: 20px;
151
+ color: $white;
152
+ height: 38px;
153
+ width: 38px;
154
+ }
155
+ }
156
+ }
157
+
158
+ }
159
+
160
+ &.sidebar {
161
+ aside {
162
+ &>.backdrop {
163
+ transform: scale(100%);
164
+ -webkit-transform: scale(100%, 100%);
165
+ }
166
+ &>.menu {
167
+ transform: translateX(0%);
168
+ }
169
+
170
+
171
+ }
172
+ }
173
+
174
+
175
+ }
@@ -0,0 +1,63 @@
1
+
2
+ // language=HTML
3
+ import {Joda, JodaDescriptionManager} from "@leuffen/jodastyle";
4
+
5
+ const html = `
6
+
7
+ <nav class="navbar-centerlogo navbar :: mobile :xl:">
8
+ <div class="navbar__wrapper [[ layout.container ]]">
9
+ <slot class="" data-select="ul.navbar-top "></slot>
10
+
11
+ <slot class="navbar__logo" data-select="[[ layout.slot_logo_selector ]]"></slot>
12
+
13
+ <div class="burger-menu" onclick="this.closest('nav').classList.toggle('sidebar')">
14
+ <div class="burger-menu__text">
15
+ [[ layout.burger_text ]]
16
+ </div>
17
+ <div class="burger-menu__burger">
18
+ <div></div>
19
+ <div></div>
20
+ <div></div>
21
+ </div>
22
+ </div>
23
+
24
+ </div>
25
+
26
+
27
+ <aside>
28
+ <div class="backdrop" onclick="this.closest('nav').classList.remove('sidebar')"></div>
29
+ <div class="menu">
30
+ <div class="menu-header">
31
+ <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-x-lg" viewBox="0 0 16 16" onclick="this.closest('nav').classList.remove('sidebar')">
32
+ <path d="M2.146 2.854a.5.5 0 1 1 .708-.708L8 7.293l5.146-5.147a.5.5 0 0 1 .708.708L8.707 8l5.147 5.146a.5.5 0 0 1-.708.708L8 8.707l-5.146 5.147a.5.5 0 0 1-.708-.708L7.293 8 2.146 2.854Z"/>
33
+ </svg>
34
+ </div>
35
+ <slot data-select="ul.navbar-main" data-copy="1" data-child-class="isl-navbar-switch1__nav--items-item"></slot>
36
+ </div>
37
+ </aside>
38
+ </nav>
39
+
40
+ `;
41
+
42
+ Joda.registerTemplate(
43
+ "navbar-centerlogo",
44
+ html,
45
+ {
46
+ slot_logo_selector: ".brand",
47
+ burger_text: "Menu",
48
+ container: "container"
49
+
50
+ },
51
+ {
52
+ "onAfterConnectedCallback": (element: HTMLElement) => {
53
+ // If the page is scrolled down, the navbar should be sticky
54
+ // Update this on scroll event
55
+ window.addEventListener("scroll", () => {
56
+ if (window.scrollY > 1) {
57
+ element.classList.add("scrolled");
58
+ } else {
59
+ element.classList.remove("scrolled");
60
+ }
61
+ });
62
+ }
63
+ });
@@ -1,6 +1,7 @@
1
1
 
2
2
  @import "defaults";
3
3
  @import "navbar-blox/navbar-blox.scss";
4
+ @import "navbar-centerlogo/navbar-centerlogo.scss";
4
5
  @import "sec-legal-content/sec-legal-content";
5
6
  @import "sec-testimonial-ribbon/sec-testimonial-ribbon";
6
7
  @import "sec-card-2col/sec-card-2col";
@@ -1,5 +1,6 @@
1
1
 
2
2
  import "./navbar-blox/navbar-blox";
3
+ import "./navbar-centerlogo/navbar-centerlogo";
3
4
  import "./sec-legal-content/sec-legal-content";
4
5
  import "./sec-testimonial-ribbon/sec-testimonial-ribbon";
5
6
  import "./sec-card-2col/sec-card-2col";
@@ -0,0 +1,26 @@
1
+ @font-face {
2
+ font-family: "Cinzel";
3
+ src: url("https://cdn.leuffen.de/global/fonts/cinzel/Cinzel-Regular.woff?v=1.101") format("woff");
4
+ font-weight: 300;
5
+ font-style: normal;
6
+ font-display: swap;
7
+
8
+ }
9
+
10
+ @font-face {
11
+ font-family: "Cinzel";
12
+ src: url("https://cdn.leuffen.de/global/fonts/cinzel/Cinzel-Bold.woff?v=1.101") format("woff");
13
+ font-weight: 700;
14
+ font-style: normal;
15
+ font-display: swap;
16
+
17
+ }
18
+
19
+ @font-face {
20
+ font-family: "Cinzel";
21
+ src: url("https://cdn.leuffen.de/global/fonts/cinzel/Cinzel-Black.woff?v=1.101") format("woff");
22
+ font-weight: 900;
23
+ font-style: normal;
24
+ font-display: swap;
25
+
26
+ }
@@ -55,6 +55,7 @@
55
55
  text-transform: var(--t-header-text-transform, uppercase);
56
56
  font-weight: bold;
57
57
  font-size: 16px;
58
+ font-family: var(--t-font-family-base);
58
59
  color: var(--t-text-color-primary) !important;
59
60
  margin: var(--t-paragraf-margin);
60
61
  }
@@ -62,6 +63,7 @@
62
63
  h2, blockquote > p {
63
64
  font-size: 1.9em;
64
65
  line-height: 1.2em;
66
+ font-family: var(--t-font-family-header);
65
67
  color: var(--t-text-color) !important;
66
68
  margin: var(--t-header-margin, 0 0 20px 0);
67
69
  hyphens: manual;