mirror of
https://github.com/daylinmorgan/nimpkgs.git
synced 2025-01-02 06:50:43 -06:00
feat: add scrollbars to package page
This commit is contained in:
parent
b8bdf521b3
commit
dccb441088
2 changed files with 39 additions and 15 deletions
|
@ -35,20 +35,21 @@ proc renderAlias(pkg: NimPackage): VNode = buildHtml:
|
||||||
a(href = "#/pkg/" & pkg.alias):
|
a(href = "#/pkg/" & pkg.alias):
|
||||||
text pkg.alias
|
text pkg.alias
|
||||||
|
|
||||||
proc renderLinks(pkg: NimPackage): VNode = buildHtml(tdiv):
|
proc renderLinks(pkg: NimPackage): VNode =
|
||||||
tdiv: text "links:"
|
buildHtml(tdiv(class = "overflow-auto")):
|
||||||
tdiv:
|
tdiv: text "links:"
|
||||||
pkg.projectUrl
|
tdiv:
|
||||||
if pkg.web != "" and pkg.web != pkg.url:
|
pkg.projectUrl
|
||||||
tdiv():
|
if pkg.web != "" and pkg.web != pkg.url:
|
||||||
a(href = pkg.web, class = "flex items-center space-x-2"):
|
tdiv():
|
||||||
tdiv(class = "i-mdi-web shrink-0")
|
a(href = pkg.web, class = "flex items-center space-x-2"):
|
||||||
span: text pkg.web.noProtocol
|
tdiv(class = "i-mdi-web shrink-0")
|
||||||
if pkg.doc != "":
|
span: text pkg.web.noProtocol
|
||||||
tdiv():
|
if pkg.doc != "":
|
||||||
a(href = pkg.doc, class = "flex items-center space-x-2"):
|
tdiv():
|
||||||
tdiv(class = "i-mdi-file-outline shrink-0")
|
a(href = pkg.doc, class = "flex items-center space-x-2"):
|
||||||
span: text pkg.doc.noProtocol
|
tdiv(class = "i-mdi-file-outline shrink-0")
|
||||||
|
span: text pkg.doc.noProtocol
|
||||||
|
|
||||||
proc getTimeSinceCommit(pkg: NimPackage): kstring =
|
proc getTimeSinceCommit(pkg: NimPackage): kstring =
|
||||||
if pkg.lastCommitTime == fromUnix(0): "unknown".jss
|
if pkg.lastCommitTime == fromUnix(0): "unknown".jss
|
||||||
|
@ -73,7 +74,7 @@ proc renderPkgInfo(pkg: NimPackage): VNode =
|
||||||
text pkg.getTimeSinceCommit
|
text pkg.getTimeSinceCommit
|
||||||
tdiv:
|
tdiv:
|
||||||
tdiv: text "usage:"
|
tdiv: text "usage:"
|
||||||
tdiv(class = "bg-ctp-surfacezero rounded my-2 mx-3 p-2 w-auto"):
|
tdiv(class = "bg-ctp-surfacezero rounded my-2 mx-3 p-2 w-auto overflow-auto"):
|
||||||
pre:
|
pre:
|
||||||
text "nimble install " & pkg.name
|
text "nimble install " & pkg.name
|
||||||
pre:
|
pre:
|
||||||
|
|
|
@ -43,6 +43,29 @@ export default defineConfig({
|
||||||
color: ${catppuccinColors.mauve};
|
color: ${catppuccinColors.mauve};
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* width */
|
||||||
|
::-webkit-scrollbar {
|
||||||
|
width: 10px;
|
||||||
|
}
|
||||||
|
/* Track */
|
||||||
|
::-webkit-scrollbar-track {
|
||||||
|
background: ${catppuccinColors.crust};
|
||||||
|
border-radius: 5px;
|
||||||
|
}
|
||||||
|
/* Handle */
|
||||||
|
::-webkit-scrollbar-thumb {
|
||||||
|
background: ${catppuccinColors.mantle};
|
||||||
|
border: 1px solid transparent;
|
||||||
|
border-color: ${catppuccinColors.rosewater};
|
||||||
|
border-radius: 5px;
|
||||||
|
}
|
||||||
|
/* Handle on hover */
|
||||||
|
::-webkit-scrollbar-thumb:hover {
|
||||||
|
background: ${catppuccinColors.roswater};
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* loading animation */
|
/* loading animation */
|
||||||
.lds-dual-ring {
|
.lds-dual-ring {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
|
Loading…
Reference in a new issue