@using SharedLibraryCore.Configuration @using System.Text.RegularExpressions @model WebfrontCore.ViewModels.CommunityInfo @{ IEnumerable> allRules = new[] { new KeyValuePair<(string, long), string[]>((ViewBag.Localization["WEBFRONT_ABOUT_GLOBAL_RULES"], 0), Model.GlobalRules) }; var serverRules = Model.ServerRules?.Where(server => server.Value != null && server.Value.Any()).ToList(); if (serverRules?.Any() ?? false) { allRules = allRules.Union(serverRules); } }
@if (Model.CommunityInformation.EnableBanner) { @Model.CommunityInformation.Name } @if (!string.IsNullOrWhiteSpace(Model.CommunityInformation.Name)) {

}
@if (!string.IsNullOrWhiteSpace(Model.CommunityInformation.Description)) {
@ViewBag.Localization["WEBFRONT_ABOUT_TITLE"]
}
@if (allRules.Any(rule => rule.Value.Any())) {

@ViewBag.Localization["WEBFRONT_ABOUT_COMMUNITY_GUIDELINES"]

}
@foreach (var ((serverName, id), rules) in allRules) { if (!rules.Any()) { continue; } var start = 1;
@foreach (var rule in rules) {
@if (!rule.StartsWith("#") && !Regex.IsMatch(rule.StripColors(), @"^(Rule ?#?)?\d+(.|\))")) { @start. }
start++; }
}