@openeuropa/bcl-user 0.1.202408021145

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.1.202408021145",
6
+ "publishConfig": {
7
+ "access": "public"
8
+ },
9
+ "description": "OE - BCL user",
10
+ "dependencies": {
11
+ "@openeuropa/bcl-base-templates": "^0.1.202408021145",
12
+ "@openeuropa/bcl-button": "^0.1.202408021145",
13
+ "@openeuropa/bcl-card": "^0.1.202408021145",
14
+ "@openeuropa/bcl-form": "^0.1.202408021145",
15
+ "@openeuropa/bcl-link": "^0.1.202408021145",
16
+ "@openeuropa/bcl-navigation": "^0.1.202408021145"
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": "7ee2013f7f64a70ddfa35228a9a65967dd71eec3"
33
+ }
@@ -0,0 +1,64 @@
1
+ {% apply spaceless %}
2
+
3
+ {# Parameters:
4
+ - picture (object) (default: {})
5
+ format: {
6
+ - path (string) (default: '')
7
+ - alt (string) (default: '')
8
+ - classes (string) (default: '')
9
+ }
10
+ - name (object) (default: {})
11
+ format: {
12
+ - text (string) (default: '')
13
+ - link (string) (default: '')
14
+ }
15
+ - infos (string[]) (default: [])
16
+ #}
17
+
18
+ {% set _picture = picture|default({}) %}
19
+ {% set _name = name|default({}) %}
20
+ {% set _infos = infos|default([]) %}
21
+
22
+ {% set _picture_classes = 'rounded-pill' %}
23
+ {% set _classes = ['bcl-user-compact', 'd-flex', 'mb-3'] %}
24
+
25
+ {% if attributes is empty %}
26
+ {% set attributes = create_attribute() %}
27
+ {% endif %}
28
+
29
+ {% set attributes = attributes.addClass(_classes) %}
30
+
31
+ {% if _picture is not empty and _picture.classes is not empty %}
32
+ {% set _picture_classes = _picture_classes ~ ' ' ~ _picture.classes %}
33
+ {% endif %}
34
+
35
+ <div
36
+ {{ attributes }}
37
+ >
38
+ <div class="flex-shrink-0">
39
+ <img
40
+ class="{{ _picture_classes }}"
41
+ src="{{ _picture.path }}"
42
+ alt="{{ _picture.alt }}"
43
+ >
44
+ </div>
45
+ <div class="flex-grow-1 ms-3">
46
+ {% if _name.link is not empty %}
47
+ <a href="{{ _name.link }}" class="fs-5 standalone mb-0">{{ _name.text }}</a>
48
+ {% else %}
49
+ <p class="fs-5 mb-0 text-primary">{{ _name.text }}</p>
50
+ {% endif %}
51
+
52
+ {% if _infos is not empty %}
53
+ <div class="d-flex flex-wrap">
54
+ {% for _info in _infos %}
55
+ {% if _info is not empty %}
56
+ <span class="text-muted text-nowrap{{ loop.last ? '' :' me-4-5'}}">{{ _info }}</span>
57
+ {% endif %}
58
+ {% endfor %}
59
+ </div>
60
+ {% endif %}
61
+ </div>
62
+ </div>
63
+
64
+ {% endapply %}
@@ -0,0 +1,11 @@
1
+ {% extends "@oe-bcl/bcl-base-templates/content-type.html.twig" %}
2
+
3
+ {% block content %}
4
+ {{ get_dummy_text(4, true) }}
5
+ <ul class="mb-4-5">
6
+ <li>{{ get_dummy_text() }}</li>
7
+ <li>{{ get_dummy_text() }}</li>
8
+ <li>{{ get_dummy_text() }}</li>
9
+ </ul>
10
+ {% include '@oe-bcl/bcl-form/form.html.twig' with terms_form only %}
11
+ {% endblock %}
package/user.html.twig ADDED
@@ -0,0 +1,137 @@
1
+ {% extends "@oe-bcl/bcl-base-templates/content-type.html.twig" %}
2
+
3
+ {% block content %}
4
+ {% include "@oe-bcl/bcl-navigation/navigation.html.twig" with navigation only %}
5
+ <div class="tab-content">
6
+ <div class="tab-pane fade show active" id="view" role="tabpanel" aria-labelledby="view-tab">
7
+ {% include '@oe-bcl/bcl-content-banner/content-banner.html.twig' with view.banner only %}
8
+ <div class="mt-3 mt-md-4-75 pt-4-75 mb-3">
9
+ {% include '@oe-bcl/bcl-heading/heading.html.twig' with {
10
+ title: 'Personal information',
11
+ title_tag: 'h2',
12
+ attributes: create_attribute().addClass(['mb-4']),
13
+ } only %}
14
+ <div class="row">
15
+ <div class="col-12 col-md-6">
16
+ <div class="row">
17
+ <div class="col-12 col-md-4">
18
+ <p class="mb-0">Gender:</p>
19
+ </div>
20
+ <div class="col-12 col-md-8">
21
+ <p>Male</p>
22
+ </div>
23
+ </div>
24
+ <div class="row">
25
+ <div class="col-12 col-md-4">
26
+ <p class="mb-0">Nationality:</p>
27
+ </div>
28
+ <div class="col-12 col-md-8">
29
+ <p>German</p>
30
+ </div>
31
+ </div>
32
+ <div class="row">
33
+ <div class="col-12 col-md-4">
34
+ <p class="mb-0">Date of birth:</p>
35
+ </div>
36
+ <div class="col-12 col-md-8">
37
+ <p>22/01/1972</p>
38
+ </div>
39
+ </div>
40
+ </div>
41
+ <div class="col-12 col-md-6">
42
+ <div class="row">
43
+ <div class="col-12 col-md-4">
44
+ <p class="mb-0">Country:</p>
45
+ </div>
46
+ <div class="col-12 col-md-8">
47
+ <p>Germany</p>
48
+ </div>
49
+ </div>
50
+ <div class="row">
51
+ <div class="col-12 col-md-4">
52
+ <p class="mb-0">City:</p>
53
+ </div>
54
+ <div class="col-12 col-md-8">
55
+ <p>Düsseldorf</p>
56
+ </div>
57
+ </div>
58
+ </div>
59
+ </div>
60
+ </div>
61
+ <div class="my-3">
62
+ {% include '@oe-bcl/bcl-heading/heading.html.twig' with {
63
+ title: 'Professional information',
64
+ title_tag: 'h2',
65
+ attributes: create_attribute().addClass(['mb-4']),
66
+ } only %}
67
+ <div class="row">
68
+ <div class="col-12 col-md-6">
69
+ <div class="row">
70
+ <div class="col-12 col-md-4">
71
+ <p class="mb-0">Organisation:</p>
72
+ </div>
73
+ <div class="col-12 col-md-8">
74
+ <p>DG Test</p>
75
+ </div>
76
+ </div>
77
+ <div class="row">
78
+ <div class="col-12 col-md-4">
79
+ <p class="mb-0">Position:</p>
80
+ </div>
81
+ <div class="col-12 col-md-8">
82
+ <p>Director</p>
83
+ </div>
84
+ </div>
85
+ </div>
86
+ <div class="col-12 col-md-6">
87
+ <div class="row">
88
+ <div class="col-12 col-md-4">
89
+ <p class="mb-0">Working languages:</p>
90
+ </div>
91
+ <div class="col-12 col-md-8">
92
+ <p>English, German</p>
93
+ </div>
94
+ </div>
95
+ </div>
96
+ </div>
97
+ </div>
98
+ </div>
99
+ <div class="tab-pane fade" id="edit" role="tabpanel" aria-labelledby="edit-tab">
100
+ <h1 class="my-4-5">Edit my profile</h1>
101
+ <h2 class="mb-4-5">Profile image</h2>
102
+ <div class="row">
103
+ <div class="bcl-card-start-col bcl-size-large mx-auto ms-md-2-5">
104
+ <img src="https://picsum.photos/seed/1002/400/400" class="img-fluid" alt="profile-image">
105
+ </div>
106
+ <div class="col-12 col-md align-self-center">
107
+ <div class="mt-3 text-center text-md-start">
108
+ {% include '@oe-bcl/bcl-form-input/form-input.html.twig' with edit.image_upload_input only %}
109
+ <div class="d-md-inline-block">
110
+ {% include '@oe-bcl/bcl-button/button.html.twig' with edit.remove_image_button only %}
111
+ </div>
112
+ </div>
113
+ </div>
114
+ </div>
115
+ <div class="row">
116
+ <div class="col-12">
117
+ {% include '@oe-bcl/bcl-form/form.html.twig' with edit.profile_information only %}
118
+ </div>
119
+ </div>
120
+ </div>
121
+ <div class="tab-pane fade" id="privacy" role="tabpanel" aria-labelledby="privacy-tab">
122
+ <h1 class="my-4-5">Privacy settings</h1>
123
+ <p>Who can consult my data</p>
124
+ {% include '@oe-bcl/bcl-form/form.html.twig' with privacy.settings only %}
125
+ </div>
126
+ <div class="tab-pane fade" id="visibility" role="tabpanel" aria-labelledby="visibility-tab">
127
+ <h1 class="my-4-5">Visibility settings</h1>
128
+ <p class="mb-3">Select what information should be displayed to your profile.</p>
129
+ {% include '@oe-bcl/bcl-form/form.html.twig' with privacy.public_profile_content only %}
130
+ </div>
131
+ <div class="tab-pane fade" id="cancel" role="tabpanel" aria-labelledby="cancel-tab">
132
+ <h1 class="my-4-5">Are you sure you want to cancel your account?</h1>
133
+ <p class="mb-3">When cancelling your account</p>
134
+ {% include '@oe-bcl/bcl-form/form.html.twig' with cancel.form only %}
135
+ </div>
136
+ </div>
137
+ {% endblock %}