Skip to content

Commit

Permalink
Update styles and output on front-end tool.
Browse files Browse the repository at this point in the history
  • Loading branch information
jpederson committed Apr 15, 2019
1 parent a60b773 commit b5fc4cc
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 15 deletions.
9 changes: 1 addition & 8 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,6 @@ module.exports = function(grunt) {
}
},

// start the server and all that
nodemon: {
dev: {
script: 'server.js'
}
},

// bump package.json for publishing
bump: {
options: {
Expand All @@ -66,7 +59,7 @@ module.exports = function(grunt) {
// concurrent blocking task management
concurrent: {
target: {
tasks: [ 'nodemon', 'watch' ],
tasks: [ 'watch' ],
options: {
logConcurrentOutput: true
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "colorvert-api",
"version": "1.1.1",
"version": "1.1.2",
"description": "Color conversion JSON API",
"main": "server.js",
"repository": {
Expand Down
3 changes: 2 additions & 1 deletion public/css/main.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions public/css/main.css.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions public/css/src/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ p, ul, ol {
padding: 10px 0;
}

pre a {
color: rgba( black, .7 ) !important;
border-bottom: 1px dotted rgba( black, .7 ) !important;
}

strong, th {
font-weight: 700;
}
Expand Down
5 changes: 1 addition & 4 deletions public/js/main.js

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion public/js/src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,10 @@ $(function(){

$.getJSON( endpoint, function( response ){

var url = window.location + endpoint.substring( 1 );

// set it into the response div
$(".response").html( "<pre>" + JSON.stringify( response, null, 3 ) + "</pre>" );
$(".response").html( "<pre><strong>URL:</strong><br><a href='" + url + "' target='_blank'>" + url + "</a><br><br><strong>Response:</strong><br>" + JSON.stringify( response, null, 3 ) + "</pre>" );

// set colors on body text and background.
$("body").css( "background-color", response.hex ).css( "color", response.hex_readable );
Expand Down

0 comments on commit b5fc4cc

Please sign in to comment.