Commit e4b8d6fd authored by hxgf's avatar hxgf 🎧

1.3.0 (final)

parent df8529d2
html, body{
height: 100%;
}
body, body * {
font-family: Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono, Bitstream Vera Sans Mono, Courier New, monospace, serif;
}
......@@ -8,26 +8,14 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="apple-touch-icon" sizes="57x57" href="/images/favicons/apple-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="/images/favicons/apple-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="/images/favicons/apple-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="/images/favicons/apple-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="/images/favicons/apple-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="/images/favicons/apple-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="/images/favicons/apple-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="/images/favicons/apple-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="/images/favicons/apple-icon-180x180.png">
<link rel="icon" type="image/png" sizes="192x192" href="/images/favicons/android-icon-192x192.png">
<link rel="icon" type="image/png" sizes="32x32" href="/images/favicons/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="96x96" href="/images/favicons/favicon-96x96.png">
<link rel="icon" type="image/png" sizes="16x16" href="/images/favicons/favicon-16x16.png">
{{> favicons}}
<link rel="stylesheet" href="/css/lib/tachyons.min.css" />
<link rel="stylesheet" href="/css/styles.css" />
<link rel="stylesheet" href="/css/breakpoints.css" />
</head>
<body>
<body class="sans-serif">
[[outlet]]
......
<link rel="apple-touch-icon" sizes="57x57" href="/images/favicons/apple-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="/images/favicons/apple-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="/images/favicons/apple-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="/images/favicons/apple-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="/images/favicons/apple-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="/images/favicons/apple-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="/images/favicons/apple-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="/images/favicons/apple-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="/images/favicons/apple-icon-180x180.png">
<link rel="icon" type="image/png" sizes="192x192" href="/images/favicons/android-icon-192x192.png">
<link rel="icon" type="image/png" sizes="32x32" href="/images/favicons/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="96x96" href="/images/favicons/favicon-96x96.png">
<link rel="icon" type="image/png" sizes="16x16" href="/images/favicons/favicon-16x16.png">
\ No newline at end of file
```
______ ______ ______ ______ ______ ______
/\ ___\ /\__ _\ /\ ___\ /\ == \ /\ ___\ /\ __ \
\ \___ \ \/_/\ \/ \ \ __\ \ \ __< \ \ __\ \ \ \/\ \
\/\_____\ \ \_\ \ \_____\ \ \_\ \_\ \ \_____\ \ \_____\
\/_____/ \/_/ \/_____/ \/_/ /_/ \/_____/ \/_____/
Internet Tool Kit v1.3.0
```
![headphones icon](https://stereotk.com/images/stereo-headphones-black-small.png)
### Literally the easiest way to make web sites with PHP
# STEREO Internet Tool Kit
## v1.3.0
##### The easiest way to make web sites with PHP (and friends)
### FEATURES
- [Easy & flexible router](http://altorouter.com/) with pretty urls
- [Handlebars](http://handlebarsjs.com/) templates
- Simple/intuitive application structure
- Easy and flexible routing system with pretty urls 😍
- Powerful [Handlebars](http://handlebarsjs.com/) templates
- Convenient MYSQL CRUD functionality
- Helpful utility functions *(for working with cookies, http requests, sending email, etc)*
- Sensible *(but minimal)* front-end boilerplate
- Helpful utility functions *(for working with cookies, http requests, email, etc)*
- Sensible *(and minimal)* front-end boilerplate ✨
- Straightforward application structure
- Works with most shared web hosting providers
### Just look how easy it is to make all of these responses:
Render a normal Handlebars template
### INSTALLATION
STEREO is designed to function with most LAMP stacks, and will support very old systems. Minimum requirements: PHP: 5.3, MYSQL: 3.0, Apache: 2.4.
*\* NGINX is also supported, see docs for configuration*
Easiest installation: [download the latest release](https://gitlab.com/hxgf/stereo/-/archive/1.3.0/stereo-1.3.0.zip) and put the files on your server or dev environment 👍
Next-easiest installation: clone the latest version of the master branch with git:
```
$app->get('/handlebars-normal', function(){
echo $GLOBALS['engine']->render('handlebars-example', array(
'righteous_content' => 'for_sure'
));
});
git clone https://gitlab.com/hxgf/stereo.git .
```
...just remember to remove this repo from your actual project:
```
rm -Rf .git
```
Render a Handlebars template (w/ special STEREO helpers)
### GETTING STARTED
1. Edit your global settings (site title, DB connection): ./settings.php
2. Set up some routes: ./controllers/_routes.php
3. Make some templates: ./pages/index.hbs
4. Build something cool!
##### Routing + template example
###### (render a handlebars template with a global base template with data from PHP arrays)
in ./controllers/_routes.php:
```
$app->get('/handlebars-stereo', function(){
$app->get('/favorite-planets', function(){
$planets[] = array(
'title' => 'Mercury',
'nickname' => 'Swift Planet'
);
$planets[] = array(
'title' => 'Venus',
'nickname' => 'The Morning Star'
);
$planets[] = array(
'title' => 'Earth',
'nickname' => 'Big Blue'
);
$planets[] = array(
'title' => 'Nibiru',
'nickname' => 'Planet X'
);
$GLOBALS['app']->render_template(array(
'template' => 'planets',
'title' => 'Cool Planets',
'layout' => false,
'data' => array(
'righteous_content' => 'for_sure',
'planets' => array(
'Mercury', 'Venus', 'Earth', 'Nibiru'
)
'reader_name' => 'Chad',
'planets' => $planets
)
));
});
```
in ./pages/planets.hbs:
```
<div class="mw8 center pa5">
Greetings, {{reader_name}}! Allow me to provide you with a list of my favorite planets:
<ul>
{{#each planets}}
<li>{{title}} ({{nickname}})</li>
{{/each}}
</ul>
</div>
```
Can you guess what will be rendered?
Go here to find out: [https://stereotk.com/favorite-planets](https://stereotk.com/favorite-planets)
Show a normal PHP / HTML document
##### Other responses you can make:
Render a single PHP / HTML document:
```
$app->get('/normal-page', function(){
require __DIR__ . '/pages/whatever.html';
});
```
Send an array as JSON for handy API responses
Render a PHP array as a JSON response:
```
$app->post('/json-response', function(){
// do something magic here...crunch some data? web scraping? make some API calls? idk, math??
$GLOBALS['app']->render_json(array(
'righteous_content' => 'for sure'
'righteous_content' => 'for sure',
'planets' => array(
'Mercury', 'Venus', 'Earth', 'Nibiru'
)
));
});
```
Set headers, do redirects
Set headers / do redirects:
```
$app->get('/whatever', function(){
$app->get('/party', function(){
header("Location: http://partyphysics.com/");
});
```
...and that's just the beginning!
STEREO has abstraction tools to help you build all kinds of functionality!
Check out the full documentation to see everything you can do: [https://docs.stereotk.com](https://docs.stereotk.com)
or execute any PHP code...do literally whatever you want!
### CONTRIBUTING
Contributions, issues, and feature requests are welcomed and appreciated (although a timely response is not guaranteed). Check the [issues page](https://gitlab.com/hxgf/stereo/issues) if you're interested in helping out 🙌 🙏
### Read the full documentation: [http://stereotk.com/docs](http://stereotk.com/docs)
### LICENSE
Copyright © 2019 [HXGF](https://hxgf.io).
This project is [MIT](https://gitlab.com/hxgf/stereo/blob/master/stereo/license.md) licensed.
......@@ -4,12 +4,13 @@ $GLOBALS['site_title'] = 'STEREO'; // ex: 'Party Physics'
$GLOBALS['site_code'] = ''; // ex: 'partyphysics'
$GLOBALS['site_url'] = ''; // ex: 'partyphysics.com'
// $GLOBALS['settings']['api_root'] = ''; // ex: 'https://partyphysics.com/api'
// $GLOBALS['settings']['database']['host'] = 'localhost'; // host name
// $GLOBALS['settings']['database']['name'] = ''; // db name
// $GLOBALS['settings']['database']['user'] = ''; // db user name
// $GLOBALS['settings']['database']['password'] = ''; // db password
// $GLOBALS['settings']['mailgun_api_key'] = '';
// $GLOBALS['settings']['mailgun_api_domain'] = '';
// $GLOBALS['settings']['mailgun']['api_key'] = '';
// $GLOBALS['settings']['mailgun']['domain'] = '';
// $GLOBALS['settings']['api_root'] = ''; // ex: 'https://partyphysics.com/api'
# 1.3.0
## Jun 2019
Greetings, dear ones, I am pleased to bring you the latest version of our beloved internet toolkit. The focus for this release is twofold: 1) removing that which is no longer useful and 2) making it easier than ever to achieve nice results.
May this release bring you joy and prosperity as you continue with your daily work.
And so it is:
- moved source repo to GitLab! - https://gitlab.com/hxgf/stereo
- new docs site, nice place to grow (thank you Docusaurus 😘) - http://docs.stereotk.com/
- upgraded Tachyons version - 4.11.2
- upgraded jQuery version - 3.4.1 😈
- cool generic default favicon (it's a white circle now)
- added favicons in various sizes for various platforms (in /images/favicons)
- .htaccess - rewrite url to serve primary favicon at /favicon.ico
- .htaccess - force SSL by default (if available)
- default responsive viewport: width=device-width, initial-scale=1
- updated breakpoints.css to match Tachyons media query breakpoints
- killed the boilerplate demo, moving to new examples section in docs
- app.css ✈️ styles.css
- /stereo/lib - new vendor folder for 3rd-party PHP libs (good place for stuff you want to add manually [not using composer], such as phmagick or simple_html_dom)
- updated license author (copyright + contact info)
- killed default monospace font
- now using changelog.md for any new features/fixes
- moved changelog.md and license.md to /stereo
- revised readme (streamlined demo/features, installation instructions)
---
# 1.2.0
## Feb 2017
Solidified release to support development of Darkwave CMS (and provide a better development experience in general)
Specific changes:
- upgrade tachyons version (4.6.1)
- update breakpoints (remove css variable breakpoints)
- all *_request() methods (http_request, api_request, etc) now default to array for second parameter (so 2nd param can just be blank if there's no data to send)
- move authentication from render_template to globally-available scope
- remove reference to jq sourcemap
- update email_send mailgun credentials (settings format changes for darkwave)
- fixed bug in db_find (show total number of rows derp)
- updated http_request (api/json/debug/etc) to allow force GET type request
---
# 1.1.0
## Aug 2016
STEREO is finally ready for prime time! Although it will continue to be updated with bug fixes and minor new features in the future, all of the core functionality is in place and shouldn't change ever again!
---
# 0.1.4
## Mar 2016
Past is prologue...
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment