Git dashboard HTML / CSS refactoring
* Inline SVG icons * Page layout refactoring * Dark theme works * Minor improvements
|
@ -2,8 +2,10 @@
|
|||
module HBS2.Git.Web.Assets where
|
||||
|
||||
import Data.FileEmbed
|
||||
|
||||
import Data.ByteString
|
||||
import Data.Text (Text)
|
||||
import Text.InterpolatedString.Perl6 (qc)
|
||||
import Lucid.Base
|
||||
|
||||
version :: Int
|
||||
version = 3
|
||||
|
@ -11,4 +13,167 @@ version = 3
|
|||
assetsDir :: [(FilePath, ByteString)]
|
||||
assetsDir = $(embedDir "hbs2-git-dashboard-assets/assets")
|
||||
|
||||
data IconType
|
||||
= IconCopy
|
||||
| IconCopyDone
|
||||
| IconLockClosed
|
||||
| IconGitCommit
|
||||
| IconGitFork
|
||||
| IconGitBranch
|
||||
| IconTag
|
||||
| IconFolderFilled
|
||||
| IconHaskell
|
||||
| IconMarkdown
|
||||
| IconNix
|
||||
| IconBash
|
||||
| IconPython
|
||||
| IconJavaScript
|
||||
| IconSql
|
||||
| IconSettingsFilled
|
||||
| IconFileFilled
|
||||
| IconRefresh
|
||||
| IconArrowUturnLeft
|
||||
| IconLicense
|
||||
| IconPinned
|
||||
|
||||
svgIcon :: Monad m => IconType -> HtmlT m ()
|
||||
svgIcon = toHtmlRaw . svgIconText
|
||||
|
||||
svgIconText :: IconType -> Text
|
||||
|
||||
svgIconText IconCopy = [qc|<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-copy" width="24" height="24" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none"/>
|
||||
<path d="M7 7m0 2.667a2.667 2.667 0 0 1 2.667 -2.667h8.666a2.667 2.667 0 0 1 2.667 2.667v8.666a2.667 2.667 0 0 1 -2.667 2.667h-8.666a2.667 2.667 0 0 1 -2.667 -2.667z" />
|
||||
<path d="M4.012 16.737a2.005 2.005 0 0 1 -1.012 -1.737v-10c0 -1.1 .9 -2 2 -2h10c.75 0 1.158 .385 1.5 1" />
|
||||
</svg>|]
|
||||
|
||||
svgIconText IconCopyDone = [qc|<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-copy-check" width="24" height="24" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none"/>
|
||||
<path d="M7 7m0 2.667a2.667 2.667 0 0 1 2.667 -2.667h8.666a2.667 2.667 0 0 1 2.667 2.667v8.666a2.667 2.667 0 0 1 -2.667 2.667h-8.666a2.667 2.667 0 0 1 -2.667 -2.667z" />
|
||||
<path d="M4.012 16.737a2.005 2.005 0 0 1 -1.012 -1.737v-10c0 -1.1 .9 -2 2 -2h10c.75 0 1.158 .385 1.5 1" />
|
||||
<path d="M11 14l2 2l4 -4" />
|
||||
</svg>|]
|
||||
|
||||
svgIconText IconLockClosed = [qc|<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-lock" width="24" height="24" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none"/>
|
||||
<path d="M5 13a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v6a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-6z" />
|
||||
<path d="M11 16a1 1 0 1 0 2 0a1 1 0 0 0 -2 0" />
|
||||
<path d="M8 11v-4a4 4 0 1 1 8 0v4" />
|
||||
</svg>|]
|
||||
|
||||
svgIconText IconGitCommit = [qc|<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-git-commit" width="24" height="24" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none"/>
|
||||
<path d="M12 12m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0" />
|
||||
<path d="M12 3l0 6" />
|
||||
<path d="M12 15l0 6" />
|
||||
</svg>|]
|
||||
|
||||
svgIconText IconGitFork = [qc|<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-git-fork" width="24" height="24" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none"/>
|
||||
<path d="M12 18m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0" />
|
||||
<path d="M7 6m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0" />
|
||||
<path d="M17 6m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0" />
|
||||
<path d="M7 8v2a2 2 0 0 0 2 2h6a2 2 0 0 0 2 -2v-2" />
|
||||
<path d="M12 12l0 4" />
|
||||
</svg>|]
|
||||
|
||||
svgIconText IconGitBranch = [qc|<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-git-branch" width="24" height="24" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none"/>
|
||||
<path d="M7 18m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0" />
|
||||
<path d="M7 6m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0" />
|
||||
<path d="M17 6m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0" />
|
||||
<path d="M7 8l0 8" />
|
||||
<path d="M9 18h6a2 2 0 0 0 2 -2v-5" />
|
||||
<path d="M14 14l3 -3l3 3" />
|
||||
</svg>|]
|
||||
|
||||
svgIconText IconTag = [qc|<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-tag" width="24" height="24" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none"/>
|
||||
<path d="M7.5 7.5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" />
|
||||
<path d="M3 6v5.172a2 2 0 0 0 .586 1.414l7.71 7.71a2.41 2.41 0 0 0 3.408 0l5.592 -5.592a2.41 2.41 0 0 0 0 -3.408l-7.71 -7.71a2 2 0 0 0 -1.414 -.586h-5.172a3 3 0 0 0 -3 3z" />
|
||||
</svg>|]
|
||||
|
||||
svgIconText IconFolderFilled = [qc|<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-folder-filled" width="24" height="24" viewBox="0 0 24 24" stroke-width="1.5" stroke="#currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none"/>
|
||||
<path d="M9 3a1 1 0 0 1 .608 .206l.1 .087l2.706 2.707h6.586a3 3 0 0 1 2.995 2.824l.005 .176v8a3 3 0 0 1 -2.824 2.995l-.176 .005h-14a3 3 0 0 1 -2.995 -2.824l-.005 -.176v-11a3 3 0 0 1 2.824 -2.995l.176 -.005h4z" stroke-width="0" fill="currentColor" />
|
||||
</svg>|]
|
||||
|
||||
svgIconText IconHaskell = [qc|<svg role="img" width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
||||
<title>Haskell</title>
|
||||
<path d="M0 3.535L5.647 12 0 20.465h4.235L9.883 12 4.235 3.535zm5.647 0L11.294 12l-5.647 8.465h4.235l3.53-5.29 3.53 5.29h4.234L9.883 3.535zm8.941 4.938l1.883 2.822H24V8.473zm2.824 4.232l1.882 2.822H24v-2.822z"/>
|
||||
</svg>|]
|
||||
|
||||
svgIconText IconMarkdown = [qc|<svg role="img" width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
||||
<title>Markdown</title>
|
||||
<path d="M22.27 19.385H1.73A1.73 1.73 0 010 17.655V6.345a1.73 1.73 0 011.73-1.73h20.54A1.73 1.73 0 0124 6.345v11.308a1.73 1.73 0 01-1.73 1.731zM5.769 15.923v-4.5l2.308 2.885 2.307-2.885v4.5h2.308V8.078h-2.308l-2.307 2.885-2.308-2.885H3.46v7.847zM21.232 12h-2.309V8.077h-2.307V12h-2.308l3.461 4.039z"/>
|
||||
</svg>|]
|
||||
|
||||
svgIconText IconNix = [qc|<svg role="img" width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
||||
<title>Nix</title>
|
||||
<path d="M7.352 1.592l-1.364.002L5.32 2.75l1.557 2.713-3.137-.008-1.32 2.34H14.11l-1.353-2.332-3.192-.006-2.214-3.865zm6.175 0l-2.687.025 5.846 10.127 1.341-2.34-1.59-2.765 2.24-3.85-.683-1.182h-1.336l-1.57 2.705-1.56-2.72zm6.887 4.195l-5.846 10.125 2.696-.008 1.601-2.76 4.453.016.682-1.183-.666-1.157-3.13-.008L21.778 8.1l-1.365-2.313zM9.432 8.086l-2.696.008-1.601 2.76-4.453-.016L0 12.02l.666 1.157 3.13.008-1.575 2.71 1.365 2.315L9.432 8.086zM7.33 12.25l-.006.01-.002-.004-1.342 2.34 1.59 2.765-2.24 3.85.684 1.182H7.35l.004-.006h.001l1.567-2.698 1.558 2.72 2.688-.026-.004-.006h.01L7.33 12.25zm2.55 3.93l1.354 2.332 3.192.006 2.215 3.865 1.363-.002.668-1.156-1.557-2.713 3.137.008 1.32-2.34H9.881Z"/>
|
||||
</svg>|]
|
||||
|
||||
svgIconText IconBash = [qc|<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-terminal-2" width="24" height="24" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none"/>
|
||||
<path d="M8 9l3 3l-3 3" />
|
||||
<path d="M13 15l3 0" />
|
||||
<path d="M3 4m0 2a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2z" />
|
||||
</svg>|]
|
||||
|
||||
svgIconText IconPython = [qc|<svg role="img" width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
||||
<title>Python</title>
|
||||
<path d="M14.25.18l.9.2.73.26.59.3.45.32.34.34.25.34.16.33.1.3.04.26.02.2-.01.13V8.5l-.05.63-.13.55-.21.46-.26.38-.3.31-.33.25-.35.19-.35.14-.33.1-.3.07-.26.04-.21.02H8.77l-.69.05-.59.14-.5.22-.41.27-.33.32-.27.35-.2.36-.15.37-.1.35-.07.32-.04.27-.02.21v3.06H3.17l-.21-.03-.28-.07-.32-.12-.35-.18-.36-.26-.36-.36-.35-.46-.32-.59-.28-.73-.21-.88-.14-1.05-.05-1.23.06-1.22.16-1.04.24-.87.32-.71.36-.57.4-.44.42-.33.42-.24.4-.16.36-.1.32-.05.24-.01h.16l.06.01h8.16v-.83H6.18l-.01-2.75-.02-.37.05-.34.11-.31.17-.28.25-.26.31-.23.38-.2.44-.18.51-.15.58-.12.64-.1.71-.06.77-.04.84-.02 1.27.05zm-6.3 1.98l-.23.33-.08.41.08.41.23.34.33.22.41.09.41-.09.33-.22.23-.34.08-.41-.08-.41-.23-.33-.33-.22-.41-.09-.41.09zm13.09 3.95l.28.06.32.12.35.18.36.27.36.35.35.47.32.59.28.73.21.88.14 1.04.05 1.23-.06 1.23-.16 1.04-.24.86-.32.71-.36.57-.4.45-.42.33-.42.24-.4.16-.36.09-.32.05-.24.02-.16-.01h-8.22v.82h5.84l.01 2.76.02.36-.05.34-.11.31-.17.29-.25.25-.31.24-.38.2-.44.17-.51.15-.58.13-.64.09-.71.07-.77.04-.84.01-1.27-.04-1.07-.14-.9-.2-.73-.25-.59-.3-.45-.33-.34-.34-.25-.34-.16-.33-.1-.3-.04-.25-.02-.2.01-.13v-5.34l.05-.64.13-.54.21-.46.26-.38.3-.32.33-.24.35-.2.35-.14.33-.1.3-.06.26-.04.21-.02.13-.01h5.84l.69-.05.59-.14.5-.21.41-.28.33-.32.27-.35.2-.36.15-.36.1-.35.07-.32.04-.28.02-.21V6.07h2.09l.14.01zm-6.47 14.25l-.23.33-.08.41.08.41.23.33.33.23.41.08.41-.08.33-.23.23-.33.08-.41-.08-.41-.23-.33-.33-.23-.41-.08-.41.08z"/>
|
||||
</svg>|]
|
||||
|
||||
svgIconText IconJavaScript = [qc|<svg role="img" width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
||||
<title>JavaScript</title>
|
||||
<path d="M0 0h24v24H0V0zm22.034 18.276c-.175-1.095-.888-2.015-3.003-2.873-.736-.345-1.554-.585-1.797-1.14-.091-.33-.105-.51-.046-.705.15-.646.915-.84 1.515-.66.39.12.75.42.976.9 1.034-.676 1.034-.676 1.755-1.125-.27-.42-.404-.601-.586-.78-.63-.705-1.469-1.065-2.834-1.034l-.705.089c-.676.165-1.32.525-1.71 1.005-1.14 1.291-.811 3.541.569 4.471 1.365 1.02 3.361 1.244 3.616 2.205.24 1.17-.87 1.545-1.966 1.41-.811-.18-1.26-.586-1.755-1.336l-1.83 1.051c.21.48.45.689.81 1.109 1.74 1.756 6.09 1.666 6.871-1.004.029-.09.24-.705.074-1.65l.046.067zm-8.983-7.245h-2.248c0 1.938-.009 3.864-.009 5.805 0 1.232.063 2.363-.138 2.711-.33.689-1.18.601-1.566.48-.396-.196-.597-.466-.83-.855-.063-.105-.11-.196-.127-.196l-1.825 1.125c.305.63.75 1.172 1.324 1.517.855.51 2.004.675 3.207.405.783-.226 1.458-.691 1.811-1.411.51-.93.402-2.07.397-3.346.012-2.054 0-4.109 0-6.179l.004-.056z"/>
|
||||
</svg>|]
|
||||
|
||||
svgIconText IconSql = [qc|<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-file-type-sql" width="24" height="24" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none"/>
|
||||
<path d="M14 3v4a1 1 0 0 0 1 1h4" />
|
||||
<path d="M14 3v4a1 1 0 0 0 1 1h4" />
|
||||
<path d="M5 20.25c0 .414 .336 .75 .75 .75h1.25a1 1 0 0 0 1 -1v-1a1 1 0 0 0 -1 -1h-1a1 1 0 0 1 -1 -1v-1a1 1 0 0 1 1 -1h1.25a.75 .75 0 0 1 .75 .75" />
|
||||
<path d="M5 12v-7a2 2 0 0 1 2 -2h7l5 5v4" />
|
||||
<path d="M18 15v6h2" />
|
||||
<path d="M13 15a2 2 0 0 1 2 2v2a2 2 0 1 1 -4 0v-2a2 2 0 0 1 2 -2z" />
|
||||
<path d="M14 20l1.5 1.5" />
|
||||
</svg>|]
|
||||
|
||||
svgIconText IconSettingsFilled = [qc|<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-settings-filled" width="24" height="24" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none"/>
|
||||
<path d="M14.647 4.081a.724 .724 0 0 0 1.08 .448c2.439 -1.485 5.23 1.305 3.745 3.744a.724 .724 0 0 0 .447 1.08c2.775 .673 2.775 4.62 0 5.294a.724 .724 0 0 0 -.448 1.08c1.485 2.439 -1.305 5.23 -3.744 3.745a.724 .724 0 0 0 -1.08 .447c-.673 2.775 -4.62 2.775 -5.294 0a.724 .724 0 0 0 -1.08 -.448c-2.439 1.485 -5.23 -1.305 -3.745 -3.744a.724 .724 0 0 0 -.447 -1.08c-2.775 -.673 -2.775 -4.62 0 -5.294a.724 .724 0 0 0 .448 -1.08c-1.485 -2.439 1.305 -5.23 3.744 -3.745a.722 .722 0 0 0 1.08 -.447c.673 -2.775 4.62 -2.775 5.294 0zm-2.647 4.919a3 3 0 1 0 0 6a3 3 0 0 0 0 -6z" stroke-width="0" fill="currentColor" />
|
||||
</svg>|]
|
||||
|
||||
svgIconText IconFileFilled = [qc|<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-file-filled" width="24" height="24" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none"/>
|
||||
<path d="M12 2l.117 .007a1 1 0 0 1 .876 .876l.007 .117v4l.005 .15a2 2 0 0 0 1.838 1.844l.157 .006h4l.117 .007a1 1 0 0 1 .876 .876l.007 .117v9a3 3 0 0 1 -2.824 2.995l-.176 .005h-10a3 3 0 0 1 -2.995 -2.824l-.005 -.176v-14a3 3 0 0 1 2.824 -2.995l.176 -.005h5z" stroke-width="0" fill="currentColor" />
|
||||
<path d="M19 7h-4l-.001 -4.001z" stroke-width="0" fill="currentColor" />
|
||||
</svg>|]
|
||||
|
||||
svgIconText IconRefresh = [qc|<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-refresh" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none"/>
|
||||
<path d="M20 11a8.1 8.1 0 0 0 -15.5 -2m-.5 -4v4h4" />
|
||||
<path d="M4 13a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4" />
|
||||
</svg>|]
|
||||
|
||||
svgIconText IconArrowUturnLeft = [qc|<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-arrow-uturn-left" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none"/>
|
||||
<path d="M9 14l-4 -4l4 -4" />
|
||||
<path d="M5 10h11a4 4 0 1 1 0 8h-1" />
|
||||
</svg>|]
|
||||
|
||||
svgIconText IconLicense = [qc|<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-license" width="24" height="24" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none"/>
|
||||
<path d="M15 21h-9a3 3 0 0 1 -3 -3v-1h10v2a2 2 0 0 0 4 0v-14a2 2 0 1 1 2 2h-2m2 -4h-11a3 3 0 0 0 -3 3v11" />
|
||||
<path d="M9 7l4 0" />
|
||||
<path d="M9 11l4 0" />
|
||||
</svg>|]
|
||||
|
||||
svgIconText IconPinned = [qc|<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-pinned" width="24" height="24" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none"/>
|
||||
<path d="M9 4v6l-2 4v2h10v-2l-2 -4v-6" />
|
||||
<path d="M12 16l0 5" />
|
||||
<path d="M8 4l8 0" />
|
||||
</svg>|]
|
||||
|
|
|
@ -1,337 +1,146 @@
|
|||
input, button {
|
||||
font-size: var(--form-element-font-size);
|
||||
height: 2.5rem;
|
||||
padding: 0.25rem 0.5rem;
|
||||
border-radius: 0.25rem;
|
||||
border: 1px solid #ccc;
|
||||
/* fastpok CSS start */
|
||||
|
||||
:root {
|
||||
--pico-form-element-spacing-vertical: .5rem;
|
||||
--pico-form-element-spacing-horizontal: .625rem;
|
||||
}
|
||||
|
||||
input[type="search"] {
|
||||
font-size: var(--form-element-font-size);
|
||||
height: 2.5rem;
|
||||
padding: 0.25rem 0.5rem;
|
||||
border-radius: 0.25rem;
|
||||
border: 1px solid #ccc;
|
||||
[type=search] {
|
||||
--pico-border-radius: inherit;
|
||||
}
|
||||
|
||||
button.search {
|
||||
background: url('/icon/refresh.svg') no-repeat center center;
|
||||
background-size: 24px 24px;
|
||||
min-width: 32px;
|
||||
height: 2.5rem;
|
||||
[role=search] {
|
||||
--pico-border-radius: inherit;
|
||||
}
|
||||
|
||||
button.search svg {
|
||||
[role=search]>:first-child {
|
||||
border-top-left-radius: var(--pico-border-radius);
|
||||
border-bottom-left-radius: var(--pico-border-radius);
|
||||
}
|
||||
|
||||
body, html {
|
||||
margin: 0;
|
||||
height: 100%;
|
||||
font-size: 18px;
|
||||
[role=search]>:last-child {
|
||||
border-top-right-radius: var(--pico-border-radius);
|
||||
border-bottom-right-radius: var(--pico-border-radius);
|
||||
}
|
||||
|
||||
body>footer, body>header, body>main {
|
||||
padding-block: 0;
|
||||
}
|
||||
|
||||
header {
|
||||
width: 100%;
|
||||
|
||||
font-size: 20px;
|
||||
header>nav {
|
||||
border-bottom: var(--pico-border-width) solid var(--pico-muted-border-color);
|
||||
}
|
||||
|
||||
.wrapper {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
padding: 8px;
|
||||
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 100;
|
||||
box-shadow: 0 2px 5px rgba(0,0,0,0.2);
|
||||
}
|
||||
|
||||
/* height: 64px; */
|
||||
|
||||
header h1 {
|
||||
font-size: 20px;
|
||||
margin: 0 0 0 2.21rem;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.header-title {
|
||||
}
|
||||
|
||||
.container {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.header-links {
|
||||
.sidebar {
|
||||
width: 20rem;
|
||||
flex-shrink: 0;
|
||||
padding-top: var(--pico-block-spacing-vertical);
|
||||
padding-right: var(--pico-block-spacing-horizontal);
|
||||
padding-bottom: var(--pico-block-spacing-vertical);
|
||||
border-right: var(--pico-border-width) solid var(--pico-muted-border-color);
|
||||
display: flex;
|
||||
margin-left: 10em;
|
||||
gap: 2rem;
|
||||
background: white;
|
||||
}
|
||||
|
||||
header a {
|
||||
/* display: inline; */
|
||||
height: 1rem;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.header-actions {
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
nav.left {
|
||||
flex: 0 0 20rem;
|
||||
padding: 4rem 0rem 0 1rem;
|
||||
font-size: 20px;
|
||||
flex-direction: column;
|
||||
justify-content: normal;
|
||||
background: #FAFAFA;
|
||||
}
|
||||
|
||||
nav.left .info-block {
|
||||
margin-bottom: 1.5rem;
|
||||
padding-left: 0.85rem;
|
||||
padding-right: 0.85rem;
|
||||
.content {
|
||||
padding-top: var(--pico-block-spacing-vertical);
|
||||
padding-bottom: var(--pico-block-spacing-vertical);
|
||||
padding-left: var(--pico-block-spacing-horizontal);
|
||||
}
|
||||
|
||||
section#repo-data {
|
||||
margin-top: 1.5rem;
|
||||
article {
|
||||
border: var(--pico-border-width) solid var(--pico-card-border-color);
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
section#repo-data> h1::after,
|
||||
section#repo-data> h2::after,
|
||||
section#repo-data> h3::after,
|
||||
section#repo-data> h4::after
|
||||
{
|
||||
content: "";
|
||||
display: block;
|
||||
margin: 8px 0;
|
||||
height: 1px;
|
||||
background-color: #ccc;
|
||||
}
|
||||
|
||||
/* height: calc(100vh - 64px); */
|
||||
|
||||
section {
|
||||
margin-top: 1rem;
|
||||
}
|
||||
|
||||
|
||||
main {
|
||||
flex-grow: 1;
|
||||
padding: 2rem 0 0 4rem;
|
||||
}
|
||||
|
||||
|
||||
.main {
|
||||
display: flex;
|
||||
padding: 4px 0 0 0;
|
||||
margin: 0;
|
||||
min-height: 100vh;
|
||||
}
|
||||
|
||||
main h1 {
|
||||
font-size: 1.5rem;
|
||||
}
|
||||
|
||||
main h2 {
|
||||
font-size: 1.45rem;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
div .repo-list-item {
|
||||
.repo-list-item {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: flex-start;
|
||||
|
||||
|
||||
background: #FAFAFA;
|
||||
padding: 0.75rem;
|
||||
margin-top: 1.75rem;
|
||||
border-radius: 0.25rem;
|
||||
border: 1px solid #BFC7D9;
|
||||
gap: var(--pico-block-spacing-horizontal);
|
||||
}
|
||||
|
||||
.channel-list-item {
|
||||
display: block;
|
||||
|
||||
background: #FAFAFA;
|
||||
padding: 1.45rem;
|
||||
margin-top: 2rem;
|
||||
border-radius: 0.25rem;
|
||||
border: 1px solid #BFC7D9;
|
||||
|
||||
}
|
||||
|
||||
.repo-info, .repo-info-misc {
|
||||
flex: 1;
|
||||
padding: 1.25rem;
|
||||
}
|
||||
|
||||
.repo-info h2 a {
|
||||
text-decoration: none;
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
.repo-info h2 {
|
||||
font-size: 1.35rem;
|
||||
}
|
||||
|
||||
.repo-info h2 a:hover {
|
||||
text-decoration: underline dotted;
|
||||
}
|
||||
|
||||
|
||||
.repo-info-misc {
|
||||
text-align: right;
|
||||
font-size: 0.85rem;
|
||||
}
|
||||
|
||||
|
||||
.attr {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
gap: 1rem;
|
||||
margin-bottom: 0.5em;
|
||||
padding-right: 1rem;
|
||||
font-size: 0.85rem;
|
||||
}
|
||||
|
||||
.attrname, {
|
||||
flex: 1;
|
||||
margin-right: 0.5rem;
|
||||
}
|
||||
|
||||
div.attrname a img {
|
||||
margin-right: 0.15rem;
|
||||
display: inline;
|
||||
}
|
||||
|
||||
.attrval {
|
||||
text-align: right;
|
||||
flex-basis: 8rem;
|
||||
}
|
||||
|
||||
.onleft {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.icon {
|
||||
flex-basis: 90%;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.info-block .attrname {
|
||||
font-size: 0.85rem;
|
||||
font-weight: bolder;
|
||||
}
|
||||
|
||||
.info-block .attrval {
|
||||
font-size: 0.85rem;
|
||||
}
|
||||
|
||||
.info-block a {
|
||||
font-size: inherit;
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.info-block a:hover {
|
||||
text-decoration: underline dotted 2px black;
|
||||
color: black;
|
||||
}
|
||||
|
||||
|
||||
form.search {
|
||||
.repo-list-item-link-wrapper {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
align-items: flex-start;
|
||||
gap: 0.5em;
|
||||
margin-bottom: var(--pico-typography-spacing-vertical);
|
||||
}
|
||||
|
||||
form.search input[type="search"] {
|
||||
align: center;
|
||||
flex-grow: 1;
|
||||
margin-right: 0.5em;
|
||||
.copy-button {
|
||||
margin-left: calc(var(--pico-spacing) * .5);
|
||||
background-color: transparent;
|
||||
border: none;
|
||||
padding: 0;
|
||||
border-radius: 0;
|
||||
box-shadow: none;
|
||||
color: var(--pico-secondary);
|
||||
transition: color var(--pico-transition);
|
||||
}
|
||||
|
||||
form.search button {
|
||||
align: center;
|
||||
min-width: 4rem;
|
||||
.copy-button:hover {
|
||||
color: var(--pico-secondary-hover);
|
||||
}
|
||||
|
||||
.xclip::after {
|
||||
.copy-button .icon {
|
||||
width: 1.125rem;
|
||||
height: 1.125rem;
|
||||
}
|
||||
|
||||
.inline-icon-wrapper {
|
||||
display: inline-block;
|
||||
content: url('/icon/xclip.svg');
|
||||
}
|
||||
|
||||
.inline-icon-wrapper .icon {
|
||||
margin-right: calc(var(--pico-spacing) * .25);
|
||||
vertical-align: middle;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
opacity: 0;
|
||||
transition: opacity 0.2s;
|
||||
left: 16px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.xclip:hover::after {
|
||||
left: 16px;
|
||||
position: relative;
|
||||
content: url('/icon/xclip.svg');
|
||||
vertical-align: middle;
|
||||
height: 24x;
|
||||
width: 24x;
|
||||
opacity: 1;
|
||||
.info-block {
|
||||
margin-bottom: var(--pico-block-spacing-vertical);
|
||||
}
|
||||
|
||||
.xclip {
|
||||
/*position: relative;*/
|
||||
text-decoration: underline dotted;
|
||||
.mb-0 {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.xclip:hover {
|
||||
text-decoration: underline dotted;
|
||||
.py-0 {
|
||||
padding-top: 0;
|
||||
padding-bottom: 0;
|
||||
}
|
||||
|
||||
.clicked:hover::after {
|
||||
content: url('/icon/xclipdone.svg');
|
||||
vertical-align: middle;
|
||||
right: 16px;
|
||||
height: 24x;
|
||||
width: 24x;
|
||||
opacity: 1;
|
||||
.text-nowrap {
|
||||
text-wrap: nowrap;
|
||||
}
|
||||
|
||||
nav[role="tab-control"] {
|
||||
min-height: 24px;
|
||||
font-size: 18px;
|
||||
/* border: 1px solid black; */
|
||||
display: block;
|
||||
margin-bottom: 4rem;
|
||||
.repo-menu {
|
||||
--pico-nav-breadcrumb-divider: '|';
|
||||
}
|
||||
|
||||
nav[role="tab-control"] li {
|
||||
display: block;
|
||||
padding: 0 0 0 0;
|
||||
padding-right: 2rem;
|
||||
margin-right: 2rem;
|
||||
border-right: 2px solid gray;
|
||||
font-weight: bolder;
|
||||
.repo-menu li.active {
|
||||
color: var(--pico-primary);
|
||||
}
|
||||
|
||||
nav[role="tab-control"] li a {
|
||||
color: inherit;
|
||||
aside li {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
aside ul {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
aside li :where(a,[role=link]):not(:hover) {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
nav[role="tab-control"] li.active {
|
||||
display: block;
|
||||
color: #0089D1;
|
||||
.sidebar-title {
|
||||
margin-bottom: calc(var(--pico-typography-spacing-vertical) * .25);
|
||||
}
|
||||
|
||||
/* fastpok CSS end */
|
||||
|
||||
nav.secondary[role="tab-control"] li {
|
||||
border-right: none;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
ul.misc-menu {
|
||||
margin: 0 0 0 0;
|
||||
|
@ -423,8 +232,6 @@ pre.numberSource code > span > a:first-child::before
|
|||
color: #aaaaaa;
|
||||
}
|
||||
pre.numberSource { margin-left: 3em; border-left: 1px solid #aaaaaa; padding-left: 4px; }
|
||||
div.sourceCode
|
||||
{ background-color: #f8f8f8; }
|
||||
@media screen {
|
||||
pre > code.sourceCode > span > a:first-child::before { text-decoration: underline; }
|
||||
}
|
||||
|
|
|
@ -1,8 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg"
|
||||
class="icon icon-tabler icon-tabler-file-filled"
|
||||
width="20" height="20"
|
||||
viewBox="0 0 24 24" stroke-width="1.5" stroke="#000000" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none"/>
|
||||
<path d="M12 2l.117 .007a1 1 0 0 1 .876 .876l.007 .117v4l.005 .15a2 2 0 0 0 1.838 1.844l.157 .006h4l.117 .007a1 1 0 0 1 .876 .876l.007 .117v9a3 3 0 0 1 -2.824 2.995l-.176 .005h-10a3 3 0 0 1 -2.995 -2.824l-.005 -.176v-14a3 3 0 0 1 2.824 -2.995l.176 -.005h5z" stroke-width="0" fill="currentColor" />
|
||||
<path d="M19 7h-4l-.001 -4.001z" stroke-width="0" fill="currentColor" />
|
||||
</svg>
|
Before Width: | Height: | Size: 679 B |
|
@ -1,16 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg"
|
||||
class="icon icon-tabler icon-tabler-file-alert"
|
||||
width="24"
|
||||
height="24"
|
||||
viewBox="0 0 24 24"
|
||||
stroke-width="1"
|
||||
stroke="#2c3e50"
|
||||
fill="none"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round">
|
||||
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none"/>
|
||||
<path d="M14 3v4a1 1 0 0 0 1 1h4" />
|
||||
<path d="M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z" />
|
||||
<!-- <path d="M12 11l0 3" /> -->
|
||||
</svg>
|
Before Width: | Height: | Size: 465 B |
|
@ -1,8 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg"
|
||||
class="icon icon-tabler icon-tabler-settings-filled"
|
||||
width="20" height="20"
|
||||
viewBox="0 0 24 24" stroke-width="1.5" stroke="#000000" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none"/>
|
||||
<path d="M14.647 4.081a.724 .724 0 0 0 1.08 .448c2.439 -1.485 5.23 1.305 3.745 3.744a.724 .724 0 0 0 .447 1.08c2.775 .673 2.775 4.62 0 5.294a.724 .724 0 0 0 -.448 1.08c1.485 2.439 -1.305 5.23 -3.744 3.745a.724 .724 0 0 0 -1.08 .447c-.673 2.775 -4.62 2.775 -5.294 0a.724 .724 0 0 0 -1.08 -.448c-2.439 1.485 -5.23 -1.305 -3.745 -3.744a.724 .724 0 0 0 -.447 -1.08c-2.775 -.673 -2.775 -4.62 0 -5.294a.724 .724 0 0 0 .448 -1.08c-1.485 -2.439 1.305 -5.23 3.744 -3.745a.722 .722 0 0 0 1.08 -.447c.673 -2.775 4.62 -2.775 5.294 0zm-2.647 4.919a3 3 0 1 0 0 6a3 3 0 0 0 0 -6z" stroke-width="0" fill="currentColor" />
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 908 B |
|
@ -1,9 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-git-branch" width="20" height="20" viewBox="0 0 24 24" stroke-width="1.5" stroke="#000000" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none"/>
|
||||
<path d="M7 18m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0" />
|
||||
<path d="M7 6m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0" />
|
||||
<path d="M17 6m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0" />
|
||||
<path d="M7 8l0 8" />
|
||||
<path d="M9 18h6a2 2 0 0 0 2 -2v-5" />
|
||||
<path d="M14 14l3 -3l3 3" />
|
||||
</svg>
|
Before Width: | Height: | Size: 548 B |
|
@ -1,6 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-git-commit" width="20" height="20" viewBox="0 0 24 24" stroke-width="1.5" stroke="#000000" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none"/>
|
||||
<path d="M12 12m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0" />
|
||||
<path d="M12 3l0 6" />
|
||||
<path d="M12 15l0 6" />
|
||||
</svg>
|
Before Width: | Height: | Size: 395 B |
|
@ -1,8 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-git-fork" width="20" height="20" viewBox="0 0 24 24" stroke-width="1.5" stroke="#000000" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none"/>
|
||||
<path d="M12 18m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0" />
|
||||
<path d="M7 6m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0" />
|
||||
<path d="M17 6m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0" />
|
||||
<path d="M7 8v2a2 2 0 0 0 2 2h6a2 2 0 0 0 2 -2v-2" />
|
||||
<path d="M12 12l0 4" />
|
||||
</svg>
|
Before Width: | Height: | Size: 533 B |
|
@ -1,5 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-tag" width="20" height="20" viewBox="0 0 24 24" stroke-width="1.5" stroke="#000000" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none"/>
|
||||
<path d="M7.5 7.5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" />
|
||||
<path d="M3 6v5.172a2 2 0 0 0 .586 1.414l7.71 7.71a2.41 2.41 0 0 0 3.408 0l5.592 -5.592a2.41 2.41 0 0 0 0 -3.408l-7.71 -7.71a2 2 0 0 0 -1.414 -.586h-5.172a3 3 0 0 0 -3 3z" />
|
||||
</svg>
|
Before Width: | Height: | Size: 516 B |
|
@ -1,3 +0,0 @@
|
|||
<svg role="img" withd="20" height="20" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
||||
<title>Haskell</title>
|
||||
<path d="M0 3.535L5.647 12 0 20.465h4.235L9.883 12 4.235 3.535zm5.647 0L11.294 12l-5.647 8.465h4.235l3.53-5.29 3.53 5.29h4.234L9.883 3.535zm8.941 4.938l1.883 2.822H24V8.473zm2.824 4.232l1.882 2.822H24v-2.822z"/></svg>
|
Before Width: | Height: | Size: 336 B |
|
@ -1,8 +0,0 @@
|
|||
<svg role="img"
|
||||
viewBox="0 0 24 24"
|
||||
width="20"
|
||||
height="20"
|
||||
xmlns="http://www.w3.org/2000/svg">
|
||||
<title>JavaScript</title>
|
||||
<path d="M0 0h24v24H0V0zm22.034 18.276c-.175-1.095-.888-2.015-3.003-2.873-.736-.345-1.554-.585-1.797-1.14-.091-.33-.105-.51-.046-.705.15-.646.915-.84 1.515-.66.39.12.75.42.976.9 1.034-.676 1.034-.676 1.755-1.125-.27-.42-.404-.601-.586-.78-.63-.705-1.469-1.065-2.834-1.034l-.705.089c-.676.165-1.32.525-1.71 1.005-1.14 1.291-.811 3.541.569 4.471 1.365 1.02 3.361 1.244 3.616 2.205.24 1.17-.87 1.545-1.966 1.41-.811-.18-1.26-.586-1.755-1.336l-1.83 1.051c.21.48.45.689.81 1.109 1.74 1.756 6.09 1.666 6.871-1.004.029-.09.24-.705.074-1.65l.046.067zm-8.983-7.245h-2.248c0 1.938-.009 3.864-.009 5.805 0 1.232.063 2.363-.138 2.711-.33.689-1.18.601-1.566.48-.396-.196-.597-.466-.83-.855-.063-.105-.11-.196-.127-.196l-1.825 1.125c.305.63.75 1.172 1.324 1.517.855.51 2.004.675 3.207.405.783-.226 1.458-.691 1.811-1.411.51-.93.402-2.07.397-3.346.012-2.054 0-4.109 0-6.179l.004-.056z"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 1021 B |
|
@ -1,6 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-license" width="20" height="20" viewBox="0 0 24 24" stroke-width="1.5" stroke="#000000" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none"/>
|
||||
<path d="M15 21h-9a3 3 0 0 1 -3 -3v-1h10v2a2 2 0 0 0 4 0v-14a2 2 0 1 1 2 2h-2m2 -4h-11a3 3 0 0 0 -3 3v11" />
|
||||
<path d="M9 7l4 0" />
|
||||
<path d="M9 11l4 0" />
|
||||
</svg>
|
Before Width: | Height: | Size: 445 B |
|
@ -1,7 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-lock" width="24" height="24" viewBox="0 0 24 24" stroke-width="1.5" stroke="#2c3e50" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none"/>
|
||||
<path d="M5 13a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v6a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-6z" />
|
||||
<path d="M11 16a1 1 0 1 0 2 0a1 1 0 0 0 -2 0" />
|
||||
<path d="M8 11v-4a4 4 0 1 1 8 0v4" />
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 468 B |
Before Width: | Height: | Size: 29 KiB |
Before Width: | Height: | Size: 28 KiB |
|
@ -1,7 +0,0 @@
|
|||
<svg role="img"
|
||||
viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"
|
||||
height="20"
|
||||
withd="20"
|
||||
>
|
||||
<title>Markdown</title>
|
||||
<path d="M22.27 19.385H1.73A1.73 1.73 0 010 17.655V6.345a1.73 1.73 0 011.73-1.73h20.54A1.73 1.73 0 0124 6.345v11.308a1.73 1.73 0 01-1.73 1.731zM5.769 15.923v-4.5l2.308 2.885 2.307-2.885v4.5h2.308V8.078h-2.308l-2.307 2.885-2.308-2.885H3.46v7.847zM21.232 12h-2.309V8.077h-2.307V12h-2.308l3.461 4.039z"/></svg>
|
Before Width: | Height: | Size: 448 B |
|
@ -1,8 +0,0 @@
|
|||
<svg
|
||||
role="img"
|
||||
viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"
|
||||
height="20"
|
||||
width="20"
|
||||
>
|
||||
<title>NixOS</title>
|
||||
<path d="M7.352 1.592l-1.364.002L5.32 2.75l1.557 2.713-3.137-.008-1.32 2.34H14.11l-1.353-2.332-3.192-.006-2.214-3.865zm6.175 0l-2.687.025 5.846 10.127 1.341-2.34-1.59-2.765 2.24-3.85-.683-1.182h-1.336l-1.57 2.705-1.56-2.72zm6.887 4.195l-5.846 10.125 2.696-.008 1.601-2.76 4.453.016.682-1.183-.666-1.157-3.13-.008L21.778 8.1l-1.365-2.313zM9.432 8.086l-2.696.008-1.601 2.76-4.453-.016L0 12.02l.666 1.157 3.13.008-1.575 2.71 1.365 2.315L9.432 8.086zM7.33 12.25l-.006.01-.002-.004-1.342 2.34 1.59 2.765-2.24 3.85.684 1.182H7.35l.004-.006h.001l1.567-2.698 1.558 2.72 2.688-.026-.004-.006h.01L7.33 12.25zm2.55 3.93l1.354 2.332 3.192.006 2.215 3.865 1.363-.002.668-1.156-1.557-2.713 3.137.008 1.32-2.34H9.881Z"/></svg>
|
Before Width: | Height: | Size: 843 B |
|
@ -1,6 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-pinned" width="20" height="20" viewBox="0 0 24 24" stroke-width="1.5" stroke="#000000" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none"/>
|
||||
<path d="M9 4v6l-2 4v2h10v-2l-2 -4v-6" />
|
||||
<path d="M12 16l0 5" />
|
||||
<path d="M8 4l8 0" />
|
||||
</svg>
|
Before Width: | Height: | Size: 378 B |
|
@ -1,4 +0,0 @@
|
|||
<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"
|
||||
width="20" height="20">
|
||||
<title>Python</title>
|
||||
<path d="M14.25.18l.9.2.73.26.59.3.45.32.34.34.25.34.16.33.1.3.04.26.02.2-.01.13V8.5l-.05.63-.13.55-.21.46-.26.38-.3.31-.33.25-.35.19-.35.14-.33.1-.3.07-.26.04-.21.02H8.77l-.69.05-.59.14-.5.22-.41.27-.33.32-.27.35-.2.36-.15.37-.1.35-.07.32-.04.27-.02.21v3.06H3.17l-.21-.03-.28-.07-.32-.12-.35-.18-.36-.26-.36-.36-.35-.46-.32-.59-.28-.73-.21-.88-.14-1.05-.05-1.23.06-1.22.16-1.04.24-.87.32-.71.36-.57.4-.44.42-.33.42-.24.4-.16.36-.1.32-.05.24-.01h.16l.06.01h8.16v-.83H6.18l-.01-2.75-.02-.37.05-.34.11-.31.17-.28.25-.26.31-.23.38-.2.44-.18.51-.15.58-.12.64-.1.71-.06.77-.04.84-.02 1.27.05zm-6.3 1.98l-.23.33-.08.41.08.41.23.34.33.22.41.09.41-.09.33-.22.23-.34.08-.41-.08-.41-.23-.33-.33-.22-.41-.09-.41.09zm13.09 3.95l.28.06.32.12.35.18.36.27.36.35.35.47.32.59.28.73.21.88.14 1.04.05 1.23-.06 1.23-.16 1.04-.24.86-.32.71-.36.57-.4.45-.42.33-.42.24-.4.16-.36.09-.32.05-.24.02-.16-.01h-8.22v.82h5.84l.01 2.76.02.36-.05.34-.11.31-.17.29-.25.25-.31.24-.38.2-.44.17-.51.15-.58.13-.64.09-.71.07-.77.04-.84.01-1.27-.04-1.07-.14-.9-.2-.73-.25-.59-.3-.45-.33-.34-.34-.25-.34-.16-.33-.1-.3-.04-.25-.02-.2.01-.13v-5.34l.05-.64.13-.54.21-.46.26-.38.3-.32.33-.24.35-.2.35-.14.33-.1.3-.06.26-.04.21-.02.13-.01h5.84l.69-.05.59-.14.5-.21.41-.28.33-.32.27-.35.2-.36.15-.36.1-.35.07-.32.04-.28.02-.21V6.07h2.09l.14.01zm-6.47 14.25l-.23.33-.08.41.08.41.23.33.33.23.41.08.41-.08.33-.23.23-.33.08-.41-.08-.41-.23-.33-.33-.23-.41-.08-.41.08z"/></svg>
|
Before Width: | Height: | Size: 1.5 KiB |
|
@ -1,13 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg"
|
||||
width="24"
|
||||
height="24"
|
||||
viewBox="0 0 24 24"
|
||||
stroke-width="2"
|
||||
stroke="currentColor"
|
||||
fill="none"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round">
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none"/>
|
||||
<path d="M20 11a8.1 8.1 0 0 0 -15.5 -2m-.5 -4v4h4" />
|
||||
<path d="M4 13a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4" />
|
||||
</svg>
|
Before Width: | Height: | Size: 384 B |
|
@ -1,10 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-file-type-sql" width="20" height="20" viewBox="0 0 24 24" stroke-width="1.5" stroke="#000000" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none"/>
|
||||
<path d="M14 3v4a1 1 0 0 0 1 1h4" />
|
||||
<path d="M14 3v4a1 1 0 0 0 1 1h4" />
|
||||
<path d="M5 20.25c0 .414 .336 .75 .75 .75h1.25a1 1 0 0 0 1 -1v-1a1 1 0 0 0 -1 -1h-1a1 1 0 0 1 -1 -1v-1a1 1 0 0 1 1 -1h1.25a.75 .75 0 0 1 .75 .75" />
|
||||
<path d="M5 12v-7a2 2 0 0 1 2 -2h7l5 5v4" />
|
||||
<path d="M18 15v6h2" />
|
||||
<path d="M13 15a2 2 0 0 1 2 2v2a2 2 0 1 1 -4 0v-2a2 2 0 0 1 2 -2z" />
|
||||
<path d="M14 20l1.5 1.5" />
|
||||
</svg>
|
Before Width: | Height: | Size: 695 B |
|
@ -1,9 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg"
|
||||
class="icon icon-tabler icon-tabler-terminal-2"
|
||||
width="20" height="20" viewBox="0 0 24 24"
|
||||
stroke-width="1.5" stroke="#000000" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none"/>
|
||||
<path d="M8 9l3 3l-3 3" />
|
||||
<path d="M13 15l3 0" />
|
||||
<path d="M3 4m0 2a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2z" />
|
||||
</svg>
|
Before Width: | Height: | Size: 444 B |
|
@ -1,15 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg"
|
||||
class="icon icon-tabler icon-tabler-arrow-back-up"
|
||||
width="20"
|
||||
height="20"
|
||||
viewBox="0 0 24 24"
|
||||
stroke-width="2"
|
||||
stroke="#000000"
|
||||
fill="none"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round">
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none"/>
|
||||
<path d="M9 14l-4 -4l4 -4" />
|
||||
<path d="M5 10h11a4 4 0 1 1 0 8h-1" />
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 399 B |
|
@ -1,5 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-folder-filled" width="24" height="24" viewBox="0 0 24 24" stroke-width="1.5" stroke="#00abfb" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none"/>
|
||||
<path d="M9 3a1 1 0 0 1 .608 .206l.1 .087l2.706 2.707h6.586a3 3 0 0 1 2.995 2.824l.005 .176v8a3 3 0 0 1 -2.824 2.995l-.176 .005h-14a3 3 0 0 1 -2.995 -2.824l-.005 -.176v-11a3 3 0 0 1 2.824 -2.995l.176 -.005h4z"
|
||||
stroke-width="0" fill="#00abfb" />
|
||||
</svg>
|
Before Width: | Height: | Size: 546 B |
|
@ -1,6 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-copy" width="24" height="24" viewBox="0 0 24 24" stroke-width="1.5" stroke="#2c3e50" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none"/>
|
||||
<path d="M7 7m0 2.667a2.667 2.667 0 0 1 2.667 -2.667h8.666a2.667 2.667 0 0 1 2.667 2.667v8.666a2.667 2.667 0 0 1 -2.667 2.667h-8.666a2.667 2.667 0 0 1 -2.667 -2.667z" />
|
||||
<path d="M4.012 16.737a2.005 2.005 0 0 1 -1.012 -1.737v-10c0 -1.1 .9 -2 2 -2h10c.75 0 1.158 .385 1.5 1" />
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 564 B |
|
@ -1,6 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-copy-check" width="24" height="24" viewBox="0 0 24 24" stroke-width="1.5" stroke="#2c3e50" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none"/>
|
||||
<path d="M7 7m0 2.667a2.667 2.667 0 0 1 2.667 -2.667h8.666a2.667 2.667 0 0 1 2.667 2.667v8.666a2.667 2.667 0 0 1 -2.667 2.667h-8.666a2.667 2.667 0 0 1 -2.667 -2.667z" />
|
||||
<path d="M4.012 16.737a2.005 2.005 0 0 1 -1.012 -1.737v-10c0 -1.1 .9 -2 2 -2h10c.75 0 1.158 .385 1.5 1" />
|
||||
<path d="M11 14l2 2l4 -4" />
|
||||
</svg>
|
Before Width: | Height: | Size: 600 B |
|
@ -1,7 +0,0 @@
|
|||
<svg role="img"
|
||||
viewBox="0 0 24 24"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
height="20"
|
||||
withd="20" >
|
||||
<title>YAML</title>
|
||||
<path d="m0 .97 4.111 6.453v4.09h2.638v-4.09L11.053.969H8.214L5.58 5.125 2.965.969Zm12.093.024-4.47 10.544h2.114l.97-2.345h4.775l.804 2.345h2.26L14.255.994Zm1.133 2.225 1.463 3.87h-3.096zm3.06 9.475v10.29H24v-2.199h-5.454v-8.091zm-12.175.002v10.335h2.217v-7.129l2.32 4.792h1.746l2.4-4.96v7.295h2.127V12.696h-2.904L9.44 17.37l-2.455-4.674Z"/></svg>
|
Before Width: | Height: | Size: 484 B |
|
@ -13,6 +13,7 @@ import HBS2.OrDie
|
|||
|
||||
import HBS2.Git.Data.Tx.Git
|
||||
import HBS2.Git.Data.RepoHead
|
||||
import HBS2.Git.Web.Assets
|
||||
|
||||
-- import Data.Text.Fuzzy.Tokenize as Fuzz
|
||||
|
||||
|
@ -265,10 +266,18 @@ myCss = do
|
|||
hyper_ :: Text -> Attribute
|
||||
hyper_ = makeAttribute "_"
|
||||
|
||||
ariaLabel_ :: Text -> Attribute
|
||||
ariaLabel_ = makeAttribute "aria-label"
|
||||
|
||||
onClickCopy :: Text -> Attribute
|
||||
onClickCopy s =
|
||||
hyper_ [qc|on click writeText('{s}') into the navigator's clipboard add .clicked to me wait 2s remove .clicked from me|]
|
||||
hyper_ [qc|on click writeText('{s}') into the navigator's clipboard
|
||||
set my innerHTML to '{svgIconText IconCopyDone}'
|
||||
set @data-tooltip to 'Copied!'
|
||||
wait 2s
|
||||
set my innerHTML to '{svgIconText IconCopy}'
|
||||
set @data-tooltip to 'Copy'
|
||||
|]
|
||||
|
||||
markdownToHtml :: Text -> Either PandocError String
|
||||
markdownToHtml markdown = runPure $ do
|
||||
|
@ -318,10 +327,10 @@ rootPage content = do
|
|||
myCss
|
||||
|
||||
body_ do
|
||||
header_ do
|
||||
div_ [class_ "header-title"] $ h1_ [] $ do
|
||||
a_ [href_ (toURL RepoListPage)] "hbs2-peer dashboard"
|
||||
|
||||
header_ [class_ "container-fluid"] do
|
||||
nav_ do
|
||||
ul_ $ li_ $ a_ [href_ (toURL RepoListPage)] $ strong_ "hbs2-peer dashboard"
|
||||
|
||||
content
|
||||
|
||||
|
@ -333,80 +342,73 @@ dashboardRootPage = rootPage do
|
|||
|
||||
now <- liftIO getPOSIXTime <&> fromIntegral . round
|
||||
|
||||
div_ [class_ "container main"] $ do
|
||||
nav_ [class_ "left"] $ do
|
||||
div_ [class_ "info-block"] "Всякая разная рандомная информация хрен знает, что тут пока выводить"
|
||||
div_ [class_ "info-block"] "Всякая разная рандомная информация хрен знает, что тут пока выводить"
|
||||
main_ [class_ "container-fluid"] $ do
|
||||
div_ [class_ "wrapper"] $ do
|
||||
aside_ [class_ "sidebar"] $ do
|
||||
div_ [class_ "info-block"] $ small_ "Всякая разная рандомная информация хрен знает, что тут пока выводить"
|
||||
div_ [class_ "info-block"] $ small_ "Всякая разная рандомная информация хрен знает, что тут пока выводить"
|
||||
|
||||
main_ do
|
||||
div_ [class_ "content"] do
|
||||
|
||||
section_ do
|
||||
h2_ "Git repositories"
|
||||
form_ [role_ "search"] do
|
||||
input_ [name_ "search", type_ "search"]
|
||||
input_ [type_ "submit", value_ "Search"]
|
||||
|
||||
section_ do
|
||||
|
||||
section_ do
|
||||
h1_ "Git repositories"
|
||||
form_ [class_ "search"] do
|
||||
input_ [type_ "search", id_ "search"]
|
||||
button_ [class_ "search"] mempty
|
||||
for_ items $ \it@RepoListItem{..} -> do
|
||||
|
||||
let locked = isJust $ coerce @_ @(Maybe HashRef) rlRepoGK0
|
||||
|
||||
section_ [id_ "repo-search-results"] do
|
||||
let url = toURL (RepoPage (CommitsTab Nothing) (coerce @_ @(LWWRefKey 'HBS2Basic) rlRepoLww))
|
||||
-- path ["repo", Text.unpack $ view rlRepoLwwAsText it]
|
||||
let t = fromIntegral $ coerce @_ @Word64 rlRepoSeq
|
||||
|
||||
for_ items $ \it@RepoListItem{..} -> do
|
||||
let updated = agePure t now
|
||||
|
||||
let locked = isJust $ coerce @_ @(Maybe HashRef) rlRepoGK0
|
||||
article_ [class_ "repo-list-item"] do
|
||||
div_ do
|
||||
|
||||
let url = toURL (RepoPage (CommitsTab Nothing) (coerce @_ @(LWWRefKey 'HBS2Basic) rlRepoLww))
|
||||
-- path ["repo", Text.unpack $ view rlRepoLwwAsText it]
|
||||
let t = fromIntegral $ coerce @_ @Word64 rlRepoSeq
|
||||
h5_ do
|
||||
toHtml rlRepoName
|
||||
|
||||
let updated = agePure t now
|
||||
div_ [class_ "repo-list-item-link-wrapper"] $ do
|
||||
a_ [href_ url] (toHtml $ view rlRepoLwwAsText it)
|
||||
button_ [class_ "copy-button", onClickCopy (view rlRepoLwwAsText it), data_ "tooltip" "Copy"] do
|
||||
svgIcon IconCopy
|
||||
|
||||
div_ [class_ "repo-list-item"] do
|
||||
div_ [class_ "repo-info", style_ "flex: 1; flex-basis: 70%;"] do
|
||||
toHtml rlRepoBrief
|
||||
|
||||
h2_ [class_ "xclip", onClickCopy (view rlRepoLwwAsText it)] do
|
||||
toHtml rlRepoName
|
||||
-- when locked $ img_ [src_ "/icon/lock-closed.svg"]
|
||||
div_ do
|
||||
|
||||
p_ $ a_ [href_ url] (toHtml $ view rlRepoLwwAsText it)
|
||||
div_ [class_ "text-nowrap"] do
|
||||
small_ $ "Updated " <> toHtml updated
|
||||
|
||||
toHtml rlRepoBrief
|
||||
when locked do
|
||||
div_ do
|
||||
small_ do
|
||||
span_ [class_ "inline-icon-wrapper"] $ svgIcon IconLockClosed
|
||||
"Encrypted"
|
||||
|
||||
div_ [ ] do
|
||||
div_ do
|
||||
small_ do
|
||||
span_ [class_ "inline-icon-wrapper"] $ svgIcon IconGitCommit
|
||||
strong_ $ toHtml $ show rlRepoCommits
|
||||
" commits"
|
||||
|
||||
div_ [ class_ "attr" ] do
|
||||
div_ [ class_ "attrname"] ""
|
||||
div_ [ class_ "attrval"] (toHtml updated)
|
||||
|
||||
when locked do
|
||||
div_ [ class_ "attr" ] do
|
||||
div_ [ class_ "attrname"] "encrypted"
|
||||
div_ [ class_ "attrval"] do
|
||||
img_ [src_ "/icon/lock-closed.svg"]
|
||||
|
||||
div_ [ class_ "attr" ] do
|
||||
div_ [ class_ "attrname"] "commits"
|
||||
div_ [ class_ "attrval"] $ toHtml (show rlRepoCommits)
|
||||
|
||||
div_ [ class_ "attr" ] do
|
||||
div_ [ class_ "attrname"] "forks"
|
||||
div_ [ class_ "attrval"] $ toHtml (show rlRepoForks)
|
||||
div_ do
|
||||
small_ do
|
||||
span_ [class_ "inline-icon-wrapper"] $ svgIcon IconGitFork
|
||||
strong_ $ toHtml $ show rlRepoForks
|
||||
" forks"
|
||||
|
||||
|
||||
|
||||
tabClick :: Attribute
|
||||
tabClick =
|
||||
hyper_ "on click take .active from .tab for event's target"
|
||||
|
||||
-- repoMenu :: Monad m => HtmlT m () -> HtmlT m ()
|
||||
repoMenu :: Term [Attribute] (t1 -> t2) => t1 -> t2
|
||||
repoMenu = ul_ []
|
||||
|
||||
|
||||
repoMenuItem0 :: Term [Attribute] (t1 -> t2) => [Attribute] -> t1 -> t2
|
||||
repoMenuItem0 misc name = li_ ([class_ "tab active"] <> misc <> [tabClick]) name
|
||||
|
||||
repoMenuItem :: Term [Attribute] (t1 -> t2) => [Attribute] -> t1 -> t2
|
||||
repoMenuItem misc name = li_ ([class_ "tab"] <> misc <> [tabClick]) name
|
||||
|
||||
hyper_ "on click take .contrast from .tab for event's target"
|
||||
|
||||
parsedManifest :: (DashBoardPerks m, MonadReader DashBoardEnv m) => RepoListItem -> m ([Syntax C], Text)
|
||||
parsedManifest RepoListItem{..} = do
|
||||
|
@ -459,9 +461,9 @@ repoRefs lww = do
|
|||
td_ do
|
||||
|
||||
if | Text.isPrefixOf "refs/heads" r_ -> do
|
||||
img_ [src_ "/icon/git-branch.svg"]
|
||||
svgIcon IconGitBranch
|
||||
| Text.isPrefixOf "refs/tags" r_ -> do
|
||||
img_ [src_ "/icon/git-tag.svg"]
|
||||
svgIcon IconTag
|
||||
| otherwise -> mempty
|
||||
|
||||
td_ (toHtml r_)
|
||||
|
@ -564,7 +566,7 @@ repoTree_ embed lww co root = do
|
|||
|
||||
for_ back' $ \r -> do
|
||||
let rootLink = toURL (RepoTree lww co (coerce @_ @GitHash r))
|
||||
td_ $ img_ [src_ "/icon/tree-up.svg"]
|
||||
td_ $ svgIcon IconArrowUturnLeft
|
||||
td_ ".."
|
||||
td_ do a_ [ href_ "#"
|
||||
, hxGet_ rootLink
|
||||
|
@ -578,25 +580,25 @@ repoTree_ embed lww co root = do
|
|||
tr_ mempty do
|
||||
td_ $ case tp of
|
||||
Commit -> mempty
|
||||
Tree -> img_ [src_ "/icon/tree.svg"]
|
||||
Tree -> svgIcon IconFolderFilled
|
||||
Blob -> do
|
||||
let syn = Sky.syntaxesByFilename syntaxMap (Text.unpack name)
|
||||
& headMay
|
||||
<&> Text.toLower . Sky.sName
|
||||
|
||||
let icon = case syn of
|
||||
Just "haskell" -> [src_ "/icon/haskell.svg"]
|
||||
Just "markdown" -> [src_ "/icon/markdown.svg"]
|
||||
Just "nix" -> [src_ "/icon/nixos.svg"]
|
||||
Just "bash" -> [src_ "/icon/terminal.svg"]
|
||||
Just "python" -> [src_ "/icon/python.svg"]
|
||||
Just "javascript" -> [src_ "/icon/javascript.svg"]
|
||||
Just "sql" -> [src_ "/icon/sql.svg"]
|
||||
Just "haskell" -> IconHaskell
|
||||
Just "markdown" -> IconMarkdown
|
||||
Just "nix" -> IconNix
|
||||
Just "bash" -> IconBash
|
||||
Just "python" -> IconPython
|
||||
Just "javascript" -> IconJavaScript
|
||||
Just "sql" -> IconSql
|
||||
Just s | s `elem` ["cabal","makefile","toml","ini","yaml"]
|
||||
-> [src_ "/icon/gear.svg"]
|
||||
_ -> [src_ "/icon/blob-filled.svg"]
|
||||
-> IconSettingsFilled
|
||||
_ -> IconFileFilled
|
||||
|
||||
img_ ([alt_ (fromMaybe "blob" syn)] <> icon)
|
||||
svgIcon icon
|
||||
|
||||
-- debug $ red "PUSH URL" <+> pretty (path ["back", wtf])
|
||||
|
||||
|
@ -719,7 +721,7 @@ repoForks lww = do
|
|||
for_ forks $ \it@RepoListItem{..} -> do
|
||||
let lwwTo = coerce @_ @(LWWRefKey 'HBS2Basic) rlRepoLww
|
||||
tr_ [class_ "commit-brief-title"] do
|
||||
td_ $ img_ [src_ "/icon/git-fork.svg"]
|
||||
td_ $ svgIcon IconGitFork
|
||||
td_ [class_ "mono"] $
|
||||
a_ [ href_ (toURL (RepoPage (CommitsTab Nothing) lwwTo))
|
||||
] do
|
||||
|
@ -754,7 +756,7 @@ repoCommits lww predicate' = do
|
|||
for_ co $ \case
|
||||
CommitListItemBrief{..} -> do
|
||||
tr_ [class_ "commit-brief-title"] do
|
||||
td_ [class_ "commit-icon"] $ img_ [src_ "/icon/git-commit.svg"]
|
||||
td_ [class_ "commit-icon"] $ svgIcon IconGitCommit
|
||||
|
||||
td_ [class_ "commit-hash mono"] do
|
||||
let hash = coerce @_ @GitHash commitListHash
|
||||
|
@ -937,137 +939,137 @@ repoPage tab lww params = rootPage do
|
|||
|
||||
debug $ red "META" <+> pretty meta
|
||||
|
||||
div_ [class_ "container main"] $ do
|
||||
nav_ [class_ "left"] $ do
|
||||
main_ [class_ "container-fluid"] do
|
||||
div_ [class_ "wrapper"] do
|
||||
aside_ [class_ "sidebar"] do
|
||||
|
||||
div_ [class_ "info-block" ] do
|
||||
div_ [ class_ "attr" ] do
|
||||
a_ [href_ (toURL (RepoPage (CommitsTab Nothing) lww))] $ toHtml (ShortRef lww)
|
||||
div_ [class_ "info-block" ] do
|
||||
toHtml (ShortRef lww)
|
||||
|
||||
div_ [class_ "info-block" ] do
|
||||
div_ [ class_ "attr" ] do
|
||||
img_ [src_ "/icon/tree-up.svg"]
|
||||
a_ [ href_ "/"] "back to projects"
|
||||
-- div_ [class_ "info-block" ] do
|
||||
-- a_ [ href_ "/"] do
|
||||
-- span_ [class_ "inline-icon-wrapper"] $ svgIcon IconArrowUturnLeft
|
||||
-- "back to projects"
|
||||
|
||||
div_ [class_ "info-block" ] do
|
||||
for_ author $ \a -> do
|
||||
div_ [ class_ "attr" ] do
|
||||
div_ [ class_ "attrname"] "author:"
|
||||
div_ [ class_ "attrval"] $ toHtml a
|
||||
div_ [class_ "info-block" ] do
|
||||
|
||||
for_ public $ \p -> do
|
||||
div_ [ class_ "attr" ] do
|
||||
div_ [ class_ "attrname"] "public:"
|
||||
div_ [ class_ "attrval"] $ toHtml p
|
||||
summary_ [class_ "sidebar-title"] $ small_ $ strong_ "About"
|
||||
ul_ [class_ "mb-0"] do
|
||||
for_ author $ \a -> do
|
||||
li_ $ small_ do
|
||||
"Author: "
|
||||
toHtml a
|
||||
|
||||
div_ [class_ "info-block" ] do
|
||||
for_ public $ \p -> do
|
||||
li_ $ small_ do
|
||||
"Public: "
|
||||
toHtml p
|
||||
|
||||
when (Text.length manifest > 100) do
|
||||
div_ [ class_ "attr" ] do
|
||||
div_ [ class_ "attrname"] do
|
||||
a_ [ href_ (toURL (RepoPage ManifestTab lww))] do
|
||||
img_ [src_ "/icon/license.svg"]
|
||||
when (Text.length manifest > 100) do
|
||||
li_ $ small_ do
|
||||
a_ [class_ "secondary", href_ (toURL (RepoPage ManifestTab lww))] do
|
||||
span_ [class_ "inline-icon-wrapper"] $ svgIcon IconLicense
|
||||
"Manifest"
|
||||
|
||||
when (rlRepoForks > 0) do
|
||||
div_ [ class_ "attr" ] do
|
||||
div_ [ class_ "attrname"] do
|
||||
a_ [ hxGet_ (toURL (RepoForksHtmx lww))
|
||||
, hxTarget_ "#repo-tab-data"
|
||||
] do
|
||||
img_ [src_ "/icon/git-fork.svg"]
|
||||
"Forks"
|
||||
when (rlRepoForks > 0) do
|
||||
li_ $ small_ do
|
||||
a_ [class_ "secondary"
|
||||
, href_ "#"
|
||||
, hxGet_ (toURL (RepoForksHtmx lww))
|
||||
, hxTarget_ "#repo-tab-data"
|
||||
] do
|
||||
span_ [class_ "inline-icon-wrapper"] $ svgIcon IconGitFork
|
||||
toHtml $ show rlRepoForks
|
||||
" forks"
|
||||
|
||||
div_ [ class_ "attrval"] $ toHtml (show $ rlRepoForks)
|
||||
li_ $ small_ do
|
||||
a_ [class_ "secondary"
|
||||
, href_ (toURL (RepoPage (CommitsTab Nothing) lww))
|
||||
] do
|
||||
span_ [class_ "inline-icon-wrapper"] $ svgIcon IconGitCommit
|
||||
toHtml $ show rlRepoCommits
|
||||
" commits"
|
||||
|
||||
div_ [ class_ "attr" ] do
|
||||
div_ [ class_ "attrname"] do
|
||||
a_ [ href_ (toURL (RepoPage (CommitsTab Nothing) lww))] do
|
||||
img_ [src_ "/icon/git-commit.svg"]
|
||||
"Commits"
|
||||
|
||||
div_ [ class_ "attrval"] $ toHtml (show $ rlRepoCommits)
|
||||
|
||||
for_ pinned $ \(_,ref) -> do
|
||||
div_ [ class_ "attr" ] do
|
||||
for_ pinned $ \(_,ref) -> do
|
||||
case ref of
|
||||
PinnedRefBlob s n hash -> do
|
||||
div_ [ class_ "attrname"] $ do
|
||||
a_ [ href_ "#"
|
||||
, hxGet_ (toURL (RepoSomeBlob lww s hash))
|
||||
, hxTarget_ "#repo-tab-data"
|
||||
] do
|
||||
img_ [src_ "/icon/pinned-light.svg"]
|
||||
toHtml (Text.take 12 n)
|
||||
|
||||
div_ [ class_ "attrval"] $ toHtml $ ShortRef hash
|
||||
|
||||
for_ mbHead $ \rh -> do
|
||||
|
||||
let theHead = headMay [ v | (GitRef "HEAD", v) <- view repoHeadRefs rh ]
|
||||
|
||||
let checkHead v what | v == theHead = strong_ what
|
||||
| otherwise = what
|
||||
|
||||
div_ [class_ "info-block" ] do
|
||||
strong_ [] "heads"
|
||||
for_ (view repoHeadHeads rh) $ \(branch,v) -> do
|
||||
div_ [ class_ "attrval onleft"] do
|
||||
a_ [ href_ (toURL (RepoPage (CommitsTab (Just v)) lww ))
|
||||
] do checkHead (Just v)
|
||||
$ toHtml branch
|
||||
|
||||
div_ [class_ "info-block" ] do
|
||||
strong_ [] "tags"
|
||||
for_ (view repoHeadTags rh) $ \(tag,v) -> do
|
||||
div_ [ class_ "attrval onleft"] do
|
||||
a_ [href_ (toURL (RepoPage (CommitsTab (Just v)) lww ))]
|
||||
do checkHead (Just v) $
|
||||
toHtml tag
|
||||
|
||||
main_ do
|
||||
|
||||
nav_ [ role_ "tab-control" ] do
|
||||
repoMenu do
|
||||
|
||||
let menu t = if isActiveTab tab t then repoMenuItem0 else repoMenuItem
|
||||
|
||||
menu (CommitsTab Nothing)
|
||||
[ hxGet_ (toURL (RepoCommits lww))
|
||||
, hxTarget_ "#repo-tab-data"
|
||||
] "commits"
|
||||
|
||||
|
||||
menu (TreeTab Nothing)
|
||||
[ hxGet_ (toURL (RepoRefs lww))
|
||||
PinnedRefBlob s n hash -> small_ do
|
||||
li_ $ a_ [class_ "secondary"
|
||||
, href_ "#"
|
||||
, hxGet_ (toURL (RepoSomeBlob lww s hash))
|
||||
, hxTarget_ "#repo-tab-data"
|
||||
] "tree"
|
||||
] do
|
||||
span_ [class_ "inline-icon-wrapper"] $ svgIcon IconPinned
|
||||
toHtml (Text.take 12 n)
|
||||
" "
|
||||
toHtml $ ShortRef hash
|
||||
|
||||
section_ [id_ "repo-data"] do
|
||||
strong_ (toHtml $ rlRepoName)
|
||||
for_ mbHead $ \rh -> do
|
||||
|
||||
div_ [id_ "repo-tab-data"] do
|
||||
let theHead = headMay [ v | (GitRef "HEAD", v) <- view repoHeadRefs rh ]
|
||||
|
||||
case tab of
|
||||
let checkHead v what | v == theHead = strong_ what
|
||||
| otherwise = what
|
||||
|
||||
TreeTab{} -> do
|
||||
div_ [class_ "info-block" ] do
|
||||
summary_ [class_ "sidebar-title"] $ small_ $ strong_ "Heads"
|
||||
ul_ [class_ "mb-0"] $ do
|
||||
for_ (view repoHeadHeads rh) $ \(branch,v) -> do
|
||||
li_ $ small_ do
|
||||
a_ [class_ "secondary", href_ (toURL (RepoPage (CommitsTab (Just v)) lww ))] do
|
||||
checkHead (Just v) $ toHtml branch
|
||||
|
||||
let tree = [ fromStringMay @GitHash (Text.unpack v)
|
||||
| ("tree", v) <- params
|
||||
] & catMaybes & headMay
|
||||
div_ [class_ "info-block" ] do
|
||||
summary_ [class_ "sidebar-title"] $ small_ $ strong_ "Tags"
|
||||
ul_ [class_ "mb-0"] $ do
|
||||
for_ (view repoHeadTags rh) $ \(tag,v) -> do
|
||||
li_ $ small_ do
|
||||
a_ [class_ "secondary", href_ (toURL (RepoPage (CommitsTab (Just v)) lww ))] do
|
||||
checkHead (Just v) $ toHtml tag
|
||||
|
||||
maybe (repoRefs lww) (\t -> repoTree lww t t) tree
|
||||
div_ [class_ "content"] $ do
|
||||
|
||||
ManifestTab -> do
|
||||
thisRepoManifest it
|
||||
article_ [class_ "py-0"] $ nav_ [ariaLabel_ "breadcrumb", class_ "repo-menu"] $ ul_ do
|
||||
|
||||
CommitsTab{} -> do
|
||||
let predicate = Right (fromQueryParams params)
|
||||
repoCommits lww predicate
|
||||
let menuTabClasses isActive = if isActive then "tab contrast" else "tab"
|
||||
menuTab t misc name = li_ do
|
||||
a_ ([class_ $ menuTabClasses $ isActiveTab tab t] <> misc <> [tabClick]) do
|
||||
name
|
||||
|
||||
ForksTab -> do
|
||||
repoForks lww
|
||||
menuTab (CommitsTab Nothing)
|
||||
[ href_ "#"
|
||||
, hxGet_ (toURL (RepoCommits lww))
|
||||
, hxTarget_ "#repo-tab-data"
|
||||
] "commits"
|
||||
|
||||
div_ [id_ "repo-tab-data-embedded"] mempty
|
||||
menuTab (TreeTab Nothing)
|
||||
[ href_ "#"
|
||||
, hxGet_ (toURL (RepoRefs lww))
|
||||
, hxTarget_ "#repo-tab-data"
|
||||
] "tree"
|
||||
|
||||
section_ do
|
||||
strong_ $ toHtml rlRepoName
|
||||
|
||||
div_ [id_ "repo-tab-data"] do
|
||||
|
||||
case tab of
|
||||
|
||||
TreeTab{} -> do
|
||||
|
||||
let tree = [ fromStringMay @GitHash (Text.unpack v)
|
||||
| ("tree", v) <- params
|
||||
] & catMaybes & headMay
|
||||
|
||||
maybe (repoRefs lww) (\t -> repoTree lww t t) tree
|
||||
|
||||
ManifestTab -> do
|
||||
thisRepoManifest it
|
||||
|
||||
CommitsTab{} -> do
|
||||
let predicate = Right (fromQueryParams params)
|
||||
repoCommits lww predicate
|
||||
|
||||
ForksTab -> do
|
||||
repoForks lww
|
||||
|
||||
div_ [id_ "repo-tab-data-embedded"] mempty
|
||||
|
|
|
@ -129,7 +129,7 @@ library hbs2-git-dashboard-assets
|
|||
import: shared-properties
|
||||
|
||||
build-depends:
|
||||
base, file-embed
|
||||
base, file-embed, lucid, text
|
||||
|
||||
exposed-modules:
|
||||
HBS2.Git.Web.Assets
|
||||
|
|