Skip to content
Permalink
Browse files

Initial commit

  • Loading branch information...
claviska committed Jul 28, 2016
0 parents commit 3a02f91726d8c089a0b0f274d3f15f75b136f010
Showing with 17,956 additions and 0 deletions.
  1. +12 −0 .editorconfig
  2. +142 −0 .github/CONTRIBUTING.md
  3. +26 −0 .github/ISSUE_TEMPLATE.md
  4. +27 −0 .github/PULL_REQUEST_TEMPLATE.md
  5. +12 −0 .gitignore
  6. +17 −0 .jshintrc
  7. +206 −0 LICENSE.md
  8. +98 −0 README.md
  9. +2 −0 app/backups/.gitignore
  10. +2 −0 app/content/cache/.gitignore
  11. +2 −0 app/content/themes/.gitignore
  12. +2 −0 app/content/uploads/.gitignore
  13. +214 −0 app/index.php
  14. +160 −0 app/source/classes/Admin.php
  15. +331 −0 app/source/classes/Backup.php
  16. +70 −0 app/source/classes/Blog.php
  17. +111 −0 app/source/classes/Cache.php
  18. +1,072 −0 app/source/classes/Controller/APIController.php
  19. +395 −0 app/source/classes/Controller/AdminController.php
  20. +19 −0 app/source/classes/Controller/Controller.php
  21. +88 −0 app/source/classes/Controller/ThemeController.php
  22. +100 −0 app/source/classes/Database.php
  23. +54 −0 app/source/classes/Error.php
  24. +78 −0 app/source/classes/Feed.php
  25. +117 −0 app/source/classes/History.php
  26. +66 −0 app/source/classes/Language.php
  27. +71 −0 app/source/classes/Middleware.php
  28. +819 −0 app/source/classes/Post.php
  29. +476 −0 app/source/classes/Postleaf.php
  30. +62 −0 app/source/classes/PostleafPDO.php
  31. +167 −0 app/source/classes/Renderer.php
  32. +78 −0 app/source/classes/Search.php
  33. +123 −0 app/source/classes/Session.php
  34. +79 −0 app/source/classes/Setting.php
  35. +363 −0 app/source/classes/Tag.php
  36. +42 −0 app/source/classes/Theme.php
  37. +286 −0 app/source/classes/Upload.php
  38. +551 −0 app/source/classes/User.php
  39. +8 −0 app/source/defaults/default.database.php
  40. +130 −0 app/source/defaults/default.database.sql
  41. +15 −0 app/source/defaults/default.htaccess
  42. +11 −0 app/source/defaults/post.editor.html
  43. +9 −0 app/source/defaults/post.support.html
  44. +8 −0 app/source/defaults/post.themes.html
  45. +16 −0 app/source/defaults/post.welcome.html
  46. BIN app/source/images/app-icon.png
  47. BIN app/source/images/autumn.jpg
  48. BIN app/source/images/ladybug.jpg
  49. BIN app/source/images/ladybug.png
  50. BIN app/source/images/leaves.jpg
  51. BIN app/source/images/loader-dark.gif
  52. BIN app/source/images/loader-light.gif
  53. BIN app/source/images/logo-color.png
  54. +13 −0 app/source/images/logo-color.svg
  55. BIN app/source/images/raccoon.jpg
  56. BIN app/source/images/sunflower.jpg
  57. +120 −0 app/source/installer/index.php
  58. +267 −0 app/source/installer/install.php
  59. +292 −0 app/source/languages/en-us.php
  60. +292 −0 app/source/languages/es.php
  61. +292 −0 app/source/languages/pl.php
  62. +36 −0 app/source/runtime.php
  63. +666 −0 app/source/scripts/editor.js
  64. +58 −0 app/source/scripts/installer.js
  65. +20 −0 app/source/scripts/lib.js
  66. +79 −0 app/source/scripts/login.js
  67. +193 −0 app/source/scripts/modules/locater.js
  68. +142 −0 app/source/scripts/modules/postleaf.js
  69. +76 −0 app/source/scripts/modules/reauthenticate.js
  70. +110 −0 app/source/scripts/modules/shared.js
  71. +133 −0 app/source/scripts/navigation.js
  72. +1,115 −0 app/source/scripts/posts.edit.js
  73. +211 −0 app/source/scripts/posts.js
  74. +264 −0 app/source/scripts/settings.js
  75. +161 −0 app/source/scripts/tags.edit.js
  76. +169 −0 app/source/scripts/tags.js
  77. +176 −0 app/source/scripts/users.edit.js
  78. +174 −0 app/source/scripts/users.js
  79. +53 −0 app/source/styles/admin-toolbar.scss
  80. +72 −0 app/source/styles/editor.scss
  81. +59 −0 app/source/styles/lib.scss
  82. +10 −0 app/source/styles/login.scss
  83. +74 −0 app/source/styles/navigation.scss
  84. +46 −0 app/source/styles/partials/_alertable.scss
  85. +94 −0 app/source/styles/partials/_editor-toolbar.scss
  86. +118 −0 app/source/styles/partials/_input-inner-addon.scss
  87. +49 −0 app/source/styles/partials/_layout.scss
  88. +54 −0 app/source/styles/partials/_loader.scss
  89. +82 −0 app/source/styles/partials/_locater.scss
  90. +186 −0 app/source/styles/partials/_menu.scss
  91. +8 −0 app/source/styles/partials/_nanobar.scss
  92. +112 −0 app/source/styles/partials/_overrides.scss
  93. +60 −0 app/source/styles/partials/_panel.scss
  94. +20 −0 app/source/styles/partials/_se-preview.scss
  95. +343 −0 app/source/styles/partials/_selectize.scss
  96. +73 −0 app/source/styles/partials/_tag-cover.scss
  97. +10 −0 app/source/styles/partials/_utilities.scss
  98. +73 −0 app/source/styles/partials/_variables.scss
  99. +114 −0 app/source/styles/posts.edit.scss
  100. +145 −0 app/source/styles/posts.scss
  101. +85 −0 app/source/styles/settings.scss
  102. +51 −0 app/source/styles/tags.edit.scss
  103. +75 −0 app/source/styles/tags.scss
  104. +79 −0 app/source/styles/users.edit.scss
  105. +81 −0 app/source/styles/users.scss
  106. +131 −0 app/source/templates/editor.zen.hbs
  107. +51 −0 app/source/templates/error.system.hbs
  108. +74 −0 app/source/templates/helpers/admin.php
  109. +482 −0 app/source/templates/helpers/theme.php
  110. +126 −0 app/source/templates/helpers/url.php
  111. +320 −0 app/source/templates/helpers/utility.php
  112. +42 −0 app/source/templates/login.hbs
  113. +33 −0 app/source/templates/login.recover.hbs
  114. +31 −0 app/source/templates/login.reset.hbs
  115. +86 −0 app/source/templates/navigation.hbs
  116. +5 −0 app/source/templates/partials/admin-toolbar.hbs
  117. +48 −0 app/source/templates/partials/backups-table.hbs
  118. +17 −0 app/source/templates/partials/footer.hbs
  119. +27 −0 app/source/templates/partials/header.hbs
  120. +63 −0 app/source/templates/partials/history-table.hbs
  121. +11 −0 app/source/templates/partials/locater-items.hbs
  122. +51 −0 app/source/templates/partials/menu.hbs
  123. +16 −0 app/source/templates/partials/navigation-item.hbs
  124. +37 −0 app/source/templates/partials/post-list.hbs
  125. +27 −0 app/source/templates/partials/tag-list.hbs
  126. +36 −0 app/source/templates/partials/user-list.hbs
  127. +492 −0 app/source/templates/posts.edit.hbs
  128. +89 −0 app/source/templates/posts.hbs
  129. +1 −0 app/source/templates/posts.new.hbs
  130. +237 −0 app/source/templates/settings.hbs
  131. +121 −0 app/source/templates/tags.edit.hbs
  132. +49 −0 app/source/templates/tags.hbs
  133. +1 −0 app/source/templates/tags.new.hbs
  134. +189 −0 app/source/templates/users.edit.hbs
  135. +46 −0 app/source/templates/users.hbs
  136. +1 −0 app/source/templates/users.new.hbs
  137. +22 −0 composer.json
  138. +480 −0 composer.lock
  139. +450 −0 gulpfile.js
  140. +42 −0 package.json
