Skip to content

Commit d316027

Browse files
committed
Merge branch 'print-styles-for-comments'
2 parents 3bb9156 + 464e728 commit d316027

File tree

4 files changed

+14
-2
lines changed

4 files changed

+14
-2
lines changed

src/Buttercup.Web/Views/Recipes/Show.cshtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@
9494
{
9595
<partial name="_Comment" model="@commentViewModel" />
9696
}
97-
<form method="post" asp-action="AddComment" asp-route-id="@Model.Recipe.Id">
97+
<form class="new-comment-form" method="post" asp-action="AddComment" asp-route-id="@Model.Recipe.Id">
9898
<p class="new-comment-form__author">@User.Identity?.Name</p>
9999
<div class="new-comment-form__field form-field">
100100
<textarea class="form-field__input" asp-for="NewCommentAttributes.Body" aria-label="@Localizer["Label_Comment"]" placeholder="@Localizer["Placeholder_Comment"]" required></textarea>

src/Buttercup.Web/Views/Shared/_Comment.cshtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
}
1616
@if (Model.IncludeDeleteLink)
1717
{
18-
<a asp-controller="Comments" asp-action="Delete" asp-route-id="@Model.Id">@Localizer["Label_Delete"]</a>
18+
<a class="comment__action" asp-controller="Comments" asp-action="Delete" asp-route-id="@Model.Id">@Localizer["Label_Delete"]</a>
1919
}
2020
</header>
2121
@Html.FromMarkdown(Model.Body, MarkdownPipelines.Comments)

src/Buttercup.Web/styles/comment.less

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,9 @@
2424
a.comment__timestamp {
2525
color: @color-black;
2626
}
27+
28+
@media print {
29+
.comment__action {
30+
display: none;
31+
}
32+
}

src/Buttercup.Web/styles/new-comment-form.less

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
.new-comment-form {
2+
@media print {
3+
display: none;
4+
}
5+
}
6+
17
.new-comment-form__author {
28
margin-bottom: 0.7em;
39
font-weight: 500;

0 commit comments

Comments
 (0)