-
-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into i1449_docker_compose_quote_your_sources_bro
- Loading branch information
Showing
16 changed files
with
442 additions
and
207 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import {byClass, make} from './dom.js'; | ||
|
||
const notesList = byClass('notes-list'); | ||
const actionRemove = byClass('notes-action-remove'); | ||
const totalCount = document.getElementsByName('notes').length; | ||
let checkedCount = notesList.querySelectorAll('[name=notes]:checked').length; | ||
const selectAll = make('input', { | ||
type: 'checkbox', | ||
title: 'Select all on this page', | ||
}); | ||
|
||
const updateSelection = () => { | ||
selectAll.checked = checkedCount === totalCount; | ||
selectAll.indeterminate = checkedCount > 0 && checkedCount < totalCount; | ||
actionRemove.disabled = checkedCount === 0; | ||
actionRemove.textContent = `Delete ${checkedCount} selected note${checkedCount === 1 ? '' : 's'}`; | ||
}; | ||
|
||
selectAll.addEventListener('change', () => { | ||
checkedCount = 0; | ||
|
||
for (const noteSelect of document.getElementsByName('notes')) { | ||
checkedCount += (noteSelect.checked = selectAll.checked); | ||
} | ||
|
||
updateSelection(); | ||
}); | ||
|
||
notesList.addEventListener('change', e => { | ||
if (e.target.name === 'notes') { | ||
checkedCount += e.target.checked ? 1 : -1; | ||
updateSelection(); | ||
} | ||
}); | ||
|
||
updateSelection(); | ||
|
||
if (!byClass('notes-empty')) { | ||
byClass('notes-select-all').append(selectAll); | ||
} |
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 |
---|---|---|
@@ -1 +1,2 @@ | ||
$content-color-lighter: #777; | ||
$link-color: #336979; |
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,12 @@ | ||
.pages-layout-split { | ||
display: flex; | ||
|
||
> [rel=next] { | ||
margin-left: auto; | ||
} | ||
} | ||
|
||
// XXX: temporary hack for private message list | ||
.pages-layout-left { | ||
float: left; | ||
} |
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,95 @@ | ||
@import '../theme'; | ||
|
||
.notes-folders { | ||
line-height: 1; | ||
margin-bottom: 16px; | ||
|
||
> ul { | ||
display: flex; | ||
flex-wrap: wrap; | ||
gap: 8px; | ||
} | ||
|
||
li { | ||
display: block; | ||
} | ||
|
||
a { | ||
border-radius: 2px; | ||
display: inline-block; | ||
padding: 8px; | ||
} | ||
|
||
.current { | ||
background-color: $link-color; | ||
color: white; | ||
text-decoration: none; | ||
} | ||
} | ||
|
||
.notes-filter { | ||
margin-bottom: 16px; | ||
} | ||
|
||
$cell-padding: 4px; | ||
|
||
.notes-list > * > * { | ||
// allow clicking anywhere on the row, outside a link, to select a message | ||
> * > label { | ||
display: block; | ||
padding: $cell-padding; | ||
} | ||
|
||
> th { | ||
padding: $cell-padding; | ||
text-align: left; | ||
vertical-align: bottom; // ideally, this would be middle-aligned text aligned to the bottom of the cell (for when some other cell's text wraps to multiple lines), but normally the checkbox is close in height, so good enough | ||
} | ||
|
||
// checkbox | ||
> :nth-child(1) { | ||
text-align: center; | ||
width: 2em; | ||
} | ||
|
||
// message title | ||
// | ||
// desirable properties: | ||
// - [X] no zalgo overflow | ||
// - [X] focus ring normal-looking and unclipped | ||
// - [X] link area doesn’t include empty space when text wraps | ||
// - [ ] link area extends to full height of cell | ||
// - [ ] link area exists even when title is zero-sized, e.g. contains no printing characters | ||
> :nth-child(2) > label { | ||
overflow: hidden; | ||
} | ||
} | ||
|
||
.notes-list > tbody > :nth-child(odd) { | ||
background-color: rgba(0, 0, 0, 0.05); | ||
} | ||
|
||
.notes-list .unread { | ||
font-weight: bold; | ||
} | ||
|
||
.notes-empty { | ||
padding: $cell-padding; | ||
} | ||
|
||
#note-content { | ||
padding-top: 2em; | ||
} | ||
|
||
#note-content .formatted-content { | ||
padding-top: 1.5em; | ||
} | ||
|
||
#notes-content { | ||
font-size: 14px; | ||
padding-top: 2em; | ||
} | ||
|
||
#notes-content .buttons { | ||
padding-top: 1em; | ||
} |
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
Oops, something went wrong.