Fix some mobile issues with the descriptions
f58727be2daf5aef3ee2afd269a4ee131899307b
1 parent
0e7bd0ba
AGENTS.md
+3 -1
| 146 | 146 | `1.125rem` (large). Do not introduce other font sizes. |
|
| 147 | 147 | ||
| 148 | 148 | Margins and padding use `0.25rem` increments (e.g. `0.25rem`, `0.5rem`, `0.75rem`, |
|
| 149 | 149 | `1rem`, `1.5rem`, `2rem`). Do not use arbitrary values like `0.3rem` or `0.4rem`. |
|
| 150 | 150 | ||
| 151 | - | No media queries, no dark mode, no responsive breakpoints. |
|
| 151 | + | There is a single `@media (max-width: 720px)` breakpoint for mobile. To hide an |
|
| 152 | + | element on mobile, add the `desktop` class to it in the template HTML. Do not add |
|
| 153 | + | per-element CSS rules in the media query for hiding. |
|
| 152 | 154 | ||
| 153 | 155 | ## Conventions |
|
| 154 | 156 | ||
| 155 | 157 | - No JavaScript anywhere. All interactivity is pure HTML (links, `<details>`). |
|
| 156 | 158 | The only JS files are syntax highlighting scripts served as static assets. |
templates/home.html
+1 -1
| 18 | 18 | <span class="subject">{{.Data.LastCommit.Subject}}</span> |
|
| 19 | 19 | <span class="author">{{.Data.LastCommit.Author}}</span> |
|
| 20 | 20 | <span class="date">{{timeAgo .Data.LastCommit.AuthorDate}} ago</span> |
|
| 21 | 21 | </div> |
|
| 22 | 22 | {{end}} |
|
| 23 | - | <details class="clone-selector"> |
|
| 23 | + | <details class="clone-selector desktop"> |
|
| 24 | 24 | <summary>Clone</summary> |
|
| 25 | 25 | <div class="clone-dropdown"> |
|
| 26 | 26 | <label>Git HTTPS URL</label> |
|
| 27 | 27 | <input type="text" value="{{.Data.CloneHTTPS}}" readonly> |
|
| 28 | 28 | <label>Git SSH URL</label> |
templates/layout.html
+2 -2
| 8 | 8 | </head> |
|
| 9 | 9 | <body> |
|
| 10 | 10 | <div class="container"> |
|
| 11 | 11 | {{if not .Repo}} |
|
| 12 | 12 | <nav class="repo-nav"> |
|
| 13 | - | <span class="repo-name"><a href="{{.BaseURL}}/" class="logo-link"><img class="logo" src="{{.BaseURL}}/radiant.svg" alt="" width="16" height="16"></a><a href="{{.BaseURL}}/">{{.SiteTitle}}</a>{{if .SiteDescription}}<span class="repo-desc">{{.SiteDescription}}</span>{{end}}</span> |
|
| 13 | + | <span class="repo-name"><a href="{{.BaseURL}}/" class="logo-link"><img class="logo" src="{{.BaseURL}}/radiant.svg" alt="" width="16" height="16"></a><a href="{{.BaseURL}}/">{{.SiteTitle}}</a>{{if .SiteDescription}}<span class="repo-desc desktop">{{.SiteDescription}}</span>{{end}}</span> |
|
| 14 | 14 | </nav> |
|
| 15 | 15 | {{end}} |
|
| 16 | 16 | {{if .Repo}} |
|
| 17 | 17 | <nav class="repo-nav"> |
|
| 18 | - | <span class="repo-name"><a href="{{.BaseURL}}/" class="logo-link"><img class="logo" src="{{.BaseURL}}/radiant.svg" alt="" width="16" height="16"></a><a href="{{.BaseURL}}/{{.Repo}}/">{{.Repo}}</a>{{if .Description}}<span class="repo-desc">{{.Description}}</span>{{end}}</span> |
|
| 18 | + | <span class="repo-name"><a href="{{.BaseURL}}/" class="logo-link"><img class="logo" src="{{.BaseURL}}/radiant.svg" alt="" width="16" height="16"></a><a href="{{.BaseURL}}/{{.Repo}}/">{{.Repo}}</a>{{if .Description}}<span class="repo-desc desktop">{{.Description}}</span>{{end}}</span> |
|
| 19 | 19 | <a href="{{.BaseURL}}/{{.Repo}}/" class="tab{{if eq .Section "home"}} active{{end}}">home</a> |
|
| 20 | 20 | <a href="{{.BaseURL}}/{{.Repo}}/log/{{.Ref}}" class="tab{{if eq .Section "log"}} active{{end}}">log</a> |
|
| 21 | 21 | <a href="{{.BaseURL}}/{{.Repo}}/refs" class="tab{{if eq .Section "refs"}} active{{end}}">refs</a> |
|
| 22 | 22 | {{if .CommitHash}}<a href="{{.BaseURL}}/{{.Repo}}/commit/{{.CommitHash}}" class="tab tab-mono active">{{shortHash .CommitHash}}</a>{{end}} |
|
| 23 | 23 | </nav> |