diff --git a/src/Config.php b/src/Config.php index 4281a4c..5eec063 100644 --- a/src/Config.php +++ b/src/Config.php @@ -3,8 +3,8 @@ namespace WebProjectFitness; class Config { - const SITE_JS_VERSION = '1.01'; - const SITE_CSS_VERSION = '1.01'; + const SITE_JS_VERSION = '1.03'; + const SITE_CSS_VERSION = '1.03'; const TITLE_HEADER = 'Fitness'; const DESCRIPTION_HEADER = 'Site for find all the fitness exercise you need'; diff --git a/static/css/style.css b/static/css/style.css index 53c330b..dc19180 100644 --- a/static/css/style.css +++ b/static/css/style.css @@ -58,3 +58,8 @@ #exercises-container div.selected { cursor: pointer; } + +.favorite img { + height: 30px; + cursor: pointer; +} \ No newline at end of file diff --git a/static/img/favorite.png b/static/img/favorite.png new file mode 100644 index 0000000..f28d87b Binary files /dev/null and b/static/img/favorite.png differ diff --git a/static/img/no-favorite.png b/static/img/no-favorite.png new file mode 100644 index 0000000..8ef29b7 Binary files /dev/null and b/static/img/no-favorite.png differ diff --git a/static/js/javascript.js b/static/js/javascript.js index 4b57dad..1c6aa11 100644 --- a/static/js/javascript.js +++ b/static/js/javascript.js @@ -202,8 +202,19 @@ let Point = ( function () { if ( storageData[ $elem.data( "id" ) ] ) { let data = storageData[ $elem.data( "id" ) ]; let main = $( "#main-container" ); + let favStorage = localStorage.getItem( "fav" ); + + if ( favStorage ) { + favStorage = JSON.parse( favStorage ); + } else { + favStorage = {}; + } + let fav = favStorage[ $elem.data( "id" ) ]; main.html( ` +