aboutsummaryrefslogtreecommitdiff
path: root/assets/src
diff options
context:
space:
mode:
authorNavan Chauhan <navanchauhan@gmail.com>2021-03-14 12:49:43 +0530
committerNavan Chauhan <navanchauhan@gmail.com>2021-03-14 12:49:43 +0530
commit9999c6cd9ab120e7aa107638ce5d2924b1c48756 (patch)
tree2f4fa11c7978040b7dde326fc93283577962f7ca /assets/src
parentf27b930331cc5dc70d070de4a10459d551dd597e (diff)
changed fixed value to dynamic
Diffstat (limited to 'assets/src')
-rw-r--r--assets/src/index.html2
-rw-r--r--assets/src/js/main.js26
-rw-r--r--assets/src/template/analyse.html30
-rw-r--r--assets/src/template/drug-form.html6
-rw-r--r--assets/src/template/navbar.html2
5 files changed, 34 insertions, 32 deletions
diff --git a/assets/src/index.html b/assets/src/index.html
index af730f4..b8d3a67 100644
--- a/assets/src/index.html
+++ b/assets/src/index.html
@@ -9,7 +9,7 @@
<section class="py-5 text-center container">
<div class="row py-lg-5">
<div class="col-lg-6 col-md-8 mx-auto">
- <h1 class="font-weight-light">Doge420</h1>
+ <h1 class="display-1">Doge420</h1>
<p class="lead text-muted">My teacher said to my I'm a failure, that I'll never amount to anything. I scoffed at him. Shocked, my teacher asked what's so funny, my future is on the line. "Well...you see professor" I say as the teacher prepares to laugh at my answer, rebuttal at hand. "I watch Rick and Morty." The class is shocked, they merely watch pleb shows like the big bang theory to feign intelligence, not grasping the humor. "...how? I can't even understand it's sheer nuance and subtlety." "Well you see...WUBBA LUBBA DUB DUB!" One line student laughs in the back, I turn to see a who this fellow genius is. It's none other than Albert Einstein.</p>
<p>
<a href="#" class="btn btn-primary my-2">Do Nothing</a>
diff --git a/assets/src/js/main.js b/assets/src/js/main.js
index 936215e..dbcc4a6 100644
--- a/assets/src/js/main.js
+++ b/assets/src/js/main.js
@@ -44,10 +44,28 @@ function draw_me_like_one_of_your_french_girls(mol){
function calculate_and_disperse(mol){
- var descrs = JSON.parse(mol.get_descriptors());
- document.getElementById('exactmw').textContent = descrs["exactmw"];
- document.getElementById('CrippenMR').textContent = descrs["CrippenMR"];
- document.getElementById('CrippenClogP').textContent = descrs["CrippenClogP"];
+ try {
+ var descrs = JSON.parse(mol.get_descriptors());
+ } catch(err) {
+ alert("oo wee, failed to calculate descriptors senpai")
+ }
+ //document.getElementById('exactmw').textContent = descrs["exactmw"];
+ //document.getElementById('CrippenMR').textContent = descrs["CrippenMR"];
+ //document.getElementById('CrippenClogP').textContent = descrs["CrippenClogP"];
+ let tableRef = document.getElementById("analyse_table");
+ const keys = Object.keys(descrs);
+ for (let i = 0; i < keys.length; i++) {
+ const key = keys[i];
+ console.log(key, descrs[key]);
+ var newRow = tableRef.insertRow(-1);
+ var newCell_label = newRow.insertCell(0);
+ var newCell_value = newRow.insertCell(-1);
+ var newText_label = document.createTextNode(key);
+ var newText_value = document.createTextNode(descrs[key]);
+ newCell_label.appendChild(newText_label);
+ newCell_value.appendChild(newText_value);
+ }
+
}
diff --git a/assets/src/template/analyse.html b/assets/src/template/analyse.html
index ce8d097..00f2aea 100644
--- a/assets/src/template/analyse.html
+++ b/assets/src/template/analyse.html
@@ -1,5 +1,6 @@
+<section style="padding:60px;">
<div class='container'>
- <div class='row'><h2>Workbench</h2></div>
+ <div class='row'><h2 class="display-3">Workbench</h2></div>
<div class='row'>
<div class='col-6'>
<canvas id="draw-canvas-2" class="w-100"></canvas>
@@ -8,33 +9,16 @@
<table class="table table-striped">
<thead>
<tr>
- <th scope="col">#</th>
<th scope="col">Property</th>
<th scope="col">Value</th>
- <th scope="col">Reference</th>
</tr>
</thead>
- <tbody>
- <tr>
- <th scope="row">1</th>
- <td>Exact M.W.</td>
- <td id="exactmw">-</td>
- <td>-</td>
- </tr>
- <tr>
- <th scope="row">2</th>
- <td>CrippenMR</td>
- <td id='CrippenMR'>-</td>
- <td>-</td>
- </tr>
- <tr>
- <th scope="row">3</th>
- <td>CrippenClogP</td>
- <td id='CrippenClogP'>-</td>
- <td>-</td>
- </tr>
+ <tbody id='analyse_table'>
+ <!--<tr><td scope="row">Exact M.W.</td><td id="exactmw">-</td></tr>
+ <tr><td scope="row">CrippenMR</td><td id='CrippenMR'>-</td></tr>
+ <tr><td scope="row">CrippenClogP</td><td id='CrippenClogP'>-</td></tr>-->
</tbody>
</table>
</div>
</div>
-</div> \ No newline at end of file
+</div></section> \ No newline at end of file
diff --git a/assets/src/template/drug-form.html b/assets/src/template/drug-form.html
index 454ec09..f3ecc0a 100644
--- a/assets/src/template/drug-form.html
+++ b/assets/src/template/drug-form.html
@@ -1,7 +1,7 @@
-<div class="full-width bg-secondary text-light">
+<section class="bg-secondary text-light" style="padding:60px;">
<div class="container">
<div class="mb-3">
- <h2>Drug</h2>
+ <h2 class='display-3'>Analyse Compound</h2><small>*Snorts Cocoa Cola*</small>
<p >Ok so people can’t have opinions, the people on this sub are the reason there are instructions on toothpaste. Everyone here are cancerous sheep who have been mind controlled to upvoting if they see a 69, 420, Instagram Fortnite and TikTok bad Minecraft good. I’m not saying I like any of these more than Minecraft but people are allowed to have opinions. So next time you call someone a normie realize who the real normie is🤡</p>
<div class='col-12'>
<form>
@@ -19,4 +19,4 @@
-</div></div></div> \ No newline at end of file
+</div></div></section> \ No newline at end of file
diff --git a/assets/src/template/navbar.html b/assets/src/template/navbar.html
index 8bfaa00..f8a8341 100644
--- a/assets/src/template/navbar.html
+++ b/assets/src/template/navbar.html
@@ -1,6 +1,6 @@
<nav class="navbar navbar-dark bg-dark">
- <a class="navbar-brand" href="#">
+ <a class="navbar-brand mx-auto" href="#">
<img src="./img/doge420logo.png" width="30" height="30" class="d-inline-block align-top" alt="Lord Doge smoking a blunt">
Doge420
</a>