Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UHF-3511: Add user-edited-content class to wrap custom html #685

Merged
merged 1 commit into from
Jun 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dist/css/ckeditor.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/css/styles.min.css

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions src/scss/05_objects/__index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
@import 'hyphenate';
@import 'link';
@import 'quote';
@import 'user-edited-content';
3 changes: 3 additions & 0 deletions src/scss/05_objects/_user-edited-content.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.user-edited-content {
overflow-wrap: break-word;
}
2 changes: 1 addition & 1 deletion templates/component/remote-video.twig
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@
{% if video_title|render %}
<{{ video_title_level }} class="remote-video__video-title">{{ video_title }}</{{ video_title_level }}>
{% endif %}
<div class="remote-video__video-desc">{{ video_desc }}</div>
<div class="remote-video__video-desc user-edited-content">{{ video_desc }}</div>
{% endblock component_content %}
{% endembed %}
2 changes: 1 addition & 1 deletion templates/misc/component.twig
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ Example usage:
{% endif %}

{% if component_description|render %}
<div class="component__description">
<div class="component__description user-edited-content">
{{ component_description}}
</div>
{% endif %}
Expand Down
2 changes: 1 addition & 1 deletion templates/module/helfi_tpr/tpr-errand-service.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
'component--hardcoded',
'errand-service__accordion',
],
component_content_class: 'accordion',
component_content_class: ['accordion', 'user-edited-content'],
}
%}
{% block component_content %}
Expand Down
2 changes: 1 addition & 1 deletion templates/module/helfi_tpr/tpr-unit.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
{# End of Main image #}

{% if content.description|render and hide_description == false %}
<div class="long-desc">
<div class="long-desc user-edited-content">
{{ content.description }}
</div>
{% endif %}
Expand Down
2 changes: 1 addition & 1 deletion templates/paragraphs/paragraph--banner.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
<h2 class="banner__title">{{ content.field_banner_title }}</h2>
{% endif %}
{% if has_description %}
<div class="banner__desc">{{ content.field_banner_desc }}</div>
<div class="banner__desc user-edited-content">{{ content.field_banner_desc }}</div>
{% endif %}
</div>
{% if has_link %}
Expand Down
2 changes: 1 addition & 1 deletion templates/paragraphs/paragraph--hero.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
design == "with-image-bottom" or
design == "diagonal"
%}
<div class="hero__description">
<div class="hero__description user-edited-content">
{{ description }}
</div>
{% endif %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
<div class="liftup-with-image__content">
<h2 class="liftup-with-image__title">{{ content.field_liftup_with_image_title }}</h2>
{% if content.field_liftup_with_image_desc|render %}
<div class="liftup-with-image__desc">{{ content.field_liftup_with_image_desc }}</div>
<div class="liftup-with-image__desc user-edited-content">{{ content.field_liftup_with_image_desc }}</div>
{% endif %}
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion templates/paragraphs/paragraph--phasing-item.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
{{ content.field_title}}
</p>
{% if content.field_description|render %}
<div class="phasing__item-description">
<div class="phasing__item-description user-edited-content">
{{ content.field_description}}
</div>
{% endif %}
Expand Down
2 changes: 1 addition & 1 deletion templates/paragraphs/paragraph--sidebar-text.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
</h2>
{% endif %}
{% if content.field_sidebar_text_text|render %}
<div class="sidebar-text__text-content">
<div class="sidebar-text__text-content user-edited-content">
{{ content.field_sidebar_text_text }}
</div>
{% endif %}
Expand Down
5 changes: 4 additions & 1 deletion templates/paragraphs/paragraph--text.html.twig
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{% block paragraph %}
{% embed "@hdbt/misc/component.twig" with { component_classes: [ 'component--paragraph-text' ], } %}
{% embed "@hdbt/misc/component.twig" with {
component_classes: [ 'component--paragraph-text' ],
component_content_class: [ 'user-edited-content' ],
} %}
{% block component_content %}

{{ content }}
Expand Down