Skip to content

Commit eb00686

Browse files
feat: add legal notice page template
1 parent 0d0f037 commit eb00686

File tree

8 files changed

+295
-31
lines changed

8 files changed

+295
-31
lines changed

acf-json/group_67619372a9c81.json

Lines changed: 146 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,146 @@
1+
{
2+
"key": "group_67619372a9c81",
3+
"title": "Legal Notice",
4+
"fields": [
5+
{
6+
"key": "field_67619372ffd97",
7+
"label": "Company",
8+
"name": "company",
9+
"aria-label": "",
10+
"type": "textarea",
11+
"instructions": "",
12+
"required": 0,
13+
"conditional_logic": 0,
14+
"wrapper": {
15+
"width": "",
16+
"class": "",
17+
"id": ""
18+
},
19+
"default_value": "",
20+
"maxlength": "",
21+
"rows": "",
22+
"placeholder": "",
23+
"new_lines": "br"
24+
},
25+
{
26+
"key": "field_67619416ffd98",
27+
"label": "Representative",
28+
"name": "representative",
29+
"aria-label": "",
30+
"type": "textarea",
31+
"instructions": "",
32+
"required": 0,
33+
"conditional_logic": 0,
34+
"wrapper": {
35+
"width": "",
36+
"class": "",
37+
"id": ""
38+
},
39+
"default_value": "",
40+
"maxlength": "",
41+
"rows": "",
42+
"placeholder": "",
43+
"new_lines": "br"
44+
},
45+
{
46+
"key": "field_676194eeffd99",
47+
"label": "Registration number",
48+
"name": "registration_number",
49+
"aria-label": "",
50+
"type": "textarea",
51+
"instructions": "",
52+
"required": 0,
53+
"conditional_logic": 0,
54+
"wrapper": {
55+
"width": "",
56+
"class": "",
57+
"id": ""
58+
},
59+
"default_value": "",
60+
"maxlength": "",
61+
"rows": "",
62+
"placeholder": "",
63+
"new_lines": "br"
64+
},
65+
{
66+
"key": "field_676194f9ffd9a",
67+
"label": "VAT number",
68+
"name": "vat_number",
69+
"aria-label": "",
70+
"type": "textarea",
71+
"instructions": "",
72+
"required": 0,
73+
"conditional_logic": 0,
74+
"wrapper": {
75+
"width": "",
76+
"class": "",
77+
"id": ""
78+
},
79+
"default_value": "",
80+
"maxlength": "",
81+
"rows": "",
82+
"placeholder": "",
83+
"new_lines": "br"
84+
},
85+
{
86+
"key": "field_67619536ffd9b",
87+
"label": "Email",
88+
"name": "email",
89+
"aria-label": "",
90+
"type": "email",
91+
"instructions": "",
92+
"required": 0,
93+
"conditional_logic": 0,
94+
"wrapper": {
95+
"width": "",
96+
"class": "",
97+
"id": ""
98+
},
99+
"default_value": "",
100+
"placeholder": "",
101+
"prepend": "",
102+
"append": ""
103+
},
104+
{
105+
"key": "field_6761953dffd9c",
106+
"label": "Phone",
107+
"name": "phone",
108+
"aria-label": "",
109+
"type": "text",
110+
"instructions": "",
111+
"required": 0,
112+
"conditional_logic": 0,
113+
"wrapper": {
114+
"width": "",
115+
"class": "",
116+
"id": ""
117+
},
118+
"default_value": "",
119+
"maxlength": "",
120+
"placeholder": "",
121+
"prepend": "",
122+
"append": ""
123+
}
124+
],
125+
"location": [
126+
[
127+
{
128+
"param": "page_template",
129+
"operator": "==",
130+
"value": "page-legal-notice.php"
131+
}
132+
]
133+
],
134+
"menu_order": 0,
135+
"position": "normal",
136+
"style": "default",
137+
"label_placement": "top",
138+
"instruction_placement": "label",
139+
"hide_on_screen": [
140+
"the_content"
141+
],
142+
"active": true,
143+
"description": "",
144+
"show_in_rest": 0,
145+
"modified": 1734452852
146+
}

build/bundle.asset.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<?php return array('dependencies' => array(), 'version' => 'e4c047f1a28a4c754993');
1+
<?php return array('dependencies' => array(), 'version' => '41ec9ed9fecb27873916');

build/css/style.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

inc/components/footer.php