@@ -0,0 +1,12 @@
root = true

[*]
indent_style = space
indent_size = 4
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = false

[*.md]
trim_trailing_whitespace = false
@@ -0,0 +1,142 @@
# Contributing to Postleaf

Thanks for your help in making Postleaf better. Before you submit an issue or pull request, please read through this document.

Following these guidelines helps to communicate that you respect the time of the developers managing and developing this open source project. In return, they should reciprocate that respect in addressing your issue or assessing patches and features.

## Using the issue tracker

[The issue tracker](https://github.com/claviska/postleaf-app/issues) is the preferred channel for [bug reports](#bug-reports) and [submitting pull requests](#pull-requests), but please respect the following restrictions:

* Please **do not** use the issue tracker for personal support requests. [Stack Overflow](https://stackoverflow.com/questions/tagged/postleaf-app) is a better place to get help.

* Please **do not** derail or troll issues. Keep the discussion on topic and respect the opinions of others.

* Please **do not** post comments consisting solely of "+1" or ":thumbsup:". Use [GitHub's "reactions" feature](https://github.com/blog/2119-add-reactions-to-pull-requests-issues-and-comments) instead.

* Please **do not** open issues or pull requests regarding bugs in third party libraries. Open them in their respective repositories.

## Bug reports

A bug is a _demonstrable problem_ that is caused by the code in the repository. Good bug reports are extremely helpful, so thanks!

Guidelines for bug reports:

1. **Validate and lint your code** — to ensure your problem isn't caused by a simple error in your own code.

2. **Use the GitHub issue search** — check if the issue has already been reported.

3. **Check if the issue has been fixed** — try to reproduce it using the latest `master` or development branch in the repository.

4. **Isolate the problem** — ideally create a [reduced test case](https://css-tricks.com/reduced-test-cases/) and a live example.

A good bug report shouldn't leave others needing to chase you up for more information. Please try to be as detailed as possible in your report. What is your environment? What steps will reproduce the issue? What browser(s) and OS experience the problem? Do other browsers show the bug differently? What would you expect to be the outcome? All these details will help people to fix any potential bugs.

Example:

> Short and descriptive example bug report title
>
> A summary of the issue and the browser/OS environment in which it occurs. If
> suitable, include the steps required to reproduce the bug.
>
> 1. This is the first step
> 2. This is the second step
> 3. Further steps, etc.
>
> `<url>` - a link to the reduced test case
>
> Any other information you want to share that is relevant to the issue being
> reported. This might include the lines of code that you have identified as
> causing the bug, and potential solutions (and your opinions on their
> merits).
## Pull requests

Good pull requests — patches, improvements, new features — are a fantastic help. They should remain focused in scope and avoid containing unrelated commits.

**Please ask first** before embarking on any significant pull request (e.g. implementing features, refactoring code, porting to a different language), otherwise you risk spending a lot of time working on something that the project's developers might not want to merge into the project.

Please adhere to the [coding guidelines](#code-guidelines) used throughout the project (indentation, accurate comments, etc.) and any other requirements.

**Do not edit CSS and JS files in `app/src/admin`!** Those files are automatically generated. You should edit the source files in `scripts` and `styles` instead.

Adhering to the following process is the best way to get your work included in the project:

## Code guidelines

We try to adhere as closely as possible to the following code guidelines, and we ask that you do the same. If you follow these basic rules and pay attention to the existing code, you'll be just fine.

When in doubt, try to stay consistent with the rest of the code base and keep it practical. If you feel there's something missing from these guidelines, let the developers know or submit a PR so we can address it.

### HTML

We generally follow [@mdo's code guide](http://codeguide.co/#html) for HTML, with the exception of four spaces instead of two.

Quick tips:

- Always use the HTML5 doctype.
- Always use double quotes, never single quotes, on attributes.
- Don't include a trailing slash in self-closing elements.
- Don't omit optional closing tags (e.g. `</li>` or `</body>`).
- Avoid generated markup in JavaScript.

Example of well-formed HTML:

```html
<!DOCTYPE html>
<html>
<head>
<title>Page title</title>
</head>
<body>
<img src="images/company-logo.png" alt="Company">
<h1 class="hello-world">Hello, world!</h1>
</body>
</html>
```

### CSS

We generally follow [@mdo's code guide](http://codeguide.co/#css) for CSS, with the exception of four spaces intead of two.

Example of well-formed CSS:

```css
/* Good CSS */
.selector,
.selector-secondary,
.selector[type="text"] {
padding: 15px;
margin-bottom: 15px;
background-color: rgba(0,0,0,.5);
box-shadow: 0 1px 2px #ccc, inset 0 1px 0 #fff;
}
```

### JavaScript

Postleaf doesn't have a specific JavaScript code guideline, but here are some rules that we try really hard to follow:

- Always use semicolons
- Indent with four spaces (no tabs)
- Always use strict mode
- Keep it pretty. Refrain from using long lines and excessive whitespace.
- Use `$().on('click')` instead of `$().click()` (applies to all event aliases)
- Make sure your work pleases JSHint. There is a Gulp task for this (`gulp jshint`) and it's automatically triggered by `gulp watch`

### PHP

Postleaf doesn't have a specific PHP code guideline, but here are some rules that we try really hard to follow:

- Indent with four spaces (no tabs)
- Keep it pretty. Refrain from using long lines and excesive whitespace.
- Use `camelCase` for method names, not `underscore_naming`.
- Opening braces for methods should be on the same line as the method.

This section is a work in progress. 🔨

## License and Code Contributions

By submitting bug fixes, code, documentation, or anything else to this project, you agree to allow the developer, A Beautiful Site, LLC, to license or relicense your work under their license of choice and you agree to forfeit all copyrights, intellectual property rights, and royalties pertaining to your contribution.

We want Postleaf to remain free for everyone to use, forever, so please do not submit any code or content that is licensed or copyrighted without first getting written consent from the author.
@@ -0,0 +1,26 @@
Thanks for using Postleaf! 💙💚

This issue tracker is ONLY for bug reports. If you need help with something or would like to request a feature, please ask on https://community.postleaf.org/ instead.

---

### Issue Summary

Give us a short summary of what’s going on.

### Steps to Reproduce

Tell us how to replicate the problem.

1. Step one
2. Step two
3. ...

### Additional info

- Postleaf version:
- PHP version:
- Affected browsers:
- Operating system:

Provide any additional information that may be relevant to the bug here.
@@ -0,0 +1,27 @@
Thanks for contributing to Postleaf! 💙💚

### Pull Request Summary

Tell us why you’re submitting this PR.

### Have you...

- [ ] Checked that your code adheres to our code guidelines?

---

### Contributor License Agreement

We want Postleaf to remain free and open for everyone to use forever, so please don’t submit any code or content that is licensed or copyrighted without first getting written consent.

Before we accept your pull request, we ask that you agree to the following terms to ensure there are no conflicts with Postleaf’s license now or in the future.

1. I certify that the code I am contributing to this project is completely original or free of any known license or copyright.

2. I agree to allow the developer of Postleaf, A Beautiful Site, LLC, license or relicense my work at their discretion. By submitting this pull request, I agree to forfeit all copyrights, intellectual property rights, and royalties pertaining to my contribution.

3. By entering my name in the space provided below, I agree to all of the terms mentioned above.

Signed: [FULL_LEGAL_NAME]

Date: [YYYY-MM-DD]
@@ -0,0 +1,12 @@
# Files
.DS_Store
.htaccess
npm-debug.log

# Folders
/app/database.php
/app/source/assets
/app/source/vendor
/design
/dist
/node_modules
@@ -0,0 +1,17 @@
{
"browser": true,
"jquery": true,
"bitwise": true,
"eqeqeq": true,
"freeze": true,
"latedef": "nofunc",
"newcap": true,
"noarg": true,
"node": true,
"nonew": true,
"regexp": true,
"undef": true,
"unused": true,
"elision": true,
"notypeof": true
}
Oops, something went wrong.

0 comments on commit 3a02f91

Please sign in to comment.
You can’t perform that action at this time.