Skip to content

Commit

Permalink
More Colors Support 🏥 (issue: #3 solved)
Browse files Browse the repository at this point in the history
Added support for more colors.

Removed "convert" button inside index.html
  • Loading branch information
ThunbergOlle committed Jan 10, 2019
1 parent f9aa771 commit 8fe60d7
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 11 deletions.
7 changes: 1 addition & 6 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm"
crossorigin="anonymous"
/>
<link rel="stylesheet" href="styles.css" />

<script
src="https://code.jquery.com/jquery-3.2.1.slim.min.js"
integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN"
Expand All @@ -27,7 +25,7 @@
<title>Preview</title>
</head>
<body style="padding: 0; margin: 0; background-color: #24292e">
<h5 class="text text-center text-white" style="margin-top: 10%;">Color previewer sourcemod v0.1.1</h5>
<h5 class="text text-center text-white" style="margin-top: 10%;">Color previewer sourcemod v0.1.2</h5>
<form>
<div class="form-group" style="margin-left: 20%; margin-right: 20%;">
<label for="inp" class="text-white">Input a string</label>
Expand All @@ -39,9 +37,6 @@ <h5 class="text text-center text-white" style="margin-top: 10%;">Color previewer
<p id="out2" class="text-white" style="display: inline-block; margin:0; padding: 0;">This will be the preview string.</p>
</div>
<br>
<div class="text-center">
<button onclick="convert()" class="btn btn-danger">Convert</button>
</div>
<div class="text-center" style="float: right; margin-top: 20px; margin-right: 20px;">
<button onclick="openGitHub()" class="btn btn-warning text-white">Report a bug 🐛</button>
</div>
Expand Down
3 changes: 1 addition & 2 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ const path = require('path');
let mainWindow
function createWindow () {
// Create the browser window.
mainWindow = new BrowserWindow({width: 600, height: 400, icon: path.join(__dirname, 'appico.ico')
})
mainWindow = new BrowserWindow({width: 600, height: 400, icon: path.join(__dirname, 'appico.ico')});
mainWindow.setMenu(null);
mainWindow.setResizable(false);
// and load the index.html of the app.
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

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

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
"scripts": {
"start": "electron .",
"build": "electron-packager . --out=dist/win --platform=win32 --arch=x64 --icon=appico.ico --asar=true --overwrite"

},
"repository": "https://github.com/electron/electron-quick-start",
"keywords": [
Expand Down
6 changes: 5 additions & 1 deletion renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,17 @@ convert = () => {
input = input.replace("{DARKRED}", ' <p style="color: #CF0000; display: inline-block; margin:0; padding: 0; margin-right: 5px;"> ');
input = input.replace("{BLUEGRAY}", ' <p style="color: #AFC2D8; display: inline-block; margin:0; padding: 0; margin-right: 5px;"> ');
input = input.replace("{BLUE}", ' <p style="color: #5E97D8; display: inline-block; margin:0; padding: 0; margin-right: 5px;"> ');
input = input.replace("{LIGHTBLUE}", ' <p style="color: #6B8DB0; display: inline-block; margin:0; padding: 0; margin-right: 5px;"> ');
input = input.replace("{DARKBLUE}", ' <p style="color: #4B69FE; display: inline-block; margin:0; padding: 0; margin-right: 5px;"> ');
input = input.replace("{PURPLE}", ' <p style="color: #B980EF; display: inline-block; margin:0; padding: 0; margin-right: 5px;"> ');
input = input.replace("{OLIVE}", ' <p style="color: #926B1C; display: inline-block; margin:0; padding: 0; margin-right: 5px;"> ');
input = input.replace("{LIGHTOLIVE}", ' <p style="color: #DDDAA7; display: inline-block; margin:0; padding: 0; margin-right: 5px;"> ');
input = input.replace("{ORCHID}", ' <p style="color: #D22CE5; display: inline-block; margin:0; padding: 0; margin-right: 5px;"> ');
input = input.replace("{GRAY}", ' <p style="color: #C5C5C3; display: inline-block; margin:0; padding: 0; margin-right: 5px;"> ');
input = input.replace("{YELLOW}", ' <p style="color: #ECE37A; display: inline-block; margin:0; padding: 0; margin-right: 5px;"> ');
input = input.replace("{GOLD}", ' <p style="color: #E3AD39; display: inline-block; margin:0; padding: 0; margin-right: 5px;"> ');
input = input.replace("{LIGHTGREEN}", ' <p style="color: #BEFE8F; display: inline-block; margin:0; padding: 0; margin-right: 5px;" ');
input = input.replace("{LIGHTPURPLE}", ' <p style="color: #8D7599; display: inline-block; margin:0; padding: 0; margin-right: 5px;" ');
input = input.replace("{GREEN}", ' <p style="color: #40FE40; display: inline-block; margin:0; padding: 0; margin-right: 5px;"> ');
input = input.replace("{LIME}", ' <p style="color: #A1FE47; display: inline-block; margin:0; padding: 0; margin-right: 5px;"> ');
input = input.replace("{GREY}", ' <p style="color: #C4C9CF; display: inline-block; margin:0; padding: 0; margin-right: 5px;"> ');
Expand All @@ -31,7 +36,6 @@ convert = () => {
}

outp.innerHTML = input;
outpBox.innerHTML = input;
}

openGitHub = () =>{
Expand Down

0 comments on commit 8fe60d7

Please sign in to comment.