Code cleanup on Settings page

This commit is contained in:
Lim Chee Aun 2022-12-10 20:48:48 +08:00
parent 4b93d13256
commit 46d5e20008
2 changed files with 148 additions and 138 deletions

View file

@ -4,18 +4,23 @@
animation: fade-in 0.2s ease-out;
max-height: 100vh;
overflow: auto;
position: relative;
}
#settings-container .close-button {
float: right;
position: absolute;
top: 0;
right: 0;
}
#settings-container h2 {
margin: 3em 0 1em;
font-size: .9em;
text-transform: uppercase;
color: var(--text-insignificant-color);
}
#settings-container h2 ~ h2 {
margin-top: 2em;
}
#settings-container ul {
margin: 0;

View file

@ -24,12 +24,9 @@ export default ({ onClose }) => {
return (
<div id="settings-container" class="box">
<div>
<button type="button" class="close-button plain" onClick={onClose}>
<button type="button" class="close-button plain large" onClick={onClose}>
<Icon icon="x" alt="Close" />
</button>
</div>
<div>
<h2>Accounts</h2>
<ul class="accounts-list">
{accounts.map((account, i) => {
@ -119,8 +116,6 @@ export default ({ onClose }) => {
Add new account
</a>
</p>
</div>
<div>
<h2>Theme</h2>
<form
ref={themeFormRef}
@ -180,7 +175,17 @@ export default ({ onClose }) => {
</label>
</div>
</form>
</div>
<h2>About</h2>
<p>
<a href="https://github.com/cheeaun/phanpy" target="_blank">
Built
</a>{' '}
by{' '}
<a href="https://mastodon.social/@cheeaun" target="_blank">
@cheeaun
</a>
.
</p>
</div>
);
};