Skip to content

Commit 53a530e

Browse files
authored
feat(launch): Launch | 011 - Fix social embed information & readme (#2)
1 parent 00b6333 commit 53a530e

File tree

6 files changed

+42
-48
lines changed

6 files changed

+42
-48
lines changed

README.MD

Lines changed: 24 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -4,61 +4,51 @@
44
[![This project is using Percy.io for visual regression testing.](https://percy.io/static/images/percy-badge.svg)](https://percy.io/poly-glot/tensorflowjs-remove-background)
55
[![Cypress.io Dashboard](https://img.shields.io/badge/cypress-dashboard-brightgreen.svg)](https://dashboard.cypress.io/projects/jp2thc/runs)
66
[![DeepScan grade](https://deepscan.io/api/teams/8408/projects/10623/branches/149386/badge/grade.svg)](https://deepscan.io/dashboard#view=project&tid=8408&pid=10623&bid=149386)
7+
[![Maintainability](https://api.codeclimate.com/v1/badges/e9ab18c4667689e347de/maintainability)](https://codeclimate.com/github/poly-glot/tensorflowjs-remove-background/maintainability)
78
[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/poly-glot/tensorflowjs-remove-background)
89

9-
Remove Background from picture using WebAssembly & TensorFlow.js
10+
Remove Background from the picture using WebAssembly & TensorFlow.js
1011

1112
# Getting Started
1213
```
1314
npm install
1415
npm start
1516
```
1617

17-
## Manual Review Guidelines
18+
# How it is pieced together
19+
<img src="https://removebg.junaid.eu/assets/diagram.svg" alt="Flow diagram" />
20+
21+
## Demonstration
1822
<table width="100%">
1923
<tr>
20-
<td width="100">CSS</td>
21-
<td>Use BEM naming convention </td>
24+
<td width="100">Canvas</td>
25+
<td>How to manipulate <a href="https://developer.mozilla.org/en-US/docs/Web/API/ImageData" target="_blank">ImageData</a> to build a new image.</td>
2226
</tr>
2327
<tr>
24-
<td width="100">JS</td>
25-
<td>Prefix DOM Element class name or ID with "js-" to indicate element is linked to Javascript</td>
28+
<td width="100">Canvas</td>
29+
<td><a href="https://github.com/poly-glot/tensorflowjs-remove-background/blob/00b6333c660ea1ecf7d1562dae56b68eea137041/src/component/output/events.js#L42" target="_blank">Save Canvas image.</a></td>
2630
</tr>
2731
<tr>
28-
<td width="100">JS</td>
29-
<td>Use Async/Await over promises</td>
32+
<td width="100">SEO</td>
33+
<td><a href="https://support.google.com/gsa/answer/6329153?hl=en#82542">Excluding Unwanted Text from the Google Index</a> <code>&lt;!--googleoff: index--&gt;</code></td>
3034
</tr>
3135
<tr>
32-
<td width="100">JS</td>
33-
<td>Keep Code branching to one level and reduce nested if/else statements</td>
36+
<td width="100">HTML</td>
37+
<td>Use <code>referrerpolicy="no-referrer"</code> to disable hotlink protection.</td>
3438
</tr>
39+
<tr>
40+
<td width="100">HTML</td>
41+
<td>Use accept attribute e.g. <code>accept=".jpg,.png,.jpeg"</code> to allow users to select required file type.</td>
42+
</tr>
3543
<tr>
3644
<td width="100">JS</td>
37-
<td>Leverage Modern Browser API's instead of bloated libraries or framework e.g. use fetch instead of axios</td>
38-
</tr>
45+
<td>Handle events using <a href="https://javascript.info/bubbling-and-capturing">Event Bubbling</a>.</td>
46+
</tr>
47+
<tr>
48+
<td width="100">Accessibility</td>
49+
<td>A small &amp; Accessible Collapse implementation.</td>
50+
</tr>
3951
</table>
4052

41-
# Local Development
42-
43-
### Running Github Action
44-
```
45-
# https://github.com/nektos/act
46-
curl https://raw.githubusercontent.com/nektos/act/master/install.sh | sudo bash
47-
act pull_request
48-
act --job ci
49-
```
50-
51-
### Running Sonar
52-
```
53-
docker run -d --name sonarqube -p 9000:9000 -p 9092:9092 sonarqube
54-
docker run -ti -v $(pwd)/src:/root/src --link sonarqube newtmitch/sonar-scanner
55-
```
56-
57-
### Docker
58-
```
59-
docker build -t tensorflowjs-remove-background .
60-
docker run -it --rm -p 5000:5000 tensorflowjs-remove-background
61-
```
62-
6353
# Browser Support
6454
2 most recent versions of Chrome, Firefox, Safari & MS Edge.

docs/control-flow.drawio

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<mxfile host="app.diagrams.net" modified="2020-04-07T03:51:43.486Z" agent="5.0 (Macintosh)" etag="AtO8hbI7gnz9pmPdEX8B" version="12.9.8" type="device"><diagram name="Page-1" id="74e2e168-ea6b-b213-b513-2b3c1d86103e">7VtZc9s2EP41nmkfmuEhHn6sHNv11Gk9lpM2Tx2IhCg0IMEBoau/vgAJigdAiTIlS06bmWS4i4PkfrvfLpbKlX0Tr+8pSOefSAjxlWWE6yv745VlXY9c/q9QbAqFY1qFIqIoLFRmpZigf6BUGlK7QCHMGhMZIZihtKkMSJLAgDV0gFKyak6bEdy8awoiqCgmAcCq9g8UsrnUmoZRDfwCUTSXt/YdOTAFwbeIkkUi73dl2bP8TzEcg3IvOT+bg5Csair79sq+oYSw4ipe30AsTFuarVh31zG6fW4KE9ZngedBN7j2Zua1GwLft3+SOywBXsDyFVzM9xozMOXmsdxICFvllHCM20qqaMK2ZqrM4Q+pTntHC4VSO1NnIqFv2jP3BrYpPTBboRiDhEvjOYsxV5r8MpgjHD6CDVkIdDPGva2UxlyiTIYSR90e524IBdBC2nqaEDCYQjze+uoNwYTyoYTkN8wYJd+2ji/uOyMJuwMxwiKev0AaggRItbyjz0WAUZTw64A7H6Tbt6p7Y+lekDK4rqmkd95DEkNGubmMcnQkI0UySSmuqrD0y6ic1yLSKyMSSCqItltX4cAvZET0jA5LiY6HJOXWt4wJWdAA9oRRgUo1VGdg7rectJSlWsp0dZayd1hK7v7MSRYkkfDXHdvbfXYHmPtGAhgcC8/LFDi2L/I6hK5VhGJO1pkwLyVLJAKC07Sw02QR8QGGSMIF7u0RZAp+VQwJ3FZzxOAkBYEYXfHM14L1IkKs02l7x5zVDDnT0XiSpcHaPUXI+XpAuWqRYgJqeH7OuEX+B1AF0NXgZ2rwG50CP1vB7wYkSyAC8omSAGYZSqKL4M1y1G1a7yg82td86MX59XFlBNh9QYvfvsQRNO9KTquZB3KymkiRUDYnEUkAvq20reRfzXkkJJXW/BsytpHWBAtGmraGa8T+FMs/OFL6Whv5uJY758KmFBL+urVFQv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kkC89idpZ3cCGRk75x/KCVysfqteTK/+P4B9+y8=</diagram></mxfile>

public/assets/diagram.svg

Lines changed: 3 additions & 0 deletions
Loading

public/assets/social.jpg

89.2 KB
Loading

public/index.html

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,31 +3,28 @@
33
<head>
44
<meta charset="UTF-8">
55

6-
<title>Usual title</title>
7-
<meta name="description" content="Usual description">
6+
<title>Remove Background from the picture using WebAssembly &amp; TensorFlow.js</title>
7+
<meta name="description" content="Open source vanilla js project demonstrating TDD and power of Tensorflow in the browser.">
88

99
<!-- Facebook Meta Tags
1010
================================================== -->
11-
<meta property="og:title" content="Usual title">
12-
<meta property="og:url" content="">
13-
<meta property="og:image" content="">
11+
<meta property="og:title" content="Remove Background from the picture using WebAssembly&amp; TensorFlow.js">
12+
<meta property="og:url" content="https://removebg.junaid.eu/">
13+
<meta property="og:image" content="https://removebg.junaid.eu/assets/social.jpg">
1414
<meta property="og:image:type" content="image/jpg">
1515
<meta property="og:image:width" content="1200">
1616
<meta property="og:image:height" content="630">
17-
<meta property="og:description" content="Usual description">
18-
<meta property="og:site_name" content="Usual title">
17+
<meta property="og:description" content="Open source vanilla js project demonstrating TDD and power of Tensorflow in the browser.">
1918
<meta property="og:locale" content="en_GB">
2019
<meta property="og:type" content="website">
2120

2221
<!-- Twitter Cards
2322
================================================== -->
2423
<meta name="twitter:card" content="summary_large_image">
25-
<meta name="twitter:site" content="">
26-
<meta name="twitter:creator" content="">
27-
<meta name="twitter:url" content="">
28-
<meta name="twitter:title" content="Usual title">
29-
<meta name="twitter:description" content="Usual description">
30-
<meta name="twitter:image" content="">
24+
<meta name="twitter:url" content="https://removebg.junaid.eu/">
25+
<meta name="twitter:title" content="Remove Background from the picture using WebAssembly&amp; TensorFlow.js">
26+
<meta name="twitter:description" content="Open source vanilla js project demonstrating TDD and power of Tensorflow in the browser.">
27+
<meta name="twitter:image" content="https://removebg.junaid.eu/assets/social.jpg">
3128

3229

3330
<link rel="shortcut icon" href="data:image/x-icon;," type="image/x-icon">
@@ -37,7 +34,8 @@
3734
</head>
3835
<body class="site">
3936
<header class="site__header" aria-label="Main Header">
40-
<p>Usual header notice</p>
37+
<p>Remove Background</p>
38+
<a href="https://github.com/poly-glot/tensorflowjs-remove-background" target="_blank" rel="noopener">Github</a>
4139
</header>
4240

4341
<main class="site__body" aria-label="Main View">

src/component/core-css/site.css

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
.site__header {
22
border-bottom: 1px solid var(--borderColor);
3+
display: flex;
4+
justify-content: space-between;
35
padding: 15px;
46
}
57

0 commit comments

Comments
 (0)