Skip to content

Commit

Permalink
style: various gnoweb fix after revamp (#3376)
Browse files Browse the repository at this point in the history
Continue fixing the issues reported in #3355 mainly:

- Colors a11y issues
- Directory layout 
- Copy btn style 
- code element font-size to follow parent's one
  • Loading branch information
alexiscolin authored Dec 19, 2024
1 parent e506a8d commit b9aedb1
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 13 deletions.
9 changes: 4 additions & 5 deletions gno.land/pkg/gnoweb/components/directory.gohtml
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
{{ define "renderDir" }}
<main class="w-full grow-[2] bg-gray-50">
<section class="max-w-screen-max mx-auto px-10 grid grid-cols-10 grid-flow-dense gap-8 xxl:gap-20 items-start">
<aside id="sidebar" class="relative h-full"></aside>
<section class="max-w-screen-max mx-auto px-4 md:px-10 grid grid-cols-1 lg:grid-cols-10 xl:grid-cols-10 grid-flow-dense gap-x-20 xxl:gap-x-32 items-start">

{{ $pkgpath := .PkgPath }}
<article class="code-content mt-10 pb-24 text-gray-900">
<div class="flex justify-between mb-3 items-center">
<article class="code-content mt-10 lg:col-span-7 pb-24 text-gray-900">
<div class="flex flex-col md:flex-row justify-between mb-4 md:items-center">
<div class="flex items-center gap-8">
<h1 class="text-600 font-bold">{{ $pkgpath }}</h1>
</div>
<div class="flex gap-4 text-gray-300">
<div class="flex gap-4 text-gray-300 pt-0.5">
<span class="text-gray-300">Directory · {{ .FileCounter }} Files</span>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion gno.land/pkg/gnoweb/components/help.gohtml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
<div>
<h3 class="text-gray-400 text-50 mb-1">Command</h3>
<div class="relative rounded-sm text-100 bg-light">
<button class="w-5 h-5 absolute top-2 right-2 text-gray-400" aria-label="Copy Command" data-copy-btn="help-cmd-{{ .FuncName }}">
<button class="w-5 h-5 absolute top-2 right-2 text-gray-400 hover:text-gray-600" aria-label="Copy Command" data-copy-btn="help-cmd-{{ .FuncName }}">
<svg class="w-5 h-5 top-0" data-copy-icon>
<use href="#ico-copy"></use>
<use href="#ico-check" class="hidden text-green-600"></use>
Expand Down
2 changes: 1 addition & 1 deletion gno.land/pkg/gnoweb/components/index.gohtml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
</form>
</div>

<form class="sidemenu col-span-3 flex justify-end lg:justify-start gap-3 sm:gap-6 h-full text-100 text-gray-300">
<form class="sidemenu col-span-3 flex justify-end lg:justify-start gap-3 sm:gap-6 h-full text-100 text-gray-400">
<a href="{{ .RealmPath }}">
<div class="group gap-1 xxl:pr-1 hover:text-gray-600 relative flex items-center h-full after:block after:absolute after:h-1 after:bg-green-600 after:left-0 after:rounded-t-sm after:bottom-0 {{ if (and (not (queryHas .WebQuery "source")) (not (queryHas .WebQuery "help"))) }}after:w-full text-stroke text-gray-600 is-active{{ end }}">
<input type="radio" value="summary" name="sidemenu" id="sidemenu-meta" class="peer hidden" />
Expand Down
8 changes: 4 additions & 4 deletions gno.land/pkg/gnoweb/components/source.gohtml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
<div class="flex items-center">
<h1 class="text-600 text-gray-900 font-bold">{{ .FileName }}</h1>
</div>
<div class="flex gap-8 text-gray-300 items-center justify-between">
<span class="text-gray-300 pt-0.5">{{ .FileSize }} · {{ .FileLines }} lines</span>
<button class="flex items-center gap-0.5 hover:text-gray-600 pt-0.5" data-copy-btn="source-code">
<svg class="w-5 h-5 xxl:w-4 xxl:h-4 shrink-0 inline-block text-gray-300" data-copy-icon>
<div class="flex gap-8 text-gray-300 items-center justify-between text-gray-400">
<span class="pt-0.5">{{ .FileSize }} · {{ .FileLines }} lines</span>
<button class="group flex items-center gap-0.5 pt-0.5 hover:text-gray-600" data-copy-btn="source-code">
<svg class="w-5 h-5 xxl:w-4 xxl:h-4 shrink-0 inline-block" data-copy-icon>
<use href="#ico-copy"></use>
<use href="#ico-check" class="hidden text-green-600"></use>
</svg>
Expand Down
2 changes: 1 addition & 1 deletion gno.land/pkg/gnoweb/frontend/css/input.css
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@
}

.realm-content :not(pre) > code {
@apply bg-gray-100 px-1 py-0.5 rounded-sm text-100 font-mono;
@apply bg-gray-100 px-1 py-0.5 rounded-sm text-[.96em] font-mono;
}

.realm-content pre {
Expand Down
2 changes: 1 addition & 1 deletion gno.land/pkg/gnoweb/public/styles.css

Large diffs are not rendered by default.

0 comments on commit b9aedb1

Please sign in to comment.