Forráskód Böngészése

Merge branch 'master' into feature/lerna

Renée Kooi 6 éve
szülő
commit
6e9b058641

+ 2 - 0
.github/pull_request_template.md

@@ -0,0 +1,2 @@
+
+⚠️ ATTENTION ☢️ Uppy is [transitioning into a Lerna repo](https://github.com/transloadit/uppy/pull/906) this/next week, please wait with new PRs to avoid conflicts. Discussion in [#862](https://github.com/transloadit/uppy/issues/862)

+ 18 - 2
CHANGELOG.md

@@ -70,6 +70,7 @@ PRs are welcome! Please do open an issue to discuss first if it's a big feature,
 - [ ] core: I think there is a use case for having a single-use mode or something for Uppy, where pressing "Upload" locks it down (no new files can be added) and once the upload is finished it's just done. especially with the Form plugin
 - [] dashboard: hiding pause/resume from the UI by default (with option) would be good too probably (we could auto pause and show a resume button when detecting a network change to a metered network using https://devdocs.io/dom/networkinformation/type)
 - [ ] test: Add a prepublish test that checks if `npm pack` is not massive
+- [ ] Add release documentation. eg: test on transloadit website, check examples on the uppy.io website
 
 ## 1.0 Goals
 
@@ -123,8 +124,20 @@ To Be Released: 2018-06-28.
 - [ ] core: look into utilizing https://github.com/que-etc/resize-observer-polyfill for responsive components. See also https://github.com/transloadit/uppy/issues/750
 - [ ] core: use Browserslist config to share between PostCSS, Autoprefixer and Babel https://github.com/browserslist/browserslist, https://github.com/amilajack/eslint-plugin-compat (@arturi)
 - [ ] core: utilize https://github.com/jonathantneal/postcss-preset-env, maybe https://github.com/jonathantneal/postcss-normalize (@arturi)
-- [x] thumbnailgenerator: Polyfill Math.log2 since IE11 doesn't support this method (#892 / @DJWassink)
 - [x] xhrupload: Add `withCredentials` option (#874 / @tuoxiansp)
+- [ ] core: default `autoProceed` to `false`
+- [x] **breaking** provider: rename `host` option to `serverUrl` (#905, @ifedapoolarewaju)
+
+## 0.25.6
+
+Released: 2018-06-25.
+
+- core: ⚠️ **breaking** rename `host` option to `serverUrl` (#905 / @ifedapoolarewaju)
+- dashboard: added browser back button listening (#575 / @zcallan)
+- core: Split utils into separate files (#899 / @goto-bus-stop)
+- providers: Better provider errors (#895 / @arturi)
+- instagram: better thumbnail quality for ig (#901, #887 / @ifedapoolarewaju)
+- core: add `types` to uppy npm package (#0c2d66e8ac005d6a4200948de1bc3a44057f0393 / @arturi)
 
 ## 0.25.5
 
@@ -147,7 +160,7 @@ Released: 2018-06-12.
 - tests: run integration tests with npm-installed uppy (#880 / @ifedapoolarewaju)
 - xhrupload: add withCredentials option (#874 / @tuoxiansp, @b1ncer)
 - xhrupload: Move .withCredentials assignment to after open(): IE 10 doesn't allow setting it before open() is called (#2698b599d716743bbf7ed3ac70c648fef0fd8976 / @goto-bus-stop)
-- thumbnailgenerator: Updated ThumbnailGenerator to work with IE (#4ddc9da47b13c9dfe49155d8c3bcd76b9fa494f2 / @DJWassink)
+- thumbnailgenerator: Polyfill Math.log2 since IE11 doesn't support this method (#4ddc9da47b13c9dfe49155d8c3bcd76b9fa494f2. #892 / @DJWassink)
 - core: add eslint-plugin-compat (@goto-bus-stop, #894)
 - dashboard: remove Dashboard bottom margin, since “powered by” has been moved (#a561e4e7a2c18f5092ba03185e0836ffa6796d04 / @arturi)
 - dashboard: fix Dashboard open/close animation on small screen (#982d27f62693c0eb026e381d10157afffe1eeb64 / @arturi)
@@ -216,6 +229,9 @@ Changed strings:
 - webcam: swap record/stop button icons, fixes #859 (#fdcca95 / @arturi)
 - xhrupload: fix bytesUploaded and bytesTotal for bundled progress (#864 / @arturi)
 - xhrupload: fix retry/timer issues, add timer.done() to `cancel-all` events; disable progress throttling in Core; Ignore progress events in timeout tracker after upload was aborted (#864 / @goto-bus-stop, @arturi)
+- Server: Allow custom headers to be set for remote multipart uploads (@ifedapoolarewaju)
+- Server: Add type to metadata as `filetype`
+- uppy/uppy-server: refactor oauth flow tonot use cookies anymore (@ifedapoolarewaju)
 
 ## 0.24.4
 

+ 5 - 3
README.md

@@ -11,6 +11,8 @@ Uppy is a sleek, modular JavaScript file uploader that integrates seamlessly wit
 - **Preview** and edit metadata with a nice interface;
 - **Upload** to the final destination, optionally process/encode
 
+<img src="https://github.com/transloadit/uppy/raw/master/assets/uppy-demo-2.gif">
+
 **[Read the docs](https://uppy.io/docs)** | **[Try Uppy](https://uppy.io/examples/dashboard/)**
 
 Uppy is being developed by the folks at [Transloadit](https://transloadit.com), a versatile file encoding service.
@@ -65,7 +67,7 @@ $ npm install uppy --save
 
 We recommend installing from npm and then using a module bundler such as [Webpack](http://webpack.github.io/), [Browserify](http://browserify.org/) or [Rollup.js](http://rollupjs.org/).
 
-Add CSS [uppy.min.css](https://transloadit.edgly.net/releases/uppy/v0.25.5/dist/uppy.min.css), either to `<head>` of your HTML page or include in JS, if your bundler of choice supports it — transforms and plugins are available for Browserify and Webpack.
+Add CSS [uppy.min.css](https://transloadit.edgly.net/releases/uppy/v0.25.6/dist/uppy.min.css), either to `<head>` of your HTML page or include in JS, if your bundler of choice supports it — transforms and plugins are available for Browserify and Webpack.
 
 Alternatively, you can also use a pre-built bundle from Transloadit's CDN: Edgly. In that case `Uppy` will attach itself to the global `window.Uppy` object.
 
@@ -74,12 +76,12 @@ Alternatively, you can also use a pre-built bundle from Transloadit's CDN: Edgly
 1\. Add a script to the bottom of `<body>`:
 
 ``` html
-<script src="https://transloadit.edgly.net/releases/uppy/v0.25.5/dist/uppy.min.js"></script>
+<script src="https://transloadit.edgly.net/releases/uppy/v0.25.6/dist/uppy.min.js"></script>
 ```
 
 2\. Add CSS to `<head>`:
 ``` html
-<link href="https://transloadit.edgly.net/releases/uppy/v0.25.5/dist/uppy.min.css" rel="stylesheet">
+<link href="https://transloadit.edgly.net/releases/uppy/v0.25.6/dist/uppy.min.css" rel="stylesheet">
 ```
 
 3\. Initialize:

BIN
assets/uppy-demo-2.gif


+ 1 - 1
bin/upload-to-cdn.sh

@@ -8,7 +8,7 @@
 #  - Checks if a tag is being built (on Travis - otherwise opts to continue execution regardless)
 #  - Installs AWS CLI if needed
 #  - Assumed a fully built uppy is in root dir (unless a specific tag was specified, then it's fetched from npm)
-#  - Runs npm pack, and stores files to e.g. https://transloadit.edgly.net/releases/uppy/v0.25.5/dist/uppy.css
+#  - Runs npm pack, and stores files to e.g. https://transloadit.edgly.net/releases/uppy/v0.25.6/dist/uppy.css
 #  - Uses local package by default, if [version] argument was specified, takes package from npm
 #
 # Run as:

+ 2 - 2
examples/cdn-example/index.html

@@ -4,11 +4,11 @@
     <title></title>
     <meta charset="UTF-8">
     <meta name="viewport" content="width=device-width, initial-scale=1">
-    <link href="https://transloadit.edgly.net/releases/uppy/v0.25.5/dist/uppy.min.css" rel="stylesheet">
+    <link href="https://transloadit.edgly.net/releases/uppy/v0.25.6/dist/uppy.min.css" rel="stylesheet">
   </head>
   <body>
     <button id="uppyModalOpener">Open Modal</button>
-    <script src="https://transloadit.edgly.net/releases/uppy/v0.25.5/dist/uppy.min.js"></script>
+    <script src="https://transloadit.edgly.net/releases/uppy/v0.25.6/dist/uppy.min.js"></script>
     <script>
       const uppy = Uppy.Core({debug: true, autoProceed: false})
         .use(Uppy.Dashboard, { trigger: '#uppyModalOpener' })

+ 2 - 2
examples/uppy-with-server/client/index.html

@@ -4,11 +4,11 @@
     <title></title>
     <meta charset="UTF-8">
     <meta name="viewport" content="width=device-width, initial-scale=1">
-    <link href="https://transloadit.edgly.net/releases/uppy/v0.25.5/dist/uppy.min.css" rel="stylesheet">
+    <link href="https://transloadit.edgly.net/releases/uppy/v0.25.6/dist/uppy.min.css" rel="stylesheet">
   </head>
   <body>
     <button id="uppyModalOpener">Open Modal</button>
-    <script src="https://transloadit.edgly.net/releases/uppy/v0.25.5/dist/uppy.min.js"></script>
+    <script src="https://transloadit.edgly.net/releases/uppy/v0.25.6/dist/uppy.min.js"></script>
     <script>
       const uppy = Uppy.Core({debug: true, autoProceed: false})
         .use(Uppy.Dashboard, { trigger: '#uppyModalOpener' })

+ 0 - 1
package.json

@@ -1,7 +1,6 @@
 {
   "private": true,
   "name": "uppy-build",
-  "version": "0.25.5",
   "description": "Extensible JavaScript file upload widget with support for drag&drop, resumable uploads, previews, restrictions, file processing/encoding, remote providers like Instagram, Dropbox, Google Drive, S3 and more :dog:",
   "lint-staged": {
     "*.js": "eslint"

+ 0 - 0
website/src/_posts/2018-02-0.24.md → website/src/_posts/2018-04-0.24.md


+ 60 - 32
website/src/_posts/2018-06-0.25.md

@@ -1,29 +1,41 @@
 ---
-title: "Uppy 0.25: Drag drop links or images from webpages, improved selecting in providers, interactive components in i18n strings"
+title: "Uppy 0.25: Drag & Drop Links Urls & Images, Improved File Selecting in Providers, Interactive Components In i18n"
 date: 2018-06-07
-author: renee
-image: ""
-published: false
+author: arturi
+image: "https://uppy.io/images/blog/0.25/new-select-provider.jpg"
+published: true
 ---
 
-Uppy 0.25 brings drag drop links or images from webpages, improved selecting in provider view, interactive components in i18n strings.
+Uppy 0.25 comes with a couple of new features, like drag-and-dropping URLs and images with the Url plugin, Dashboard modal animation and interactive components in i18n strings, as well as a ton of under the hood fixes and improvements.
 
 <!--more-->
 
-## i18n Strings With Interactive Components
+## Select In Providers
+
+<img src="/images/blog/0.25/new-select-provider.jpg">
+
+Selecting files doesn’t add files to Uppy immediately anymore. Instead a “Select” button appears (with a counter), and pressing that adds all the files with checked checkboxes and closes the Instagram or Google Drive overlay. Cancel discards the selection and also closes the overlay.
+
+This addresses an undesirable case where `autoProceed: true` would begin uploading files the moment you ticked a checkbox, and you couldn’t see what was going on because the provider overlay was still open.
+
+## Drag & Drop or Paste Links And Images with the Url Plugin
+
+If you use the [Url plugin](/docs/url/) with the [Dashboard](/docs/dashboard), you can now drop or paste URLs into the main Dashboard area. They will automatically be imported by the Url plugin:
+
+<figure class="wide"><video alt="Demo video showing Uppy with Url plugin that accepts drag and dropped urls" autoplay loop muted playsinline><source src="/images/blog/0.25/link-drop-demo.mp4" type="video/mp4">Your browser does not support the video tag, you can <a href="/images/blog/0.25/link-drop-demo.mp4">download the video</a> to watch it.</video></figure>
+
+## i18n Strings with Interactive Components
 
 ⚠️ **breaking**
 
-We’ve changed how i18n strings work with interactive components. We now use placeholder for those interactive buttons, so it works nicely in languages that have different word order than English. Example:
+We’ve changed how i18n strings work with interactive components. We now use a placeholder for e.g. buttons, so it works nicely in languages that have different word order than English. Example:
 
 ```js
 dropPasteImport: 'Drop files here, paste, import from one of the locations above or %{browse}'
 browse: 'browse'
 ```
 
-`%{browse}` will be replaced with a button/link.
-
-We can’t do this in all situations yet, because some parts of some strings need to be wrapped in Preact elements, which the Translator can’t handle.
+`%{browse}` will be replaced with a button/link. Previously, these two strings were concatenated in the view layer, so the `browse` text would always be last.
 
 Here’s a list of strings that were changed in this release, please update those in your locales:
 
@@ -33,43 +45,59 @@ Here’s a list of strings that were changed in this release, please update thos
 - dashboard: `fileSource` and `importFrom` need to contain `%{name}`, substituted by the name of the provider
 - dragdrop: `dropHereOr` needs to contain `%{browse}`, substituted by the "browse" text button
 
-See full list of locale strings for each plugin you are using on [Uppy Docs](/docs/).
+The full list of available locale strings for each plugin is now documented in the [Uppy Docs](/docs/).
 
 ## React Documentation
 
-React docs have been improved: we now have a separate page for each Uppy React wrapper component we offer.
+React docs have been improved: we now have a [separate page](/docs/react/) for each Uppy React wrapper component that we offer.
 
-- The id option is listed on each plugin's documentation page.
-- The replaceTargetContent option is listed on UI plugin documentation pages.
-- The locale option is described on each plugin documentation page, and includes a short description for each string. The default value is removed from the snippet at the top of the ## Options section to save some space (since it's a very large object sometimes).
+Other improvements in docs:
 
-## Drag & Drop Links or Images From Webpages
+- The `id` option is now listed on each plugin's documentation page.
+- The `replaceTargetContent` option is listed on UI plugin documentation pages.
+- The `locale` option is described on each plugin documentation page, and includes a short description for each string.
 
-<figure class="wide"><video alt="Demo video showing Uppy with Url plugin that accepts drag and dropped urls" controls autoplay><source src="/images/blog/0.25/link-drop-demo.mp4" type="video/mp4">Your browser does not support the video tag, you can <a href="/images/blog/0.25/link-drop-demo.mp4">download the video</a> to watch it.</video></figure>
+## Typescript Definitions
 
-## Select In Provider View Vefore Adding Files
+[@taoqf](https://github.com/taoqf) went ahead and added a lot of type definitions to Uppy in [#834](https://github.com/transloadit/uppy/pull/834). So if you are using TypeScript (and even if not, your code editor / linting tool likely supports type definitions), you are in for a treat!
 
-Selecting files doesn’t add files to Uppy immediately anymore. Instead a “Select” button appears (with a counter), and pressing that adds all the files with checked checkboxes and closes the Instagram or Google Drive overlay. Cancel discards the selection and also closes the overlay.
+## No need to `.run()`
 
-This addresses an undesirable case where `autoProceed: true` would begin uploading files the moment you ticked a checkbox, and you couldn’t see what was going on because the provider overlay was still open.
+⚠️**breaking**
 
-## Typescript Definitions
+We removed the need to type `uppy.run()` in [#793](https://github.com/transloadit/uppy/pull/793). You now only have to call `.use()` for the plugins that you need (as usual), and everything is then run automatically. It comes with a few tradeoffs but we were getting a big amount of support tickets where people forgot to conclude with `.run()`, and we saw a chance to reduce boilerplate, so we decided to go ahead and pave the cowpath.
+
+## Authorisation tokens in Local Storage
 
-...
+⚠️**breaking**
 
-## Other cool things
+Authorisation tokens from Uppy Server are now stored in local storage as opposed to cookies. Two primary reasons for this decision are:
 
-- Fix: Debounce render calls again, fixes #669 #796 by goto-bus-stop
-- Fix: XHRUPload canceled uploads progress events #864 
-- Improvement: ⚠️ **breaking** Remove `uppy.run()` — everything is now run automatically, you only need to call `.use()` for plugins that you need, as usual (#793 / @goto-bus-stop)
-- Improvement: Dashboard open/close animation
-- Improvement: You can now hide action buttons in Dashboard and StatusBar #821
-- Improvement: Pass `allowedFileTypes` and `maxNumberOfFiles` to `input[type=file]` to add restrictions to the system file picking dialog too
-- Improvement: merge meta data when add file #810
+1. It avoids CSRF issues which are present when using cookies.
+2. It allows for less stringent [CORS policies enforced by browsers](https://github.com/transloadit/uppy/issues/803#issuecomment-386257515), since we are no longer sending cookie credentials via Ajax requests.
+
+This is a breaking change because it requires that the Uppy Server version should also be updated to **0.13.x** otherwise there could be unexpected behaviour.
+
+What’s more about the Authorisation tokens is that they are now encrypted on the server before being sent down to the client. Subsequent requests from the client will then send the token to the server via headers (not via cookies anymore).
+
+## Other Cool Changes
+
+- Fix: Debounce render calls again, fixes #669 (#796)
+- Fix: XHRUpload canceled uploads progress events (#864)
+- Improvement: Dashboard open/close animation (#852)
+- Improvement: You can now hide action buttons in Dashboard and StatusBar (#821)
+- Improvement: Pass `allowedFileTypes` and `maxNumberOfFiles` to `input[type=file]` to add restrictions to the system file picking dialog too (#814)
+- Improvement: merge meta data when add file (#810)
 - Fix: More robust failure handling for Transloadit, closes #708 (#805)
+- Feature: display username/email in provider view
+- Feature: show message for empty provider files
+- Server: Allow custom headers to be set for remote multipart uploads
+- Server: Add type to metadata as `filetype`
+
+⚠️**heads up**
 
-<img class="border" src="/images/blog/0.25/">
+In the next release we are planning a [Lerna conversion](https://github.com/transloadit/uppy/pull/906), meaning that each Uppy plugin / module will get its own NPM package. Pretty excited about that one! (but also please refrain from sending us big PRs in the meantime :)
 
-Have fun,
+See you in the next one!
 
 The Uppy Team

+ 1 - 1
website/src/docs/aws-s3.md

@@ -6,7 +6,7 @@ permalink: docs/aws-s3/
 ---
 
 The `AwsS3` plugin can be used to upload files directly to an S3 bucket.
-Uploads can be signed using [uppy-server][uppy-server docs] or a custom signing function.
+Uploads can be signed using [Uppy Server][uppy-server docs] or a custom signing function.
 
 ```js
 const AwsS3 = require('@uppy/aws-s3')

+ 1 - 1
website/src/docs/dropbox.md

@@ -5,7 +5,7 @@ title: "Dropbox"
 permalink: docs/dropbox/
 ---
 
-The Dropbox plugin lets users import files their Google Drive account.
+The Dropbox plugin lets users import files their Dropbox account.
 
 An Uppy Server instance is required for the Dropbox plugin to work. Uppy Server handles authentication with Dropbox, downloads the files, and uploads them to the destination. This saves the user bandwidth, especially helpful if they are on a mobile connection.
 

+ 1 - 1
website/src/docs/google-drive.md

@@ -5,7 +5,7 @@ title: "GoogleDrive"
 permalink: docs/google-drive/
 ---
 
-The GoogleDrive plugin lets users import files their Google Drive account.
+The GoogleDrive plugin lets users import files from their Google Drive account.
 
 An Uppy Server instance is required for the GoogleDrive plugin to work. Uppy Server handles authentication with Google, downloads files from the Drive and uploads them to the destination. This saves the user bandwidth, especially helpful if they are on a mobile connection.
 

+ 2 - 2
website/src/docs/index.md

@@ -54,12 +54,12 @@ Alternatively, you can also use a pre-built bundle from Transloadit's CDN: Edgly
 1\. Add a script to the bottom of `<body>`:
 
 ``` html
-<script src="https://transloadit.edgly.net/releases/uppy/v0.25.5/dist/uppy.min.js"></script>
+<script src="https://transloadit.edgly.net/releases/uppy/v0.25.6/dist/uppy.min.js"></script>
 ```
 
 2\. Add CSS to `<head>`:
 ``` html
-<link href="https://transloadit.edgly.net/releases/uppy/v0.25.5/dist/uppy.min.css" rel="stylesheet">
+<link href="https://transloadit.edgly.net/releases/uppy/v0.25.6/dist/uppy.min.css" rel="stylesheet">
 ```
 
 3\. Initialize:

+ 1 - 1
website/src/docs/instagram.md

@@ -5,7 +5,7 @@ title: "Instagram"
 permalink: docs/instagram/
 ---
 
-The Instagram plugin lets users import files their Google Drive account.
+The Instagram plugin lets users import files their Instagram account.
 
 An Uppy Server instance is required for the Instagram plugin to work. Uppy Server handles authentication with Instagram, downloads the pictures and videos, and uploads them to the destination. This saves the user bandwidth, especially helpful if they are on a mobile connection.
 

+ 2 - 2
website/src/examples/i18n/app.html

@@ -1,11 +1,11 @@
 <!-- Basic Uppy styles. You can use Transloadit's CDN, Edgly:
-https://transloadit.edgly.net/releases/uppy/v0.25.5/dist/uppy.min.css -->
+https://transloadit.edgly.net/releases/uppy/v0.25.6/dist/uppy.min.css -->
 <link rel="stylesheet" href="/uppy/uppy.min.css">
 
 <div class="UppyDragDrop"></div>
 
 <!-- Load Uppy pre-built bundled version. You can use Transloadit's CDN, Edgly:
-https://transloadit.edgly.net/releases/uppy/v0.25.5/dist/uppy.min.js -->
+https://transloadit.edgly.net/releases/uppy/v0.25.6/dist/uppy.min.js -->
 <script src="/uppy/uppy.min.js"></script>
 <script>
   var uppy = Uppy.Core({ debug: true });

BIN
website/src/images/blog/0.25/new-select-provider.jpg


BIN
website/src/images/uppy-demo-2.mp4


+ 7 - 5
website/themes/uppy/layout/index.ejs

@@ -1,6 +1,6 @@
 <section id="hero" class="IndexHero">
   <header id="logo-wrap" class="IndexHero-header">
-    <img id="logo" class="IndexHero-logo" title="Uppy" alt="Uppy" src="<%- config.logo_large %>">
+    <img id="logo" class="IndexHero-logo" title="Uppy" alt="Uppy" src="<%- config.logo_medium %>">
     <h1 class="IndexHero-title"><%- config.title %></h1>
 
     <h2 class="IndexHero-tagline">
@@ -23,8 +23,10 @@
 
   <div class="IndexExample-block">
     <video class="IndexExample-video"
-           src="/images/uppy-demo.mp4"
-           autoplay loop muted></video>
+           autoplay loop muted playsinline>
+      <source src="/images/uppy-demo-2.mp4" type="video/mp4">
+      Your browser does not support the video tag, you can <a href="/images/blog/0.25/link-drop-demo.mp4">download the video</a> to watch it.
+    </video>
     <form id="upload-form">
       <input type="file">
     </form>
@@ -79,8 +81,8 @@
   <p>© <%- date(Date.now(), 'YYYY') %> <a href="https://transloadit.com" rel="noreferrer noopener" target="_blank">Transloadit</a></p>
 </footer>
 
-<link href="https://transloadit.edgly.net/releases/uppy/v0.25.5/dist/uppy.min.css" rel="stylesheet">
-<script src="https://transloadit.edgly.net/releases/uppy/v0.25.5/dist/uppy.min.js"></script>
+<link href="https://transloadit.edgly.net/releases/uppy/v0.25.6/dist/uppy.min.css" rel="stylesheet">
+<script src="https://transloadit.edgly.net/releases/uppy/v0.25.6/dist/uppy.min.js"></script>
 
 <script>
   var PROTOCOL = location.protocol === 'https:' ? 'https' : 'http'

+ 1 - 1
website/themes/uppy/layout/layout.ejs

@@ -47,7 +47,7 @@
           </ul>
         </nav>
 
-        <a href="https://github.com/transloadit/uppy" class="github-corner" aria-label="View source on Github"><svg width="80" height="80" viewBox="0 0 250 250" style="fill:#e02177; color:#fff; position: absolute; top: 0; border: 0; right: 0;" aria-hidden="true"><path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path><path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2" fill="currentColor" style="transform-origin: 130px 106px;" class="octo-arm"></path><path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z" fill="currentColor" class="octo-body"></path></svg></a><style>.github-corner:hover .octo-arm{animation:octocat-wave 560ms ease-in-out}@keyframes octocat-wave{0%,100%{transform:rotate(0)}20%,60%{transform:rotate(-25deg)}40%,80%{transform:rotate(10deg)}}@media (max-width:500px){.github-corner:hover .octo-arm{animation:none}.github-corner .octo-arm{animation:octocat-wave 560ms ease-in-out}}</style>
+        <a href="https://github.com/transloadit/uppy" class="github-corner" aria-label="View source on Github"><svg width="67" height="67" viewBox="0 0 250 250" style="fill:#e02177; color:#fff; position: absolute; top: 0; border: 0; right: 0;" aria-hidden="true"><path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path><path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2" fill="currentColor" style="transform-origin: 130px 106px;" class="octo-arm"></path><path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z" fill="currentColor" class="octo-body"></path></svg></a><style>.github-corner:hover .octo-arm{animation:octocat-wave 560ms ease-in-out}@keyframes octocat-wave{0%,100%{transform:rotate(0)}20%,60%{transform:rotate(-25deg)}40%,80%{transform:rotate(10deg)}}@media (max-width:500px){.github-corner:hover .octo-arm{animation:none}.github-corner .octo-arm{animation:octocat-wave 560ms ease-in-out}}</style>
       </header>
 
       <main class="MainContent js-MainContent" id="main">

+ 7 - 2
website/themes/uppy/source/css/_common.scss

@@ -144,7 +144,7 @@ a.button {
   padding: 2em 1.4em 0;
 
   @media #{$screen-medium} {
-    padding: 0 60px 30px;
+    padding: 60px 60px 30px;
   }
 }
 
@@ -236,10 +236,15 @@ a.button {
     height: auto;
     padding: 10px 60px;
     box-shadow: none;
-    position: relative;
+    // position: relative;
     z-index: 2;
     border-top: 3px solid $color-primary;
+    border-bottom: 1px solid rgba($color-lightgray, 0.3);
     text-align: left;
+
+    // &.fix-header {
+    //   box-shadow: 0 0 4px rgba(0,0,0,.25);
+    // }
   }
 }
 

+ 10 - 4
website/themes/uppy/source/css/_index.scss

@@ -179,16 +179,14 @@
   text-align: center;
   margin: 0;
   padding: 0;
-  position: relative;
-  top: -20px;
 }
 
 .TryMe-btn {
   @include reset-button();
   font-size: 12px;
   display: inline-block;
-  padding: 6px 10px;
-  border-radius: 25px;
+  padding: 4px 8px;
+  border-radius: 23px;
   transition: all .3s ease;
   background-color: $color-primary;
   color: $color-white;
@@ -248,6 +246,7 @@
   overflow: hidden;
   max-width: 500px;
   margin: auto;
+  margin-bottom: 30px;
   font-size: 1em;
 
   @media #{$screen-medium} {
@@ -259,8 +258,15 @@
   }
 }
 
+  .IndexExample-block:nth-child(2) {
+    @media #{$screen-medium} {
+      padding-left: 30px;
+    }
+  }
+
 .IndexExample-video {
   max-width: 100%;
+  margin-bottom: 5px;
 }
 
 .IndexExample-block img {

+ 27 - 6
website/themes/uppy/source/css/_page.scss

@@ -27,15 +27,18 @@
   }
 
   &.is-open { transform: translate(0, 0); }
-  .fix-sidebar & { position: fixed; }
+  // .fix-sidebar & { position: fixed; }
 
   @media #{$screen-medium} {
-    position: absolute;
+    // position: absolute;
     top: 0;
-    left: 60px;
-    bottom: 0;
-    padding: 2.2em 0;
-    width: 230px;
+    left: 0;
+    // bottom: 0;
+    // padding: 2.2em 0;
+    padding-top: 95px;
+    padding-left: 60px;
+    padding-bottom: 130px;
+    // width: 20px;
     margin-right: 20px;
     overflow-x: hidden;
     overflow-y: auto;
@@ -168,6 +171,24 @@
     margin-left: 20px;
   }
 
+  // h2, h3 {
+  //   padding-top: 80px;
+  // }
+
+  // for ancor links to work with fixed header
+  h2:before, h3:before {
+    content: '';
+    display: block;
+    margin-top: -60px;
+    height: 60px;
+    visibility: hidden;
+
+    @media #{$screen-large} {
+      margin-top: -90px;
+      height: 90px;
+    }
+  }
+
   .post h1,
   > h1 {
     font-size: 1.6em;

+ 14 - 8
website/themes/uppy/source/js/common.js

@@ -14,7 +14,7 @@
   }
 
   function InnerPage () {
-    var main = document.querySelector('.js-MainContent')
+    // var main = document.querySelector('.js-MainContent')
     var menuButton = document.querySelector('.js-MenuBtn')
     var header = document.querySelector('.js-MainHeader')
     var menu = document.querySelector('.js-Sidebar')
@@ -23,13 +23,19 @@
     var animating = false
     var allLinks = []
 
+    // // listen for scroll event to do positioning & highlights
+    // window.addEventListener('scroll', updateSidebar)
+    // window.addEventListener('resize', updateSidebar)
+
     function updateSidebar () {
       var top = (doc && doc.scrollTop) || body.scrollTop
       var headerHeight = header.offsetHeight
-      if (top > headerHeight) {
-        main.classList.add('fix-sidebar')
+      if (top > (headerHeight - 25)) {
+        // main.classList.add('fix-sidebar')
+        header.classList.add('fix-header')
       } else {
-        main.classList.remove('fix-sidebar')
+        // main.classList.remove('fix-sidebar')
+        header.classList.remove('fix-header')
       }
       if (animating || !allLinks) return
       var last
@@ -172,10 +178,10 @@
 
         // init smooth scroll
         window.smoothScroll.init({
-          speed: 400,
-          offset: window.innerWidth > 720
-            ? 40
-            : 58
+          speed: 400
+          // offset: window.innerWidth > 720
+          //   ? 40
+          //   : 58
         })
       }