From 689cd97071272880f03986ca32cff6b926eb63cb Mon Sep 17 00:00:00 2001 From: Nolan Lawson Date: Sun, 28 Jan 2018 19:01:51 -0800 Subject: [PATCH] refactor external links --- bin/svgs.js | 1 + routes/_components/AccountProfile.html | 12 ++++--- routes/_components/ExternalLink.html | 31 +++++++++++++++++++ routes/_components/NotLoggedInHome.html | 8 +++-- routes/_components/status/Status.html | 28 ++++++++++------- routes/settings/about.html | 10 +++--- routes/settings/instances/[instanceName].html | 12 ++++--- routes/settings/instances/add.html | 6 ++-- templates/2xx.html | 1 + 9 files changed, 80 insertions(+), 29 deletions(-) create mode 100644 routes/_components/ExternalLink.html diff --git a/bin/svgs.js b/bin/svgs.js index 2b2ffbd..4d7e7d2 100644 --- a/bin/svgs.js +++ b/bin/svgs.js @@ -19,4 +19,5 @@ module.exports = [ {id:'fa-user-times', src:'node_modules/font-awesome-svg-png/white/svg/user-times.svg', title: 'Stop Following'}, {id:'fa-user-plus', src:'node_modules/font-awesome-svg-png/white/svg/user-plus.svg', title: 'Follow'}, {id:'fa-comments', src:'node_modules/font-awesome-svg-png/white/svg/comments.svg', title: 'Statuses'}, + {id:'fa-external-link', src:'node_modules/font-awesome-svg-png/white/svg/external-link.svg', title: 'External Link'}, ] \ No newline at end of file diff --git a/routes/_components/AccountProfile.html b/routes/_components/AccountProfile.html index 5405435..ac824fb 100644 --- a/routes/_components/AccountProfile.html +++ b/routes/_components/AccountProfile.html @@ -6,9 +6,9 @@
- + {{profile.display_name}} - +
{{'@' + profile.acct}} @@ -129,11 +129,11 @@ text-overflow: ellipsis; min-width: 0; } - .account-profile-name a { + :global(.account-profile-name a) { color: var(--body-text-color); text-decoration: none; } - .account-profile-name a:hover { + :global(.account-profile-name a:hover) { color: var(--body-text-color); text-decoration: underline; } @@ -175,13 +175,15 @@ \ No newline at end of file diff --git a/routes/_components/ExternalLink.html b/routes/_components/ExternalLink.html new file mode 100644 index 0000000..c2879b6 --- /dev/null +++ b/routes/_components/ExternalLink.html @@ -0,0 +1,31 @@ +{{#if class}} + + + {{#if showIcon}} + + + + {{/if}} + +{{else}} + + + {{#if showIcon}} + + + + {{/if}} + +{{/if}} + \ No newline at end of file diff --git a/routes/_components/NotLoggedInHome.html b/routes/_components/NotLoggedInHome.html index f0026af..c6d412f 100644 --- a/routes/_components/NotLoggedInHome.html +++ b/routes/_components/NotLoggedInHome.html @@ -7,11 +7,11 @@

Pinafore

-

Pinafore is a web client for Mastodon, optimized for speed and simplicity.

+

Pinafore is a web client for Mastodon, optimized for speed and simplicity.

To get started, log in to an instance.

-

Don't have an instance? Join Mastodon!

+

Don't have an instance? Join Mastodon!

@@ -46,11 +46,13 @@ \ No newline at end of file diff --git a/routes/_components/status/Status.html b/routes/_components/status/Status.html index 2c9a2a3..f252bc3 100644 --- a/routes/_components/status/Status.html +++ b/routes/_components/status/Status.html @@ -8,7 +8,7 @@ {{#if timelineType === 'account' && timelineValue === status.account.id}} - {{status.account.username}} + {{status.account.username}} {{else}} {{status.account.username}} {{/if}} @@ -18,9 +18,9 @@ {{/if}}
{{#if timelineType === 'account' && timelineValue === originalAccount.id}} - + {{originalAccount.display_name || originalAccount.username}} - + {{else}} {{originalAccount.display_name || originalAccount.username}} @@ -30,9 +30,9 @@ {{'@' + originalAccount.acct}} {{#if timelineType === 'status'}} - + {{else}}

open-source software created by Nolan Lawson.

+

Pinafore is open-source software created by Nolan Lawson.

-

Icons provided by Font Awesome.

+

Icons provided by Font Awesome.

-

Logo thanks to "sailboat" by Gregor Cresnar from the Noun Project.

+

Logo thanks to "sailboat" by Gregor Cresnar from the Noun Project.

\ No newline at end of file diff --git a/routes/settings/instances/[instanceName].html b/routes/settings/instances/[instanceName].html index 0103611..7d7d95e 100644 --- a/routes/settings/instances/[instanceName].html +++ b/routes/settings/instances/[instanceName].html @@ -11,8 +11,10 @@
Profile picture for {{'@' + verifyCredentials.acct}} - {{'@' + verifyCredentials.acct}} + + {{'@' + verifyCredentials.acct}} + {{verifyCredentials.display_name}}

Theme:

@@ -59,7 +61,7 @@ border-radius: 4px; grid-area: avatar; } - .acct-handle { + :global(.acct-handle) { grid-area: handle; } .theme-chooser { @@ -97,6 +99,7 @@ import { store } from '../../_store/store' import Layout from '../../_components/Layout.html' import SettingsLayout from '../_components/SettingsLayout.html' + import ExternalLink from '../../_components/ExternalLink.html' import { changeTheme, switchToInstance, @@ -108,7 +111,8 @@ export default { components: { Layout, - SettingsLayout + SettingsLayout, + ExternalLink }, store: () => store, data: () => ({ diff --git a/routes/settings/instances/add.html b/routes/settings/instances/add.html index 59114cf..bd9e62b 100644 --- a/routes/settings/instances/add.html +++ b/routes/settings/instances/add.html @@ -30,7 +30,7 @@ {{#if !$isUserLoggedIn}} -

Don't have an instance? Join Mastodon!

+

Don't have an instance? Join Mastodon!

{{/if}} @@ -73,6 +73,7 @@ import { store } from '../../_store/store' import LoadingMask from '../../_components/LoadingMask' import { logInToInstance, handleOauthCode } from './_actions/add' + import ExternalLink from '../../_components/ExternalLink.html' export default { async oncreate () { @@ -84,7 +85,8 @@ components: { Layout, SettingsLayout, - LoadingMask + LoadingMask, + ExternalLink }, store: () => store, methods: { diff --git a/templates/2xx.html b/templates/2xx.html index 736daa2..aeebc5b 100644 --- a/templates/2xx.html +++ b/templates/2xx.html @@ -84,6 +84,7 @@ body.offline,body.theme-hotpants.offline,body.theme-majesty.offline,body.theme-o Stop Following Follow Statuses +External Link