<commit_before>﻿@model Message

<article class="gap-bottom">
	<aside class="user-avatar align-center float-left mobile-hide">
		@if (string.IsNullOrEmpty(Model.PostedByAvatarPath)) {
			<canvas width="100" height="100" data-jdenticon-value="@Model.PostedById"></canvas>
		}
		else {
			<img src="@Model.PostedByAvatarPath" />
		}
	</aside>

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

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

	<div class="message-container">
		<section class="@messageClasses">
			<span id="message@(Model.Id)"></span>
			<!-- TODO - if unread target = this, then <span id="latest"></span> -->

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

				@if (Model.CanReply) {
					<span class="reply-button pad-right pointer note">
						<img class="align-middle" src="~/images/reply.png" alt="Reply" title="Reply" />
					</span>
				}

				@if (Model.CanQuote) {
					<a class="pad-right note" asp-controller="@nameof(Quotes)" asp-action="@nameof(Quotes.Create)" asp-route-id="@Model.Id">
						<img class="align-middle" src="~/images/quote.png" alt="QOTM" title="QOTM" />
					</a>
				}

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

				@if (Model.CanDelete) {
					@if (Model.ParentId == 0) {
						<a class="pad-right note" asp-controller="@nameof(Messages)" asp-action="@nameof(Messages.Delete)" asp-route-id="@Model.Id" onclick="return confirm('Are you sure you want to remove this ENTIRE topic?');">
							<img class="align-middle" src="~/images/delete.png" alt="Delete" title="Delete" />
						</a>
					}
					else {
						<a class="pad-right note" asp-controller="@nameof(Messages)" asp-action="@nameof(Messages.Delete)" asp-route-id="@Model.Id" onclick="return confirm('Are you sure you want to remove this reply?');">
							<img class="align-middle" src="~/images/delete.png" alt="Delete" title="Delete" />
						</a>
					}
				}
			</aside>

			<header class="message-header note">
				<aside class="user-avatar align-center float-left mobile-show">
					@if (string.IsNullOrEmpty(Model.PostedByAvatarPath)) {
						<canvas width="100" height="100" data-jdenticon-value="@Model.PostedById"></canvas>
					}
					else {
						<img src="@Model.PostedByAvatarPath" />
					}
				</aside>

				@Model.PostedByName
				<time>
					posted @Model.TimePosted
					@if (Model.TimeEdited != Model.TimePosted) {
						<span>| edited @Model.TimeEdited</span>
					}
				</time>
			</header>

			<br class="clear mobile-show" />

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

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

			<div class="hidden reply-form pad gap-top">
				<p>Reply directly to this message:</p>
				<partial name="_MessageForm" for="@Model.ReplyForm" />
			</div>

			<div class="float-right note">
				<a asp-action="@nameof(Topics.Display)" asp-route-id="@Model.Id">#@Model.Id</a>
			</div>

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

		<section class="pad-left">
			<ol>
				@foreach (var messageThought in Model.Thoughts) {<commit_msg>Moved QOTM link. Fixed a bug in the sidebar links for QOTM.<commit_after>﻿@model Message

<article class="gap-bottom">
	<aside class="user-avatar align-center float-left mobile-hide">
		@if (string.IsNullOrEmpty(Model.PostedByAvatarPath)) {
			<canvas width="100" height="100" data-jdenticon-value="@Model.PostedById"></canvas>
		}
		else {
			<img src="@Model.PostedByAvatarPath" />
		}
	</aside>

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

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

	<div class="message-container">
		<section class="@messageClasses">
			<span id="message@(Model.Id)"></span>
			<!-- TODO - if unread target = this, then <span id="latest"></span> -->

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

				@if (Model.CanReply) {
					<span class="reply-button pad-right pointer note">
						<img class="align-middle" src="~/images/reply.png" alt="Reply" title="Reply" />
					</span>
				}

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

				@if (Model.CanDelete) {
					@if (Model.ParentId == 0) {
						<a class="pad-right note" asp-controller="@nameof(Messages)" asp-action="@nameof(Messages.Delete)" asp-route-id="@Model.Id" onclick="return confirm('Are you sure you want to remove this ENTIRE topic?');">
							<img class="align-middle" src="~/images/delete.png" alt="Delete" title="Delete" />
						</a>
					}
					else {
						<a class="pad-right note" asp-controller="@nameof(Messages)" asp-action="@nameof(Messages.Delete)" asp-route-id="@Model.Id" onclick="return confirm('Are you sure you want to remove this reply?');">
							<img class="align-middle" src="~/images/delete.png" alt="Delete" title="Delete" />
						</a>
					}
				}
			</aside>

			<header class="message-header note">
				<aside class="user-avatar align-center float-left mobile-show">
					@if (string.IsNullOrEmpty(Model.PostedByAvatarPath)) {
						<canvas width="100" height="100" data-jdenticon-value="@Model.PostedById"></canvas>
					}
					else {
						<img src="@Model.PostedByAvatarPath" />
					}
				</aside>

				@Model.PostedByName
				<time>
					posted @Model.TimePosted
					@if (Model.TimeEdited != Model.TimePosted) {
						<span>| edited @Model.TimeEdited</span>
					}
				</time>
			</header>

			<br class="clear mobile-show" />

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

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

			<div class="hidden reply-form pad gap-top">
				<p>Reply directly to this message:</p>
				<partial name="_MessageForm" for="@Model.ReplyForm" />
			</div>

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

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

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

		<section class="pad-left">
			<ol>
				@foreach (var messageThought in Model.Thoughts) {
{'fraction_non_alphanumeric': 0.18905605112501664, 'fraction_numerical': 0.003727865796831314, 'mean_word_length': 3.4821002386634845, 'pattern_counts': {'":': 0, '<': 142, '<?xml version=': 0, '>': 144, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, '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': '1353145', 'n_tokens_mistral': 3190, 'n_tokens_neox': 2512, 'n_words': 491}