<commit_before>﻿@model Forum.Models.ViewModels.Messages.DisplayMessage

<article class="gap-bottom" message="@Model.Id">
	<aside class="user-avatar align-center float-left mobile-hide">
		@if (string.IsNullOrEmpty(Model.PostedByAvatarPath)) {
			<img identicon-value="@Model.PostedById" style="width: 80%; height: 80%;" alt="Identicon" />
		}
		else {
			<img src="@Model.PostedByAvatarPath" />
		}
	</aside>

	@{
		var messageClasses = "message-contents content-box pad";

		if (Model.Poseys) {
			messageClasses += " poseys";
		}
	}

	<div class="message-container">
		<section class="@messageClasses">
			<span id="message@(Model.Id)"></span>

			@if (Model.ShowControls) {
				<aside class="float-right pad-bottom font-small">
					@if (Model.CanThought) {
						<span class="thought-button small-pad-left small-pad-right pointer" message-id="@Model.Id">
							<img class="align-middle" src="~/images/smiley.png" alt="Thought" title="Thought" />
                            <vc:smiley-selector />
						</span>
					}

					@if (Model.CanReply) {
						<a class="reply-button small-pad-left small-pad-right" asp-controller="@nameof(Messages)" asp-action="@nameof(Messages.Reply)" asp-route-id="@Model.Id" message-id="@Model.Id">
							<img class="align-middle" src="~/images/reply.png" alt="Reply" title="Reply" />
						</a>
					}

					@if (Model.CanEdit) {
						<a class="edit-button small-pad-left small-pad-right" asp-controller="@nameof(Messages)" asp-action="@nameof(Messages.Edit)" asp-route-id="@Model.Id" message-id="@Model.Id">
							<img class="align-middle" src="~/images/edit.png" alt="Edit" title="Edit" />
						</a>
					}

					@if (Model.CanDelete) {
						@if (Model.IsFirstMessage) {
							<a class="delete-button small-pad-left small-pad-right" asp-controller="@nameof(Messages)" asp-action="@nameof(Messages.Delete)" asp-route-id="@Model.Id" onclick="return confirm('HEY WAIT: Do you want to remove this ENTIRE topic?');">
								<img class="align-middle" src="~/images/delete.png" alt="Delete" title="Delete" />
							</a>
						}
						else {
							<a class="delete-button small-pad-left small-pad-right" asp-controller="@nameof(Messages)" asp-action="@nameof(Messages.Delete)" asp-route-id="@Model.Id" onclick="return confirm('HEY WAIT: Do you want to delete this message?');">
								<img class="align-middle" src="~/images/delete.png" alt="Delete" title="Delete" />
							</a>
						}
					}
				</aside>
			}

			<header class="message-header font-small">
				<aside class="user-avatar align-center float-left mobile-only">
					@if (string.IsNullOrEmpty(Model.PostedByAvatarPath)) {
						<img identicon-value="@Model.PostedById" width="80" height="80" alt="Identicon" />
					}
					else {
						<img src="@Model.PostedByAvatarPath" />
					}
				</aside>

				<a asp-controller="@nameof(Messages)" asp-action="@nameof(Messages.History)" asp-route-id="@Model.PostedById" class="small-pad-right">@Html.Raw(Model.PostedByName)</a>

				<span class="font-tiny dark-text">
					<span>posted <passed-time time="@Model.TimePosted" /></span>
					@if (Model.TimeEdited != Model.TimePosted) {
						<span>| edited <passed-time time="@Model.TimeEdited" /></span>
					}
				</span>
			</header>

			<br class="clear-left mobile-only" />

			@if (Model.ReplyId > 0) {
				<p class="pad-left font-small subdued-text"><a asp-action="@nameof(Topics.Display)" asp-route-id="@Model.TopicId" asp-route-page="1" asp-route-target="@Model.ReplyId">In reply to this post by @Html.Raw(Model.ReplyPostedBy):</a></p>
				<blockquote class="reply pointer">
					<div class="reply-preview font-small subdued-text" reply="@Model.ReplyId">@Html.Raw(Model.ReplyPreview)</div>
					<div class="reply-body hidden" reply="@Model.ReplyId">@Html.Raw(Model.ReplyBody)</div>
				</blockquote>
			}

			<div class="message-body">@Html.Raw(Model.Body)</div>

			<div class="hidden" id="edit-message-@Model.Id"></div>
			<div class="hidden" id="message-reply-@Model.Id"></div>
			<div class="hidden font-small pad-top" id="working-@Model.Id"><img src="~/images/loadingDots.gif" alt="Working" title="Working" /> Working...</div>

			<div class="float-right font-small subdued-text">
				@if (Model.CanQuote) {
					<a class="pad-right" asp-controller="@nameof(Quotes)" asp-action="@nameof(Quotes.Create)" asp-route-id="@Model.Id">
						QOTM
					</a>
				}

				<a asp-controller="@nameof(Topics)" asp-action="@nameof(Topics.Display)" asp-route-id="@Model.TopicId" asp-route-target="@Model.Id" asp-fragment="message@(Model.Id)">#@Model.Id</a>
			</div>

			<br class="clear-left" />
		</section>

		<section class="pad-left font-small subdued-text">
			<ol>
				@foreach (var messageThought in Model.Thoughts) {
					<li class="small-pad"><img src="@messageThought.Path" /> @Html.Raw(messageThought.Thought)</li>
				}
			</ol>
		</section>

		<section class="message-cards">@Html.Raw(Model.Cards)</section>
	</div>
</article><commit_msg>hide the thought button until JS loads<commit_after>﻿@model Forum.Models.ViewModels.Messages.DisplayMessage

