diff --git a/vipra-cmd/runcfg/CMD - Import 25.launch b/vipra-cmd/runcfg/CMD - Import 25.launch new file mode 100644 index 0000000000000000000000000000000000000000..60e6ec53b3752a8306084103e9bc4ccf5a0b7d4c --- /dev/null +++ b/vipra-cmd/runcfg/CMD - Import 25.launch @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication"> +<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS"> +<listEntry value="/vipra-cmd/src/main/java/de/vipra/cmd/Main.java"/> +</listAttribute> +<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES"> +<listEntry value="1"/> +</listAttribute> +<listAttribute key="org.eclipse.debug.ui.favoriteGroups"> +<listEntry value="org.eclipse.debug.ui.launchGroup.run"/> +</listAttribute> +<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.m2e.launchconfig.classpathProvider"/> +<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="de.vipra.cmd.Main"/> +<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-i /home/eike/repos/master/ma-impl/vm/data/test-25.json"/> +<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="vipra-cmd"/> +<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.m2e.launchconfig.sourcepathProvider"/> +<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dlog4j.configurationFile=log4j2dev.xml"/> +</launchConfiguration> diff --git a/vipra-cmd/src/main/java/de/vipra/cmd/lda/DTMAnalyzer.java b/vipra-cmd/src/main/java/de/vipra/cmd/lda/DTMAnalyzer.java index 412c6581fa81d9601d16b0e4e946858e01401281..05e5a3a2b92d70474a2af0cddcf10b37f9f1ecac 100644 --- a/vipra-cmd/src/main/java/de/vipra/cmd/lda/DTMAnalyzer.java +++ b/vipra-cmd/src/main/java/de/vipra/cmd/lda/DTMAnalyzer.java @@ -244,6 +244,12 @@ public class DTMAnalyzer extends Analyzer { newTopics.add(newTopic); } + // sort topic words and generate topic name + for (final TopicFull topic : newTopics) { + Collections.sort(topic.getWords(), Collections.reverseOrder()); + topic.setName(TopicFull.getNameFromWords(topic.getWords())); + } + log.info("creating " + newTopics.size() + " " + StringUtils.quantity(newTopics.size(), "topic")); log.info("creating " + newWords.size() + " " + StringUtils.quantity(newWords.size(), "word")); diff --git a/vipra-ui/app/html/index.html b/vipra-ui/app/html/index.html index 7124f615c719368c20de272ca3638d043e9e436b..532e4c38d728fc1e22d7bc8e21ed31389860b024 100644 --- a/vipra-ui/app/html/index.html +++ b/vipra-ui/app/html/index.html @@ -1,7 +1,12 @@ <div ng-cloak ng-hide="$state.current.name !== 'index'"> <div class="row" ng-hide="search"> - <div class="col-md-12"> - <div class="heading"></div> + <div class="col-md-12 text-center"> + <svg class="logo hover heading" viewBox="0 0 200 120"> + <polyline style="animation-delay:0s" class="logo-shape" points="0,0 100,45 100,75 0,0" fill="#006591"/> + <polyline style="animation-delay:.5s" class="logo-shape" points="100,45 200,0 100,75 100,45" fill="#0079a2"/> + <polyline style="animation-delay:1s" class="logo-shape" points="100,75 200,0 100,120 100,75" fill="#006591"/> + <polyline style="animation-delay:1.5s" class="logo-shape" points="0,0 100,75 100,120 0,0" fill="#0079a2"/> + </svg> </div> </div> <div class="row" ng-hide="search"> diff --git a/vipra-ui/app/img/logo-inkscape.svg b/vipra-ui/app/img/logo-inkscape.svg deleted file mode 100644 index 05e51bac5ac3be7165ff26abe05a9a2ae31b48b2..0000000000000000000000000000000000000000 --- a/vipra-ui/app/img/logo-inkscape.svg +++ /dev/null @@ -1,186 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no"?> -<!-- Created with Inkscape (http://www.inkscape.org/) --> - -<svg - xmlns:dc="http://purl.org/dc/elements/1.1/" - xmlns:cc="http://creativecommons.org/ns#" - xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" - xmlns:svg="http://www.w3.org/2000/svg" - xmlns="http://www.w3.org/2000/svg" - xmlns:xlink="http://www.w3.org/1999/xlink" - xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" - xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" - width="91.637482mm" - height="55.924236mm" - viewBox="0 0 324.69974 198.15674" - id="svg2" - version="1.1" - inkscape:version="0.91 r13725" - sodipodi:docname="logo-inkscape.svg"> - <defs - id="defs4"> - <linearGradient - inkscape:collect="always" - id="linearGradient4221"> - <stop - style="stop-color:#0079a2;stop-opacity:1" - offset="0" - id="stop4223" /> - <stop - style="stop-color:#009abf;stop-opacity:1" - offset="1" - id="stop4225" /> - </linearGradient> - <linearGradient - inkscape:collect="always" - id="linearGradient4213"> - <stop - style="stop-color:#006491;stop-opacity:1" - offset="0" - id="stop4215" /> - <stop - style="stop-color:#00a4c0;stop-opacity:1" - offset="1" - id="stop4217" /> - </linearGradient> - <linearGradient - inkscape:collect="always" - id="linearGradient4205"> - <stop - style="stop-color:#0079a2;stop-opacity:1" - offset="0" - id="stop4207" /> - <stop - style="stop-color:#009abf;stop-opacity:1" - offset="1" - id="stop4209" /> - </linearGradient> - <linearGradient - inkscape:collect="always" - id="linearGradient4197"> - <stop - style="stop-color:#006491;stop-opacity:1" - offset="0" - id="stop4199" /> - <stop - style="stop-color:#00a4c0;stop-opacity:1" - offset="1" - id="stop4201" /> - </linearGradient> - <linearGradient - inkscape:collect="always" - xlink:href="#linearGradient4197" - id="linearGradient4203" - x1="283.92856" - y1="203.43364" - x2="445.40039" - y2="203.43364" - gradientUnits="userSpaceOnUse" - gradientTransform="translate(86.138062,74.953319)" /> - <linearGradient - inkscape:collect="always" - xlink:href="#linearGradient4205" - id="linearGradient4211" - x1="283.42285" - y1="203.43364" - x2="121.42857" - y2="203.43364" - gradientUnits="userSpaceOnUse" - gradientTransform="translate(86.267027,74.953319)" /> - <linearGradient - inkscape:collect="always" - xlink:href="#linearGradient4213" - id="linearGradient4219" - x1="283.92856" - y1="203.43364" - x2="121.54656" - y2="79.678802" - gradientUnits="userSpaceOnUse" - gradientTransform="translate(86.267027,75.095251)" /> - <linearGradient - inkscape:collect="always" - xlink:href="#linearGradient4221" - id="linearGradient4227" - x1="284.43472" - y1="203.43364" - x2="446.31104" - y2="79.67881" - gradientUnits="userSpaceOnUse" - gradientTransform="translate(86.138062,75.095251)" /> - </defs> - <sodipodi:namedview - id="base" - pagecolor="#ffffff" - bordercolor="#666666" - borderopacity="1.0" - inkscape:pageopacity="0.0" - inkscape:pageshadow="2" - inkscape:zoom="1.4142136" - inkscape:cx="216.30244" - inkscape:cy="55.76913" - inkscape:document-units="px" - inkscape:current-layer="layer1" - showgrid="false" - showguides="true" - inkscape:guide-bbox="true" - inkscape:object-paths="true" - inkscape:snap-intersection-paths="true" - inkscape:object-nodes="true" - inkscape:snap-smooth-nodes="true" - inkscape:snap-midpoints="true" - inkscape:snap-object-midpoints="true" - inkscape:snap-center="true" - fit-margin-top="0" - fit-margin-left="0" - fit-margin-right="0" - fit-margin-bottom="0" - inkscape:showpageshadow="false" - inkscape:window-width="2505" - inkscape:window-height="1416" - inkscape:window-x="55" - inkscape:window-y="24" - inkscape:window-maximized="1" /> - <metadata - id="metadata7"> - <rdf:RDF> - <cc:Work - rdf:about=""> - <dc:format>image/svg+xml</dc:format> - <dc:type - rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> - <dc:title></dc:title> - </cc:Work> - </rdf:RDF> - </metadata> - <g - inkscape:label="Ebene 1" - inkscape:groupmode="layer" - id="layer1" - transform="translate(-207.74933,-154.63212)"> - <path - style="fill:#006491;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" - d="M 207.74933,154.84502 370.13131,229.75464 532.38477,154.70309 370.00275,352.78885 207.74933,154.70309" - id="path4289" - inkscape:connector-curvature="0" /> - <path - style="fill:url(#linearGradient4227);fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0;stroke-linecap:butt;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" - d="m 370.06703,229.68368 162.38202,-74.90962 -162.38202,124.14146 0,-49.23184" - id="path3363" - inkscape:connector-curvature="0" /> - <path - style="fill:url(#linearGradient4203);fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0;stroke-linecap:butt;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" - d="m 370.06703,278.77359 0,73.9443 162.38202,-198.08576 -162.38202,124.14146" - id="path3365" - inkscape:connector-curvature="0" /> - <path - style="fill:url(#linearGradient4219);fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0;stroke-linecap:butt;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" - d="m 370.1956,229.68368 -162.38201,-74.90963 162.38201,124.14146 0,-49.23183" - id="path3363-9" - inkscape:connector-curvature="0" /> - <path - style="fill:url(#linearGradient4211);fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0;stroke-linecap:butt;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" - d="m 370.1956,278.77358 0,73.9443 L 207.81359,154.63212 370.1956,278.77358" - id="path3365-8" - inkscape:connector-curvature="0" /> - </g> -</svg> diff --git a/vipra-ui/app/img/logo.png b/vipra-ui/app/img/logo.png deleted file mode 100644 index 51fd6e5373495b87b757dea086067314f482fa8b..0000000000000000000000000000000000000000 Binary files a/vipra-ui/app/img/logo.png and /dev/null differ diff --git a/vipra-ui/app/img/logo.svg b/vipra-ui/app/img/logo.svg deleted file mode 100644 index 70bfa448be8a6b90293a9146294e9b338018790a..0000000000000000000000000000000000000000 --- a/vipra-ui/app/img/logo.svg +++ /dev/null @@ -1,133 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no"?> -<svg - xmlns:dc="http://purl.org/dc/elements/1.1/" - xmlns:cc="http://creativecommons.org/ns#" - xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" - xmlns:svg="http://www.w3.org/2000/svg" - xmlns="http://www.w3.org/2000/svg" - xmlns:xlink="http://www.w3.org/1999/xlink" - version="1.1" - id="svg2" - viewBox="0 0 324.69974 198.15674" - height="55.924236mm" - width="91.637482mm"> - <defs - id="defs4"> - <linearGradient - id="linearGradient4221"> - <stop - id="stop4223" - offset="0" - style="stop-color:#0079a2;stop-opacity:1" /> - <stop - id="stop4225" - offset="1" - style="stop-color:#009abf;stop-opacity:1" /> - </linearGradient> - <linearGradient - id="linearGradient4213"> - <stop - id="stop4215" - offset="0" - style="stop-color:#006491;stop-opacity:1" /> - <stop - id="stop4217" - offset="1" - style="stop-color:#00a4c0;stop-opacity:1" /> - </linearGradient> - <linearGradient - id="linearGradient4205"> - <stop - id="stop4207" - offset="0" - style="stop-color:#0079a2;stop-opacity:1" /> - <stop - id="stop4209" - offset="1" - style="stop-color:#009abf;stop-opacity:1" /> - </linearGradient> - <linearGradient - id="linearGradient4197"> - <stop - id="stop4199" - offset="0" - style="stop-color:#006491;stop-opacity:1" /> - <stop - id="stop4201" - offset="1" - style="stop-color:#00a4c0;stop-opacity:1" /> - </linearGradient> - <linearGradient - gradientTransform="translate(86.138062,74.953319)" - gradientUnits="userSpaceOnUse" - y2="203.43364" - x2="445.40039" - y1="203.43364" - x1="283.92856" - id="linearGradient4203" - xlink:href="#linearGradient4197" /> - <linearGradient - gradientTransform="translate(86.267027,74.953319)" - gradientUnits="userSpaceOnUse" - y2="203.43364" - x2="121.42857" - y1="203.43364" - x1="283.42285" - id="linearGradient4211" - xlink:href="#linearGradient4205" /> - <linearGradient - gradientTransform="translate(86.267027,75.095251)" - gradientUnits="userSpaceOnUse" - y2="79.678802" - x2="121.54656" - y1="203.43364" - x1="283.92856" - id="linearGradient4219" - xlink:href="#linearGradient4213" /> - <linearGradient - gradientTransform="translate(86.138062,75.095251)" - gradientUnits="userSpaceOnUse" - y2="79.67881" - x2="446.31104" - y1="203.43364" - x1="284.43472" - id="linearGradient4227" - xlink:href="#linearGradient4221" /> - </defs> - <metadata - id="metadata7"> - <rdf:RDF> - <cc:Work - rdf:about=""> - <dc:format>image/svg+xml</dc:format> - <dc:type - rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> - <dc:title></dc:title> - </cc:Work> - </rdf:RDF> - </metadata> - <g - transform="translate(-207.74933,-154.63212)" - id="layer1"> - <path - id="path4289" - d="M 207.74933,154.84502 370.13131,229.75464 532.38477,154.70309 370.00275,352.78885 207.74933,154.70309" - style="fill:#006491;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> - <path - id="path3363" - d="m 370.06703,229.68368 162.38202,-74.90962 -162.38202,124.14146 0,-49.23184" - style="fill:url(#linearGradient4227);fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0;stroke-linecap:butt;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> - <path - id="path3365" - d="m 370.06703,278.77359 0,73.9443 162.38202,-198.08576 -162.38202,124.14146" - style="fill:url(#linearGradient4203);fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0;stroke-linecap:butt;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> - <path - id="path3363-9" - d="m 370.1956,229.68368 -162.38201,-74.90963 162.38201,124.14146 0,-49.23183" - style="fill:url(#linearGradient4219);fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0;stroke-linecap:butt;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> - <path - id="path3365-8" - d="m 370.1956,278.77358 0,73.9443 L 207.81359,154.63212 370.1956,278.77358" - style="fill:url(#linearGradient4211);fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0;stroke-linecap:butt;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> - </g> -</svg> diff --git a/vipra-ui/app/index.html b/vipra-ui/app/index.html index a76fe610a854e1884d7564b990d6631fa703f7ed..cbef9640a590700e2af0eb00dea3d17b75c5d3d4 100644 --- a/vipra-ui/app/index.html +++ b/vipra-ui/app/index.html @@ -44,7 +44,14 @@ <span class="icon-bar"></span> <span class="icon-bar"></span> </button> - <a ui-sref="index" class="navbar-brand" ng-class="{spin:loading.any}"></a> + <a ui-sref="index" class="navbar-brand"> + <svg class="logo hover" viewBox="0 0 200 120" ng-class="{animate:loading.any}"> + <polyline style="animation-delay:0s" class="logo-shape" points="0,0 100,45 100,75 0,0" fill="#006591"/> + <polyline style="animation-delay:.5s" class="logo-shape" points="100,45 200,0 100,75 100,45" fill="#0079a2"/> + <polyline style="animation-delay:1s" class="logo-shape" points="100,75 200,0 100,120 100,75" fill="#006591"/> + <polyline style="animation-delay:1.5s" class="logo-shape" points="0,0 100,75 100,120 0,0" fill="#0079a2"/> + </svg> + </a> </div> <!-- Collect the nav links, forms, and other content for toggling --> <div class="collapse navbar-collapse" id="vipra-navbar-collapse-1"> diff --git a/vipra-ui/app/js/controllers.js b/vipra-ui/app/js/controllers.js index 2813aecc972796f4de5a237742fd67a2c8cd5d38..66cfa1d973d10c20211410859ba4c94dbc98daae 100644 --- a/vipra-ui/app/js/controllers.js +++ b/vipra-ui/app/js/controllers.js @@ -24,25 +24,45 @@ $scope.search = $location.search().query; - ArticleFactory.query({ limit: Vipra.config.latestItems, sort: '-created' }, function(data) { + ArticleFactory.query({ + limit: Vipra.config.latestItems, + sort: '-created' + }, function(data) { $scope.latestArticles = data; + }, function(err) { + $scope.errors = err; }); - TopicFactory.query({ limit: Vipra.config.latestItems, sort: '-created' }, function(data) { + TopicFactory.query({ + limit: Vipra.config.latestItems, + sort: '-created' + }, function(data) { $scope.latestTopics = data; + }, function(err) { + $scope.errors = err; }); - WordFactory.query({ limit: Vipra.config.latestItems, sort: '-created' }, function(data) { + WordFactory.query({ + limit: Vipra.config.latestItems, + sort: '-created' + }, function(data) { $scope.latestWords = data; + }, function(err) { + $scope.errors = err; }); $scope.$watch('search', function() { if ($scope.search) { $location.search('query', $scope.search); $scope.searching = true; - SearchFactory.query({ limit: Vipra.config.searchResults, query: $scope.search }, function(data) { + SearchFactory.query({ + limit: Vipra.config.searchResults, + query: $scope.search + }, function(data) { $scope.searching = false; $scope.searchResults = data; + }, function(err) { + $scope.errors = err; }); } else { $location.search('query', null); @@ -64,6 +84,8 @@ $scope.buildDate = Vipra.formatDateTime(moment($scope.info.app.builddate, 'YYMMDD_HHmm').toDate()); $scope.startTime = Vipra.formatDateTime(moment($scope.info.vm.starttime, 'x').toDate()); $scope.upTime = moment.duration($scope.info.vm.uptime).humanize(); + }, function(err) { + $scope.errors = err; }); } @@ -223,27 +245,43 @@ if (node) { if (node.type === 'article' && $scope.shown.topics) { // node is article, load article to get topics - ArticleFactory.get({ id: node.dbid }, function(data) { + ArticleFactory.get({ + id: node.dbid + }, function(data) { if (data.topics) { for (var i = 0; i < data.topics.length; i++) data.topics[i] = data.topics[i].topic; constructor(data.topics, node, topicNode); } + }, function(err) { + $scope.errors = err; }); } else if (node.type === 'topic') { // node is topic, load topic to get words and articles if ($scope.shown.words) - TopicFactory.get({ id: node.dbid }, function(data) { + TopicFactory.get({ + id: node.dbid + }, function(data) { constructor(data.words, node, wordNode); + }, function(err) { + $scope.errors = err; }); if ($scope.shown.articles) - TopicFactory.articles({ id: node.dbid }, function(data) { + TopicFactory.articles({ + id: node.dbid + }, function(data) { constructor(data, node, articleNode); + }, function(err) { + $scope.errors = err; }); } else if (node.type === 'word' && $scope.shown.topics) { // node is word, load word to get topics - WordFactory.topics({ id: node.dbid }, function(data) { + WordFactory.topics({ + id: node.dbid + }, function(data) { constructor(data, node, topicNode); + }, function(err) { + $scope.errors = err; }); } $scope.nodes.update(node); @@ -283,6 +321,8 @@ $scope.articles = data; $scope.articlesTotal = headers("V-Total"); $scope.maxPage = Math.ceil($scope.articlesTotal / $scope.limit); + }, function(err) { + $scope.errors = err; }); }); @@ -298,7 +338,9 @@ $scope.topicSort = $scope.topicSort || 'share'; $scope.topicSortRev = typeof $scope.topicSortRev === 'undefined' ? true : $scope.topicSortRev; - ArticleFactory.get({ id: $stateParams.id }, function(data) { + ArticleFactory.get({ + id: $stateParams.id + }, function(data) { $scope.article = data; $scope.article.text = Vipra.createInitial($scope.article.text); $scope.articleDate = Vipra.formatDate($scope.article.date); @@ -331,6 +373,8 @@ $scope.topicShare = topicShare; } + }, function(err) { + $scope.errors = err; }); } @@ -360,6 +404,8 @@ $scope.topics = data; $scope.topicsTotal = headers("V-Total"); $scope.maxPage = Math.ceil($scope.topicsTotal / $scope.limit); + }, function(err) { + $scope.errors = err; }); }); @@ -375,10 +421,14 @@ $scope.wordSort = $scope.wordSort || 'likeliness'; $scope.wordSortRev = typeof $scope.wordSortRev === 'undefined' ? true : $scope.wordSortRev; - TopicFactory.get({ id: $stateParams.id }, function(data) { + TopicFactory.get({ + id: $stateParams.id + }, function(data) { $scope.topic = data; $scope.topicCreated = Vipra.formatDateTime($scope.topic.created); $scope.topicModified = Vipra.formatDateTime($scope.topic.modified); + }, function(err) { + $scope.errors = err; }); $scope.startRename = function() { @@ -397,6 +447,8 @@ $scope.isRename = false; }, function(errors) { $scope.renameErrors = Vipra.getErrors(errors); + }, function(err) { + $scope.errors = err; }); } else { $scope.isRename = false; @@ -434,6 +486,8 @@ $scope.articles = data; $scope.articlesTotal = headers("V-Total"); $scope.maxPage = Math.ceil($scope.articlesTotal / $scope.limit); + }, function(err) { + $scope.errors = err; }); }); @@ -464,6 +518,8 @@ $scope.words = data; $scope.wordsTotal = headers("V-Total"); $scope.maxPage = Math.ceil($scope.wordsTotal / $scope.limit); + }, function(err) { + $scope.errors = err; }); }); @@ -476,13 +532,21 @@ app.controller('WordsShowController', ['$scope', '$stateParams', 'WordFactory', function($scope, $stateParams, WordFactory) { - WordFactory.get({ id: $stateParams.id }, function(data) { + WordFactory.get({ + id: $stateParams.id + }, function(data) { $scope.word = data; $scope.wordCreated = Vipra.formatDateTime($scope.word.created); + }, function(err) { + $scope.errors = err; }); - WordFactory.topics({ id: $stateParams.id }, function(data) { + WordFactory.topics({ + id: $stateParams.id + }, function(data) { $scope.topics = data; + }, function(err) { + $scope.errors = err; }); } diff --git a/vipra-ui/app/less/app.less b/vipra-ui/app/less/app.less index 1fe525713345b81e797f372bde9ea2797ab32f9f..9c8729b4ab4187641c7c46c7c384aa77b5440e4c 100644 --- a/vipra-ui/app/less/app.less +++ b/vipra-ui/app/less/app.less @@ -24,9 +24,6 @@ ul.dashed { } .heading { - .noselect; - background: transparent url(/img/logo.svg) no-repeat 50% 50%; - background-size: contain; height: 125px; margin: 25px 0; } @@ -64,16 +61,11 @@ ul.dashed { } } - .navbar-header { - padding: 0 10px; - } - .navbar-brand { - background: transparent url(/img/logo.svg) no-repeat 50% 50%; - background-size: contain; - &.spin, - &:hover:not(.spin) { - .spinner; + padding: 10px; + + svg { + height: 30px; } } } @@ -104,18 +96,6 @@ ul.dashed { content: " "; } -.spinner { - background: transparent url(/img/logo.svg) no-repeat 50% 50%; - background-size: contain; - -webkit-animation:spin 4s linear infinite; - -moz-animation:spin 4s linear infinite; - animation:spin 4s linear infinite; - - &.spinner-small { - padding: 20px; - } -} - .graph { position: absolute; top: 50px; @@ -271,6 +251,29 @@ bs-checkbox { cursor: pointer; } +.logo { + &.hover { + .logo-shape { + transition: all .8s; + &:hover { + transition: all .1s; opacity:.1; + } + } + } + + &.animate { + .logo-shape { + -webkit-animation:fadeRotate 2s ease-in-out infinite; + -moz-animation:fadeRotate 2s ease-in-out infinite; + animation:fadeRotate 2s ease-in-out infinite; + } + } +} + @-moz-keyframes spin { 100% { -moz-transform: rotateY(360deg); } } @-webkit-keyframes spin { 100% { -webkit-transform: rotateY(360deg); } } -@keyframes spin { 100% { -webkit-transform: rotateY(360deg); transform:rotateY(360deg); } } \ No newline at end of file +@keyframes spin { 100% { -webkit-transform: rotateY(360deg); transform:rotateY(360deg); } } + +@-moz-keyframes fadeRotate { 0% { opacity: 1; } 35% { opacity: .1; } 70% { opacity: 1; } } +@-webkit-keyframes fadeRotate { 0% { opacity: 1; } 35% { opacity: .1; } 70% { opacity: 1; } } +@keyframes fadeRotate { 0% { opacity: 1; } 35% { opacity: .1; } 70% { opacity: 1; } } \ No newline at end of file