diff options
author | Vitaly Takmazov | 2016-08-24 22:10:40 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2016-08-24 23:06:51 +0300 |
commit | f02157b46f0a922ae437f094fbb2b3cec1a53761 (patch) | |
tree | 6973eebf62644b5d4694d7d76a0a2e9f5cb4da65 | |
parent | 4d03adb533b78c12888556e500e96c3d13df2fd8 (diff) |
font-awesome icons
-rw-r--r-- | juick-www/package.json | 5 | ||||
-rw-r--r-- | juick-www/src/main/java/com/juick/www/PageTemplates.java | 4 | ||||
-rw-r--r-- | juick-www/src/main/static/style.css | 10 | ||||
-rw-r--r-- | juick-www/webpack.config.js | 9 |
4 files changed, 18 insertions, 10 deletions
diff --git a/juick-www/package.json b/juick-www/package.json index 47fc949a..151e678a 100644 --- a/juick-www/package.json +++ b/juick-www/package.json @@ -16,16 +16,19 @@ "eslint": "^3.1.1", "eslint-loader": "^1.4.1", "extract-text-webpack-plugin": "^1.0.1", + "file-loader": "^0.9.0", "globby": "^4.1.0", "script-loader": "^0.7.0", "style-loader": "^0.13.1", "uglify-loader": "^1.3.0", + "url-loader": "^0.5.7", "webpack": "^1.13.1" }, "dependencies": { "autosize": "^3.0.16", "classlist.js": "^1.1.20150312", "element-closest": "^2.0.1", - "whatwg-fetch": "^1.0.0" + "whatwg-fetch": "^1.0.0", + "font-awesome": "^4.6.3" } } diff --git a/juick-www/src/main/java/com/juick/www/PageTemplates.java b/juick-www/src/main/java/com/juick/www/PageTemplates.java index 6e13bcc2..2efdf6cf 100644 --- a/juick-www/src/main/java/com/juick/www/PageTemplates.java +++ b/juick-www/src/main/java/com/juick/www/PageTemplates.java @@ -469,10 +469,10 @@ public class PageTemplates { out.print(" <nav class=\"s\">"); if (msg.Likes > 0) { - out.print("<a href=\"/" + msg.getUser().getUName() + "/" + msg.getMID() + "\" class=\"likes\">" + msg.Likes + "</a>"); + out.print("<a href=\"/" + msg.getUser().getUName() + "/" + msg.getMID() + "\" class=\"likes\"><i class=\"fa fa-heart-o\"></i> " + msg.Likes + "</a>"); } if (msg.Replies > 0) { - out.print("<a href=\"/" + msg.getUser().getUName() + "/" + msg.getMID() + "\" class=\"replies\">" + msg.Replies + "</a>"); + out.print("<a href=\"/" + msg.getUser().getUName() + "/" + msg.getMID() + "\" class=\"replies\"><i class=\"fa fa-comment-o\"></i> " + msg.Replies + "</a>"); } out.println("</nav>"); out.print("</article>"); diff --git a/juick-www/src/main/static/style.css b/juick-www/src/main/static/style.css index 0ea0bef8..096af366 100644 --- a/juick-www/src/main/static/style.css +++ b/juick-www/src/main/static/style.css @@ -69,9 +69,9 @@ article .irbr { clear: right; } article>nav.l { display: inline-block; font-size: 10pt; } article>nav.l a { color: #888; border-bottom: 1px dotted #AAA; margin-right: 15px; } article>nav.s { display: inline-block; text-align: right; float: right; } -article>nav.s a { font-weight: bold; color: #222; } -article a.likes { padding-left: 20px; background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAQAAAC1+jfqAAAAAXNSR0IArs4c6QAAAMRJREFUGBmtwbsuQ2EAAOCPX6LlKSRGD2E0YCKRGDqLQReDSVhIjI1r49bRdiZJn0GIQcPSxFO4HPHLOe1J2rpMvo//MaMl1batZNSWtlTLrK4JL5qqTqQO1aTqqppeTcrtexRklkTRskzw4Eju1rmOIIqCjrp7uRsNhQWLCmfu5C48Kxk05MmV3JR3xwatiaZ1rYg29Zr34VSPHdG6wpw3iaDPnmhDpiKVKPtmV7Sq4tOlET86EEUNw34RJK4Ffxgzrs8XpvA41+ECiwcAAAAASUVORK5CYII=") no-repeat 0px 1px; } -article a.replies { margin-left: 18px; padding-left: 20px; background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAANdJREFUOMvN069OgmEUBvAfSCUxNicFKTQ3bkCLyRvwDrgHZ5Q7MFlobAY3G9UrsOi0iIGNBIGgG00o53PvCMAHBJ7thPecPc/5+3IoKKKDIeZrbIi74CiFQBs3eMTbmmRnuMUID5nzG90cFXcxyEqHU3zlEBigkQoUor9N8Recf4Gdpr8XgV+Uc/DK+Ekdz/hAcwNyE594Sp0NTJYOZobriB/FjUwjNkE9m36GKq5wHO9zXOICtch4j1f0Q2QlSnjBGL10dXlQxXvSVmWbTZ3E/5ijtRxcAIj4MflVC0WJAAAAAElFTkSuQmCC") no-repeat 0px 1px; } +article>nav.s a { color: #222; } +article a.likes { padding-left: 20px; } +article a.replies { margin-left: 18px; } article footer.comm { margin: 13px 0 0 0; } article textarea { width: 530px; padding: 2px; resize: vertical; vertical-align: top; min-height: 12pt; height: 12pt; border: 0; } article input { width: 50px; margin-left: 6px; vertical-align: top; border: 1px solid #CCC; background: #EEE; color: #999; } @@ -216,7 +216,9 @@ q { border-left: 1px dashed #CCC; margin: 10px 0 10px 10px; padding-left: 10px; .ico32-fb { background: #3b579d url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAAXNSR0IArs4c6QAAADNQTFRFO1edX3ewl6bLnKrOoK3QrrrYvMXe2N7r3OLu3+Tv5urz7O/29vf6+Pn7+vv9/Pz9////ykQjsQAAAEZJREFUOMtjYBgFuAATO68ADxdOaUYuATDAqYBbAL8CFgECCjiBcqz4XMiPz3oQEKCtAgEkwEdIAQchBWyEFDAPkDdHsAIAhZkIwz/VK/UAAAAASUVORK5CYII=") no-repeat; } .ico32-lj { background: #888888 url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAAXNSR0IArs4c6QAAAlJQTFRFAAAAAAAAAFVVADNmACRtAEBgADNmADdtADBgADljADNmADFiADFjADVpADJjADRpADRoADFnADNmADJkADVlADJnADRnADJlADJnADJlADRnADNmADJnADNmADJmADRmADNlADRmADNnADNmADJmADRmADNmADRmADJmADNlADNmADNmADJmADNnADNlADNnADNmADNlADNmADNmADNmBTRmADNmADNmADNmWGh4ADNmBDZnK1J6LWCURmiIRmmLc4mfADNmKlyPADNmGkNsLF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DXrGG9V+KX6FgazoRXSAfHbGMe+P378eXiCP67ETcQ45Y8uf0YMFAaoeSqHB66RAggY1u1JnzzwilRBQDDdlrJvaPDTrwsDQlLfFaUtfp9PmBL8YqhYcesRsiQEJGscgZwIgYlp2xJC0z8XJH2ZPhmkKgAAAABJRU5ErkJggg==") no-repeat; } .ico32-gp { background: #dc4a38 url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAQAAADZc7J/AAAAAXNSR0IArs4c6QAAAa9JREFUSMftlTFoU1EUhr/3EguZFFzSIVVehyq03dxEJy3iIiJCi4Nr6eQmLoKggg46CaKj6FBB0OIgXcRJiQiKiFIf2KEJVsSCTWlN+Bx8eaQtaa5Dt57tP+/+/33n3P/cCzuxPeFh7/nRFdvxxtFw8m4f+tojJl62qT4xsRBOj511yT0Zuqjq5P/8/Lj6LEd9LqoLRt0Z8QY8Dqy2QbTGI6CfSrjAADDYgd8BUAgXWABG3Z/jH8Ai81lJE97pJfAYiJnK8RBwJWplaISTvZpYcEZteh7AQ9a90fH1ut96n0Ofl0zVOT/Y8mZurapVa65atert7iUQrUXXooQS9xkm5m6WbpCS8osmKSn1EEdcVfVWpweCSsgXH7Ch6rSlrQSKm9vICY4xxF5qVNjFGcqORQ0AXrLUa98x55x30oPG4LCfVDubtjX9tE2/tEcpm81XasNiCL1oTT23Idvvb7USYuURypmZO4+1xnv+8DNE4N8UHt20Zh9Po+WwHrxVGx5fl7tg3YHunHVXhYO8IEFmeE7KCglnKTMRfQ63T8kpZ/1uy2W/+sBTxjuPzLbHX6Ju9rcCQGEmAAAAAElFTkSuQmCC") no-repeat; } - +.fa-comment-o { + margin-top: -2px; +} /******************************************************************************/ @media screen and (max-width: 850px) { diff --git a/juick-www/webpack.config.js b/juick-www/webpack.config.js index ed041ee6..ace447f6 100644 --- a/juick-www/webpack.config.js +++ b/juick-www/webpack.config.js @@ -5,7 +5,8 @@ module.exports = { devtool: 'source-map', entry: { "scripts" : globby.sync([ - __dirname + "/src/main/static/*.*" + __dirname + "/src/main/static/*.*", + require.resolve('font-awesome/css/font-awesome.css') ]) }, output: { @@ -17,8 +18,10 @@ module.exports = { { test: /\.jsx?$/, loader: 'eslint', exclude: /node_modules/ } ], loaders: [ - { test: /\.css$/, loader: ExtractTextPlugin.extract("style-loader", "css-loader") } - ] + { test: /\.css$/, loader: ExtractTextPlugin.extract("style-loader", "css-loader") }, + { test: /\.woff(2)?(\?v=[0-9]\.[0-9]\.[0-9])?$/, loader: "url-loader?limit=100000000000" }, + { test: /\.(ttf|eot|svg)(\?v=[0-9]\.[0-9]\.[0-9])?$/, loader: "url-loader?limit=10000000000" }, + ] }, plugins: [ new ExtractTextPlugin("style.css", { |