Browse Source

Update

Add a demo to readme
Remove category button from closed sorting
Remove placeholder text from closed sorting
main
indigane 4 years ago committed by GitHub
parent
commit
3fe8f3f3c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      README.md
  2. 17
      card-sort.html

6
README.md

@ -2,7 +2,11 @@
A tool for conducting a virtual card sorting. A tool for conducting a virtual card sorting.
## Web ## Demo
[https://indigane.github.io/cardsort/card-sort.html#eJxNUMtOwzAQ...voGHGh0GQ==](https://indigane.github.io/cardsort/card-sort.html#eJxNUMtOwzAQ_JXIPbYIce0FJSCoSlBMXfWCOGyMSUxMHfmRyEL8O54WAYedGa_Xs-v9ZAu2fmblK7EVK71XH61JhaFjF6lTyM1Dxop8n-kGsQAsl0BD3mtZHLSPZIpcpCXSTdXUmW8R5AJImbHXl037rmQoOHlJJqfvrAuOjlndW4CzdkpZbMgPyqBiSxP9kJBOjzDbRqORfLDBaDyutR9BtoNLHXH5WO7rssri3FNP6gLTc-VgyzccaGflRH_uxJ01toNIobew3SFIDgpNd7FNJ_I4iTw_ndhRkFiNeMKXxazfcL9Po_qd91D9yf-belmxa7a--voGHGh0GQ==)
## Create your own
https://indigane.github.io/cardsort/ https://indigane.github.io/cardsort/

17
card-sort.html

@ -60,16 +60,15 @@
} }
/* Toolbar */ /* Toolbar */
.toolbar { .toolbar {
display: grid; display: flex;
grid-template-columns: 1fr 1fr 1fr; padding: 5px;
grid-template-rows: 1fr;
gap: 10px 10px;
align-items: center; align-items: center;
justify-items: center; justify-content: space-around;
} }
.toolbar button { .toolbar button {
font-size: 24px; font-size: 24px;
cursor: pointer; cursor: pointer;
margin: 5px;
} }
/* Uncategorized cards */ /* Uncategorized cards */
.uncategorized-cards { .uncategorized-cards {
@ -223,7 +222,9 @@
const cardTexts = data[uncategorizedKey]; const cardTexts = data[uncategorizedKey];
Object.assign(settings, loadSettings(data)); Object.assign(settings, loadSettings(data));
if (settings.allowCategoryEditing === false) { if (settings.allowCategoryEditing === false) {
buttonCreateCategory.style.display = 'none';
categoryTemplate.content.querySelector('.title').disabled = true; categoryTemplate.content.querySelector('.title').disabled = true;
categoryTemplate.content.querySelector('.title').removeAttribute('placeholder');
} }
buttonCreateCategory.addEventListener('click', () => createCategory()); buttonCreateCategory.addEventListener('click', () => createCategory());
for (const text of cardTexts) { for (const text of cardTexts) {
@ -273,6 +274,12 @@
if (name) { if (name) {
titleInput.value = name; titleInput.value = name;
} }
else if (settings.allowCategoryEditing === false) {
titleInput.style.opacity = '0';
titleInput.style.height = '0';
titleInput.style.margin = '0';
titleInput.style.padding = '0';
}
categoriesGrid.show( categoriesGrid.show(
categoriesGrid.add([itemElement], { categoriesGrid.add([itemElement], {
active: false, active: false,

Loading…
Cancel
Save