Skip to content

Commit

Permalink
Initial commit.
Browse files Browse the repository at this point in the history
  • Loading branch information
colintucker committed May 1, 2018
0 parents commit aa6df40
Show file tree
Hide file tree
Showing 36 changed files with 7,192 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# For more information about the properties used in this file,
# please see the EditorConfig documentation:
# http://editorconfig.org/

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

[*.md]
trim_trailing_whitespace = false

[*.php]
indent_size = 4
indent_style = space
19 changes: 19 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Docs and tests folders
/docs export-ignore
/tests export-ignore

# Continuous integration files
/.travis.yml export-ignore
/.scrutinizer.yml export-ignore

# Git files
/.gitattributes export-ignore
/.gitignore export-ignore

# Editor files
/.editorconfig export-ignore

# Markdown files
/CONTRIBUTING.md export-ignore
/LICENSE.md export-ignore
/README.md export-ignore
24 changes: 24 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
### Thumbnails ###
._*
Thumbs.db

### Folder Config ###
.directory
.DS_Store
Desktop.ini

### Log Files ###
*.log

### SQL Files ###
*.sql

### Node.js Packages ###
/**/node_modules

### Sass Cache ###
.sass-cache

### Source Maps ###
/**/*.js.map
/**/*.css.map
104 changes: 104 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
# Contributing

When contributing to this repository, please first discuss the change you wish to
make via issue, email, or any other method with the owners of this repository before
making a change.

In order to contribute code to this project, please follow the
[pull request workflow](#pull-request-workflow).

Please note we have a [code of conduct](#code-of-conduct), please follow it in all
your interactions with the project.

## Pull Request Workflow

1. Create a [fork][forking] of the repository.
2. Add the original repository as an [upstream remote][upstream] to keep your fork
up-to-date.
3. Create a [new branch][branching] for your changes.
4. [Commit][committing] one or more well-commented and clean changes to your fork.
5. [Sync][syncing] your fork with the upstream remote to merge any changes.
6. [Push][pushing] your changes to GitHub.
7. Create a [pull request][pullreq] using the GitHub web interface.

## Code of Conduct

### Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, gender identity and expression, level of experience,
nationality, personal appearance, race, religion, or sexual identity and
orientation.

### Our Standards

Examples of behavior that contributes to creating a positive environment
include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

### Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.

### Scope

This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.

### Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at <[email protected]>. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.

### Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 1.4, available at [http://contributor-covenant.org/version/1/4][version]

[forking]: https://help.github.com/articles/fork-a-repo
[upstream]: https://help.github.com/articles/configuring-a-remote-for-a-fork
[branching]: https://help.github.com/articles/creating-and-deleting-branches-within-your-repository
[committing]: https://help.github.com/articles/adding-a-file-to-a-repository-using-the-command-line
[syncing]: https://help.github.com/articles/syncing-a-fork
[pushing]: https://help.github.com/articles/pushing-to-a-remote
[pullreq]: https://help.github.com/articles/creating-a-pull-request
[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/
22 changes: 22 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
Copyright (c) 2018, Praxis Interactive.
All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following
disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided with the distribution.

3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote
products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
67 changes: 67 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# SilverWare Publications Module

[![Latest Stable Version](https://poser.pugx.org/silverware/publications/v/stable)](https://packagist.org/packages/silverware/publications)
[![Latest Unstable Version](https://poser.pugx.org/silverware/publications/v/unstable)](https://packagist.org/packages/silverware/publications)
[![License](https://poser.pugx.org/silverware/publications/license)](https://packagist.org/packages/silverware/publications)

Provides a publications page for [SilverWare][silverware] apps, divided into a series of categories and publications.

## Contents

- [Requirements](#requirements)
- [Installation](#installation)
- [Usage](#usage)
- [Issues](#issues)
- [Contribution](#contribution)
- [Maintainers](#maintainers)
- [License](#license)

## Requirements

- [SilverWare][silverware]

## Installation

Installation is via [Composer][composer]:

```
$ composer require silverware/publications
```

## Usage

The module provides three pages ready for use within the CMS:

- `PublicationArchive`
- `PublicationCategory`
- `Publication`

Create a `PublicationArchive` as the top-level of your publications section. Under the `PublicationArchive` you
may add `PublicationCategory` pages as children to divide the page into a series
of categories. Then, as children of `PublicationCategory`, add your `Publication` pages for individual
publications.

Once you've added a `Publication`, you may add a series of downloadable files for the publication via the "Files" tab.

## Issues

Please use the [GitHub issue tracker][issues] for bug reports and feature requests.

## Contribution

Your contributions are gladly welcomed to help make this project better.
Please see [contributing](CONTRIBUTING.md) for more information.

## Maintainers

[![Colin Tucker](https://avatars3.githubusercontent.com/u/1853705?s=144)](https://github.com/colintucker) | [![Praxis Interactive](https://avatars2.githubusercontent.com/u/1782612?s=144)](https://www.praxis.net.au)
---|---
[Colin Tucker](https://github.com/colintucker) | [Praxis Interactive](https://www.praxis.net.au)

## License

[BSD-3-Clause](LICENSE.md) &copy; Praxis Interactive

[silverware]: https://github.com/praxisnetau/silverware
[composer]: https://getcomposer.org
[issues]: https://github.com/praxisnetau/silverware-publications/issues
16 changes: 16 additions & 0 deletions _config.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?php

/**
* SilverWare Publications configuration file.
*
* PHP version >=5.6.0
*
* For full copyright and license information, please view the
* LICENSE.md file that was distributed with this source code.
*
* @package SilverWare\Publications
* @author Colin Tucker <[email protected]>
* @copyright 2018 Praxis Interactive
* @license https://opensource.org/licenses/BSD-3-Clause BSD-3-Clause
* @link https://github.com/praxisnetau/silverware-publications
*/
11 changes: 11 additions & 0 deletions _config/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
Name: silverware-publications
---

# Configure Content Controller:

SilverStripe\CMS\Controllers\ContentController:
required_js:
- "silverware/publications: client/dist/js/bundle.js"
required_css:
- "silverware/publications: client/dist/styles/bundle.css"
Binary file added admin/client/dist/images/icons/Publication.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions admin/client/dist/js/bundle.js

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

3 changes: 3 additions & 0 deletions admin/client/src/bundles/bundle.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/* SilverWare Publications Admin Bundle
===================================================================================================================== */

Binary file added admin/client/src/images/icons/Publication.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 admin/client/src/images/icons/PublicationArchive.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions admin/client/src/styles/bundle.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/* SilverWare Publications Admin Bundle
===================================================================================================================== */
1 change: 1 addition & 0 deletions client/dist/js/bundle.js

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

1 change: 1 addition & 0 deletions client/dist/styles/bundle.css

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

6 changes: 6 additions & 0 deletions client/src/bundles/bundle.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/* SilverWare Publications Bundle
===================================================================================================================== */

// Load Styles:

require('styles/bundle.scss');
27 changes: 27 additions & 0 deletions client/src/styles/_styles.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/* SilverWare Publications Styles
===================================================================================================================== */

.publicationarchive {

.categories {

.category {
margin-bottom: $spacer;
}

}

}

article.publication,
div.publication article {

div.files {

span.info {
color: $gray-600;
}

}

}
11 changes: 11 additions & 0 deletions client/src/styles/bundle.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/* SilverWare Publications Bundle
===================================================================================================================== */

// Import SilverWare Theme Files:

@import "~silverware-theme/styles/variables";
@import "~silverware-theme/styles/mixins";

// Import Module Styles:

@import "styles";
40 changes: 40 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"name": "silverware/publications",
"type": "silverstripe-vendormodule",
"description": "SilverWare Publications Module.",
"homepage": "https://github.com/praxisnetau/silverware-publications",
"keywords": [
"silverware",
"publications",
"silverstripe"
],
"license": "BSD-3-Clause",
"authors": [
{
"name": "Colin Tucker",
"role": "Developer",
"email": "[email protected]",
"homepage": "https://www.praxis.net.au/"
}
],
"require": {
"php": ">=5.6.0",
"silverware/silverware": "^1.5"
},
"autoload": {
"psr-4": {
"SilverWare\\Publications\\": "src/"
}
},
"extra": {
"branch-alias": {
"dev-master": "1.0.x-dev"
},
"expose": [
"admin/client/dist",
"client/dist"
]
},
"minimum-stability": "dev",
"prefer-stable": true
}
Loading

0 comments on commit aa6df40

Please sign in to comment.