Skip to content

Commit

Permalink
Merge pull request #12 from martinpetrasch/newdocs
Browse files Browse the repository at this point in the history
Newdocs
  • Loading branch information
Basil committed Jan 27, 2015
2 parents 7d59663 + 3d3dea4 commit e44ffaa
Show file tree
Hide file tree
Showing 14 changed files with 758 additions and 8 deletions.
2 changes: 1 addition & 1 deletion docs/concept-luya.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ class Module extends \luya\base\Module



SQL MIGRRATION
SQL MIGRATION
-------------------------

### The Problem
Expand Down
45 changes: 38 additions & 7 deletions docs/guide/start-module.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,39 @@ Example
cmsadmin (Admin-Module)
cms (Frontend-Module)
```
2. Module File
--------------

Create "Module.php" inside module root

Example

´´´php
namespace app\modules\cmsadmin;

2. Content
class Module extends \luya\base\Module
{
public static $urlRules = [];
}
´´´


3. Update Configuration
-----------------------

Update "config/local.php" with path to module.php

Example

```
$config = ['modules' => ['myModule'=> 'app\modules\myModule\Module']]
```

***Important***

The used namespace in Module.php must match config entry

4. Content
----------
Where goes the content? All shared data class (componenets, models) does have to be place in the Admin-Module section. This is because the Rest authentification is allocated in the Admin-Modules.

Expand All @@ -26,16 +57,16 @@ cmsadmin /
- apis
- migrations
- straps
- -
cms /
- controllers
- views
- assets
- components [example content: UrlRule.php, cause its only affecting the frontend Module]
- components [example content: UrlRule.php, cause its only affecting the frontend Modu
- le]
```

3. Table names
5. Table names
--------------
Alle table names have the prefix of its FRONTEND-MODULE there there is booth or only a frontend-module. If there is only a ADMIN-Module the prefix of the table does have the same name like the module.

