Compare commits

...

3 Commits

Author SHA1 Message Date
Emma Winston ac3f5d9369
Merge 5ba8e0a05f into 574cdad7a8 2023-12-26 10:09:25 +00:00
Mathilde 574cdad7a8
Fixing wrongly formatted readme
Contributing to Hometown section would show up as title instead of simple body text.
2023-12-26 11:09:13 +01:00
Emma Winston 5ba8e0a05f Make fields in public profile expand on click 2019-11-30 12:48:13 +00:00
3 changed files with 38 additions and 1 deletions

View File

@ -81,7 +81,7 @@ Hometown uses [semantic versioning](https://semver.org) and follows a versioning
## Contributing to Hometown
Setting up your Hometown development environment is [exactly like setting up your Mastodon development environment](https://docs.joinmastodon.org/dev/overview/). Pull requests should be made to the `hometown-dev` branch, which is our default branch in Github.
=======
You can open issues for bugs you've found or features you think are missing. You can also submit pull requests to this repository or submit translations using Crowdin. To get started, take a look at [CONTRIBUTING.md](CONTRIBUTING.md). If your contributions are accepted into Mastodon, you can request to be paid through [our OpenCollective](https://opencollective.com/mastodon).
**IRC channel**: #mastodon on irc.libera.chat

View File

@ -322,6 +322,42 @@ function main() {
}
});
});
delegate(document, '.account__header__fields dl', 'click', ( { target } ) => {
const row = target.parentNode;
if (row.children[0].style.maxHeight === '48px' || row.children[1].style.maxHeight === '48px') {
row.children[0].style.maxHeight = 'none';
row.children[1].style.maxHeight = 'none';
row.children[0].style.whiteSpace = 'normal';
row.children[1].style.whiteSpace = 'normal';
} else {
row.children[0].style.maxHeight = '48px';
row.children[1].style.maxHeight = '48px';
row.children[0].style.whiteSpace = 'nowrap';
row.children[1].style.whiteSpace = 'nowrap';
}
});
ready(() => {
const dls = document.querySelectorAll('.account__header__fields dl');
console.log(dls);
for (let i = 0; i < dls.length; i++) {
if(dls[i].children[0].offsetWidth < dls[i].children[0].scrollWidth ||
dls[i].children[1].offsetWidth < dls[i].children[1].scrollWidth) {
dls[i].children[0].style.maxHeight = '48px';
dls[i].children[1].style.maxHeight = '48px';
dls[i].children[0].style.whiteSpace = 'nowrap';
dls[i].children[1].style.whiteSpace = 'nowrap';
dls[i].style.cursor = 'pointer';
}
}
});
}
loadPolyfills()

View File

@ -247,6 +247,7 @@
dl {
display: flex;
border-bottom: 1px solid lighten($ui-base-color, 12%);
align-items: stretch;
}
dt,