<article class="gap-bottom" message="@Model.Id">
	<aside class="user-avatar align-center float-left mobile-hide">
		@if (string.IsNullOrEmpty(Model.PostedByAvatarPath)) {
			<img identicon-value="@Model.PostedById" style="width: 80%; height: 80%;" alt="Identicon" />
		}
		else {
			<img src="@Model.PostedByAvatarPath" />
		}
	</aside>

	@{
		var messageClasses = "message-contents content-box pad";

		if (Model.Poseys) {
			messageClasses += " poseys";
		}
	}

	<div class="message-container">
		<section class="@messageClasses">
			<span id="message@(Model.Id)"></span>

			@if (Model.ShowControls) {
				<aside class="float-right pad-bottom font-small">
					@if (Model.CanThought) {
						<span class="thought-button requires-javascript hidden small-pad-left small-pad-right pointer" message-id="@Model.Id">
							<img class="align-middle" src="~/images/smiley.png" alt="Thought" title="Thought" />
                            <vc:smiley-selector />
						</span>
					}

					@if (Model.CanReply) {
						<a class="reply-button small-pad-left small-pad-right" asp-controller="@nameof(Messages)" asp-action="@nameof(Messages.Reply)" asp-route-id="@Model.Id" message-id="@Model.Id">
							<img class="align-middle" src="~/images/reply.png" alt="Reply" title="Reply" />
						</a>
					}

					@if (Model.CanEdit) {
						<a class="edit-button small-pad-left small-pad-right" asp-controller="@nameof(Messages)" asp-action="@nameof(Messages.Edit)" asp-route-id="@Model.Id" message-id="@Model.Id">
							<img class="align-middle" src="~/images/edit.png" alt="Edit" title="Edit" />
						</a>
					}

					@if (Model.CanDelete) {
						@if (Model.IsFirstMessage) {
							<a class="delete-button small-pad-left small-pad-right" asp-controller="@nameof(Messages)" asp-action="@nameof(Messages.Delete)" asp-route-id="@Model.Id" onclick="return confirm('HEY WAIT: Do you want to remove this ENTIRE topic?');">
								<img class="align-middle" src="~/images/delete.png" alt="Delete" title="Delete" />
							</a>
						}
						else {
							<a class="delete-button small-pad-left small-pad-right" asp-controller="@nameof(Messages)" asp-action="@nameof(Messages.Delete)" asp-route-id="@Model.Id" onclick="return confirm('HEY WAIT: Do you want to delete this message?');">
								<img class="align-middle" src="~/images/delete.png" alt="Delete" title="Delete" />
							</a>
						}
					}
				</aside>
			}

			<header class="message-header font-small">
				<aside class="user-avatar align-center float-left mobile-only">
					@if (string.IsNullOrEmpty(Model.PostedByAvatarPath)) {
						<img identicon-value="@Model.PostedById" width="80" height="80" alt="Identicon" />
					}
					else {
						<img src="@Model.PostedByAvatarPath" />
					}
				</aside>

				<a asp-controller="@nameof(Messages)" asp-action="@nameof(Messages.History)" asp-route-id="@Model.PostedById" class="small-pad-right">@Html.Raw(Model.PostedByName)</a>

				<span class="font-tiny dark-text">
					<span>posted <passed-time time="@Model.TimePosted" /></span>
					@if (Model.TimeEdited != Model.TimePosted) {
						<span>| edited <passed-time time="@Model.TimeEdited" /></span>
					}
				</span>
			</header>

			<br class="clear-left mobile-only" />

			@if (Model.ReplyId > 0) {
				<p class="pad-left font-small subdued-text"><a asp-action="@nameof(Topics.Display)" asp-route-id="@Model.TopicId" asp-route-page="1" asp-route-target="@Model.ReplyId">In reply to this post by @Html.Raw(Model.ReplyPostedBy):</a></p>
				<blockquote class="reply pointer">
					<div class="reply-preview font-small subdued-text" reply="@Model.ReplyId">@Html.Raw(Model.ReplyPreview)</div>
					<div class="reply-body hidden" reply="@Model.ReplyId">@Html.Raw(Model.ReplyBody)</div>
				</blockquote>
			}

			<div class="message-body">@Html.Raw(Model.Body)</div>

			<div class="hidden" id="edit-message-@Model.Id"></div>
			<div class="hidden" id="message-reply-@Model.Id"></div>
			<div class="hidden font-small pad-top" id="working-@Model.Id"><img src="~/images/loadingDots.gif" alt="Working" title="Working" /> Working...</div>

			<div class="float-right font-small subdued-text">
				@if (Model.CanQuote) {
					<a class="pad-right" asp-controller="@nameof(Quotes)" asp-action="@nameof(Quotes.Create)" asp-route-id="@Model.Id">
						QOTM
					</a>
				}

				<a asp-controller="@nameof(Topics)" asp-action="@nameof(Topics.Display)" asp-route-id="@Model.TopicId" asp-route-target="@Model.Id" asp-fragment="message@(Model.Id)">#@Model.Id</a>
			</div>

			<br class="clear-left" />
		</section>

		<section class="pad-left font-small subdued-text">
			<ol>
				@foreach (var messageThought in Model.Thoughts) {
					<li class="small-pad"><img src="@messageThought.Path" /> @Html.Raw(messageThought.Thought)</li>
				}
			</ol>
		</section>

		<section class="message-cards">@Html.Raw(Model.Cards)</section>
	</div>
</article>
{'fraction_non_alphanumeric': 0.19358407079646017, 'fraction_numerical': 0.002011263073209976, 'mean_word_length': 3.7492836676217767, 'pattern_counts': {'":': 0, '<': 167, '<?xml version=': 0, '>': 169, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 6, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3095554', 'n_tokens_mistral': 4106, 'n_tokens_neox': 3301, 'n_words': 563}