-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
351 lines (297 loc) · 20.7 KB
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
<?php
/*
Plugin Name: Custom Haurand Block Styles 2
Plugin URI: https://haurand.com
Description: Zusätzliche Block-Styles für den Block Editor
Author: Hans-Gerd Gerhards
Author URI: https://haurand.com (Quelle: Automattic: https://github.com/Automattic/gutenberg-block-styles/)
Version: 1.51
/**
* 1. Register Custom Block Styles
*/
if ( function_exists( 'register_block_style' ) ) {
function block_styles_register_block_styles() {
/**
* Register stylesheet
*/
wp_register_style(
'block-styles-stylesheet',
plugins_url( 'style.css', __FILE__ ),
array(),
'1.2'
);
/**
* Register block style
*/
register_block_style(
'core/paragraph',
array(
'name' => 'blue-paragraph',
'label' => 'Absatz mit blauem Hintergrund',
'style_handle' => 'block-styles-stylesheet',
)
);
register_block_style(
'core/button',
array(
'name' => 'fancy-button',
'label' => 'Fancy Button',
'style_handle' => 'block-styles-stylesheet',
)
);
register_block_style(
'core/list',
array(
'name' => '2col-list',
'label' => '2-Spaltige Liste',
'style_handle' => 'block-styles-stylesheet',
)
);
register_block_style(
'core/paragraph',
array(
'name' => 'full width Paragraph',
'label' => 'Absatz mit voller Breite',
'style_handle' => 'block-styles-stylesheet',
)
);
register_block_style(
'core/heading',
array(
'name' => 'gradient-headline',
'label' => 'Gradient Überschrift',
'style_handle' => 'block-styles-stylesheet',
)
);
}
add_action( 'init', 'block_styles_register_block_styles' );
}
/**
* 2. Custom Block Patterns
*/
/* ---------------------------------------------------------------------------------------------------------------------------- */
/* 1. Block */
/* Block pattern: Vorlage mit 3 Kacheln, bestehend aus jeweils einer Überschrift, einem Bild mit kurzer Beschreibung*/
/* ---------------------------------------------------------------------------------------------------------------------------- */
register_block_pattern(
'kacheln-card-pattern',
array(
'title' => __( 'Drei Spalten mit Bildern (Kacheln)', 'kacheln-block-pattern' ),
'description' => _x( 'Drei Spalten mit Bildern (Kacheln)', 'Drei Spalten mit Bildern (Kacheln)', 'kacheln-block-pattern' ),
'categories' => array('columns'),
'content' =>
" <!-- wp:columns -->
<div class=\"wp-block-columns\"><!-- wp:column {\"className\":\"kacheln\"} -->
<div class=\"wp-block-column kacheln\"><!-- wp:heading {\"align\":\"center\",\"level\":4} -->
<h4 class=\"has-text-align-center\">Geschichte</h4>
<!-- /wp:heading -->
<!-- wp:image {\"id\":47830,\"sizeSlug\":\"large\"} -->
<figure class=\"wp-block-image size-large\"><img src=\"https://haurand.com/wp-content/uploads/2020/11/sonnenuntergang_2.jpeg\" alt=\"\" class=\"wp-image-47830\"/><figcaption>Ein Foto vom Flötenspieler</figcaption></figure>
<!-- /wp:image --></div>
<!-- /wp:column -->
<!-- wp:column {\"className\":\"kacheln\"} -->
<div class=\"wp-block-column kacheln\"><!-- wp:heading {\"align\":\"center\",\"level\":4} -->
<h4 class=\"has-text-align-center\">Landschaft</h4>
<!-- /wp:heading -->
<!-- wp:image {\"id\":47824,\"sizeSlug\":\"large\"} -->
<figure class=\"wp-block-image size-large\"><img src=\"https://haurand.com/wp-content/uploads/2020/11/sauerland_3.jpg\" alt=\"\" class=\"wp-image-47824\"/><figcaption>Landschaft mit Sonnenuntergang</figcaption></figure>
<!-- /wp:image --></div>
<!-- /wp:column -->
<!-- wp:column {\"className\":\"kacheln\"} -->
<div class=\"wp-block-column kacheln\"><!-- wp:heading {\"align\":\"center\",\"level\":4} -->
<h4 class=\"has-text-align-center\">Bevölkerung</h4>
<!-- /wp:heading -->
<!-- wp:image {\"id\":47827,\"sizeSlug\":\"large\"} -->
<figure class=\"wp-block-image size-large\"><img src=\"https://haurand.com/wp-content/uploads/2020/11/sonnenuntergang_1.jpeg\" alt=\"\" class=\"wp-image-47827\"/><figcaption>Die Bevölkerung von Eilendorf (Foto: pixabay.com)</figcaption></figure>
<!-- /wp:image --></div>
<!-- /wp:column --></div>
<!-- /wp:columns -->",
)
);
/* ---------------------------------------------------------------------------------------------------------------------------- */
/* 2. Block */
/* 3 Spalten mit runden Bildern */
/* ---------------------------------------------------------------------------------------------------------------------------- */
register_block_pattern(
'haurand-three-card-pattern',
array(
'title' => __( '3 Columns with Cards', 'haurand-three-block-pattern' ),
'description' => _x( 'Three Columns with Cards', 'Three Columns with Cards', 'haurand-three-block-pattern' ),
'categories' => array('columns'),
'content' => "<!-- wp:columns -->
<div class=\"wp-block-columns\"><!-- wp:column {\"className\":\"kachel_spalte\"} -->
<div class=\"wp-block-column kachel_spalte\"><!-- wp:heading {\"align\":\"center\"} -->
<h2 class=\"has-text-align-center\" id=\"h-kontakt\">Kontakt</h2>
<!-- /wp:heading -->
<!-- wp:image {\"align\":\"center\",\"id\":2756,\"width\":200,\"height\":200,\"sizeSlug\":\"large\",\"className\":\"is-style-rounded\"} -->
<div class=\"wp-block-image is-style-rounded\"><figure class=\"aligncenter size-large is-resized\"><img src=\"https://haurand.com/wp-content/uploads/2020/09/pexels-photo-4240498.jpeg\" alt=\"\" class=\"wp-image-2756\" width=\"200\" height=\"200\"/></figure></div>
<!-- /wp:image -->
<!-- wp:paragraph {\"align\":\"center\"} -->
<p class=\"has-text-align-center\">Nehmen Sie jetzt Kontakt zu uns auf.</p>
<!-- /wp:paragraph -->
<!-- wp:buttons {\"align\":\"center\"} -->
<div class=\"wp-block-buttons aligncenter\"><!-- wp:button {\"borderRadius\":0,\"style\":{\"color\":{\"background\":\"#f60012\"}}} -->
<div class=\"wp-block-button\"><a class=\"wp-block-button__link has-background no-border-radius\" href=\"https://haurand.com/kontakt-2/\" style=\"background-color:#f60012\">Mehr Infos</a></div>
<!-- /wp:button --></div>
<!-- /wp:buttons --></div>
<!-- /wp:column -->
<!-- wp:column {\"className\":\"kachel_spalte\"} -->
<div class=\"wp-block-column kachel_spalte\"><!-- wp:heading {\"align\":\"center\"} -->
<h2 class=\"has-text-align-center\" id=\"h-ihre-webseite\">Ihre Webseite</h2>
<!-- /wp:heading -->
<!-- wp:image {\"align\":\"center\",\"id\":2755,\"width\":200,\"height\":200,\"sizeSlug\":\"large\",\"className\":\"is-style-rounded\"} -->
<div class=\"wp-block-image is-style-rounded\"><figure class=\"aligncenter size-large is-resized\"><img src=\"https://haurand.com/wp-content/uploads/2020/09/ecommerce-2140603_640.jpg\" alt=\"\" class=\"wp-image-2755\" width=\"200\" height=\"200\"/></figure></div>
<!-- /wp:image -->
<!-- wp:paragraph {\"align\":\"center\"} -->
<p class=\"has-text-align-center\">Einfach passende Webseiten.</p>
<!-- /wp:paragraph -->
<!-- wp:buttons {\"align\":\"center\"} -->
<div class=\"wp-block-buttons aligncenter\"><!-- wp:button {\"borderRadius\":0,\"style\":{\"color\":{\"background\":\"#f60012\"}}} -->
<div class=\"wp-block-button\"><a class=\"wp-block-button__link has-background no-border-radius\" href=\"https://haurand.com/ihre-neue-webseite-einfach-passend/\" style=\"background-color:#f60012\">Mehr Infos</a></div>
<!-- /wp:button --></div>
<!-- /wp:buttons --></div>
<!-- /wp:column -->
<!-- wp:column {\"className\":\"kachel_spalte\"} -->
<div class=\"wp-block-column kachel_spalte\"><!-- wp:heading {\"align\":\"center\"} -->
<h2 class=\"has-text-align-center\" id=\"h-zum-blog\">zum Blog</h2>
<!-- /wp:heading -->
<!-- wp:image {\"align\":\"center\",\"id\":2754,\"width\":200,\"height\":200,\"sizeSlug\":\"large\",\"className\":\"is-style-rounded\"} -->
<div class=\"wp-block-image is-style-rounded\"><figure class=\"aligncenter size-large is-resized\"><img src=\"https://haurand.com/wp-content/uploads/2020/09/Blog.jpg\" alt=\"\" class=\"wp-image-2754\" width=\"200\" height=\"200\"/></figure></div>
<!-- /wp:image -->
<!-- wp:paragraph {\"align\":\"center\"} -->
<p class=\"has-text-align-center\">Tipps zu WordPress und Entwicklung</p>
<!-- /wp:paragraph -->
<!-- wp:buttons {\"align\":\"center\"} -->
<div class=\"wp-block-buttons aligncenter\"><!-- wp:button {\"borderRadius\":0,\"style\":{\"color\":{\"background\":\"#f60012\"}}} -->
<div class=\"wp-block-button\"><a class=\"wp-block-button__link has-background no-border-radius\" href=\"https://haurand.com/category/allgemein/\" style=\"background-color:#f60012\">Mehr Infos</a></div>
<!-- /wp:button --></div>
<!-- /wp:buttons --></div>
<!-- /wp:column --></div>
<!-- /wp:columns --> ",
)
);
/* ---------------------------------------------------------------------------------------------------------------------------- */
/* 3. Block */
/* 2 Spalten mit Bild oben Text darunter, blauer Hintergrund ohne Rahmen */
/* Die ID der Bilder muss in jedem Fall auf 324 bzw. 325 geändert werden (z. B. im Code-Editor), wenn der Zoomeffekt verwendet werden soll
/* und die Klasse muss ebenfalls angepasst werden (wp-image-324 oder wp-image-325)
/* ---------------------------------------------------------------------------------------------------------------------------- */
register_block_pattern(
'haurand-two-card-pattern',
array(
'title' => __( '2 Columns with Cards', 'haurand-two-block-pattern' ),
'description' => _x( 'Two Columns with Cards', 'Two Columns with Cards', 'haurand-two-block-pattern' ),
'categories' => array('columns'),
'content' => "<!-- wp:columns -->
<div class=\"wp-block-columns\"><!-- wp:column {\"className\":\"blue-background\"} -->
<div class=\"wp-block-column blue-background\"><!-- wp:image {\"id\":324,\"sizeSlug\":\"large\",\"className\":\"zoomeffekt\"} -->
<figure class=\"wp-block-image size-large zoomeffekt\"><img src=\"https://haurand.com/wp-content/uploads/2020/11/sonnenuntergang_2.jpeg\" alt=\"\" class=\"wp-image-324\"/></figure>
<!-- /wp:image -->
<!-- wp:paragraph {\"className\":\"blue-background\"} -->
<p class=\"blue-background\">Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.</p>
<!-- /wp:paragraph --></div>
<!-- /wp:column -->
<!-- wp:column {\"className\":\"blue-background\"} -->
<div class=\"wp-block-column blue-background\"><!-- wp:image {\"id\":325,\"sizeSlug\":\"large\",\"className\":\"zoomeffekt\"} -->
<figure class=\"wp-block-image size-large zoomeffekt\"><img src=\"https://haurand.com/wp-content/uploads/2020/11/sauerland_3.jpg\" alt=\"\" class=\"wp-image-325\"/></figure>
<!-- /wp:image -->
<!-- wp:paragraph {\"className\":\"blue-background\"} -->
<p class=\"blue-background\">Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.</p>
<!-- /wp:paragraph --></div>
<!-- /wp:column --></div>
<!-- /wp:columns -->",
)
);
/* ---------------------------------------------------------------------------------------------------------------------------- */
/* 4. Block */
/* 2 Spalten mit Bild oben Text darunter, grüner Hintergrund ohne Rahmen mit Ken Burns Effekt*/
/* Die ID der Bilder muss in jedem Fall auf 326 bzw. 327 geändert werden (z. B. im Code-Editor), wenn der Zoomeffekt verwendet werden soll
/* und die Klasse muss ebenfalls angepasst werden (wp-image-326 oder wp-image-327)
/* ---------------------------------------------------------------------------------------------------------------------------- */
register_block_pattern(
'haurand-kb-two-card-pattern',
array(
'title' => __( '2 Columns with Cards - Ken Burns', 'haurand-kb-two-block-pattern' ),
'description' => _x( 'Two Columns with Cards - Ken Burns', 'Two Columns with Cards - Ken Burns', 'haurand-kb-two-block-pattern' ),
'categories' => array('columns'),
'content' => "<!-- wp:columns -->
<div class=\"wp-block-columns\"><!-- wp:column {\"className\":\"green-background\"} -->
<div class=\"wp-block-column green-background\"><!-- wp:image {\"id\":326,\"sizeSlug\":\"large\",\"className\":\"ken_burns\"} -->
<figure class=\"wp-block-image size-large ken_burns\"><img src=\"https://haurand.com/wp-content/uploads/2020/11/sonnenuntergang_2.jpeg\" alt=\"\" class=\"wp-image-326\"/></figure>
<!-- /wp:image -->
<!-- wp:paragraph {\"className\":\"green-background\"} -->
<p class=\"green-background\">Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.</p>
<!-- /wp:paragraph --></div>
<!-- /wp:column -->
<!-- wp:column {\"className\":\"green-background\"} -->
<div class=\"wp-block-column green-background\"><!-- wp:image {\"id\":327,\"sizeSlug\":\"large\",\"className\":\"ken_burns\"} -->
<figure class=\"wp-block-image size-large ken_burns\"><img src=\"https://haurand.com/wp-content/uploads/2020/11/sauerland_3.jpg\" alt=\"\" class=\"wp-image-327\"/></figure>
<!-- /wp:image -->
<!-- wp:paragraph {\"className\":\"green-background\"} -->
<p class=\"green-background\">Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.</p>
<!-- /wp:paragraph --></div>
<!-- /wp:column --></div>
<!-- /wp:columns -->",
)
);
/* ---------------------------------------------------------------------------------------------------------------------------- */
/* 5. Block - ähnlich wie 2. Block, aber flexibler*/
/* 3 Spalten mit rechteckigen Bildern und zoom-Effekt */
/* ---------------------------------------------------------------------------------------------------------------------------- */
register_block_pattern('haurand-three-card-pattern-v2',
array(
'title' => __( '3 Columns with Cards - v2', 'haurand-three-block-pattern-v2' ),
'description' => _x( 'Three Columns with Cards', 'Three Columns with Cards - version 2', 'haurand-three-block-pattern-v2' ),
'categories' => array('columns'),
'content' => "<!-- wp:columns {\"className\":\"kachel_spalten_v2\"} -->
<div class=\"wp-block-columns kachel_spalten_v2\"><!-- wp:column {\"className\":\"kachel_spalte_v2\"} -->
<div class=\"wp-block-column kachel_spalte_v2\"><!-- wp:heading {\"textAlign\":\"center\"} -->
<h2 class=\"has-text-align-center\" id=\"h-kontakt\">Kontakt</h2>
<!-- /wp:heading -->
<!-- wp:image {\"id\":253,\"sizeSlug\":\"large\",\"linkDestination\":\"none\",\"className\":\"zoomeffekt\"} -->
<figure class=\"wp-block-image size-large zoomeffekt\"><img src=\"http://leer.test/wp-content/uploads/2020/11/sonnenuntergang_3-1024x768.jpg\" alt=\"\" class=\"kachel_bild_v2\"/></figure>
<!-- /wp:image -->
<!-- wp:paragraph {\"align\":\"center\"} -->
<p class=\"has-text-align-center\">Nehmen Sie jetzt Kontakt zu uns auf.</p>
<!-- /wp:paragraph -->
<!-- wp:buttons {\"align\":\"center\"} -->
<div class=\"wp-block-buttons aligncenter\"><!-- wp:button {\"borderRadius\":0,\"style\":{\"color\":{\"background\":\"#f60012\"}}} -->
<div class=\"wp-block-button\"><a class=\"wp-block-button__link has-background no-border-radius\" href=\"https://haurand.com/kontakt-2/\" style=\"background-color:#f60012\">Mehr Infos</a></div>
<!-- /wp:button --></div>
<!-- /wp:buttons --></div>
<!-- /wp:column -->
<!-- wp:column {\"className\":\"kachel_spalte_v2\"} -->
<div class=\"wp-block-column kachel_spalte_v2\"><!-- wp:heading {\"textAlign\":\"center\"} -->
<h2 class=\"has-text-align-center\" id=\"h-ihre-webseite\">Ihre Webseite</h2>
<!-- /wp:heading -->
<!-- wp:image {\"id\":252,\"sizeSlug\":\"large\",\"linkDestination\":\"none\",\"className\":\"zoomeffekt\"} -->
<figure class=\"wp-block-image size-large zoomeffekt\"><img src=\"http://leer.test/wp-content/uploads/2020/11/sonnenuntergang_2-1024x768.jpeg\" alt=\"\" class=\"kachel_bild_v2\"/></figure>
<!-- /wp:image -->
<!-- wp:paragraph {\"align\":\"center\"} -->
<p class=\"has-text-align-center\">Einfach passende Webseiten.</p>
<!-- /wp:paragraph -->
<!-- wp:buttons {\"align\":\"center\"} -->
<div class=\"wp-block-buttons aligncenter\"><!-- wp:button {\"borderRadius\":0,\"style\":{\"color\":{\"background\":\"#f60012\"}}} -->
<div class=\"wp-block-button\"><a class=\"wp-block-button__link has-background no-border-radius\" href=\"https://haurand.com/ihre-neue-webseite-einfach-passend/\" style=\"background-color:#f60012\">Mehr Infos</a></div>
<!-- /wp:button --></div>
<!-- /wp:buttons --></div>
<!-- /wp:column -->
<!-- wp:column {\"className\":\"kachel_spalte_v2\"} -->
<div class=\"wp-block-column kachel_spalte_v2\"><!-- wp:heading {\"textAlign\":\"center\"} -->
<h2 class=\"has-text-align-center\" id=\"h-zum-blog\">zum Blog</h2>
<!-- /wp:heading -->
<!-- wp:image {\"id\":249,\"sizeSlug\":\"large\",\"linkDestination\":\"none\",\"className\":\"zoomeffekt\"} -->
<figure class=\"wp-block-image size-large zoomeffekt\"><img src=\"http://leer.test/wp-content/uploads/2020/11/sauerland_2-1024x768.jpg\" alt=\"\" class=\"kachel_bild_v2\"/></figure>
<!-- /wp:image -->
<!-- wp:paragraph {\"align\":\"center\"} -->
<p class=\"has-text-align-center\">Tipps zu WordPress und Entwicklung</p>
<!-- /wp:paragraph -->
<!-- wp:buttons {\"align\":\"center\"} -->
<div class=\"wp-block-buttons aligncenter\"><!-- wp:button {\"borderRadius\":0,\"style\":{\"color\":{\"background\":\"#f60012\"}}} -->
<div class=\"wp-block-button\"><a class=\"wp-block-button__link has-background no-border-radius\" href=\"https://haurand.com/category/allgemein/\" style=\"background-color:#f60012\">Mehr Infos</a></div>
<!-- /wp:button --></div>
<!-- /wp:buttons --></div>
<!-- /wp:column --></div>
<!-- /wp:columns -->",
)
);