Lines changed: 31 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -7,41 +7,44 @@
77

88
defined( 'ABSPATH' ) || exit;
99

10-
$current_language = pll_current_language();
10+
$hide_subscribe_form = ! empty( $args['hide_subscribe_form'] ) ? $args['hide_subscribe_form'] : false;
11+
$current_language = pll_current_language();
1112
?>
1213

1314
<footer class="footer">
15+
<?php if ( ! $hide_subscribe_form ) : ?>
1416
<div class="sub-from">
1517
<form id="subscribe-form" class="form" data-wf-page-id="65ef0726d2531bad1f44ea0e" data-wf-element-id="175357ac-dc97-ffe8-4592-427bd0633297">
16-
<p class="p-24-120 subs"><?php pll_e( 'Subscribe to be the first to know about upcoming concerts' ); ?></p>
17-
<input
18-
class="sub-input w-input"
19-
maxlength="256"
20-
name="email"
21-
placeholder="<?php pll_e( 'your email' ); ?>"
22-
type="email"
23-
id="email"
24-
pattern="^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$"
25-
required
26-
autocomplete="off"
27-
oninput="this.classList.remove('sub-input--error');"
28-
>
29-
<input type="hidden" name="action" value="subscribe">
30-
<?php wp_nonce_field( 'ajax_subscribe', 'subscribe_nonce', false ); ?>
31-
<button class="send-btn">
32-
<div class="pre-send w-embed">
33-
<svg width="100%" height="100%" viewbox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
34-
<path d="M2.07797 11.0802L2.07797 9.08016L14.078 9.08016L8.57797 3.58016L9.99797 2.16016L17.918 10.0802L9.99797 18.0002L8.57797 16.5802L14.078 11.0802L2.07797 11.0802Z" fill="#757575"></path>
35-
</svg>
36-
</div>
37-
<div class="done-send w-embed">
38-
<svg width="100%" height="100%" viewbox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
39-
<path d="M1.83203 10.0001L8.8306 15.8323L18.162 4.16797" stroke="#FFFAF6" stroke-width="2.33286"></path>
40-
</svg>
41-
</div>
42-
</button>
18+
<p class="p-24-120 subs"><?php pll_e( 'Subscribe to be the first to know about upcoming concerts' ); ?></p>
19+
<input
20+
class="sub-input w-input"
21+
maxlength="256"
22+
name="email"
23+
placeholder="<?php pll_e( 'your email' ); ?>"
24+
type="email"
25+
id="email"
26+
pattern="^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$"
27+
required
28+
autocomplete="off"
29+
oninput="this.classList.remove('sub-input--error');"
30+
>
31+
<input type="hidden" name="action" value="subscribe">
32+
<?php wp_nonce_field( 'ajax_subscribe', 'subscribe_nonce', false ); ?>
33+
<button class="send-btn">
34+
<div class="pre-send w-embed">
35+
<svg width="100%" height="100%" viewbox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
36+
<path d="M2.07797 11.0802L2.07797 9.08016L14.078 9.08016L8.57797 3.58016L9.99797 2.16016L17.918 10.0802L9.99797 18.0002L8.57797 16.5802L14.078 11.0802L2.07797 11.0802Z" fill="#757575"></path>
37+
</svg>
38+
</div>
39+
<div class="done-send w-embed">
40+
<svg width="100%" height="100%" viewbox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
41+
<path d="M1.83203 10.0001L8.8306 15.8323L18.162 4.16797" stroke="#FFFAF6" stroke-width="2.33286"></path>
42+
</svg>
43+
</div>
44+
</button>
4345
</form>
4446
</div>
47+
<?php endif; ?>
4548
<div class="div-block-5">
4649
<a href="<?php echo esc_url( home_url( '/' ) ); ?>" class="foo-logo w-inline-block">
4750
<div class="html-embed w-embed">

inc/translations.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,11 @@
6262
pll_register_string( 'footer', 'support the utopia', 'Polylang', true );
6363
pll_register_string( 'footer', 'support us', 'Polylang', true );
6464

65+
// Legal Notice
66+
pll_register_string( 'legal-notice', 'Represented by', 'legal-notice', true );
67+
pll_register_string( 'legal-notice', 'Registration number', 'legal-notice', true );
68+
pll_register_string( 'legal-notice', 'VAT number', 'legal-notice', true );
69+
6570
// Dates.
6671
pll_register_string( 'date', 'Monday', 'Polylang', true );
6772
pll_register_string( 'date', 'Tuesday', 'Polylang', true );

