Skip to content

Commit

Permalink
Merge branch 'release/4.1.0'
Browse files Browse the repository at this point in the history
* release/4.1.0:
  refactoring public assets
  wip
  Adds instructions on default setups
  fix for the route not being defined yet
  wip
  wip
  wip
  Apply fixes from StyleCI (#430)
  wip
  Apply fixes from StyleCI (#429)
  initial wip of a default setup
  update the base route
  wip
  • Loading branch information
austintoddj committed Feb 10, 2019
2 parents 651ccdf + fadbccc commit 50aba11
Show file tree
Hide file tree
Showing 67 changed files with 528 additions and 3,624 deletions.
15 changes: 1 addition & 14 deletions config/canvas.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,12 @@

return [

/*
|--------------------------------------------------------------------------
| Public Path
|--------------------------------------------------------------------------
|
| You are free to expose the public-facing blog to any route you wish.
| If no change is made then it will default to the /blog path of
| your application.
|
*/

'public_path' => env('CANVAS_PUBLIC_PATH', 'blog'),

/*
|--------------------------------------------------------------------------
| Route Middleware
|--------------------------------------------------------------------------
|
| You may assign any custom middleware that you choose to the /canvas
| You may assign any custom middleware that you choose to the Canvas
| routes in your application. They will be protected by basic
| user authentication by default.
|
Expand Down
Empty file removed public/.gitkeep
Empty file.
4 changes: 2 additions & 2 deletions public/css/app.css → public/app.css

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions public/app.js

Large diffs are not rendered by default.

Binary file not shown.
3,300 changes: 0 additions & 3,300 deletions public/fonts/vendor/@fortawesome/fontawesome-free/webfa-brands-400.svg

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.
2 changes: 0 additions & 2 deletions public/js/app.js

This file was deleted.

1 change: 0 additions & 1 deletion public/js/app.js.map

This file was deleted.

5 changes: 2 additions & 3 deletions public/mix-manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"/js/app.js": "/js/app.js?id=5cfc7a4f0f793a07286c",
"/css/app.css": "/css/app.css?id=da72bd8307ebced7bed8",
"/js/app.js.map": "/js/app.js.map?id=d31f3f9515a010708d4e",
"/app.js": "/app.js?id=a1bbfa8127d35ee1a71b",
"/app.css": "/app.css?id=bda34711dea8821a4299",
"/favicon.png": "/favicon.png?id=39d853e8c2bdbc38fde3"
}
58 changes: 6 additions & 52 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,63 +41,17 @@ Create a symbolic link to ensure file uploads are publicly accessible from the w
php artisan storage:link
```

If you choose to design your own theme instead of the default, you can publish the views with:
## Configuration

```bash
php artisan vendor:publish --provider="Canvas\CanvasServiceProvider" --tag="canvas-views"
```

If you publish your own views, review the API specifications below to see available data for the public-facing endpoints:

<details>
<summary><b>API Specifications</b></summary>
<ul>
<li><b>GET </b><code>/blog</code> Returns a paginated index of posts</li>

<br>

```php
"data": [
"posts": "Illuminate\Pagination\Paginator"
]
```

<li><b>GET </b><code>/blog/{slug}</code> Returns a single blog post</li>
> **Note:** You are not required to complete the following steps. You have total design freedom when integrating blog content into your application.
<br>
Generate a default blog controller with routes and views to get up and running as quickly as possible:

```php
"data": [
"author": "App\User",
"post": "App\Canvas\Post",
"meta": [
"og_title": "string"
"twitter_title": "string"
"og_description": "string"
"meta_description": "string"
"twitter_description": "string"
],
"next": "App\Canvas\Post",
"random": "App\Canvas\Post"
]
```

<li><b>GET </b><code>/blog/tag/{slug}</code> Returns a paginated index of posts for a single tag</li>

<br>

```php
"data": [
"topic": "Canvas\Tag",
"posts": "Illuminate\Pagination\Paginator"
]
```bash
php artisan canvas:setup
```
</ul>
</details>

<br>

If you want to integrate Unsplash images into your 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`:
If you want to include [Unsplash](https://unsplash.com) images in your posts, 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
'unsplash' => [
Expand Down
6 changes: 1 addition & 5 deletions resources/js/components/Editor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -308,18 +308,14 @@
margin-bottom: 20px;
}
.ql-editor a {
text-decoration: underline !important;
}
.ql-editor.ql-blank::before {
left: 0;
font-style: normal;
}
.ql-bubble .ql-editor a {
color: #3490dc;
text-decoration: none;
text-decoration: none !important;
}
.ql-container hr {
Expand Down
4 changes: 2 additions & 2 deletions resources/js/components/ImagePicker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@
v-if="this.unsplash"
v-model="unsplashSearchTerm"
ref="unsplashSearch"
placeholder="search Unsplash">
placeholder="Search free high-resolution photos">

<div v-if="!searchingUnsplash && unsplashImages.length">
<div class="card-columns">
Expand Down Expand Up @@ -170,7 +170,7 @@
</div>

<div v-if="!searchingUnsplash && !unsplashImages.length">
<h4 class="text-center">We couldn't find any matches.</h4>
<h4 class="text-center py-4">We couldn't find any matches.</h4>
</div>
</div>
</div>
Expand Down
10 changes: 0 additions & 10 deletions resources/sass/app.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@

// Fonts
@import url("https://fonts.googleapis.com/css?family=Nunito|Merriweather:300,400,700");
@import "~@fortawesome/fontawesome-free/scss/brands";
@import "~@fortawesome/fontawesome-free/scss/regular";
@import "~@fortawesome/fontawesome-free/scss/solid";
@import "~@fortawesome/fontawesome-free/scss/fontawesome";
Expand Down Expand Up @@ -50,13 +49,4 @@ a, .btn-link {
input, textarea, select {
box-shadow: none !important;
outline: none !important;
}

.fab {
&.fa-facebook-square {
color: $fa-facebook-square;
}
&.fa-twitter {
color: $fa-twitter;
}
}
6 changes: 1 addition & 5 deletions resources/sass/variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,4 @@ $green: #38c172;
$teal: #4dc0b5;
$cyan: #6cb2eb;
$dark-grey: #444;
$light-grey: #9ba3aa;

// Brand Colors
$fa-facebook-square: #3b5998;
$fa-twitter: #55acee;
$light-grey: #9ba3aa;
27 changes: 0 additions & 27 deletions resources/views/canvas/components/modals/post/edit/share.blade.php

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@

<editor :unsplash="'{{ config('canvas.unsplash.access_key') }}'"></editor>

@include('canvas::canvas.components.modals.post.create.settings')
@include('canvas::canvas.components.modals.post.create.publish')
@include('canvas::canvas.components.modals.post.create.image')
@include('canvas::canvas.components.modals.post.create.seo')
@include('canvas::components.modals.post.create.settings')
@include('canvas::components.modals.post.create.publish')
@include('canvas::components.modals.post.create.image')
@include('canvas::components.modals.post.create.seo')
</form>
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,8 @@

<editor value="{{ $data['post']->body }}" :unsplash="'{{ config('canvas.unsplash.access_key') }}'"></editor>

@include('canvas::canvas.components.modals.post.edit.share')
@include('canvas::canvas.components.modals.post.edit.settings')
@include('canvas::canvas.components.modals.post.edit.publish')
@include('canvas::canvas.components.modals.post.edit.image')
@include('canvas::canvas.components.modals.post.edit.seo')
@include('canvas::components.modals.post.edit.settings')
@include('canvas::components.modals.post.edit.publish')
@include('canvas::components.modals.post.edit.image')
@include('canvas::components.modals.post.edit.seo')
</form>
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class="form-control-lg form-control border-0 px-0"
</div>
<div class="form-group row">
<div class="col-lg-12">
<p class="lead text-muted" style="cursor: default">{{ sprintf('%s/%s', config('app.url'), config('canvas.public_path')) }}/tag/<span class="text-primary">@{{ slug }}</span></p>
<p class="lead text-muted" style="cursor: default"><span class="text-primary">@{{ slug }}</span></p>
<input type="hidden" name="slug" v-model="slug" readonly>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class="form-control-lg form-control border-0 px-0"
</div>
<div class="form-group row">
<div class="col-lg-12">
<p class="lead text-muted" style="cursor: default">{{ sprintf('%s/%s', config('app.url'), config('canvas.public_path')) }}/tag/<span class="text-primary">@{{ slug }}</span></p>
<p class="lead text-muted" style="cursor: default"><span class="text-primary">@{{ slug }}</span></p>
<input type="hidden" name="slug" v-model="slug" readonly>
@if ($errors->has('slug'))
<div class="invalid-feedback d-block">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<nav class="navbar navbar-light justify-content-between flex-nowrap flex-row py-1">
<!-- Left Side Of Navbar -->
<a class="navbar-brand logo mr-4 font-weight-bold py-0 @hasSection('status') d-none d-md-block @endif"
href="{{ route('blog.index') }}"><span>C</span>anvas</a>
href="{{ route('canvas.index') }}"><span>C</span>anvas</a>

<ul class="navbar-nav mr-auto flex-row float-right">
<li class="text-muted font-weight-bold">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
@endpush

@section('body')
@include('canvas::canvas.components.nav.navbar')
@include('canvas::components.nav.navbar')
<main class="py-4">
@yield('content')
</main>
Expand Down
4 changes: 2 additions & 2 deletions resources/views/layouts/app.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<link rel="stylesheet" href="{{ url('https://cdn.jsdelivr.net/gh/highlightjs/[email protected]/build/styles/github.min.css') }}">

<!-- Style sheets -->
<link rel="stylesheet" type="text/css" href="{{ mix('css/app.css', 'vendor/canvas') }}">
<link rel="stylesheet" type="text/css" href="{{ mix('app.css', 'vendor/canvas') }}">

<!-- Additional style sheets -->
@stack('styles')
Expand All @@ -29,7 +29,7 @@
</div>

<!-- Application scripts -->
<script type="text/javascript" src="{{ mix('js/app.js', 'vendor/canvas') }}"></script>
<script type="text/javascript" src="{{ mix('app.js', 'vendor/canvas') }}"></script>

<!-- Additional scripts -->
@stack('scripts')
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@extends('canvas::canvas.index')
@extends('canvas::index')

@section('status', 'Draft')

Expand All @@ -23,7 +23,7 @@
<div class="container">
<div class="row justify-content-center">
<div class="col-md-8">
@include('canvas::canvas.components.forms.post.create')
@include('canvas::components.forms.post.create')
</div>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@extends('canvas::canvas.index')
@extends('canvas::index')

@section('status', $data['post']->published ? 'Published' : 'Draft')

Expand All @@ -12,7 +12,6 @@
</a>
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="dropdownMenuButton">
@if($data['post']->published)
<a href="#" class="dropdown-item" data-toggle="modal" data-target="#modal-share">Share post</a>
<a href="{{ route('canvas.stats.show', $data['post']->id) }}" class="dropdown-item">View stats</a>
<div class="dropdown-divider"></div>
@endif
Expand All @@ -28,8 +27,8 @@
<div class="container">
<div class="row justify-content-center">
<div class="col-md-8">
@include('canvas::canvas.components.forms.post.edit')
@include('canvas::canvas.components.modals.post.delete')
@include('canvas::components.forms.post.edit')
@include('canvas::components.modals.post.delete')
</div>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@extends('canvas::canvas.index')
@extends('canvas::index')

@section('actions')
<a href="{{ route('canvas.post.create') }}" class="btn btn-sm btn-outline-primary my-auto mx-3">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@extends('canvas::canvas.index')
@extends('canvas::index')

@section('actions')
<a href="{{ route('canvas.post.create') }}" class="btn btn-sm btn-outline-primary my-auto mx-3">
Expand Down Expand Up @@ -51,7 +51,7 @@ class="font-weight-bold lead">{{ $post->title }}</a>
</p>
<p class="text-muted mb-2">
{{ $post->readTime }} ― <a
href="{{ route('blog.post.show', $post->slug) }}">View
href="{{ route('canvas.post.edit', $post->id) }}">Edit
post</a> ― <a
href="{{ route('canvas.stats.show', $post->id) }}">Details</a>
</p>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@extends('canvas::canvas.index')
@extends('canvas::index')

@section('actions')
<a href="{{ route('canvas.index') }}" class="btn btn-sm btn-outline-primary my-auto mx-3">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@extends('canvas::canvas.index')
@extends('canvas::index')

@section('actions')
<a href="#" class="btn btn-sm btn-outline-primary my-auto mx-3"
Expand All @@ -10,7 +10,7 @@
<div class="container">
<div class="row justify-content-center">
<div class="col-md-8">
@include('canvas::canvas.components.forms.tag.create')
@include('canvas::components.forms.tag.create')
</div>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@extends('canvas::canvas.index')
@extends('canvas::index')

@section('actions')
<a href="#" class="btn btn-sm btn-outline-primary my-auto"
Expand All @@ -19,8 +19,8 @@
<div class="container">
<div class="row justify-content-center">
<div class="col-md-8">
@include('canvas::canvas.components.forms.tag.edit')
@include('canvas::canvas.components.modals.tag.delete')
@include('canvas::components.forms.tag.edit')
@include('canvas::components.modals.tag.delete')
</div>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@extends('canvas::canvas.index')
@extends('canvas::index')

@section('actions')
<a href="{{ route('canvas.tag.create') }}" class="btn btn-sm btn-outline-primary my-auto mx-3">
Expand Down
Loading

0 comments on commit 50aba11

Please sign in to comment.