@openeuropa/bcl-user 0.15.0

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/LICENSE.md ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2020-2021 Mark Otto
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
package/package.json ADDED
@@ -0,0 +1,33 @@
1
+ {
2
+ "name": "@openeuropa/bcl-user",
3
+ "author": "European Commission",
4
+ "license": "EUPL-1.2",
5
+ "version": "0.15.0",
6
+ "publishConfig": {
7
+ "access": "public"
8
+ },
9
+ "description": "OE - BCL user",
10
+ "dependencies": {
11
+ "@openeuropa/bcl-base-templates": "^0.15.0",
12
+ "@openeuropa/bcl-button": "^0.15.0",
13
+ "@openeuropa/bcl-card": "^0.15.0",
14
+ "@openeuropa/bcl-form": "^0.15.0",
15
+ "@openeuropa/bcl-link": "^0.15.0",
16
+ "@openeuropa/bcl-navigation": "^0.15.0"
17
+ },
18
+ "repository": {
19
+ "type": "git",
20
+ "url": "git+https://github.com/openeuropa/bootstrap-component-library.git"
21
+ },
22
+ "bugs": {
23
+ "url": "https://github.com/openeuropa/bootstrap-component-library.git/issues"
24
+ },
25
+ "homepage": "https://github.com/openeuropa/bootstrap-component-library",
26
+ "keywords": [
27
+ "openeuropa",
28
+ "bootstrap-component-library",
29
+ "design-system",
30
+ "twig"
31
+ ],
32
+ "gitHead": "97a9f0822ee0d4d800e40aa17bf87dc698c5906c"
33
+ }
@@ -0,0 +1,38 @@
1
+ {% extends "@oe-bcl/bcl-base-templates/content-type.html.twig" %}
2
+
3
+ {% block content %}
4
+ <h2 class="fw-bold mb-3 mb-md-5 d-inline-block">Edit my profile</h2>
5
+ <div class="mb-4 float-lg-end">
6
+ {% include '@oe-bcl/bcl-link/link.html.twig' with profile_back only %}
7
+ </div>
8
+ {% include "@oe-bcl/bcl-navigation/navigation.html.twig" with navigation only %}
9
+ <div class="tab-content">
10
+ <div class="tab-pane fade show active" id="profile" role="tabpanel" aria-labelledby="profile-tab">
11
+ <div class="row">
12
+ <div class="offset-3 col-6 offset-lg-0 col-lg-2 mt-4 pt-3">
13
+ <img src="https://picsum.photos/seed/1002/400/400" class="img-fluid" alt="profile-image">
14
+ <div class="mt-3 d-grid">
15
+ {% include '@oe-bcl/bcl-form-input/form-input.html.twig' with image_upload_input only %}
16
+ {% include '@oe-bcl/bcl-button/button.html.twig' with remove_image_button only %}
17
+ </div>
18
+ </div>
19
+ <div class="col-12 col-lg-10">
20
+ <h3 class="fw-bold mt-4 mb-3 pt-3">Profile information</h3>
21
+ {% include '@oe-bcl/bcl-form/form.html.twig' with profile_information only %}
22
+ </div>
23
+ </div>
24
+ </div>
25
+ <div class="tab-pane fade" id="privacy" role="tabpanel" aria-labelledby="privacy-tab">
26
+ <h3 class="fw-bold pt-2 mt-4 mb-4">Privacy settings</h3>
27
+ {% include '@oe-bcl/bcl-form/form.html.twig' with privacy_settings only %}
28
+ <h3 class="fw-bold my-4">Public profile contents</h3>
29
+ <p class="mb-0">Select what information should be displayed to your profile.</p>
30
+ <p class="mb-4">Only people who have access to your data will be able to consult these informations.</p>
31
+ {% include '@oe-bcl/bcl-form/form.html.twig' with public_profile_content only %}
32
+ <h3 class="fw-bold my-4">Delete account</h3>
33
+ <p class="mb-0">Account deletion is permanent and cannot be undone.</p>
34
+ <p>If you delete your account, all content created by you (comments, articles, ...) will be anonymized.</p>
35
+ {% include '@oe-bcl/bcl-form/form.html.twig' with delete_account only %}
36
+ </div>
37
+ </div>
38
+ {% endblock %}
@@ -0,0 +1,41 @@
1
+ {% spaceless %}
2
+
3
+ {# Parameters:
4
+ - picture (object) format: {
5
+ - "path" (string) (default: '')
6
+ - "alt" (string) (default: '')
7
+ }
8
+ - name (object) format: {
9
+ - "text" (string) (default: '')
10
+ - "link" (string) (default: '')
11
+ }
12
+ - infos (array of strings) (default: [])
13
+ #}
14
+
15
+ {% set attributes = create_attribute().addClass(["d-flex", "mb-3"]) %}
16
+
17
+ <div
18
+ {{ attributes }}
19
+ >
20
+ <div class="flex-shrink-0">
21
+ <img
22
+ class="rounded-pill"
23
+ src="{{ picture.path }}"
24
+ alt="{{ picture.alt }}"
25
+ >
26
+ </div>
27
+ <div class="flex-grow-1 ms-3">
28
+ {% if name.link is not empty %}
29
+ <a href="{{ name.link }}" class="fs-5 text-underline-hover mb-0">{{ name.text }}</a>
30
+ {% else %}
31
+ <p class="fs-5 mb-0 text-primary">{{ name.text }}</p>
32
+ {% endif %}
33
+ <div class="d-flex flex-wrap">
34
+ {% for info in infos %}
35
+ <span class="text-muted text-nowrap{{ loop.last ? '' :' me-4-5'}}">{{ info }}</span>
36
+ {% endfor %}
37
+ </div>
38
+ </div>
39
+ </div>
40
+
41
+ {% endspaceless %}
@@ -0,0 +1,96 @@
1
+ {% extends "@oe-bcl/bcl-base-templates/content-type.html.twig" %}
2
+
3
+ {% block content %}
4
+ <div class="row">
5
+ <div class="col-12 col-md-10">
6
+ {% include '@oe-bcl/bcl-card/card.html.twig' with user only %}
7
+ </div>
8
+ <div class="col-12 col-md-2 text-end">
9
+ <div class="d-grid d-md-block">
10
+ {% include '@oe-bcl/bcl-button/button.html.twig' with edit_button only %}
11
+ </div>
12
+ </div>
13
+ </div>
14
+ <div class="my-3">
15
+ <h4 class="fw-bold mb-4">Personal information</h4>
16
+ <div class="row">
17
+ <div class="col-12 col-md-6">
18
+ <div class="row">
19
+ <div class="col-12 col-md-4">
20
+ <p class="mb-0">Gender:</p>
21
+ </div>
22
+ <div class="col-12 col-md-8">
23
+ <p>Male</p>
24
+ </div>
25
+ </div>
26
+ <div class="row">
27
+ <div class="col-12 col-md-4">
28
+ <p class="mb-0">Nationality:</p>
29
+ </div>
30
+ <div class="col-12 col-md-8">
31
+ <p>German</p>
32
+ </div>
33
+ </div>
34
+ <div class="row">
35
+ <div class="col-12 col-md-4">
36
+ <p class="mb-0">Date of birth:</p>
37
+ </div>
38
+ <div class="col-12 col-md-8">
39
+ <p>22/01/1972</p>
40
+ </div>
41
+ </div>
42
+ </div>
43
+ <div class="col-12 col-md-6">
44
+ <div class="row">
45
+ <div class="col-12 col-md-4">
46
+ <p class="mb-0">Country:</p>
47
+ </div>
48
+ <div class="col-12 col-md-8">
49
+ <p>Germany</p>
50
+ </div>
51
+ </div>
52
+ <div class="row">
53
+ <div class="col-12 col-md-4">
54
+ <p class="mb-0">City:</p>
55
+ </div>
56
+ <div class="col-12 col-md-8">
57
+ <p>Düsseldorf</p>
58
+ </div>
59
+ </div>
60
+ </div>
61
+ </div>
62
+ </div>
63
+ <div class="my-3">
64
+ <h4 class="fw-bold mb-4">Professional information</h4>
65
+ <div class="row">
66
+ <div class="col-12 col-md-6">
67
+ <div class="row">
68
+ <div class="col-12 col-md-4">
69
+ <p class="mb-0">Organisation:</p>
70
+ </div>
71
+ <div class="col-12 col-md-8">
72
+ <p>DG Test</p>
73
+ </div>
74
+ </div>
75
+ <div class="row">
76
+ <div class="col-12 col-md-4">
77
+ <p class="mb-0">Position:</p>
78
+ </div>
79
+ <div class="col-12 col-md-8">
80
+ <p>Director</p>
81
+ </div>
82
+ </div>
83
+ </div>
84
+ <div class="col-12 col-md-6">
85
+ <div class="row">
86
+ <div class="col-12 col-md-4">
87
+ <p class="mb-0">Working languages:</p>
88
+ </div>
89
+ <div class="col-12 col-md-8">
90
+ <p>English, German</p>
91
+ </div>
92
+ </div>
93
+ </div>
94
+ </div>
95
+ </div>
96
+ {% endblock %}