Skip to content
This repository has been archived by the owner on Jan 15, 2022. It is now read-only.

Dev #4

Merged
merged 56 commits into from
Aug 5, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
3b42dcf
Update about.css
appukuttan66 Jul 30, 2021
a046d53
Update index.html
appukuttan66 Jul 31, 2021
1380586
Update main.js
appukuttan66 Jul 31, 2021
6f62ea0
Update main.js
appukuttan66 Jul 31, 2021
b0ed35c
Update main.js
appukuttan66 Jul 31, 2021
0ac0d99
Update main.js
appukuttan66 Aug 2, 2021
5ce5954
Create b58.js
appukuttan66 Aug 2, 2021
d11880a
Update b58.js
appukuttan66 Aug 2, 2021
ca7b217
Update main.js
appukuttan66 Aug 2, 2021
9fae614
Update index.html
appukuttan66 Aug 2, 2021
493d121
Update index.html
appukuttan66 Aug 3, 2021
7cb9a2c
Update main.js
appukuttan66 Aug 3, 2021
d970a14
Update main.js
appukuttan66 Aug 3, 2021
df01505
Update main.js
appukuttan66 Aug 3, 2021
49e98f9
Update main.js
appukuttan66 Aug 3, 2021
109e782
Update main.css
appukuttan66 Aug 3, 2021
464bc57
Update index.html
appukuttan66 Aug 3, 2021
88ff23b
Update main.js
appukuttan66 Aug 3, 2021
d6f6c7d
Create notify.js
appukuttan66 Aug 3, 2021
027bc23
Update notify.js
appukuttan66 Aug 3, 2021
de9926e
Update main.js
appukuttan66 Aug 3, 2021
3dbf67c
Update main.js
appukuttan66 Aug 3, 2021
f17c01d
Update notify.js
appukuttan66 Aug 3, 2021
b1b37d3
Update notify.js
appukuttan66 Aug 3, 2021
c5a574c
Update notify.js
appukuttan66 Aug 3, 2021
fd66798
Update main.js
appukuttan66 Aug 3, 2021
b3876dd
Create created.js
appukuttan66 Aug 3, 2021
0aee1f5
Update main.js
appukuttan66 Aug 3, 2021
675fb57
Update main.js
appukuttan66 Aug 3, 2021
ff41bfc
Update main.js
appukuttan66 Aug 3, 2021
c4eb551
Update main.js
appukuttan66 Aug 3, 2021
6589883
Update main.js
appukuttan66 Aug 3, 2021
635ffe2
Delete created.js
appukuttan66 Aug 3, 2021
566bcb0
Update main.js
appukuttan66 Aug 3, 2021
8892fe6
Update main.js
appukuttan66 Aug 4, 2021
37d10f2
Update index.html
appukuttan66 Aug 4, 2021
f1017ce
Update main.js
appukuttan66 Aug 4, 2021
5661882
Update main.js
appukuttan66 Aug 4, 2021
3ebc207
Update main.js
appukuttan66 Aug 4, 2021
0d67ff2
Update index.html
appukuttan66 Aug 4, 2021
2cb5fd4
Update main.js
appukuttan66 Aug 5, 2021
b0474e9
Update main.css
appukuttan66 Aug 5, 2021
8beb909
Update index.html
appukuttan66 Aug 5, 2021
22f0e29
Update main.js
appukuttan66 Aug 5, 2021
a1e18dc
Update main.js
appukuttan66 Aug 5, 2021
ff460ed
Update main.js
appukuttan66 Aug 5, 2021
eedd41d
Update main.js
appukuttan66 Aug 5, 2021
245dc0d
Update main.js
appukuttan66 Aug 5, 2021
cb354a9
Update main.js
appukuttan66 Aug 5, 2021
4d67180
Update main.js
appukuttan66 Aug 5, 2021
806ef7e
Update main.js
appukuttan66 Aug 5, 2021
37244d6
Update main.js
appukuttan66 Aug 5, 2021
315f970
Update main.js
appukuttan66 Aug 5, 2021
d483e10
Update main.js
appukuttan66 Aug 5, 2021
4f0ad17
Merge branch 'main' into dev
appukuttan66 Aug 5, 2021
49e0b25
Update main.js
appukuttan66 Aug 5, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion css/about.css
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ html{
text-align: center !important;
}
}
@media (min-width: 320px) {
@media (min-width: 320px){
iframe {
width: auto;
}
Expand Down
5 changes: 4 additions & 1 deletion css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,16 @@
.list-group-item {
max-width: 42em;
}
nav, .card-body, .card-title, .dropdown-item, .text-muted, .satisfy {
nav, .card-title, .dropdown-item, .text-muted, .satisfy {
font-family: 'Satisfy', cursive;
}
.offline-notify{
transition: transform 0.3s;
transform: translateY(-150%);
}
.m-1-5 {
margin: 0.375rem;
}
.newtag {
height: 10px;
width: 10px;
Expand Down
35 changes: 21 additions & 14 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>Terrive | Your Door to the Decentralized world.</title>
<title>Terrive | Decentralized Photo and Video Sharing Platform.</title>
<!--Desc. and OG-->
<meta name="og:type" content="website">
<meta name="og:title" content="Login to Terrive">
Expand Down Expand Up @@ -37,16 +37,14 @@
</script>
<!--Preconnects, DNS prefetch and Preload-->
<link rel="preload" href="fonts/satisfy-v11-latin-regular.woff2" as="font" type="font/woff2" crossorigin>
<link rel="preconnect" href="https://rpc.ecency.com">
<link rel="dns-prefetch" href="https://rpc.ecency.com">
<link rel="preconnect" href="https://images.hive.blog">
<link rel="preconnect" href="https://images.ecency.com">
<link rel="dns-prefetch" href="https://images.ecency.com">
<link rel="preconnect" href="https://hivesigner.com">
<link rel="preconnect" href="https://cdn.jsdelivr.net">
<link rel="dns-prefetch" href="https://cdn.jsdelivr.net">
<!--CSS-->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x" crossorigin="anonymous">
<!-- CSS only -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<link href="css/main.css" rel="stylesheet">
<link href="css/satisfy.css" rel="stylesheet">
</head>
Expand Down Expand Up @@ -174,7 +172,7 @@ <h6 class="offcanvas-title">Notifications</h6>
</div>

<div class="modal fade" id="upload-tray" tabindex="-1" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered modal-dialog-scrollable modal-lg">
<div class="modal-dialog modal-dialog-centered modal-dialog-scrollable">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">New Post</h5>
Expand All @@ -196,8 +194,16 @@ <h5 class="modal-title">New Post</h5>
</label>
</div>
</div><br>
<div id="upload-input-wrap">
<input id="upload-image-url" onchange="loadPostPreview(this.value)" type="text" class="form-control" placeholder="URL"><br>
<div id="upload-input-wrap">
<input type="file" accept="image/*" id="input-image-ele" hidden>
<div class="position-relative">
<label class="position-absolute end-0 m-1-5" for="input-image-ele">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="var(--bs-primary)" class="bi bi-plus-square-fill" viewBox="0 0 16 16">
<path d="M2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2H2zm6.5 4.5v3h3a.5.5 0 0 1 0 1h-3v3a.5.5 0 0 1-1 0v-3h-3a.5.5 0 0 1 0-1h3v-3a.5.5 0 0 1 1 0z"/>
</svg>
</label>
<input id="upload-image-url" onchange="loadPostPreview(this.value)" type="text" class="form-control" placeholder="URLs ( Seperated using Space )"><br>
</div>
</div>
<div id="upload-preview"></div>

Expand All @@ -207,7 +213,7 @@ <h5 class="modal-title">New Post</h5>

</div>
<div class="modal-footer">
<span class="text-secondary me-3" style="font-size:14px;">Need help? Check out the <a href="#">FAQs</a></span>
<span class="text-secondary me-3" style="font-size:14px;">Need help? Check out the <a href="about">FAQs</a></span>
<button type="button" class="btn btn-outline-primary" onclick="clearUploadTray()">Clear</button>
<button type="button" class="btn btn-primary" onclick="submitPost()">Upload</button>
</div>
Expand Down Expand Up @@ -295,12 +301,12 @@ <h5 class="ms-3 fw-bold modal-title satisfy"></h5>
<path fill-rule="evenodd" d="M1.5 1.5A.5.5 0 0 0 1 2v4.8a2.5 2.5 0 0 0 2.5 2.5h9.793l-3.347 3.346a.5.5 0 0 0 .708.708l4.2-4.2a.5.5 0 0 0 0-.708l-4-4a.5.5 0 0 0-.708.708L13.293 8.3H3.5A1.5 1.5 0 0 1 2 6.8V2a.5.5 0 0 0-.5-.5z"/>
</svg>
</div>
<div class="p-3 border-bottom satisfy text-secondary text-center" id="post-body"></div>
<div class="p-3 border-bottom text-secondary text-center" id="post-body"></div>
<p class="post-comment"></p>
</div>
<div class="modal-footer">
<div class="input-group mb-3 w-max-32 mx-auto">
<input type="text" class="form-control" placeholder="Say Something ...">
<input type="text" class="form-control" placeholder="Say Something nice ...">
<button onclick="postComment()" class="btn btn-outline-primary">
<svg xmlns="http://www.w3.org/2000/svg" width="26" height="26" fill="currentColor" class="bi bi-cursor" viewBox="0 0 16 16">
<path d="M14.082 2.182a.5.5 0 0 1 .103.557L8.528 15.467a.5.5 0 0 1-.917-.007L5.57 10.694.803 8.652a.5.5 0 0 1-.006-.916l12.728-5.657a.5.5 0 0 1 .556.103zM2.25 8.184l3.897 1.67a.5.5 0 0 1 .262.263l1.67 3.897L12.743 3.52 2.25 8.184z"/>
Expand All @@ -315,7 +321,7 @@ <h5 class="ms-3 fw-bold modal-title satisfy"></h5>

<div class="tab-content">

<main id="home" class="my-3 pb-5 tab-pane fade show active">
<main id="home" class="my-3 pb-5 tab-pane fade">
</main>


Expand All @@ -337,7 +343,7 @@ <h5 class="ms-3 fw-bold modal-title satisfy"></h5>
</div>
</main>

<main id="discover" class=" w-100 h-100 tab-pane fade">
<main id="discover" class=" w-100 h-100 tab-pane fade show active">
</main>

<main id="profile" class="w-100 h-100 py-3 w-max-56 mx-auto tab-pane fade">
Expand Down Expand Up @@ -425,9 +431,10 @@ <h5 class="ms-3 fw-bold modal-title satisfy"></h5>

</div>
<script src="https://cdn.jsdelivr.net/npm/@hiveio/hive-js/dist/hive.min.js" defer></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/js/bootstrap.bundle.min.js" defer integrity="sha384-gtEjrD/SeCtmISkJkNUaaKMoLD0//ElJ19smozuHV6z3Iehds+3Ulb9Bn9Plx0x4" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.bundle.min.js" defer integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/hivesigner@latest/lib/hivesigner.min.js" defer></script>
<script src="https://cdn.jsdelivr.net/npm/remarkable@2.0.1/dist/remarkable.min.js" defer></script>
<script src="js/b58.js" defer></script>
<script src="js/main.js" defer></script>

</body>
Expand Down
44 changes: 44 additions & 0 deletions js/b58.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
// Thank you random person from github for this.

var base58_chars = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";

const create_base58_map = () => {
const base58M = Array(256).fill(-1)
for (let i = 0; i < base58_chars.length; ++i)
base58M[base58_chars.charCodeAt(i)] = i

return base58M
}

const base58Map = create_base58_map()

const binary_to_base58 = uint8array => {
const result = []

for (const byte of uint8array) {
let carry = byte
for (let j = 0; j < result.length; ++j) {
const x = (base58Map[result[j]] << 8) + carry
result[j] = base58_chars.charCodeAt(x % 58)
carry = (x / 58) | 0
}
while (carry) {
result.push(base58_chars.charCodeAt(carry % 58))
carry = (carry / 58) | 0
}
}

for (const byte of uint8array)
if (byte) break
else result.push('1'.charCodeAt(0))

result.reverse()

return String.fromCharCode(...result)
}

function b58 (input) {
const enc = new TextEncoder();
const res = binary_to_base58(enc.encode(input))
return res
}
Loading