Skip to content

Commit

Permalink
Merge pull request #2 from cherry-framework/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
ABGEO authored Apr 8, 2019
2 parents d5abafd + 4ff2953 commit 835c23a
Show file tree
Hide file tree
Showing 7 changed files with 183 additions and 21 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Cherry-framework Changelog

## [v2.0.0](https://github.com/cherry-framework/framework/releases/tag/v2.0.0 "v.0.0") (2019-04-08)

- Add Bootstrap template to sample page.

- Add Cherry [Logs Viewer](https://github.com/cherry-framework/logs-viewer).

- Add Cherry [Console](https://github.com/cherry-framework/console).

## [v1.0.0](https://github.com/cherry-framework/framework/releases/tag/v1.0.0 "v1.0.0") (2019-03-29)
#### The first stable version

Expand Down
10 changes: 10 additions & 0 deletions bin/console
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/usr/bin/env php
<?php

set_time_limit(0);

require __DIR__ . '/../vendor/autoload.php';

use Cherry\Console\Console;

$console = new Console();
6 changes: 4 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "Cherry-Project Framework",
"type": "project",
"keywords": ["cherry","framework"],
"homepage": "https://github.com/ABGEO07/cherry-framework",
"homepage": "https://github.com/cherry-framework/framework",
"license": "MIT",
"authors": [
{
Expand All @@ -16,6 +16,8 @@
"minimum-stability": "dev",
"require": {
"php": ">=5.6.0",
"cherry-project/core": "^1.0"
"cherry-project/core": "^1.0",
"cherry-project/logs-viewer": "dev-master",
"cherry-project/console": "dev-master"
}
}
118 changes: 104 additions & 14 deletions composer.lock

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

5 changes: 5 additions & 0 deletions config/routes.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,10 @@
"path": "/",
"method": "GET",
"action": "Cherry\\Controller\\DefaultController::hello"
},
"logs": {
"path": "/logs",
"method": "GET",
"action": "Cherry\\Controller\\DefaultController::showLogs"
}
}
8 changes: 8 additions & 0 deletions controllers/DefaultController.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

namespace Cherry\Controller;

use Cherry\Log\LogViewer;

class DefaultController
{
use ControllerTrait;
Expand All @@ -10,4 +12,10 @@ public function hello()
{
$this->render('index');
}

public function showLogs()
{
$lw = new LogViewer();
$lw->render();
}
}
49 changes: 44 additions & 5 deletions templates/index.templater.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,49 @@
<!doctype html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Cherry Project</title>
<meta charset="utf-8">
<title>Cherry Framework</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
</head>

<body>
<h1>Welcome to Cherry Framework!</h1>
<!-- Navigation -->
<nav class="navbar navbar-expand-lg navbar-dark bg-dark static-top">
<div class="container">
<a class="navbar-brand" href="#">Cherry Framework</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarResponsive" aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarResponsive">
<ul class="navbar-nav ml-auto">
<li class="nav-item">
<a class="nav-link" href="https://github.com/cherry-framework">Github</a>
</li>
<li class="nav-item">
<a class="nav-link" href="https://packagist.org/packages/cherry-project/framework">Packagist</a>
</li>
</ul>
</div>
</div>
</nav>

<!-- Page Content -->
<div class="container">
<div class="row">
<div class="col-lg-12 text-center">
<h1 class="mt-5">Hello, World!</h1>
<p class="lead">This is simple Cherry page.</p>
<ul class="list-unstyled">
<li>
© 2019-<?php echo date('Y'); ?> Copyright:
<a href="https://github.com/cherry-framework"> Cherry Framework</a>.
</li>
</ul>
</div>
</div>
</div>

<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
</body>
</html>
</html>

0 comments on commit 835c23a

Please sign in to comment.