Skip to content

Commit

Permalink
Merge branch 'release/5.1.0'
Browse files Browse the repository at this point in the history
* release/5.1.0: (111 commits)
  updated the changelog
  compiled assets
  updating the attributes
  updated the readme
  updated the documentation and compiled assets
  updated the check on stats index
  updated the readme
  updated the readme
  compiled assets
  fixed the link to the upgrade guide
  added the upgrade guide
  compiled assets
  compiled assets
  added a debounce to searching unsplash #605
  Apply fixes from StyleCI (#606)
  added a max upload size to the image picker
  work
  modified the debounce rates
  minor formatting fixes
  updated the changelog
  ...
  • Loading branch information
austintoddj committed Jan 22, 2020
2 parents 0302b81 + 18380a3 commit eec43b3
Show file tree
Hide file tree
Showing 179 changed files with 4,780 additions and 2,534 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@
phpunit.xml export-ignore
changelog.md export-ignore
sponsors.md export-ignore
upgrade.md export-ignore
4 changes: 2 additions & 2 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ Now that the projects are linked, run the following installation steps:
```bash
php artisan canvas:install
php artisan storage:link
php artisan canvas:setup --data
php artisan canvas:setup
```

The view stats are a core component to the project, so it's best to have a large dataset in place when developing. Assuming you passed the `--data` option during the setup process above, you'll already have posts populating the database. In which case, you can add the following snippets to your Laravel app:
Expand All @@ -91,7 +91,7 @@ The view stats are a core component to the project, so it's best to have a large
$this->call(CanvasViewsTableSeeder::class);

// Create a new class named `CanvasViewsTableSeeder` and add this to the `run()` method:
factory(View::class, 2500)->create();
factory(\Canvas\View::class, 2500)->create();

// Create a new factory named `ViewFactory` and add this definition:
$factory->define(\Canvas\View::class, function (\Faker\Generator $faker) {
Expand Down
12 changes: 12 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,18 @@

## [Unreleased](https://github.com/cnvs/canvas/compare/master...develop)

## [5.1.0](https://github.com/cnvs/canvas/compare/v5.0.3...v5.1.0) (January 22, 2020)

## Changed
- Changed the chart library from Frappe Charts to Charts.js ([0a5607b](https://github.com/cnvs/canvas/commit/0a5607b040874391d0cc34dfec70e320783db2f6))
- Refactored the mailable to a markdown template ([cefbd93](https://github.com/cnvs/canvas/commit/cefbd93290a33d382861e311d3c42a8d52a29c6e))

## Added
- Added infinite loading ([e34f7f4](https://github.com/cnvs/canvas/commit/e34f7f47093bf42e19c9a2b376db47c337ad4bfc), [415c9ec](https://github.com/cnvs/canvas/commit/415c9ec2994f9c67a1273bb15994c5af0bb28ca1), [686b85c](https://github.com/cnvs/canvas/commit/686b85ce5f41bdb3e4f62520666f68dcada88c58))
- Added user-managed settings ([8466aa0](https://github.com/cnvs/canvas/commit/8466aa02006cc68a0c5d06c6d54a2e896654abdc))
- Added an editor control bar for mobile devices ([d48b72d](https://github.com/cnvs/canvas/commit/d48b72db213d902ce54dabafc3e74da8e62fc95c))
- Added translations for Turkish and Dutch ([201aeb4](https://github.com/cnvs/canvas/commit/201aeb4d439b1438636accb1411c6db762fc6e9e), [281e604](https://github.com/cnvs/canvas/commit/281e604edcda0a717ee73fa8a095f8a2628a60f7))

## [5.0.3](https://github.com/cnvs/canvas/compare/v5.0.2...v5.0.3) (December 16, 2019)

## Fixed
Expand Down
19 changes: 11 additions & 8 deletions config/canvas.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,18 @@
| Storage
|--------------------------------------------------------------------------
|
| This is the storage disk Canvas will use to put file uploads, you may
| This is the storage disk Canvas will use to put file uploads. You may
| use any of the disks defined in the config/filesystems.php file and
| you may also configure the path where files are to be stored.
| you may also change the maximum upload size from its 3MB default.
|
*/

'storage_disk' => env('CANVAS_STORAGE_DISK', 'local'),

'storage_path' => env('CANVAS_STORAGE_PATH', 'public/canvas'),

'upload_filesize' => env('CANVAS_UPLOAD_FILESIZE', 3145728),

/*
|--------------------------------------------------------------------------
| Unsplash Integration
Expand All @@ -63,17 +65,18 @@

/*
|--------------------------------------------------------------------------
| Weekly Digest
| E-Mail Notifications
|--------------------------------------------------------------------------
|
| This option enables Canvas to send e-mail notifications via the default
| mail driver on a weekly basis. All users that have published content
| will receive a total view count summary of the last seven days.
| This option controls e-mail notifications that will be sent via the
| default application mail driver. A default option is provided to
| support the notification system as an opt-in feature.
|
|
*/

'digest' => [
'enabled' => env('CANVAS_DIGEST_ENABLED', false),
'mail' => [
'enabled' => env('CANVAS_MAIL_ENABLED', false),
],

];
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
"autosize": "^4.0.2",
"axios": "^0.19.0",
"bootstrap": "^4.4.0",
"chart.js": "^2.9.3",
"cross-env": "^6.0",
"frappe-charts": "^1.3.0",
"jquery": "^3.4",
"laravel-mix": "^5.0",
"lodash": "^4.17.5",
Expand All @@ -26,9 +26,10 @@
"popper.js": "^1.16",
"quill": "1.3.7",
"resolve-url-loader": "^3.1.0",
"sass": "^1.23.6",
"sass": "^1.24",
"sass-loader": "^8.0.0",
"vue": "^2.6.10",
"vue-infinite-loading": "^2.4.4",
"vue-multiselect": "^2.1.6",
"vue-router": "^3.1.3",
"vue-template-compiler": "^2.6.10",
Expand Down
4 changes: 2 additions & 2 deletions public/css/app-dark.css

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions public/css/app.css

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion public/js/app.js

Large diffs are not rendered by default.

112 changes: 112 additions & 0 deletions public/js/app.js.LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
/*!
* vue-infinite-loading v2.4.4
* (c) 2016-2019 PeachScript
* MIT License
*/

/**!
* @fileOverview Kickass library to create and place poppers near their reference elements.
* @version 1.16.0
* @license
* Copyright (c) 2016 Federico Zivolo and contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/

/*!
* jQuery JavaScript Library v3.4.1
* https://jquery.com/
*
* Includes Sizzle.js
* https://sizzlejs.com/
*
* Copyright JS Foundation and other contributors
* Released under the MIT license
* https://jquery.org/license
*
* Date: 2019-05-01T21:04Z
*/

/*!
* Sizzle CSS Selector Engine v2.3.4
* https://sizzlejs.com/
*
* Copyright JS Foundation and other contributors
* Released under the MIT license
* https://js.foundation/
*
* Date: 2019-04-08
*/

/*!
autosize 4.0.2
license: MIT
http://www.jacklmoore.com/autosize
*/

/*!
* Vue.js v2.6.11
* (c) 2014-2019 Evan You
* Released under the MIT License.
*/

/**
* vuex v3.1.2
* (c) 2019 Evan You
* @license MIT
*/

/**
* @license
* Lodash <https://lodash.com/>
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
* Released under MIT license <https://lodash.com/license>
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
*/

/*!
* Chart.js v2.9.3
* https://www.chartjs.org
* (c) 2019 Chart.js Contributors
* Released under the MIT License
*/

/* NProgress, (c) 2013, 2014 Rico Sta. Cruz - http://ricostacruz.com/nprogress
* @license MIT */

/*!
* Bootstrap v4.4.1 (https://getbootstrap.com/)
* Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/

/*!
* Quill Editor v1.3.7
* https://quilljs.com/
* Copyright (c) 2014, Jason Chen
* Copyright (c) 2013, salesforce.com
*/

/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <http://feross.org>
* @license MIT
*/
6 changes: 3 additions & 3 deletions public/mix-manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"/js/app.js": "/js/app.js?id=b7a6754d5337af9b0cd8",
"/css/app.css": "/css/app.css?id=cdf93057ebdc88617f00",
"/css/app-dark.css": "/css/app-dark.css?id=aeacd7e468c666beb4b6",
"/js/app.js": "/js/app.js?id=b28db4de031ebf48e43f",
"/css/app.css": "/css/app.css?id=7bfe6febf22d3f046297",
"/css/app-dark.css": "/css/app-dark.css?id=2f8397d54987fda32df0",
"/favicon.ico": "/favicon.ico?id=b3aec2f33a001156e320"
}
69 changes: 48 additions & 21 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
- [Options](#options)
- [Updates](#updates)
- [Testing](#testing)
- [Translate](#translate)
- [License](#license)
- [Credits](#credits)

Expand Down Expand Up @@ -67,11 +68,7 @@ Canvas exposes a simple UI at `/canvas` by default. This can be changed by updat
*/

'path' => env('CANVAS_PATH_NAME', 'canvas'),
```

If you'd like to restrict access to Canvas in a production environment, add any custom middleware to the following array:

```php
/*
|--------------------------------------------------------------------------
| Route Middleware
Expand All @@ -87,10 +84,29 @@ If you'd like to restrict access to Canvas in a production environment, add any
'web',
'auth',
],

/*
|--------------------------------------------------------------------------
| Storage
|--------------------------------------------------------------------------
|
| This is the storage disk Canvas will use to put file uploads. You may
| use any of the disks defined in the config/filesystems.php file and
| you may also change the maximum upload size from its 3MB default.
|
*/

'storage_disk' => env('CANVAS_STORAGE_DISK', 'local'),

'storage_path' => env('CANVAS_STORAGE_PATH', 'public/canvas'),

'upload_filesize' => env('CANVAS_UPLOAD_FILESIZE', 3145728),
```

### Publishing

> **Note:** If you'd rather have the following setup run automatically, just use [this command](#want-to-get-started-fast) to scaffold a Medium-inspired frontend. Aside from general post listings, you'll get localized content, reading suggestions and more!
Canvas takes care of the backend while giving you the freedom to display the final content however you choose. A very simple setup would include a controller, some views, and a few routes. Take a look at the following example:

Define a few routes inside of `routes/web.php`:
Expand Down Expand Up @@ -164,7 +180,7 @@ public function findPostBySlug(string $slug)

if (optional($post)->published) {
$data = [
'author' => $post->author,
'author' => $post->user,
'post' => $post,
'meta' => $post->meta,
];
Expand All @@ -179,17 +195,19 @@ public function findPostBySlug(string $slug)
}
```

Finally, just create `index.blade.php` and `show.blade.php` inside a `/views/blog` directory.

If you'd rather have all of this run automatically with no extra work from you, just follow through the optional guide below to build a Medium-inspired frontend. Aside from general post listings, you'll get localized content, reading suggestions and more!
Finally, just create `index.blade.php` and `show.blade.php` inside a `/views/blog` directory to display your data.

## Options

> **Note:** The following components are optional features, you are not required to use them.
**Want to get started fast?** Just run `php artisan canvas:setup` after installing Canvas. A `--data` option may also be included in the command to generate demo data. Then, navigate your browser to `http://your-app.test/blog` or any other URL that is assigned to your application. This command scaffolds a default frontend for your entire blog!
### Want to get started fast?

Just run `php artisan canvas:setup` after installing Canvas. Then, navigate your browser to `http://your-app.test/blog` or any other URL that is assigned to your application. This command scaffolds a default frontend for your entire blog!

If you want to include [Unsplash](https://unsplash.com) images in your post content, set up a new application at [https://unsplash.com/oauth/applications](https://unsplash.com/oauth/applications). Grab your access key and update `config/canvas.php`:
### Want access to the entire [Unsplash](https://unsplash.com) library?

Set up a new application at [https://unsplash.com/oauth/applications](https://unsplash.com/oauth/applications), grab your access key, and update `config/canvas.php`:

```php
/*
Expand All @@ -205,26 +223,29 @@ If you want to include [Unsplash](https://unsplash.com) images in your post cont

'unsplash' => [
'access_key' => env('CANVAS_UNSPLASH_ACCESS_KEY'),
],
]
```

**Want a weekly summary?** Canvas provides support for a weekly e-mail that gives you quick stats of the content you've authored, delivered straight to your inbox. Once your application is [configured for sending mail](https://laravel.com/docs/master/mail), update `config/canvas.php`:
### Want a weekly summary?

Canvas allows users to receive a weekly summary of their authored content. Once your application is [configured for sending mail](https://laravel.com/docs/master/mail), update `config/canvas.php`:

```php
/*
|--------------------------------------------------------------------------
| Weekly Digest
| E-Mail Notifications
|--------------------------------------------------------------------------
|
| This option enables Canvas to send e-mail notifications via the default
| mail driver on a weekly basis. All users that have published content
| will receive a total view count summary of the last seven days.
| This option controls e-mail notifications that will be sent via the
| default application mail driver. A default option is provided to
| support the notification system as an opt-in feature.
|
|
*/

'digest' => [
'enabled' => env('CANVAS_DIGEST_ENABLED', false),
],
'mail' => [
'enabled' => env('CANVAS_MAIL_ENABLED', false),
]
```

Since the weekly digest runs on [Laravel's Scheduler](https://laravel.com/docs/master/scheduling), you'll need to add the following cron entry to your server:
Expand All @@ -233,10 +254,12 @@ Since the weekly digest runs on [Laravel's Scheduler](https://laravel.com/docs/m
* * * * * cd /path-to-your-project && php artisan schedule:run >> /dev/null 2>&1
```

**Prefer working at night?** Simply un-comment the `Canvas::night()` method in the `CanvasServiceProvider` to switch off the lights.

## Updates

Canvas releases are versioned as `MAJOR.MINOR.PATCH` numbers
- A major or minor version _can contain breaking changes_, so follow the [upgrade guide](upgrade.md) for a step-by-step breakdown
- Patch versions will remain backwards compatible, so you can safely update the package by following the steps below:

You may update your Canvas installation using composer:

```bash
Expand All @@ -263,6 +286,10 @@ Run the tests with:
composer test
```

## Translate

One of the goals for the team behind Canvas is to ensure proper localization across the app. If you come across any translation mistakes or issues and want to make a contribution, please [create a pull request](https://github.com/cnvs/canvas/pulls). If you don't see your native language included in the `resources/lang` directory, feel free to add it.

## License

Canvas is open-sourced software licensed under the [MIT license](license).
Expand Down
Loading

0 comments on commit eec43b3

Please sign in to comment.