From bb2d7950fe03246082672a45fe2d377d14f95c97 Mon Sep 17 00:00:00 2001 From: Alejandro Gomez Date: Sun, 15 Jan 2023 23:34:15 +0100 Subject: [PATCH 01/14] spacing for urls, clickable lnurl --- src/pages/ProfilePage.css | 13 +++++++------ src/pages/ProfilePage.js | 14 ++++++++------ 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/src/pages/ProfilePage.css b/src/pages/ProfilePage.css index 507cff90..e10a6e91 100644 --- a/src/pages/ProfilePage.css +++ b/src/pages/ProfilePage.css @@ -105,11 +105,17 @@ .profile .website { color: var(--highlight); - margin-bottom: 4px; + margin: 6px 0; } .profile .lnurl { color: var(--highlight); + margin: 6px 0; + cursor: pointer; +} + +.profile .lnurl:hover { + text-decoration: underline; } .profile .btn-icon { @@ -128,11 +134,6 @@ text-overflow: ellipsis; } -.profile .lnurl::before { - content: '⚡️ '; - font-size: 10px; -} - .profile .details-wrapper { display: flex; flex-direction: column; diff --git a/src/pages/ProfilePage.js b/src/pages/ProfilePage.js index a1ca626b..cde51d58 100644 --- a/src/pages/ProfilePage.js +++ b/src/pages/ProfilePage.js @@ -67,12 +67,14 @@ export default function ProfilePage() { )} - {lnurl ?
- {lnurl} -
setShowLnQr(true)}> - -
-
: null} + {lnurl && ( + <> + ⚡️ + setShowLnQr(true)}> + {lnurl} + + + )} setShowLnQr(false)} /> ) From 312451e836566f4d7033d8450f8febd3fe7fe6e1 Mon Sep 17 00:00:00 2001 From: Alejandro Gomez Date: Sun, 15 Jan 2023 23:34:24 +0100 Subject: [PATCH 02/14] spacing for bio --- src/pages/ProfilePage.css | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/pages/ProfilePage.css b/src/pages/ProfilePage.css index e10a6e91..3aa6ef47 100644 --- a/src/pages/ProfilePage.css +++ b/src/pages/ProfilePage.css @@ -93,6 +93,7 @@ .profile .details { max-width: 680px; width: 100%; + margin-top: 12px; } .profile .details p { @@ -149,10 +150,12 @@ @media (min-width: 360px) { .profile .copy .body { font-size: 14px } .profile .details-wrapper, .profile .avatar-wrapper { margin-left: 21px; } + .profile .details { width: calc(100% - 21px); } } @media (min-width: 720px) { .profile .details-wrapper, .profile .avatar-wrapper { margin-left: 30px; } + .profile .details { width: calc(100% - 30px); } } .profile .follow-button { From 7d050242f13fe38c0fa8d95e58100a2fb3c6fa30 Mon Sep 17 00:00:00 2001 From: Alejandro Gomez Date: Sun, 15 Jan 2023 23:40:19 +0100 Subject: [PATCH 03/14] remove darkness from banner gradient --- src/pages/ProfilePage.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pages/ProfilePage.css b/src/pages/ProfilePage.css index 3aa6ef47..6eb66889 100644 --- a/src/pages/ProfilePage.css +++ b/src/pages/ProfilePage.css @@ -7,8 +7,8 @@ height: 210px; margin-bottom: -80px; object-fit: cover; - mask-image: linear-gradient(to bottom, var(--bg-color), rgba(0,0,0,0)); - -webkit-mask-image: linear-gradient(to bottom, var(--bg-color), rgba(0,0,0,0)); + mask-image: linear-gradient(to bottom, var(--bg-color) 60%, rgba(0,0,0,0)); + -webkit-mask-image: linear-gradient(to bottom, var(--bg-color) 60%, rgba(0,0,0,0)); z-index: 0; } From dbd6775f473c510a59555c488323e703ee09603f Mon Sep 17 00:00:00 2001 From: Alejandro Gomez Date: Sun, 15 Jan 2023 23:59:28 +0100 Subject: [PATCH 04/14] better spacing for urls --- src/pages/ProfilePage.css | 60 +++++++++++++++++++++++++-------------- src/pages/ProfilePage.js | 28 +++++++++--------- 2 files changed, 53 insertions(+), 35 deletions(-) diff --git a/src/pages/ProfilePage.css b/src/pages/ProfilePage.css index 6eb66889..33c7f486 100644 --- a/src/pages/ProfilePage.css +++ b/src/pages/ProfilePage.css @@ -102,20 +102,10 @@ .profile .details a { color: var(--highlight); + text-decoration: none; } -.profile .website { - color: var(--highlight); - margin: 6px 0; -} - -.profile .lnurl { - color: var(--highlight); - margin: 6px 0; - cursor: pointer; -} - -.profile .lnurl:hover { +.profile .details a:hover { text-decoration: underline; } @@ -125,16 +115,6 @@ margin-left: 4px; } -.profile .website::before { - content: '🔗 '; - font-size: 10px; -} - -.profile .lnurl { - overflow: hidden; - text-overflow: ellipsis; -} - .profile .details-wrapper { display: flex; flex-direction: column; @@ -231,3 +211,39 @@ max-width: 420px; } } + +.profile .links { + margin: 8px 12px; +} + +.profile .website { + color: var(--highlight); + margin: 6px 0; +} + +.profile .website a { + text-decoration: none; +} + +.profile .website::before { + content: '🔗 '; +} + +.profile .lnurl { + color: var(--highlight); + margin: 6px 0; + cursor: pointer; +} + +.profile .lnurl:hover { + text-decoration: underline; +} + +.profile .lnurl { + overflow: hidden; + text-overflow: ellipsis; +} + +.profile .zap { + margin-right: .3em; +} diff --git a/src/pages/ProfilePage.js b/src/pages/ProfilePage.js index cde51d58..5d4b7abc 100644 --- a/src/pages/ProfilePage.js +++ b/src/pages/ProfilePage.js @@ -61,20 +61,22 @@ export default function ProfilePage() {
{about}
- {user?.website && ( - - )} +
+ {user?.website && ( + + )} - {lnurl && ( - <> - ⚡️ - setShowLnQr(true)}> - {lnurl} - - - )} + {lnurl && ( +
setShowLnQr(true)}> + ⚡️ + + {lnurl} + +
+ )} +
setShowLnQr(false)} />
) From 548e3ae67b41f67e375a464658a5741a4e60d107 Mon Sep 17 00:00:00 2001 From: Alejandro Gomez Date: Mon, 16 Jan 2023 00:14:33 +0100 Subject: [PATCH 05/14] info placement and color --- src/element/Note.css | 4 ++++ src/element/NoteReaction.css | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/element/Note.css b/src/element/Note.css index 7ce045e7..d6786411 100644 --- a/src/element/Note.css +++ b/src/element/Note.css @@ -19,6 +19,10 @@ .note > .header > .info { font-size: small; white-space: nowrap; + color: var(--gray-tertiary); + align-self: flex-start; +} +.note.active > .header > .info { color: var(--gray-light); } diff --git a/src/element/NoteReaction.css b/src/element/NoteReaction.css index e5e9ec83..c877c84f 100644 --- a/src/element/NoteReaction.css +++ b/src/element/NoteReaction.css @@ -18,8 +18,9 @@ } .reaction > .header > .info { - color: #999; + color: var(--gray-tertiary); font-size: small; + align-self: flex-start; } .reaction .reaction-text { From 8fb06e576536f04ca94428dd6b9f59957ae5fbd8 Mon Sep 17 00:00:00 2001 From: Alejandro Gomez Date: Mon, 16 Jan 2023 00:14:52 +0100 Subject: [PATCH 06/14] more minimal reactions --- src/element/NoteReaction.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/element/NoteReaction.js b/src/element/NoteReaction.js index 74288505..918d8e7a 100644 --- a/src/element/NoteReaction.js +++ b/src/element/NoteReaction.js @@ -63,12 +63,12 @@ export default function NoteReaction(props) { const root = extractRoot(); const opt = { showHeader: ev?.Kind === EventKind.Repost, - showFooter: ev?.Kind === EventKind.Repost + showFooter: false, }; return (
- +
@@ -78,4 +78,4 @@ export default function NoteReaction(props) { {!root && refEvent ?

#{hexToBech32("note", refEvent).substring(0, 12)}

: null}
); -} \ No newline at end of file +} From 54394c8aa1279f3d8054c59b21e940d26226f137 Mon Sep 17 00:00:00 2001 From: Alejandro Gomez Date: Mon, 16 Jan 2023 00:44:50 +0100 Subject: [PATCH 07/14] note creator button and reply adjustments --- package.json | 1 + src/element/NoteCreator.css | 13 ++++++++----- src/element/NoteCreator.js | 27 +++++++++++++++++---------- src/element/NoteFooter.js | 9 +++++++-- src/element/NoteReaction.js | 2 +- src/element/Textarea.tsx | 2 ++ src/index.css | 1 + yarn.lock | 28 +++++++++++++++++++++++++++- 8 files changed, 64 insertions(+), 19 deletions(-) diff --git a/package.json b/package.json index 3ea58a1b..6abd624f 100644 --- a/package.json +++ b/package.json @@ -28,6 +28,7 @@ "react-redux": "^8.0.5", "react-router-dom": "^6.5.0", "react-scripts": "5.0.1", + "react-textarea-autosize": "^8.4.0", "react-twitter-embed": "^4.0.4", "typescript": "^4.9.4", "uuid": "^9.0.0" diff --git a/src/element/NoteCreator.css b/src/element/NoteCreator.css index 04d3c578..b7d24db3 100644 --- a/src/element/NoteCreator.css +++ b/src/element/NoteCreator.css @@ -4,8 +4,13 @@ border-radius: 10px; } +.note-reply { + margin: 10px; +} + .note-creator textarea { outline: none; + resize: none; min-height: 40px; border-radius: 10px 10px 0 0; max-width: -webkit-fill-available; @@ -15,11 +20,6 @@ min-width: -webkit-fill-available; min-width: -moz-available; min-width: fill-available; - transition: min-height .5s; -} - -.note-creator .textarea--focused { - min-height: 120px; } .note-creator .actions { @@ -43,4 +43,7 @@ .note-creator .btn { border-radius: 20px; font-weight: bold; + background-color: var(--gray-secondary); + color: var(--gray-superlight); + border-color: var(--gray-superlight); } diff --git a/src/element/NoteCreator.js b/src/element/NoteCreator.js index cbd68e3b..4d0955b2 100644 --- a/src/element/NoteCreator.js +++ b/src/element/NoteCreator.js @@ -15,6 +15,7 @@ export function NoteCreator(props) { const replyTo = props.replyTo; const onSend = props.onSend; const show = props.show || false; + const autoFocus = props.autoFocus || false; const publisher = useEventPublisher(); const [note, setNote] = useState(""); const [error, setError] = useState(""); @@ -49,8 +50,8 @@ export function NoteCreator(props) { function onChange(ev) { const { value } = ev.target + setNote(value) if (value) { - setNote(value) setActive(true) } else { setActive(false) @@ -60,22 +61,28 @@ export function NoteCreator(props) { if (!show) return false; return ( <> - {replyTo ? {`Reply to: ${replyTo.Id.substring(0, 8)}`} : null} -
+