Skip to content
This repository has been archived by the owner on Aug 16, 2023. It is now read-only.

Commit

Permalink
feat: use ESM type
Browse files Browse the repository at this point in the history
  • Loading branch information
wdzeng committed Jul 15, 2023
1 parent 46d7952 commit 81b8773
Show file tree
Hide file tree
Showing 14 changed files with 868 additions and 500 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
node_modules
src/scripts/*.js
src/scss/*.css
src/css/*.css
*.zip
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
},
"scripts": {
"build": "yarn tsc && yarn sass && yarn zip",
"dev": "concurrently --kill-others 'tsc -w' 'sass --watch --no-source-map ./src/css'",
"dev": "concurrently --kill-others 'tsc -w' 'sass --watch --no-source-map ./src/css/popup.scss:./src/css/popup.css ./src/css/terminator.scss:./src/css/terminator.css'",
"tsc": "tsc",
"sass": "sass --no-source-map ./src/css",
"sass": "sass --no-source-map ./src/css/popup.scss:./src/css/popup.css ./src/css/terminator.scss:./src/css/terminator.css",
"zip": "zip -r The-Content-Farm-Terminator.zip ./src -x *.ts -x *.scss",
"clean": "rm -f src/*.js ./src/scripts/*.js ./src/css/*.css The-Content-Farm-Terminator.zip"
"clean": "rm -f src/scripts/*.js src/css/*.css The-Content-Farm-Terminator.zip"
},
"devDependencies": {
"@types/chrome": "0.0.184",
Expand All @@ -33,4 +33,4 @@
"url": "https://github.com/wdzeng/The-Content-Farm-Terminator/issues"
},
"license": "GPL-2.0"
}
}
54 changes: 24 additions & 30 deletions src/css/popup.scss
Original file line number Diff line number Diff line change
@@ -1,52 +1,46 @@
@import 'reset';

body {
margin: 0px;
padding: 4px;
padding: 0.75rem;
font-family: sans-serif;
font-size: 14px;

& > div {
margin: 4px;
}
font-size: 1rem;
}

textarea {
font-family: consolas, sans-serif;
width: 40em;
border-radius: 3px;
padding: 0.5em;
line-height: 1.5;
.editor-wrapper {
margin-bottom: 0.5rem;

#txtArea {
font-family: consolas, monospace;
border-radius: 3px;
padding: 0.25rem;
line-height: 1.5;
}
}

.bar {
.buttons-wrapper {
display: flex;
flex-direction: row;

&-left {
.buttons-left {
flex-grow: 1;
display: flex;
flex-direction: row;

button {
font-family: sans-serif;
padding: 0 0.5em;
height: 24px;
display: block;
padding: 0.08rem 0.75rem 0.04rem;

&:not(:last-child) {
margin-right: 0.5em;
margin-right: 0.5rem;
}
}
}

&-right {
}
}

#hint {
padding-top: 8px;
line-height: 20px;
line-height: 1.5;

p {
margin: 0;

&:not(:last-child) {
margin-bottom: 6px;
}
margin-top: 0.5rem;
}
}
}
135 changes: 135 additions & 0 deletions src/css/reset.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
/* http://meyerweb.com/eric/tools/css/reset/
v2.0 | 20110126
License: none (public domain)
*/

html,
body,
div,
span,
applet,
object,
iframe,
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
pre,
a,
abbr,
acronym,
address,
big,
cite,
code,
del,
dfn,
em,
img,
ins,
kbd,
q,
s,
samp,
small,
strike,
strong,
sub,
sup,
tt,
var,
b,
u,
i,
center,
dl,
dt,
dd,
ol,
ul,
li,
fieldset,
form,
label,
legend,
table,
caption,
tbody,
tfoot,
thead,
tr,
th,
td,
article,
aside,
canvas,
details,
embed,
figure,
figcaption,
footer,
header,
hgroup,
menu,
nav,
output,
ruby,
section,
summary,
time,
mark,
audio,
video {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font: inherit;
vertical-align: baseline;
}

/* HTML5 display-role reset for older browsers */
article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
menu,
nav,
section {
display: block;
}

body {
line-height: 1;
}

ol,
ul {
list-style: none;
}

blockquote,
q {
quotes: none;
}

blockquote:before,
blockquote:after,
q:before,
q:after {
content: '';
content: none;
}

table {
border-collapse: collapse;
border-spacing: 0;
}
Loading

0 comments on commit 81b8773

Please sign in to comment.