Skip to content
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

merge changes back from feature/category2 #114

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
44 changes: 44 additions & 0 deletions scss/category.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
background: $light;
padding: $content-padding;
border-radius: 10px;
margin-top: 50px;
.card {
box-shadow: none;
padding: $content-padding;
Expand Down Expand Up @@ -74,3 +75,46 @@ border-bottom: 4px solid #e7eaf0;
min-height: 240px;
border-radius: 10px 10px 0 0;
}

// category icon
.text-center .col img {
max-width: 160px;
max-height: 160px;
margin-top: 50px;
}

// category title
.text-center .col h4 {
color: white;
font-size: 24pt;
font-family: 'Siri Web SemiBold';
// line-height: 2.6;
}

//category long description
.text-center .col p {
color: white;
font-size: 16pt;
font-family: 'Siri Web Light';
// line-height: 2.4;
}

.app-title {
font-family: 'Siri Web SemiBold';
font-size: 14pt !important;
// line-height: 2;
}

.app-desc {
font-family: 'Siri Web Light';
font-size: 12pt !important;
// line-height: 2;
overflow: hidden !important;
display: -webkit-box !important;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
white-space: normal !important;
}
.item-separator:last-child {
border: 0px;
}
20 changes: 20 additions & 0 deletions scss/fonts.scss
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,26 @@
font-style: italic;
}

@font-face {
font-family: 'Siri Web SemiBold';
src: url('/fonts/SiriWeb-SemiBold.eot');
src: url('/fonts/SiriWeb-SemiBold.eot?') format('embedded-opentype'),
url('/fonts/SiriWeb-SemiBold.woff') format('woff'),
url('/fonts/SiriWeb-SemiBold.ttf') format('opentype');
font-weight: bold;;
font-style: normal;
}

@font-face {
font-family: 'Siri Web Light';
src: url('/fonts/SiriWeb-Light.eot');
src: url('/fonts/SiriWeb-Light.eot?') format('embedded-opentype'),
url('/fonts/SiriWeb-Light.woff') format('woff'),
url('/fonts/SiriWeb-Light.ttf') format('opentype');
font-weight: lighter;;
font-style: normal;
}

@font-face {
font-family: 'Siri Core Bold';
src: url('/fonts/SiriCore-Bold.eot');
Expand Down
Binary file added www/fonts/SiriWeb-Light.eot
Binary file not shown.
Binary file added www/fonts/SiriWeb-Light.ttf
Binary file not shown.
Binary file added www/fonts/SiriWeb-Light.woff
Binary file not shown.
Binary file added www/fonts/SiriWeb-SemiBold.eot
Binary file not shown.
Binary file added www/fonts/SiriWeb-SemiBold.ttf
Binary file not shown.
Binary file added www/fonts/SiriWeb-SemiBold.woff
Binary file not shown.
23 changes: 20 additions & 3 deletions www/js/controllers.js
Original file line number Diff line number Diff line change
Expand Up @@ -215,9 +215,26 @@ angular.module('starter.controllers', [])

}

// not currently used
$scope.getFavorites = function() {
return API.favoriteStore.get("favorites");
if (!exists) {
//update project upvotes
if(app.upvotes!==undefined){
app.upvotes++;
}
//update localstorage favorites
favorites.push(app)
API.favoriteStore.put("favorites", favorites)
//update vote on the server side
API.upVote(app._id)
} else {
//update project upvotes
if(app.upvotes!==undefined){
app.upvotes--;
}
//update localstorage favorites
favorites.splice(favorites.indexOf(app),1)
API.favoriteStore.put("favorites", favorites)
//update vote on the server side
API.downVote(app._id)
}

$scope.inFavorites = function(project) {
Expand Down
2 changes: 1 addition & 1 deletion www/templates/categories.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

<div class="item item-text-wrap">
<div class="item item-divider category-label">{{ category.slug + '_title' | translate }}</div>
<div class="desc">{{ category.slug + '_description' | translate }}</div>
<div class="desc">{{ category.slug + '_description_short' | translate }}</div>
<!-- <img class="icon" ng-src="img/categories-{{category.slug}}.png" /> -->
</div>

Expand Down
12 changes: 7 additions & 5 deletions www/templates/category.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,18 @@
<img class="img-responsive" src="img/categories-{{category.slug}}.png">
</div>
</div>
<div class="category_description_container">
<div class="card text-center">
<h4>{{ category.slug + "_title" | translate }}</h4>
<p>{{ category.slug + '_description' | translate }}</p>
<div class="row text-center">
<div class="col">
<h4>{{ category.slug + "_title" | translate }}</h4>
<p>{{ category.slug + '_description_long' | translate }}</p>
</div>
</div>
<div class="category_description_container">
<ion-list>
<div class="item-separator" ng-repeat="app in apps">
<a class="item item-thumbnail-left" ng-click="showapp(app)">
<img ng-src="{{ '/img/apps/logo_'+app._id+'.png' }}">
<h2>{{app.name}}</h2>
<h2 class="app-title">{{app.name}}</h2>
<p class="app-desc">{{app.shortDescription}}</p>
<!-- <p class="like-num">{{app.upvotes}} likes</p> --> <!-- This will not currently be implemented -->
<!-- <p class="like-num"><i class="icon {{ inFavorites(app) ? 'ion-ios-heart' : 'ion-ios-heart-outline'}}"></i></p> -->
Expand Down