about summary refs log tree commit diff
path: root/app/assets
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2016-11-07 01:14:12 +0100
committerEugen Rochko <eugen@zeonfederated.com>2016-11-07 01:14:12 +0100
commit23fc424b7aea139a0aff5cd347f46c81e50c2c56 (patch)
tree47ce5106180cac5ebe93adaa4c91edc2c5ce8b79 /app/assets
parentb835f4aa1ce12cc31a721750a857d8d08a50069a (diff)
Account notes (bios) can now contain links. Character limit upped to 160
Diffstat (limited to 'app/assets')
-rw-r--r--app/assets/javascripts/components/features/account/components/header.jsx4
-rw-r--r--app/assets/stylesheets/components.scss23
2 files changed, 26 insertions, 1 deletions
diff --git a/app/assets/javascripts/components/features/account/components/header.jsx b/app/assets/javascripts/components/features/account/components/header.jsx
index d794a0aaf..39666bdc1 100644
--- a/app/assets/javascripts/components/features/account/components/header.jsx
+++ b/app/assets/javascripts/components/features/account/components/header.jsx
@@ -24,6 +24,8 @@ const Header = React.createClass({
       info = <span style={{ position: 'absolute', top: '10px', right: '10px', opacity: '0.7', display: 'inline-block', verticalAlign: 'top', background: 'rgba(0, 0, 0, 0.4)', color: '#fff', textTransform: 'uppercase', fontSize: '11px', fontWeight: '500', padding: '4px', borderRadius: '4px' }}>Follows you</span>
     }
 
+    const content = { __html: account.get('note') };
+
     return (
       <div style={{ flex: '0 0 auto', background: '#2f3441', textAlign: 'center', backgroundImage: `url(${account.get('header')})`, backgroundSize: 'cover', position: 'relative' }}>
         <div style={{ background: 'rgba(47, 52, 65, 0.8)', padding: '20px 10px' }}>
@@ -36,7 +38,7 @@ const Header = React.createClass({
           </a>
 
           <span style={{ fontSize: '14px', fontWeight: '400', display: 'block', color: '#2b90d9', marginBottom: '10px' }}>@{account.get('acct')}</span>
-          <p style={{ color: '#616b86', fontSize: '14px' }}>{account.get('note')}</p>
+          <div style={{ color: '#616b86', fontSize: '14px' }} className='account__header__content' dangerouslySetInnerHTML={content} />
 
           {info}
         </div>
diff --git a/app/assets/stylesheets/components.scss b/app/assets/stylesheets/components.scss
index 80e6cb5a8..37272e8e5 100644
--- a/app/assets/stylesheets/components.scss
+++ b/app/assets/stylesheets/components.scss
@@ -118,6 +118,29 @@
   }
 }
 
+.account__header__content {
+  word-wrap: break-word;
+  font-weight: 300;
+  overflow: hidden;
+
+  p {
+    margin-bottom: 20px;
+
+    &:last-child {
+      margin-bottom: 0;
+    }
+  }
+
+  a {
+    color: inherit;
+    text-decoration: underline;
+
+    &:hover {
+      text-decoration: none;
+    }
+  }
+}
+
 .status__display-name, .status__relative-time, .detailed-status__display-name, .detailed-status__datetime, .account__display-name {
   text-decoration: none;
 }