-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
92 lines (84 loc) · 3.22 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Bootstrap CSS -->
<link href="src/style.css" rel="stylesheet" >
<link href="page.css" rel="stylesheet">
<title>CodeBlocks by Alvin saini</title>
</head>
<body>
<div class="div-con">
<div class="heading">
<h2>Code Blocks For Websites</h2>
</div>
<div class="logo margin-extra">
<img src="logo.jpg" alt="logo">
</div>
<div class="line">
<p>An Opensource solution to show Code on website in better way</p>
</div>
<div class="div-con">
<a class="link" id="Github" href="https://github.com/codewithalvin/code_tag_for_websites">GITHUB</a>
<a class="link" href="#HOW">HOW TO USE</a>
</div>
<div class="dib-con" id ="HOW">
<p class="line bold margin-extra"> HOW TO USE IT </p>
<p class="line">You can use it in two ways see them below</p>
<p class="line b-300 margin-extra"> • Use below style and script tag in your html and enjoy it
</p>
<code>
<link href="https://codewithalvin.github.io/code_tag_for_websites/src/style.css" rel="stylesheet" >
</code>
<code>
<script src="https://codewithalvin.github.io/code_tag_for_websites/src/script.js"></script>
</code>
<p class="line bold">OR</p>
<p class="line b-300 margin-extra" > • Copy and use the source code from <a href="#Github">Github</a> The file You are looking for are in src directory</p>
</div>
<div class="div-con">
<p class="line bold">Look at at example below</p>
<p class="line b-300 margin-extra">
Writting this 👇
</p>
<img class="codeexample" src="CodeExample.jpg" alt="CodeExample" />
<p class="line b-300 margin-extra">
Gives that 👇
Note if you are using html inside <code> then do consider encoding the html first
</p>
<code>
import requests #for web fetching
from bs4 import BeautifulSoup #for parsing
class Scrape:
def __init__(self,url):
self.url=url
def fetch(self,url):
headers={"User-Agent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36"}
page=requests.get(url,headers=headers).content
soup = BeautifulSoup(page, 'html.parser')
return soup.prettify()
def get_by_name(self,name):
pass
def get_by_username(self,username):
url=self.url+username
return self.fetch(url)
</code>
</div>
<div class="div-con">
<p class="line bold margin-extra">EDIT THEME</p>
<p class="line b-300">
Overwrite the class <i>.dark_nav .dark_code .light_nav .light_code</i>
</p>
<p class="line b-300 margin-extra">
Note that .dark_code and .dark_nav work together and .light_nav and .light_code together.
</p>
</div>
</div>
<footer>
<p class="line bold">Made By <a href="https://alvinsaini.vercel.app"> Alvin Saini </a></p>
</footer>
<script src="src/script.js"></script>
</body>
</html>