Skip to content

Commit 497124e

Browse files
author
adi
committed
updated to improve the css and fixed the jsdelivr link
1 parent a9c804a commit 497124e

4 files changed

Lines changed: 22 additions & 126 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
*Import from CDN*
1414
```html
15-
<script type="module" src="https://cdn.jsdelivr.net/gh/vanillawc/wc-code@1.0.3/src/wc-code.js"></script>
15+
<script type="module" src="https://cdn.jsdelivr.net/gh/vanillawc/wc-code@1.0.4/src/wc-code.js"></script>
1616
```
1717

1818
## Usage NOTE

docs/index.html

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,20 @@
66
<script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
77
<script type="module" src="https://cdn.jsdelivr.net/gh/vanillawc/wc-markdown@1/index.js"></script>
88
<script type="module" src="https://cdn.jsdelivr.net/gh/vanillawc/wc-code@0.3.3/build/index.js"></script>
9-
<link rel="stylesheet" href="https://fonts.xz.style/serve/inter.css">
10-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@exampledev/new.css@1.1.2/new.min.css">
119
</head>
1210
<body>
13-
<header>
11+
<style>
12+
article{
13+
margin-left: auto;
14+
margin-right: auto;
15+
max-width: 700px;
16+
}
17+
</style>
18+
<article>
1419
<h1>wc-code</h1>
1520
<p>cool ways to show code</p>
16-
</header>
17-
<article>
1821
<wc-markdown>
1922
<script type="wc-content">
20-
# Note
21-
this content was written in [new.css][new-css-link]
22-
and with the help of [wc-markdown][wc-markdown-link]
23-
24-
[new-css-link]: https://newcss.net/
25-
[wc-markdown-link]: https://github.com/vanillawc/wc-markdown
26-
2723
# wc-code elements
2824
`<wc-code>` elements are elements that allow you to present your
2925
code with a rich feature of options
@@ -44,8 +40,7 @@ <h3>JavaScript usage -</h3>
4440
var url = "https://sv443.net/jokeapi/v2/joke/Any?blacklistFlags=nsfw,racist,sexist&format=txt"
4541
var resp = await fetch(url);
4642
var text = await resp.text();
47-
console.log(text);
48-
43+
console.log(text);
4944
</script>
5045
</wc-code>
5146
<h3>Python usage -</h3>
@@ -54,8 +49,7 @@ <h3>Python usage -</h3>
5449
<script type="wc-content">
5550
a = 1
5651
b = 5
57-
print(a, b, a+b)
58-
52+
print(a, b, a+b)
5953
</script>
6054
</wc-code>
6155
<wc-markdown highlight>
@@ -119,4 +113,4 @@ <h3>Python usage -</h3>
119113
</wc-code-zone>
120114
</article>
121115
</body>
122-
</html>
116+
</html>

docs/index.pug

Lines changed: 0 additions & 104 deletions
This file was deleted.

src/wc-code.css

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
1+
wc-code{
2+
padding: 10px;
3+
border: 2px solid black;
4+
border-radius: 5px;
5+
}
6+
17
wc-code input[type="button"] {
2-
border: 1px solid grey;
3-
border-radius: 3px;
4-
margin: 5px 5px;
5-
padding: 4px 18px;
8+
border: 1px solid grey;
9+
border-radius: 3px;
10+
margin: 5px 5px;
11+
padding: 4px 18px;
612
background: white;
713
color: black;
814
cursor: pointer;

0 commit comments

Comments
 (0)