-
Notifications
You must be signed in to change notification settings - Fork 323
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* initial package_versions.eml * styling * move styles * padding on smaller screens * improved collapsing on smaller screens * unformat styles * include publication date with version, simplify template, render publication dates * fmt --------- Co-authored-by: Kate Bagenzo <[email protected]> Co-authored-by: kate-bagenzo <[email protected]>
- Loading branch information
1 parent
79bc800
commit ffbbb8b
Showing
13 changed files
with
116 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
let render | ||
(package : Package.package) | ||
= | ||
Layout.render | ||
~title:(Printf.sprintf "%s Versions" package.name) | ||
~description:"Package Versions" @@ | ||
let version = Package.specific_version package in | ||
<div class="bg-default dark:bg-dark-default py-8"> | ||
<div class="container-fluid flex items-center gap-2"> | ||
<a href="/p/<%s package.name %>" class="h-11 w-11 m-5 border-primary border-2 rounded-full flex items-center justify-center"><%s! Icons.arrow_left "h-6 w-6 text-primary"; %></a> | ||
<h1 class="text-2xl font-medium"><%s package.name %> Versions (<%i List.length package.versions %>) </h1> | ||
</div> | ||
<div class="container-fluid flex justify-center"> | ||
<table class="table-auto border-separate border-spacing-y-6"> | ||
<thead class="container-fluid text-md text-lighter text-left"> | ||
<tr class="py-4"> | ||
<th class="hidden sm:table-cell text-left font-normal border-b-2 border-gray-200 py-4 pl-3 md:pr-14"><%s! Icons.bars_3 "h-5 w-5"; %></th> | ||
<th class="text-left font-normal border-b-2 border-gray-200 px-5 md:pr-12">Version</th> | ||
<th class="text-left font-normal border-b-2 border-gray-200 md:pr-14">Release Date</th> | ||
<th class="text-left font-normal border-b-2 border-gray-200 px-5 md:pr-14">Links</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<% package.versions |> List.iter (fun (item: Package.version_with_publication_date) -> %> | ||
<tr class="tr-selected"> | ||
<td class="hidden sm:table-cell text-left font-normal py-5 px-4 <%s if version = item.version then "bg-primary-200 rounded-l" else "" %>"> | ||
<% if version = item.version then ( %><div class="bg-primary h-3 w-3 rounded-full"></div><% ) else ( %><div class="bg-gray-200 h-2 w-2 rounded-full ml-0.5"></div><% ); %> | ||
<div class="absolute h-[4.5rem] pl-1"> | ||
<% if List.nth package.versions (List.length package.versions -1) <> item then ( %> | ||
<div class="-ml-px w-1 border-solid border-r-2 border-gray-200 h-full"></div> | ||
<% ); %> | ||
</div> | ||
</td> | ||
<td class="text-left bg-primary-200"> | ||
<a href="/p/<%s package.name %>/<%s item.version %>" class="p-5 hover:no-underline hover:text-primary focus:text-primary focus:no-underline <%s if version = item.version then "font-bold focus:font-bold" else "" %> text-base md:mr-10"> | ||
<%s item.version %> | ||
</a> | ||
</td> | ||
<td class="pr-4 text-left text-sm bg-primary-200"> | ||
<%s Utils.human_date_of_timestamp item.publication %> | ||
</td> | ||
<td class="text-left text-sm bg-primary-200 rounded-r"> | ||
<a href="/p/<%s package.name %>/<%s item.version %>/doc/index.html" class="text-primary flex items-center p-2 font-medium sm:p-4"><%s! Icons.document "h-5 w-5"; %> Documentation</a> | ||
</td> | ||
</tr> | ||
<% ); %> | ||
</tbody> | ||
</table> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters