Skip to content

os.js store update #4

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 24 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
a5095be
Swapped Materilize for UIKit
ElectrcNINJA Jan 15, 2017
cdf26c0
Added site specific css file
ElectrcNINJA Jan 15, 2017
59bbfe0
added os.js header png
ElectrcNINJA Jan 15, 2017
4c08deb
Converted into angualr app
ElectrcNINJA Jan 15, 2017
24f4d53
Added Searchbar Functionality
ElectrcNINJA Jan 15, 2017
e5f6680
removed nav from views directory
ElectrcNINJA Jan 16, 2017
5ff9ea9
Updated Readme, Changelog. Added .gitignore
ElectrcNINJA Jan 16, 2017
9f52d93
Updated my copy/pasta comments
ElectrcNINJA Jan 16, 2017
3c3298b
Removing .vscode and correcting README error
ElectrcNINJA Jan 16, 2017
720a62c
added .vscore back to gitingore
ElectrcNINJA Jan 16, 2017
efe390d
Added Packages View
ElectrcNINJA Jan 17, 2017
56932f2
Added Packages Page and Components
ElectrcNINJA Jan 17, 2017
5ae36b0
Search Component is now async
ElectrcNINJA Jan 17, 2017
5211ca3
added some error handling to getpackages()
ElectrcNINJA Jan 17, 2017
a9c86ed
removed stray " and added closing tbody tag
ElectrcNINJA Jan 17, 2017
3334b2a
Added CSS HTML, and Image for new site header.
ElectrcNINJA Jan 17, 2017
682f212
Tweaked layout for proper spacing and alignment
ElectrcNINJA Jan 18, 2017
4d59a9a
Removed unnecessary padding
ElectrcNINJA Jan 18, 2017
1cf77e5
Center aligned row contents
ElectrcNINJA Jan 18, 2017
6f8b788
Search now only matches on package name
ElectrcNINJA Jan 21, 2017
6744438
Part Refactoring (#1)
ElectrcNINJA Mar 31, 2017
760ddab
added .vs to gitignore
ElectrcNINJA Mar 31, 2017
6ca162b
Part refactoring (#2)
ElectrcNINJA Mar 31, 2017
1189ba0
Resolving Confilct
ElectrcNINJA Mar 31, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.vscode/
.directory
.vs/
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,7 @@

## Ver. 1.00
* Initial Release

## Ver. 1.20
* Switched UI Kit 3 for CSS JS and CSS
* Implements Angualr
31 changes: 24 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,30 @@
Simple web app to browse, install and submit application for the OS.js project

## What's included
* JS, CSS, and Fonts dirs using the Materialize front-end framework.
* Packages dir for...well packages / applications.
* packages.json, packages listing.
* index.html for the front page.
* Angualr modules and components for the store.
* JS, CSS, and Fonts using the UIKit 3 front-end framework.
* Some OS.js theme assets. (banner and icon)
* packages.json and directory for package repo and listing.
* index.html for the frontpage and angualr entry-point.
* This readme document.
* CHANGELOG.md, please make notes for new pushes.

## What needs to be done.
* Clean up of the front page / add more content.
* Add logic to the search bar and search button and link it to the package lists or package repo.
## What needs to be done
* Add Package directory list view.
* Add Package detail view.
* Add a way to display icons from the package on the package's listing.
* Front page search needs to match *just* the name of the package not all info.

## How to run
lite-server (for development)
***this method requires node and npm***

```
# Install lite-server globaly
$ npm install lite-server -g
```

```
# in project root directory run
$ lite-server
```
17 changes: 17 additions & 0 deletions app/app.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
angular.
module('storeApp').
config(['$locationProvider', '$routeProvider',
function config($locationProvider, $routeProvider) {
$locationProvider.hashPrefix('!');

$routeProvider.
when('/home', {
template: '<home-view></home-view>'
}).
when('/packages', {
templateUrl: 'app/views/packages/packages.template.html',
controller: 'pkgController'
}).
otherwise('/home');
}
]);
8 changes: 8 additions & 0 deletions app/app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
var storeApp = angular.module('storeApp', [
'ngRoute',
'appNav',
'appFooter',
'homeView',
'appSearch',
'packageView'
]);
6 changes: 6 additions & 0 deletions app/parts/footer/footer.component.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// Register the `appFooter` component on the `appFooter` module,
angular.
module('appFooter').
component('appFooter', {
templateUrl: 'app/parts/footer/footer.template.html'
});
8 changes: 8 additions & 0 deletions app/parts/footer/footer.controller.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/**
App Footer Controller
*/
angular.module('appFooter', [])
.controller('AppFooterController', function ($http) {
var ctrl = this;
//Controller Logic Goes here.
});
2 changes: 2 additions & 0 deletions app/parts/footer/footer.module.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// Define the `appFooter` module
angular.module('appFooter', []);
25 changes: 25 additions & 0 deletions app/parts/footer/footer.template.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<footer class="uk-section uk-section-secondary uk-padding-small">
<div class="uk-container">
<div class="uk-child-width-1-3@m uk-grid-small" uk-grid>
<h4>About OS.js</h4>
<h4>Helpful Links</h4>
</div>

<div class="uk-child-width-1-3@m uk-grid-small" uk-grid>
<p>
OS.js is a JavaScript web desktop implementation for your browser with a fully-fledged window manager, Application
APIs, GUI toolkits and filesystem abstraction.
</p>
<div>
<ul class="">
<li><a href="http://os.js.org/">Project Page</a></li>
<li><a href="https://github.com/andersevenrud/OS.js-v2">Project Github</a></li>
</ul>
</div>
</div>

<div class="uk-grid-match uk-child-width-1-3@m uk-grid-small" uk-grid>
<p class="uk-text-bottom">© 2017 Made by the OS.js Community</p>
</div>
</div>
</footer>
6 changes: 6 additions & 0 deletions app/parts/nav/nav.component.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// Register the `appNav` component on the `appNav` module,
angular.
module('appNav').
component('appNav', {
templateUrl: 'app/parts/nav/nav.template.html'
});
12 changes: 12 additions & 0 deletions app/parts/nav/nav.controller.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/**
App Nav Controller
*/
angular.module('appNav', [])
.controller('AppNavController', function ($http, $location) {
var ctrl = this;

ctrl.getClass = function (path) {
console.log(path);
return ($location.path().substr(0, path.length) === path) ? 'uk-active' : '';
}
});
2 changes: 2 additions & 0 deletions app/parts/nav/nav.module.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// Define the `appNav` module
angular.module('appNav', ['ngRoute']);
16 changes: 16 additions & 0 deletions app/parts/nav/nav.template.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<nav class="osjs-header uk-light" ng-controller="AppNavController as ctrl" uk-navbar>
<div class="uk-navbar-left">
<a href="#!/home" class="uk-navbar-item uk-logo bg-flat"><img class="header-logo" src="/img/osjs-logo.png" /> Web Store</a>
<ul class="uk-navbar-nav">
<li ngClass="{ctrl.getClass('#!/home')}">
<a href="#!/home">Home</a>
</li>
<li><a href="#!/packages">Packages</a></li>
</ul>
</div>
<div class="uk-navbar-right">
<ul class="uk-navbar-nav">
<li><a href="">Submit</a></li>
</ul>
</div>
</nav>
22 changes: 22 additions & 0 deletions app/parts/search/search-box.template.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<div ng-controller="AppSearchController as searchCtrl">
<div class="uk-grid-small uk-child-width-1-2@s uk-flex-center uk-text-center" uk-grid>
<div class="uk-section">
<form>
<fieldset class="uk-fieldset uk-child-width-1-2@s">
<div class="uk-inline">
<input ng-model="searchCtrl.search" class="uk-input" type="text" placeholder="Search">
</div>
</fieldset>
</form>
</div>
</div>

<div ng-show="searchCtrl.search" class="uk-child-width-1-5@s uk-flex-center" uk-grid>
<div ng-repeat="pkg in searchCtrl.packages | filter:{name: searchCtrl.search}">
<div class=" uk-card uk-card-default uk-animation-fade uk-animation-fast uk-card-body ">
<div class="uk-text-center "><img class="uk-preserve-width " width="40 " src="/img/osjs-icon.png " /></div>
<p class="uk-text-center uk-text-middle ">{{pkg.name}}</p>
</div>
</div>
</div>
</div>
7 changes: 7 additions & 0 deletions app/parts/search/search.component.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/**
App Search Component
*/
angular.module('appSearch')
.component('searchBox', {
templateUrl: 'app/parts/search/search-box.template.html'
});
28 changes: 28 additions & 0 deletions app/parts/search/search.controller.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/**
App Search Controller
*/
angular.module('appSearch', [])
.controller('AppSearchController', function ($http) {
var appSearch = this;
getPackages($http, this).then((pkgs) => {
appSearch.packages = pkgs;
});
});

/**
Helpers
*/
function getPackages($http) {
return new Promise((resolve, reject) => {
//Get the packages.json file
$http.get('packages.json')
.then(function (res) {
//Return the data
resolve(res.data);
}, (err) => {
//Or reject if we've hit a snag.
reject(err);
});
});
}

4 changes: 4 additions & 0 deletions app/parts/search/search.module.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/**
App Search Module
*/
angular.module('appSearch', []);
8 changes: 8 additions & 0 deletions app/views/home/home.component.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// Register the `homeView` component on the `homeView` module,
angular.
module('homeView').
component('homeView', {
templateUrl: 'app/views/home/home.template.html',
controller: function () {
}
});
4 changes: 4 additions & 0 deletions app/views/home/home.module.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// Define the `homeView` module
angular.module('homeView', [

]);
9 changes: 9 additions & 0 deletions app/views/home/home.template.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<div class="main-content">
<div class="uk-section">
<div class="uk-container uk-container-large">
<h1 class="uk-text-center">Welcome to the OS.js Web Store</h1>
<h3 class="uk-text-center">Discover, install, and create OS.js Applications</h3>
<search-box></search-box>
</div>
</div>
</div>
26 changes: 26 additions & 0 deletions app/views/packages/packages.component.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// Register the `homeView` component on the `homeView` module,
angular
.module('packageView')
.controller('pkgController', ['$scope', '$http', function ($scope, $http) {
getPackages($http).then((pkgs) => {
$scope.packages = pkgs;
}).catch((err) => {
console.log(err);
})
}]);

//Helpers

function getPackages($http) {
return new Promise((resolve, reject) => {
//Get the packages.json file
$http.get('packages.json')
.then(function (res) {
//Return the data
resolve(res.data);
}, (err) => {
//Or reject if we've hit a snag.
reject(err);
});
})
};
4 changes: 4 additions & 0 deletions app/views/packages/packages.module.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// Define the `homeView` module
angular.module('packageView', [

]);
19 changes: 19 additions & 0 deletions app/views/packages/packages.template.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<div ng-controller="pkgController" class="uk-container">
<h2 class="uk-padding-small">All packages</h2>
<table class="uk-table uk-table-hover uk-padding-small">
<thead>
<tr>
<th></th>
<th class="uk-text-center">Name</th>
<th class="uk-text-center">Description</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="p in packages">
<td class="uk-table-shrink"><img class="uk-preserve-width" width="40" src="/img/osjs-icon.png"/></td>
<td class="uk-table-shrink uk-text-middle uk-text-center">{{p.name}}</td>
<td class="uk-table-expand uk-text-middle uk-text-center">{{p.description}}</td>
</tr>
</tbody>
</table>
</div>
4 changes: 4 additions & 0 deletions css/images/accordion-close.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions css/images/accordion-open.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions css/images/close-large.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions css/images/close.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions css/images/divider-icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions css/images/form-checkbox-indeterminate.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions css/images/form-checkbox.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions css/images/form-radio.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions css/images/form-select.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading