Browse Source

Update Index.cshtml

pull/18863/head
Salih 2 years ago
parent
commit
893b038efc
  1. 3
      modules/docs/src/Volo.Docs.Web/Pages/Documents/Project/Index.cshtml

3
modules/docs/src/Volo.Docs.Web/Pages/Documents/Project/Index.cshtml

@ -337,12 +337,13 @@
var count = Model.DocumentPreferences.Parameters.Count;
var rowCount = count / maxCellCount + (count % maxCellCount > 0 ? 1 : 0);
var cellSize = 12 / (count > maxCellCount ? maxCellCount : count);
var latestCellSize = 12 / count - (rowCount - 1) * maxCellCount;
string BuildParameterDivClass(int index)
{
var row = index / maxCellCount;
var isLastRow = row == rowCount - 1;
var currentCellSize = isLastRow ? 12 / (count % maxCellCount) : cellSize;
var currentCellSize = isLastRow ? latestCellSize : cellSize;
return $"col-12 col-lg-{currentCellSize} mb-lg-{(isLastRow ? "0" : "2")} {(index == count - 1 ? "" : "mb-2")}";
}

Loading…
Cancel
Save