Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump is-svg and postcss-svgo #38

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
end_of_line = lf
indent_style = space
indent_size = 4
trim_trailing_whitespace = true
Expand Down
2 changes: 1 addition & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=homestead
DB_USERNAME=homestead
DB_PASSWORD=secret
DB_USERNAME=homestead

BROADCAST_DRIVER=log
CACHE_DRIVER=file
Expand Down
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
* text=auto
*.css linguist-vendored
*.scss linguist-vendored
*.css linguist-vendored
*.js linguist-vendored
CHANGELOG.md export-ignore
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
.phpunit.result.cache
Homestead.json
Homestead.yaml
npm-debug.log
yarn-error.log
npm-debug.log
database.sqlite
*.log
.DS_Store
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2019 Peter Porzuczek
Copyright (c) 2022 Peter Porzuczek

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
> The aim of the project is to publish the code together with the tasks in a way that is clear and accessible to the student. The ability to disable code publication makes it possible for the student to work on the assignments themselves and when the teacher decides to publish the code, they can do so immediately.

## Preview

### Example course
<div>
<img src="https://i.imgur.com/qvVdrG3.png" alt="app-preview" width="70%">
Expand Down
4 changes: 1 addition & 3 deletions app/Console/Kernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@ class Kernel extends ConsoleKernel
*
* @var array
*/
protected $commands = [
//
];
protected $commands = [];

/**
* Define the application's command schedule.
Expand Down
4 changes: 1 addition & 3 deletions app/Exceptions/Handler.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@ class Handler extends ExceptionHandler
*
* @var array
*/
protected $dontReport = [
//
];
protected $dontReport = [];

