diff --git a/docs-web/src/main/webapp/index.html b/docs-web/src/main/webapp/index.html index a829a852..80fbc1bb 100644 --- a/docs-web/src/main/webapp/index.html +++ b/docs-web/src/main/webapp/index.html @@ -45,6 +45,7 @@ + diff --git a/docs-web/src/main/webapp/js/filter/Shorten.js b/docs-web/src/main/webapp/js/filter/Shorten.js new file mode 100644 index 00000000..57963f49 --- /dev/null +++ b/docs-web/src/main/webapp/js/filter/Shorten.js @@ -0,0 +1,13 @@ +'use strict'; + +/** + * Filter shortening text in one letter uppercase. + */ +App.filter('shorten', function() { + return function(text) { + if (!text) { + return ''; + } + return text.substring(0, 1).toUpperCase(); + } +}) \ No newline at end of file diff --git a/docs-web/src/main/webapp/partial/document.html b/docs-web/src/main/webapp/partial/document.html index 64d27f40..8eb6572b 100644 --- a/docs-web/src/main/webapp/partial/document.html +++ b/docs-web/src/main/webapp/partial/document.html @@ -49,7 +49,9 @@ {{ document.title }} {{ document.create_date | date: 'yyyy-MM-dd' }} - {{ tag.name }} +
+ {{ tag.name | shorten }}{{ tag.name }} +
diff --git a/docs-web/src/main/webapp/style/main.less b/docs-web/src/main/webapp/style/main.less index 188b123a..17dabe1e 100644 --- a/docs-web/src/main/webapp/style/main.less +++ b/docs-web/src/main/webapp/style/main.less @@ -18,6 +18,27 @@ .label { margin-left: 2px; + + .full { + display: none; + } + } + + &:hover { + .tags { + position: absolute; + margin-top: -10px; + + .label { + .full { + display: inline; + } + + .shorten { + display: none; + } + } + } } } }