about summary refs log tree commit diff
diff options
context:
space:
mode:
authorDavid Yip <yipdw@member.fsf.org>2017-12-26 22:24:19 -0600
committerDavid Yip <yipdw@member.fsf.org>2017-12-26 22:24:19 -0600
commit7174d1c955116e142754189e6169d9b31b599070 (patch)
tree49139e81fc3cff355950401207968dca0944acd0
parent7347bc733418651216f22f224caf656471499a08 (diff)
parent65f30f65a2816d5b25c096be0f237bbca17608e5 (diff)
Merge remote-tracking branch 'origin/master' into merge-upstream
 Conflicts:
	app/javascript/images/mastodon-drawer.png
	app/javascript/styles/mastodon/components.scss
-rw-r--r--app/javascript/images/mastodon-drawer.png (renamed from app/javascript/images/mastodon-getting-started.png)bin46174 -> 46174 bytes
-rw-r--r--app/javascript/images/wave-drawer.pngbin0 -> 3269 bytes
-rw-r--r--app/javascript/mastodon/features/compose/index.js1
-rw-r--r--app/javascript/mastodon/features/getting_started/index.js24
-rw-r--r--app/javascript/styles/mastodon/components.scss16
-rw-r--r--app/lib/provider_discovery.rb2
-rw-r--r--spec/fixtures/requests/oembed_json_xml.html8
-rw-r--r--spec/fixtures/requests/oembed_xml.html8
8 files changed, 34 insertions, 25 deletions
diff --git a/app/javascript/images/mastodon-getting-started.png b/app/javascript/images/mastodon-drawer.png
index 8fe0df76a..8fe0df76a 100644
--- a/app/javascript/images/mastodon-getting-started.png
+++ b/app/javascript/images/mastodon-drawer.png
Binary files differdiff --git a/app/javascript/images/wave-drawer.png b/app/javascript/images/wave-drawer.png
new file mode 100644
index 000000000..ca9f9e1d8
--- /dev/null
+++ b/app/javascript/images/wave-drawer.png
Binary files differdiff --git a/app/javascript/mastodon/features/compose/index.js b/app/javascript/mastodon/features/compose/index.js
index 0c66585c9..c3e936ab9 100644
--- a/app/javascript/mastodon/features/compose/index.js
+++ b/app/javascript/mastodon/features/compose/index.js
@@ -94,6 +94,7 @@ export default class Compose extends React.PureComponent {
           <div className='drawer__inner' onFocus={this.onFocus}>
             <NavigationContainer onClose={this.onBlur} />
             <ComposeFormContainer />
+            <div className='mastodon' />
           </div>
 
           <Motion defaultStyle={{ x: -100 }} style={{ x: spring(showSearch ? 0 : -100, { stiffness: 210, damping: 20 }) }}>
diff --git a/app/javascript/mastodon/features/getting_started/index.js b/app/javascript/mastodon/features/getting_started/index.js
index 11fb6d365..2f02f245f 100644
--- a/app/javascript/mastodon/features/getting_started/index.js
+++ b/app/javascript/mastodon/features/getting_started/index.js
@@ -98,19 +98,17 @@ export default class GettingStarted extends ImmutablePureComponent {
           <ColumnLink icon='sign-out' text={intl.formatMessage(messages.sign_out)} href='/auth/sign_out' method='delete' />
         </div>
 
-        <div className='getting-started__footer scrollable optionally-scrollable'>
-          <div className='static-content getting-started'>
-            <p>
-              <a href='https://github.com/tootsuite/documentation/blob/master/Using-Mastodon/FAQ.md' rel='noopener' target='_blank'><FormattedMessage id='getting_started.faq' defaultMessage='FAQ' /></a> • <a href='https://github.com/tootsuite/documentation/blob/master/Using-Mastodon/User-guide.md' rel='noopener' target='_blank'><FormattedMessage id='getting_started.userguide' defaultMessage='User Guide' /></a> • <a href='https://github.com/tootsuite/documentation/blob/master/Using-Mastodon/Apps.md' rel='noopener' target='_blank'><FormattedMessage id='getting_started.appsshort' defaultMessage='Apps' /></a>
-            </p>
-            <p>
-              <FormattedMessage
-                id='getting_started.open_source_notice'
-                defaultMessage='Mastodon is open source software. You can contribute or report issues on GitHub at {github}.'
-                values={{ github: <a href='https://github.com/tootsuite/mastodon' rel='noopener' target='_blank'>tootsuite/mastodon</a> }}
-              />
-            </p>
-          </div>
+        <div className='static-content getting-started'>
+          <p>
+            <a href='https://github.com/tootsuite/documentation/blob/master/Using-Mastodon/FAQ.md' rel='noopener' target='_blank'><FormattedMessage id='getting_started.faq' defaultMessage='FAQ' /></a> • <a href='https://github.com/tootsuite/documentation/blob/master/Using-Mastodon/User-guide.md' rel='noopener' target='_blank'><FormattedMessage id='getting_started.userguide' defaultMessage='User Guide' /></a> • <a href='https://github.com/tootsuite/documentation/blob/master/Using-Mastodon/Apps.md' rel='noopener' target='_blank'><FormattedMessage id='getting_started.appsshort' defaultMessage='Apps' /></a>
+          </p>
+          <p>
+            <FormattedMessage
+              id='getting_started.open_source_notice'
+              defaultMessage='Mastodon is open source software. You can contribute or report issues on GitHub at {github}.'
+              values={{ github: <a href='https://github.com/tootsuite/mastodon' rel='noopener' target='_blank'>tootsuite/mastodon</a> }}
+            />
+          </p>
         </div>
       </Column>
     );
diff --git a/app/javascript/styles/mastodon/components.scss b/app/javascript/styles/mastodon/components.scss
index 71d0b91e9..207406cc0 100644
--- a/app/javascript/styles/mastodon/components.scss
+++ b/app/javascript/styles/mastodon/components.scss
@@ -1758,7 +1758,7 @@
   position: absolute;
   top: 0;
   left: 0;
-  background: lighten($ui-base-color, 13%);
+  background: lighten($ui-base-color, 13%) url('../images/wave-drawer.png') no-repeat bottom / 100% auto;
   box-sizing: border-box;
   padding: 0;
   display: flex;
@@ -1771,6 +1771,11 @@
   &.darker {
     background: $ui-base-color;
   }
+
+  > .mastodon {
+    background: url('../images/mastodon-drawer.png') no-repeat left bottom / contain;
+    flex: 1;
+  }
 }
 
 .pseudo-drawer {
@@ -2072,15 +2077,8 @@
   overflow-y: auto;
 }
 