/**
* A list of the inputs that are never flashed for validation exceptions.
Expand Down
4 changes: 2 additions & 2 deletions app/Http/Controllers/Auth/RegisterController.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace App\Http\Controllers\Auth;

use App\User;
use App\Models\User;
use App\Http\Controllers\Controller;
use Illuminate\Support\Facades\Hash;
use Illuminate\Support\Facades\Validator;
Expand Down Expand Up @@ -59,7 +59,7 @@ protected function validator(array $data)
* Create a new user instance after a valid registration.
*
* @param array $data
* @return \App\User
* @return \App\Models\User
*/
protected function create(array $data)
{
Expand Down
4 changes: 2 additions & 2 deletions app/Http/Controllers/CourseController.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;

use App\User;
use App\Course;
use App\Models\User;
use App\Models\Course;

class CourseController extends Controller
{
Expand Down
6 changes: 3 additions & 3 deletions app/Http/Controllers/LearnController.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;

use App\Course;
use App\Problem;
use App\Solution;
use App\Models\Course;
use App\Models\Problem;
use App\Models\Solution;

class LearnController extends Controller
{
Expand Down
4 changes: 2 additions & 2 deletions app/Http/Controllers/ProblemController.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
use Illuminate\Http\Request;
use GrahamCampbell\Markdown\Facades\Markdown;

use App\User;
use App\Problem;
use App\Models\User;
use App\Models\Problem;

class ProblemController extends Controller
{
Expand Down
4 changes: 2 additions & 2 deletions app/Http/Controllers/QuestController.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
use Illuminate\Http\Request;
use GrahamCampbell\Markdown\Facades\Markdown;

use App\User;
use App\Quest;
use App\Models\User;
use App\Models\Quest;

class QuestController extends Controller
{
Expand Down
4 changes: 2 additions & 2 deletions app/Http/Controllers/SolutionController.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
use Illuminate\Http\Request;
use GrahamCampbell\Markdown\Facades\Markdown;

use App\User;
use App\Solution;
use App\Models\User;
use App\Models\Solution;

class SolutionController extends Controller
{
Expand Down
17 changes: 3 additions & 14 deletions app/Http/Controllers/TopicController.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
use Illuminate\Database\Eloquent\Collection;
use GrahamCampbell\Markdown\Facades\Markdown;

use App\User;
use App\Topic;
use App\Models\User;
use App\Models\Topic;

class TopicController extends Controller
{
Expand Down Expand Up @@ -90,8 +90,8 @@ public function store(Request $request)
$topic = new Topic;
$topic->index = $request->input('index');
$topic->name = $request->input('name');
$topic->description = $request->input('description');
$topic->description_html = Markdown::convertToHtml($request->input('description'));
$topic->description = $request->input('description');
$topic->course_id = $request->input('course_id');
$topic->links = $request->input('links');
$topic->public = $request->input('public') === 'public';
Expand All @@ -113,13 +113,9 @@ public function store(Request $request)
public function show($id)
{
$_topic = Topic::find($id);

$userId = auth()->user()->id;

$user = User::find($userId);

$topic = $user->courses->find($_topic->course_id)->topics->find($id);

$topic->description_html = str_replace("{{", "{spc{", $topic->description_html);

return view('manage.topic.show')->with('topic', $topic);
Expand All @@ -134,11 +130,8 @@ public function show($id)
public function edit($id)
{
$_topic = Topic::find($id);

$userId = auth()->user()->id;

$user = User::find($userId);

$topic = $user->courses->find($_topic->course_id)->topics->find($id);

return view('manage.topic.edit')->with('topic', $topic)->with('courses', $user->courses);
Expand Down Expand Up @@ -192,13 +185,9 @@ public function update(Request $request, $id)
public function destroy($id)
{
$_topic = Topic::find($id);

$userId = auth()->user()->id;

$user = User::find($userId);

$topic = $user->courses->find($_topic->course_id)->topics->find($id);

$topic->delete();

return redirect()->route('topics.filter', [$topic->course_id])->with('success', 'Topic Deleted!');
Expand Down
12 changes: 7 additions & 5 deletions app/Course.php → app/Models/Course.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,16 @@ public function getIsNightAttribute()
date_default_timezone_set('Europe/Warsaw');
$hour = date('H', time());

return !($hour > 6 && $hour < 19);
return !($hour > 7 && $hour < 19);
}

public function user(){
return $this->belongsTo('App\User');
public function topics() {
return
$this->hasMany('App\Models\Topic');
}

public function topics() {
return $this->hasMany('App\Topic');
public function user(){
return
$this->belongsTo('App\Models\User');
}
}
4 changes: 2 additions & 2 deletions app/Problem.php → app/Models/Problem.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
class Problem extends Model
{
public function quest(){
return $this->belongsTo('App\Quest');
return $this->belongsTo('App\Models\Quest');
}

public function solutions() {
return $this->hasMany('App\Solution');
return $this->hasMany('App\Models\Solution');
}
}
8 changes: 4 additions & 4 deletions app/Quest.php → app/Models/Quest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@

class Quest extends Model
{
public function topic(){
return $this->belongsTo('App\Topic');
public function problems() {
return $this->hasMany('App\Models\Problem');
}

public function problems() {
return $this->hasMany('App\Problem');
public function topic(){
return $this->belongsTo('App\Models\Topic');
}
}
2 changes: 1 addition & 1 deletion app/Solution.php → app/Models/Solution.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
class Solution extends Model
{
public function problem(){
return $this->belongsTo('App\Problem');
return $this->belongsTo('App\Models\Problem');
}
}
10 changes: 5 additions & 5 deletions app/Topic.php → app/Models/Topic.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@

class Topic extends Model
{
public function course(){
return $this->belongsTo('App\Course');
}

public function quests() {
return $this->hasMany('App\Quest');
return $this->hasMany('App\Models\Quest');
}

public function course(){
return $this->belongsTo('App\Models\Course');
}
}
6 changes: 1 addition & 5 deletions app/User.php → app/Models/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,6 @@ class User extends Authenticatable
];

public function courses() {
return $this->hasMany('App\Course');
}

public function photos() {
return $this->hasMany('App\Photo');
return $this->hasMany('App\Models\Course');
}
}
6 changes: 3 additions & 3 deletions artisan
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ define('LARAVEL_START', microtime(true));

/*
|--------------------------------------------------------------------------
| Register The Auto Loader
| Register The Auto Loader.
|--------------------------------------------------------------------------
|
| Composer provides a convenient, automatically generated class loader
Expand All @@ -21,7 +21,7 @@ $app = require_once __DIR__.'/bootstrap/app.php';

/*
|--------------------------------------------------------------------------
| Run The Artisan Application
| Run The Artisan Application.
|--------------------------------------------------------------------------
|
| When we run the console application, the current CLI command will be
Expand All @@ -39,7 +39,7 @@ $status = $kernel->handle(

/*
|--------------------------------------------------------------------------
| Shutdown The Application
| Shutdown The Application.
|--------------------------------------------------------------------------
|
| Once Artisan has finished running, we will fire off the shutdown events
Expand Down
8 changes: 4 additions & 4 deletions bootstrap/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@
*/

$app->singleton(
Illuminate\Contracts\Http\Kernel::class,
App\Http\Kernel::class
Illuminate\Contracts\Console\Kernel::class,
App\Console\Kernel::class
);

$app->singleton(
Illuminate\Contracts\Console\Kernel::class,
App\Console\Kernel::class
Illuminate\Contracts\Http\Kernel::class,
App\Http\Kernel::class
);

$app->singleton(
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
"barryvdh/laravel-cors": "^0.11.3",
"fideloper/proxy": "^4.0",
"graham-campbell/markdown": "^11.1",
"laravel/framework": "^6.0",
"laravel/tinker": "^1.0",
"laravel/framework": "^6.0",
"league/commonmark": "^1.0",
"league/commonmark-extras": "^1.1",
"renatomarinho/laravel-page-speed": "^1.8",
Expand Down
4 changes: 2 additions & 2 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion config/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
|
*/

'name' => env('APP_NAME', 'Laravel'),
'name' => env('APP_NAME', 'Timeriddle'),

/*
|--------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion config/auth.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
'providers' => [
'users' => [
'driver' => 'eloquent',
'model' => App\User::class,
'model' => App\Models\User::class,
],

// 'users' => [
Expand Down
Loading