-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b7b9508
commit 1fb84d1
Showing
14 changed files
with
294 additions
and
106 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<div class="container" ng-controller="galerieCtrl"> | ||
<div class="seznam-div"> | ||
<ul class="list-group" id="kat-list"> | ||
<!--<li class="list-group-item noselect" id="mekkysi" style="text-decoration: line-through">Měkkýši</li> | ||
<li class="list-group-item active noselect" id="clenovci">Členovci</li>--> | ||
<li class="list-group-item noselect" ng-repeat="set in setList" ng-class="{active: set.enabled}" ng-click="set.enabled = !set.enabled; updateSelected();" ng-model="set.enabled" id="placeholder"> | ||
<span class="icon-check" ng-show="set.enabled"></span> | ||
<span class="icon-check-empty" ng-show="!set.enabled"></span> | ||
{{set.desc}} | ||
</li> | ||
</ul> | ||
</div> | ||
<div class="gallery"> | ||
<figure class="gallery" ng-repeat="img in imgList" id="placeholder"> | ||
<img ng-src="{{img.Image}}" alt="{{img.Name}}"> | ||
<figcaption class="copyright">{{img.Name}}</figcaption> | ||
</figure> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<div class="poznavackaContainer" ng-controller="poznavackaCtrl"> | ||
<figure class="obrazek-div"> | ||
<img class="obrazek" ng-src="{{thisOne.Image | default: 'splash.jpg'}}"> | ||
<figcaption class="copyright" ng-show="thisOne.Name">{{thisOne.Author + ", " + thisOne.License}}</figcaption> | ||
</figure> | ||
<div class="reseni-div card"> | ||
<h4 class="card-title">Řešení:</h4> | ||
<div class="reseni" ng-model="showSolution" ng-class="{show: showSolution}" ng-click="showSolution = !showSolution"> | ||
<p class="reseni-text noselect">{{thisOne.Name | default: 'Doporučuje 9 z 10 biologů'}}</p> | ||
</div> | ||
<p class="card-text">Najeďte nebo klikněte.</p> | ||
</div> | ||
<div class="seznam-div"> | ||
<ul class="list-group" id="kat-list"> | ||
<!--<li class="list-group-item noselect" id="mekkysi" style="text-decoration: line-through">Měkkýši</li> | ||
<li class="list-group-item active noselect" id="clenovci">Členovci</li>--> | ||
<li class="list-group-item noselect" ng-repeat="set in setList" ng-class="{active: set.enabled}" ng-click="set.enabled = !set.enabled; updateSelected();" ng-model="set.enabled" id="placeholder"> | ||
<span class="icon-check" ng-show="set.enabled"></span> | ||
<span class="icon-check-empty" ng-show="!set.enabled"></span> | ||
{{set.desc}} | ||
</li> | ||
</ul> | ||
</div> | ||
<div class="tlacitka-div"> | ||
<a id="nahodna" href=""" ng-click="next()" class="btn"><i class="icon-right"></i>Další obrázek</a> | ||
</div> | ||
<div class="badges"> | ||
<a href='https://play.google.com/store/apps/details?id=cz.clexpert.poznavacka&utm_source=http://petrzjunior.github.io/poznavacka/&pcampaignid=MKT-Other-global-all-co-prtnr-py-PartBadge-Mar2515-1'><img alt='Nyní na Google Play' src='https://play.google.com/intl/en_us/badges/images/generic/cs_badge_web_generic.png' /></a> | ||
<a href="https://www.microsoft.com/store/apps/9pfg9clhg3nl?ocid=badge"><img src="https://assets.windowsphone.com/92051e30-484c-4b7a-9cab-3571c606d58c/Czech_Get_it_Win_10_InvariantCulture_Default.png" alt="Získat ve Windows 10" /></a> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,32 @@ | ||
<!DOCTYPE html> | ||
|
||
<!-- Ahoj, pokud tě zajímá, jak to celé funguje, zastav se osobně a zeptej se --> | ||
<!DOCTYPE html> | ||
<html ng-app="poznavackaApp"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<title>Poznávačka</title> | ||
<script src="js/lib/jquery.min.js" type="text/javascript"></script> | ||
<script src="js/lib/jquery.unveil.js" type="text/javascript"></script> | ||
<script src="js/lib/angular.min.js" type="text/javascript"></script> | ||
<script src="js/lib/angular-route.min.js" type="text/javascript"></script> | ||
<script src="js/app.js" type="text/javascript"></script> | ||
<script src="js/poznavacka.js" type="text/javascript"></script> | ||
<script src="js/galerie.js" type="text/javascript"></script> | ||
<link href="flexbox.css" rel="stylesheet"> | ||
<link href="icons.css" rel="stylesheet"> | ||
</head> | ||
|
||
<body> | ||
<body ng-controller="mainCtrl"> | ||
<div class="page"> | ||
<div class="jumbotron"> | ||
<h1 class="display-3">Poznávačka master</h1> | ||
<p class="lead">stvořil Petr Zahradník</p> | ||
</div> | ||
<div class="container"> | ||
<figure class="obrazek-div"> | ||
<img class="obrazek" src="splash.jpg"> | ||
<figcaption class="copyright"></figcaption> | ||
</figure> | ||
<div class="reseni-div card"> | ||
<h4 class="card-title">Řešení:</h4> | ||
<div class="reseni"> | ||
<p class="reseni-text noselect">-nic-</p> | ||
</div> | ||
<p class="card-text">Najeďte nebo klikněte.</p> | ||
</div> | ||
<div class="seznam-div"> | ||
<ul class="list-group" id="kat-list"> | ||
<li class="list-group-item noselect" id="mekkysi" style="text-decoration: line-through">Měkkýši</li> | ||
<li class="list-group-item active noselect" id="clenovci">Členovci</li> | ||
</ul> | ||
</div> | ||
<div class="tlacitka-div"> | ||
<a id="nahodna" href="#!" onclick="dalsi(); return false;" class="btn"><i class="icon-right"></i>Další obrázek</a> | ||
</div> | ||
<div class="badges"> | ||
<a href='https://play.google.com/store/apps/details?id=cz.clexpert.poznavacka&utm_source=http://petrzjunior.github.io/poznavacka/&pcampaignid=MKT-Other-global-all-co-prtnr-py-PartBadge-Mar2515-1'><img alt='Nyní na Google Play' src='https://play.google.com/intl/en_us/badges/images/generic/cs_badge_web_generic.png'/></a> | ||
<a href="https://www.microsoft.com/store/apps/9pfg9clhg3nl?ocid=badge"><img src="https://assets.windowsphone.com/92051e30-484c-4b7a-9cab-3571c606d58c/Czech_Get_it_Win_10_InvariantCulture_Default.png" alt="Získat ve Windows 10" /></a> | ||
</div> | ||
</div> | ||
<ul class="navbar"> | ||
<li><a href="#!/poznavacka" ng-class="{ navThis: isActive('/poznavacka') }">Poznávačka</a></li> | ||
<li><a href="#!/galerie" ng-class="{ navThis: isActive('/galerie') }">Galerie</a></li> | ||
</ul> | ||
<div ng-view></div> | ||
</div> | ||
<script src="https://code.jquery.com/jquery-2.2.4.min.js" integrity="sha256-BbhdlvQf/xTY9gja0Dq3HiwQF8LaCRTXxZKRutelT44=" crossorigin="anonymous"></script> | ||
<script src="poznavacka.js"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,36 @@ | ||
// JavaScript source code | ||
var poznavackaApp = angular.module("poznavackaApp", ["ngRoute"]); | ||
|
||
poznavackaApp.config(['$routeProvider', | ||
function ($routeProvider) { | ||
$routeProvider. | ||
when('/poznavacka', { | ||
templateUrl: '/html/poznavacka.html', | ||
controller: 'poznavackaCtrl' | ||
}). | ||
when('/galerie', { | ||
templateUrl: '/html/galerie.html', | ||
controller: 'galerieCtrl' | ||
}). | ||
otherwise({ | ||
redirectTo: '/poznavacka' | ||
}) | ||
} | ||
]); | ||
|
||
poznavackaApp.factory("loaderService", function (poznavackaConfig) { | ||
return poznavackaConfig.setList; | ||
}); | ||
|
||
poznavackaApp.constant("poznavackaConfig", { | ||
setList: [ | ||
{name: "mekkysi", desc: "Měkkýši (Pracuje se na tom)", enabled: false, file: "clenovci.json"}, | ||
{name: "clenovci", desc: "Členovci", enabled: true, file: "clenovci.json"} | ||
] | ||
}); | ||
|
||
poznavackaApp.controller("mainCtrl", function($scope, $location) { | ||
$scope.isActive = function (viewLocation) { | ||
var active = (viewLocation === $location.path()); | ||
return active; | ||
}; | ||
}); |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
poznavackaApp.controller("galerieCtrl", function($scope, $http, loaderService) { | ||
$scope.setList = []; | ||
$scope.imgList = []; | ||
|
||
$scope.updateSelected = function() { | ||
$scope.imgList = []; | ||
for(var index = 0; index < $scope.setList.length; index++) { | ||
if($scope.setList[index].enabled) { | ||
$http.get($scope.setList[index].file).then(function(data) { | ||
$scope.imgList = $scope.imgList.concat(data.data); | ||
}); | ||
} | ||
} | ||
}; | ||
|
||
var loadSets = function(){ | ||
$scope.setList = loaderService; | ||
}; | ||
loadSets(); | ||
$scope.updateSelected(); | ||
|
||
$scope.next = function() { | ||
$scope.showSolution = false; | ||
$scope.thisOne = $scope.imgList[Math.floor((Math.random() * ($scope.imgList.length - 1)) + 0)]; | ||
console.log($scope.thisOne); | ||
}; | ||
}); |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
/** | ||
* jQuery Unveil | ||
* A very lightweight jQuery plugin to lazy load images | ||
* http://luis-almeida.github.com/unveil | ||
* | ||
* Licensed under the MIT license. | ||
* Copyright 2013 Luís Almeida | ||
* https://github.com/luis-almeida | ||
*/ | ||
|
||
;(function($) { | ||
|
||
$.fn.unveil = function(threshold, callback) { | ||
|
||
var $w = $(window), | ||
th = threshold || 0, | ||
retina = window.devicePixelRatio > 1, | ||
attrib = retina? "data-src-retina" : "data-src", | ||
images = this, | ||
loaded; | ||
|
||
this.one("unveil", function() { | ||
var source = this.getAttribute(attrib); | ||
source = source || this.getAttribute("data-src"); | ||
if (source) { | ||
this.setAttribute("src", source); | ||
if (typeof callback === "function") callback.call(this); | ||
} | ||
}); | ||
|
||
function unveil() { | ||
var inview = images.filter(function() { | ||
var $e = $(this); | ||
if ($e.is(":hidden")) return; | ||
|
||
var wt = $w.scrollTop(), | ||
wb = wt + $w.height(), | ||
et = $e.offset().top, | ||
eb = et + $e.height(); | ||
|
||
return eb >= wt - th && et <= wb + th; | ||
}); | ||
|
||
loaded = inview.trigger("unveil"); | ||
images = images.not(loaded); | ||
} | ||
|
||
$w.on("scroll.unveil resize.unveil lookup.unveil", unveil); | ||
|
||
unveil(); | ||
|
||
return this; | ||
|
||
}; | ||
|
||
})(window.jQuery || window.Zepto); |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
poznavackaApp.controller("poznavackaCtrl", function($scope, $http, loaderService) { | ||
$scope.setList = []; | ||
$scope.imgList = []; | ||
|
||
$scope.updateSelected = function() { | ||
$scope.imgList = []; | ||
for(var index = 0; index < $scope.setList.length; index++) { | ||
if($scope.setList[index].enabled) { | ||
$http.get($scope.setList[index].file).then(function(data) { | ||
$scope.imgList = $scope.imgList.concat(data.data); | ||
}); | ||
} | ||
} | ||
}; | ||
|
||
var loadSets = function(){ | ||
$scope.setList = loaderService; | ||
}; | ||
loadSets(); | ||
$scope.updateSelected(); | ||
|
||
$scope.next = function() { | ||
$scope.showSolution = false; | ||
$scope.thisOne = $scope.imgList[Math.floor((Math.random() * ($scope.imgList.length - 1)) + 0)]; | ||
console.log($scope.thisOne); | ||
}; | ||
}); | ||
|
||
poznavackaApp.filter('default', [function(){ | ||
return function(value, def) { | ||
return value || def; | ||
}; | ||
}]); |
Oops, something went wrong.