-.getting-started__footer {
-  display: flex;
-  flex-direction: column;
-}
-
 .getting-started {
-  box-sizing: border-box;
-  padding-bottom: 235px;
-  background: url('~images/mastodon-getting-started.png') no-repeat 0 100%;
+  background: $ui-base-color;
   flex: 1 0 auto;
 
   p {
diff --git a/app/lib/provider_discovery.rb b/app/lib/provider_discovery.rb
index 04ba38101..5732e4fcb 100644
--- a/app/lib/provider_discovery.rb
+++ b/app/lib/provider_discovery.rb
@@ -29,7 +29,7 @@ class ProviderDiscovery < OEmbed::ProviderDiscovery
       end
 
       if format.nil? || format == :xml
-        provider_endpoint ||= html.at_xpath('//link[@type="application/xml+oembed"]')&.attribute('href')&.value
+        provider_endpoint ||= html.at_xpath('//link[@type="text/xml+oembed"]')&.attribute('href')&.value
         format ||= :xml if provider_endpoint
       end
 
diff --git a/spec/fixtures/requests/oembed_json_xml.html b/spec/fixtures/requests/oembed_json_xml.html
index b5fc9bed0..8afd8e997 100644
--- a/spec/fixtures/requests/oembed_json_xml.html
+++ b/spec/fixtures/requests/oembed_json_xml.html
@@ -1,8 +1,14 @@
 <!DOCTYPE html>
 <html>
   <head>
+    <!--
+      oEmbed
+      https://oembed.com/
+      > The type attribute must contain either application/json+oembed for JSON
+      > responses, or text/xml+oembed for XML.
+    -->
     <link href='https://host/provider.json' rel='alternate' type='application/json+oembed'>
-    <link href='https://host/provider.xml' rel='alternate' type='application/xml+oembed'>
+    <link href='https://host/provider.xml' rel='alternate' type='text/xml+oembed'>
   </head>
   <body></body>
 </html>
diff --git a/spec/fixtures/requests/oembed_xml.html b/spec/fixtures/requests/oembed_xml.html
index 5d7633e71..bdfcca170 100644
--- a/spec/fixtures/requests/oembed_xml.html
+++ b/spec/fixtures/requests/oembed_xml.html
@@ -1,7 +1,13 @@
 <!DOCTYPE html>
 <html>
   <head>
-    <link href='https://host/provider.xml' rel='alternate' type='application/xml+oembed'>
+    <!--
+      oEmbed
+      https://oembed.com/
+      > The type attribute must contain either application/json+oembed for JSON
+      > responses, or text/xml+oembed for XML.
+    -->
+    <link href='https://host/provider.xml' rel='alternate' type='text/xml+oembed'>
   </head>
   <body></body>
 </html>