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

Commit

Permalink
Merge pull request #4 from appukuttan66/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
appukuttan66 authored Aug 5, 2021
2 parents 94a09ee + 49e0b25 commit 9b07917
Show file tree
Hide file tree
Showing 6 changed files with 245 additions and 90 deletions.
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

0 comments on commit 9b07917

Please sign in to comment.