Skip to content

Commit 494b951

Browse files
Merged in feature/BKL-65-StylingMyAnswersPage (pull request #53)
Feature/BKL-65 StylingMyAnswersPage
2 parents 5bb7043 + ea68c90 commit 494b951

File tree

6 files changed

+45
-26
lines changed

6 files changed

+45
-26
lines changed

web/profiles/custom/os2loop/modules/os2loop_subscriptions/templates/os2loop-subscriptions-user.html.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
{{ drupal_view('os2loop_subscriptions_node', 'block_1') }}
1010
</div>
1111

12-
<h2 class="h4 my-30">{{ 'Taxonomy term subscriptions'|t }}</h2>
12+
<h2 class="h4 mt-60 mb-30">{{ 'Taxonomy term subscriptions'|t }}</h2>
1313
<div class="os2loop-subscription-term">
1414
{{ drupal_view('os2loop_subscription_term', 'block_1') }}
1515
</div>

web/profiles/custom/os2loop/themes/os2loop_theme/assets/signifly-custom/custom-index.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,4 @@
5252

5353
@import "pages/user-questions.scss";
5454
@import "pages/user-subscriptions.scss";
55+
@import "pages/user-replies.scss";
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
.user-replies {
2+
.content-wrapper {
3+
@extend .block-primary-white, .p-30;
4+
5+
.views-rows-container {
6+
@extend .block-primary-gray, .p-30, .mt-30;
7+
}
8+
9+
.views-row {
10+
@extend .block-secondary-white, .py-20, .px-30;
11+
12+
+ .views-row {
13+
@extend .mt-20;
14+
}
15+
16+
// TODO: move this to bootstrap-custom
17+
.list-group-item {
18+
@extend .p-0;
19+
}
20+
}
21+
}
22+
}

web/profiles/custom/os2loop/themes/os2loop_theme/templates/content-entities/comment--list-display.html.twig

Lines changed: 15 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -67,34 +67,30 @@
6767
*/
6868
#}
6969

70-
{% set node_value = commented_entity.os2loop_question_content.value is defined ? commented_entity.os2loop_question_content.value : commented_entity.os2loop_post_content.value %}
70+
{% set comment_title = commented_entity.label %}
7171
{% set comment_value = elements['#comment'].os2loop_question_answer.value is defined ? elements['#comment'].os2loop_question_answer.value : elements['#comment'].os2loop_post_comment.value %}
72-
{% set node_value_truncated = node_value|length > 200 ? true : false %}
72+
{% set comment_title_truncated = comment_title|length > 90 ? true : false %}
7373
{% set comment_value_truncated = comment_value|length > 200 ? true : false %}
7474
<div class="list-group">
75-
<article class="list-group-item mb-2 bg-light border-top">
75+
<article class="list-group-item">
7676
<div class="small">
7777
<span>{{ 'Created'|t }}</span>: {{ created }}
7878
</div>
79-
<div>
80-
{% if node_value_truncated %}
81-
{{ node_value|truncate(200, true)|raw }}
82-
<span>...</span>
79+
<div class="h5 mt-10 mb-0">
80+
{% if comment_title_truncated %}
81+
{{ comment_title|truncate(90, true, '...')|raw }}
8382
{% else %}
84-
{{ node_value|raw }}
83+
{{ comment_title|raw }}
8584
{% endif %}
8685
</div>
87-
<div class="d-flex">
88-
<h3 class="h6">
89-
<a href="{{ path('entity.comment.canonical', {'comment': comment.id}) }}#comment-{{ comment.id }}">
90-
{% if comment_value_truncated %}
91-
{{ comment_value|truncate(200, true)|raw }}
92-
<span>...</span>
93-
{% else %}
94-
{{ comment_value|raw }}
95-
{% endif %}
96-
</a>
97-
</h3>
86+
<div class="d-flex mt-10 mb-0">
87+
<a href="{{ path('entity.comment.canonical', {'comment': comment.id}) }}#comment-{{ comment.id }}" class="link-unstyled">
88+
{% if comment_value_truncated %}
89+
{{ comment_value|truncate(200, true, '...')|raw }}
90+
{% else %}
91+
{{ comment_value|raw }}
92+
{% endif %}
93+
</a>
9894
</div>
9995
</article>
10096
</div>

web/profiles/custom/os2loop/themes/os2loop_theme/templates/views/views-view-field--os2loop-user-answers--comment-type.html.twig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424
{% set comment_type = row._entity.comment_type.target_id %}
2525

2626
{% if comment_type == 'os2loop_question_answer' %}
27-
{{ 'My answers on questions'|t }}
27+
{{ 'Answers to questions'|t }}
2828
{% else %}
29-
{{ 'My comments to posts'|t }}
29+
{{ 'Comments to posts'|t }}
3030
{% endif %}
3131

web/profiles/custom/os2loop/translations/translations.da.po

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28932,11 +28932,11 @@ msgid_plural "@count media items remaining."
2893228932
msgstr[0] "Maks. 1 fil kan vedhæftes"
2893328933
msgstr[1] "Maks. @count filer kan vedhæftes"
2893428934

28935-
msgid "My answers on questions"
28936-
msgstr "Mine svar på spørgsmål"
28935+
msgid "Answers to questions"
28936+
msgstr "Svar på spørgsmål"
2893728937

28938-
msgid "My comments to posts"
28939-
msgstr "Mine kommentarer på indlæg"
28938+
msgid "Comments to posts"
28939+
msgstr "Kommentarer på indlæg"
2894028940

2894128941
msgid "contact editorial office"
2894228942
msgstr "Kontakt redaktionen"

0 commit comments

Comments
 (0)