page-legal-notice.php

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
<?php
2+
/**
3+
* Template Name: Legal Notice Template
4+
*
5+
* @package 0.0.1
6+
*/
7+
8+
defined( 'ABSPATH' ) || exit;
9+
10+
global $post;
11+
12+
$extra_classes = array();
13+
14+
$extra_classes[] = 'post-' . $post->post_name;
15+
16+
get_header(
17+
null,
18+
array(
19+
'data-wf-page' => '665723f572caecd02591aa75',
20+
'barba-container-extra-classes' => 'inner-page ' . implode( ' ', $extra_classes ),
21+
'barba-namespace' => 'simple-page',
22+
)
23+
);
24+
25+
the_post();
26+
?>
27+
<div class="usual-page">
28+
<h1 class="heading"><?php the_title(); ?></h1>
29+
<div class="legal-wrapper">
30+
<?php
31+
$company = get_field( 'company' );
32+
if ( ! empty( $company ) ) :
33+
?>
34+
<div class="legal-wrapper__item">
35+
<p><?php echo $company; ?></p>
36+
</div>
37+
<?php endif; ?>
38+
<?php
39+
$representative = get_field( 'representative' );
40+
if ( ! empty( $representative ) ) :
41+
?>
42+
<div class="legal-wrapper__item">
43+
<strong><?php pll_e( 'Represented by' ); ?></strong>
44+
<p><?php echo $representative; ?></p>
45+
</div>
46+
<?php endif; ?>
47+
<?php
48+
$registration_number = get_field( 'registration_number' );
49+
if ( ! empty( $registration_number ) ) :
50+
?>
51+
<div class="legal-wrapper__item">
52+
<strong><?php pll_e( 'Registration number' ); ?></strong>
53+
<p><?php echo $registration_number; ?></p>
54+
</div>
55+
<?php endif; ?>
56+
<?php
57+
$vat_number = get_field( 'vat_number' );
58+
if ( ! empty( $vat_number ) ) :
59+
?>
60+
<div class="legal-wrapper__item">
61+
<strong><?php pll_e( 'VAT number' ); ?></strong>
62+
<p><?php echo $vat_number; ?></p>
63+
</div>
64+
<?php endif; ?>
65+
<?php
66+
$email = get_field( 'email' );
67+
$phone = get_field( 'phone' );
68+
if ( ! empty( $email ) || ! empty( $phone ) ) :
69+
?>
70+
<div class="legal-wrapper__item">
71+
<?php if ( ! empty( $phone ) ) : ?>
72+
<p><strong>Tel </strong><a href="<?php echo esc_url( utopia_format_phone_link( $phone ) ); ?>"><?php echo esc_html( $phone ); ?></a></p>
73+
<?php endif; ?>
74+
<?php if ( ! empty( $email ) ) : ?>
75+
<p><strong>Email </strong><a href="<?php echo esc_url( utopia_format_email_link( $email ) ); ?>"><?php echo esc_html( $email ); ?></a></p>
76+
<?php endif; ?>
77+
</div>
78+
<?php endif; ?>
79+
</div>
80+
<?php
81+
get_template_part(
82+
'inc/components/footer',
83+
);
84+
?>
85+
</div>
86+
<?php get_footer(); ?>

src/styles/index.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
@import 'components/gdpr.scss';
55

6-
@import 'pages/home', 'pages/concert', 'pages/article', 'pages/utopians';
6+
@import 'pages/home', 'pages/concert', 'pages/article', 'pages/utopians', 'pages/legal';
77

88
.opacity-0 {
99
opacity: 0;

src/styles/pages/_legal.scss

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
.legal-wrapper {
2+
padding-top: 109rem;
3+
padding-bottom: 84rem;
4+
width: 100%;
5+
max-width: 642rem;
6+
margin-inline: auto;
7+
display: flex;
8+
flex-direction: column;
9+
row-gap: 54rem;
10+
font-size: 24rem;
11+
line-height: 28.8rem;
12+
13+
strong {
14+
font-weight: 400;
15+
color: #757575;
16+
}
17+
18+
@include mobile {
19+
padding-top: 57rem;
20+
padding-right: 24rem;
21+
font-size: 20rem;
22+
line-height: 24rem;
23+
}
24+
}

0 commit comments

Comments
 (0)