1
0
Fork 0
mirror of https://github.com/cheeaun/phanpy.git synced 2025-02-24 11:20:48 +03:00

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; animation: fade-in 0.2s ease-out;
max-height: 100vh; max-height: 100vh;
overflow: auto; overflow: auto;
position: relative;
} }
#settings-container .close-button { #settings-container .close-button {
float: right; position: absolute;
top: 0;
right: 0;
} }
#settings-container h2 { #settings-container h2 {
margin: 3em 0 1em;
font-size: .9em; font-size: .9em;
text-transform: uppercase; text-transform: uppercase;
color: var(--text-insignificant-color); color: var(--text-insignificant-color);
} }
#settings-container h2 ~ h2 {
margin-top: 2em;
}
#settings-container ul { #settings-container ul {
margin: 0; margin: 0;

View file

@ -24,12 +24,9 @@ export default ({ onClose }) => {
return ( return (
<div id="settings-container" class="box"> <div id="settings-container" class="box">
<div> <button type="button" class="close-button plain large" onClick={onClose}>
<button type="button" class="close-button plain" onClick={onClose}>
<Icon icon="x" alt="Close" /> <Icon icon="x" alt="Close" />
</button> </button>
</div>
<div>
<h2>Accounts</h2> <h2>Accounts</h2>
<ul class="accounts-list"> <ul class="accounts-list">
{accounts.map((account, i) => { {accounts.map((account, i) => {
@ -119,8 +116,6 @@ export default ({ onClose }) => {
Add new account Add new account
</a> </a>
</p> </p>
</div>
<div>
<h2>Theme</h2> <h2>Theme</h2>
<form <form
ref={themeFormRef} ref={themeFormRef}
@ -180,7 +175,17 @@ export default ({ onClose }) => {
</label> </label>
</div> </div>
</form> </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> </div>
); );
}; };