Expand All @@ -61,7 +92,7 @@ the database prefix would be:
guestbookadmin_
```

4. Module urlRules
6. Module urlRules
-----------------
Each Module can have its own url Rules. Even its not access by module context, example ulrRules

Expand All @@ -76,7 +107,7 @@ Each Module can have its own url Rules. Even its not access by module context, e

All the luya module urlRules does have to "prefix" theyr pattern with the current module name, otherwise the urlRouting would load the default module registered for this project. (like cms)

5. Module COntenxt
7. Module Context
-------------------
If a module is invoke by another module the context variable contains the name of the module which has invoke the active module. For example if the cms loades other modules, the loaded module can access the
parent module with $this->getContext();
Binary file added images/body-bg.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/highlight-bg.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/hr.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/octocat-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/tar-gz-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/zip-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
47 changes: 47 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<link href='https://fonts.googleapis.com/css?family=Chivo:900' rel='stylesheet' type='text/css'>
<link rel="stylesheet" type="text/css" href="stylesheets/stylesheet.css" media="screen">
<link rel="stylesheet" type="text/css" href="stylesheets/pygment_trac.css" media="screen">
<link rel="stylesheet" type="text/css" href="stylesheets/print.css" media="print">
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<title>Luya by zephir</title>
</head>

<body>
<div id="container">
<div class="inner">

<header>
<h1>Luya</h1>
<h2></h2>
</header>

<section id="downloads" class="clearfix">
<a href="https://github.com/zephir/luya/zipball/master" id="download-zip" class="button"><span>Download .zip</span></a>
<a href="https://github.com/zephir/luya/tarball/master" id="download-tar-gz" class="button"><span>Download .tar.gz</span></a>
<a href="https://github.com/zephir/luya" id="view-on-github" class="button"><span>View on GitHub</span></a>
</section>

<hr>

<section id="main_content">
<h3>
<a id="luya" class="anchor" href="#luya" aria-hidden="true"><span class="octicon octicon-link"></span></a>LUYA</h3>
</section>

<footer>
Luya is maintained by <a href="https://github.com/zephir">zephir</a><br>
This page was generated by <a href="http://pages.github.com">GitHub Pages</a>. Tactile theme by <a href="https://twitter.com/jasonlong">Jason Long</a>.
</footer>


</div>
</div>
</body>
</html>
1 change: 1 addition & 0 deletions javascripts/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
console.log('This would be the main JS file.');
1 change: 1 addition & 0 deletions params.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"name":"Luya","tagline":"","body":"### LUYA","google":"","note":"Don't delete this file! It's used internally to help with page regeneration."}
228 changes: 228 additions & 0 deletions stylesheets/print.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,228 @@
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
padding: 0;
margin: 0;
font: inherit;
font-size: 100%;
vertical-align: baseline;
border: 0;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
display: block;
}
body {
line-height: 1;
}
ol, ul {
list-style: none;
}
blockquote, q {
quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
content: '';
content: none;
}
table {
border-spacing: 0;
border-collapse: collapse;
}
body {
font-family: 'Helvetica Neue', Helvetica, Arial, serif;
font-size: 13px;
line-height: 1.5;
color: #000;
}

a {
font-weight: bold;
color: #d5000d;
}

header {
padding-top: 35px;
padding-bottom: 10px;
}

header h1 {
font-size: 48px;
font-weight: bold;
line-height: 1.2;
color: #303030;
letter-spacing: -1px;
}

header h2 {
font-size: 24px;
font-weight: normal;
line-height: 1.3;
color: #aaa;
letter-spacing: -1px;
}
#downloads {
display: none;
}
#main_content {
padding-top: 20px;
}

code, pre {
margin-bottom: 30px;
font-family: Monaco, "Bitstream Vera Sans Mono", "Lucida Console", Terminal;
font-size: 12px;
color: #222;
}

code {
padding: 0 3px;
}

pre {
padding: 20px;
overflow: auto;
border: solid 1px #ddd;
}
pre code {
padding: 0;
}

ul, ol, dl {
margin-bottom: 20px;
}


/* COMMON STYLES */

table {
width: 100%;
border: 1px solid #ebebeb;
}

th {
font-weight: 500;
}

td {
font-weight: 300;
text-align: center;
border: 1px solid #ebebeb;
}

form {
padding: 20px;
background: #f2f2f2;

}


/* GENERAL ELEMENT TYPE STYLES */

h1 {
font-size: 2.8em;
}

h2 {
margin-bottom: 8px;
font-size: 22px;
font-weight: bold;
color: #303030;
}

h3 {
margin-bottom: 8px;
font-size: 18px;
font-weight: bold;
color: #d5000d;
}

h4 {
font-size: 16px;
font-weight: bold;
color: #303030;
}

h5 {
font-size: 1em;
color: #303030;
}

h6 {
font-size: .8em;
color: #303030;
}

p {
margin-bottom: 20px;
font-weight: 300;
}

a {
text-decoration: none;
}

p a {
font-weight: 400;
}

blockquote {
padding: 0 0 0 30px;
margin-bottom: 20px;
font-size: 1.6em;
border-left: 10px solid #e9e9e9;
}

ul li {
list-style-position: inside;
list-style: disc;
padding-left: 20px;
}

ol li {
list-style-position: inside;
list-style: decimal;
padding-left: 3px;
}

dl dd {
font-style: italic;
font-weight: 100;
}

footer {
padding-top: 20px;
padding-bottom: 30px;
margin-top: 40px;
font-size: 13px;
color: #aaa;
}

footer a {
color: #666;
}

/* MISC */
.clearfix:after {
display: block;
height: 0;
clear: both;
visibility: hidden;
content: '.';
}

.clearfix {display: inline-block;}
* html .clearfix {height: 1%;}
.clearfix {display: block;}
Loading

0 comments on commit e44ffaa

Please sign in to comment.