Compare commits
15 Commits
Author | SHA1 | Date |
---|---|---|
onez++ | 1b8d37b930 | |
onez++ | e97f174796 | |
onez++ | 5cdf9c7ee5 | |
onez++ | e3f7e7fa54 | |
onez++ | 9c1833c901 | |
onez++ | bdf007da6e | |
onez++ | e257697d21 | |
onez++ | f432e72943 | |
onez++ | c1d1725a92 | |
onez++ | 8144653163 | |
onez++ | f5b23e0335 | |
onez++ | b0a1611a26 | |
onez++ | 6b7f186eff | |
onez++ | aeb87fff39 | |
onez++ | dd313a7f31 |
20
index.js
20
index.js
|
@ -63,8 +63,26 @@ app.get('/studios/:studio', async function (req, res) {
|
|||
});
|
||||
|
||||
app.get('/', async function (req, res) {
|
||||
let urls = [
|
||||
'blokkify-lang',
|
||||
'blokkify-web',
|
||||
'blokkify-backend'
|
||||
];
|
||||
|
||||
let dat = [];
|
||||
|
||||
for (let url of urls) {
|
||||
let url2 = `https://git.blokkify.net/api/v1/repos/Blokkify/${url}/releases`;
|
||||
let j = await (fetch(url2).then(x => x.json()));
|
||||
j.forEach(x => x.tsrc = url);
|
||||
dat = [...dat, ...j]
|
||||
}
|
||||
|
||||
dat = dat.sort((a,b) => new Date(b.created_at) - new Date(a.created_at));
|
||||
|
||||
res.render('main', {
|
||||
...(await getAuth(req))
|
||||
...(await getAuth(req)),
|
||||
log: dat
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"name": "zenocodr-web",
|
||||
"name": "blokkify-web",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
|
|
|
@ -47,7 +47,9 @@ textarea,
|
|||
|
||||
.button,
|
||||
input[type="submit"] {
|
||||
padding: 8px;
|
||||
padding: 5px;
|
||||
padding-top: 2px;
|
||||
padding-bottom: 2px;
|
||||
text-decoration: none;
|
||||
display: inline-block;
|
||||
border-radius: 5px;
|
||||
|
@ -55,8 +57,8 @@ input[type="submit"] {
|
|||
border: solid rgb(45, 155, 96) 2px;
|
||||
color: rgb(255, 255, 255);
|
||||
margin: auto;
|
||||
margin-top: 10px;
|
||||
margin-bottom: 10px;
|
||||
margin-top: 1px;
|
||||
margin-bottom: 1px;
|
||||
font-weight: bold;
|
||||
font-size: 1.1rem;
|
||||
}
|
||||
|
@ -160,8 +162,8 @@ a {
|
|||
|
||||
.banner {
|
||||
background-image: linear-gradient(to bottom,
|
||||
rgba(255, 255, 255, 0.9),
|
||||
rgba(255, 255, 255, 0.7)),
|
||||
rgba(255, 255, 255, 0.85),
|
||||
rgba(255, 255, 255, 0.85)),
|
||||
url("/bg.png");
|
||||
background-size: cover;
|
||||
padding: 50px;
|
||||
|
@ -226,4 +228,9 @@ p {
|
|||
|
||||
.date {
|
||||
font-size: 0.8em;
|
||||
}
|
||||
|
||||
.scroller {
|
||||
height: 100px;
|
||||
overflow-y: scroll;
|
||||
}
|
|
@ -38,3 +38,17 @@ async function submitFunc(event) {
|
|||
for (let form of document.querySelectorAll('form')) {
|
||||
form.addEventListener('submit', submitFunc);
|
||||
}
|
||||
|
||||
let h = document.querySelector('#projFile');
|
||||
|
||||
window.addEventListener("message", (event) => {
|
||||
const str = JSON.stringify(event.data);
|
||||
const bytes = new TextEncoder().encode(str);
|
||||
const blob = new Blob([bytes], {
|
||||
type: "application/json;charset=utf-8"
|
||||
});
|
||||
let f = new File([blob], "data.json", { type: "image/jpeg", lastModified: new Date().getTime() });
|
||||
let container = new DataTransfer();
|
||||
container.items.add(f);
|
||||
h.files = container.files;
|
||||
})
|
|
@ -35,6 +35,9 @@ function addComment(username, content) {
|
|||
`;
|
||||
}
|
||||
|
||||
let queue = new Promise((resolve, reject) => {
|
||||
resolve();
|
||||
})
|
||||
for (let elem of document.querySelectorAll('.list-wrapper')) {
|
||||
let endpoint = elem.getAttribute("endpoint");
|
||||
let type = elem.getAttribute("type");
|
||||
|
@ -43,8 +46,13 @@ for (let elem of document.querySelectorAll('.list-wrapper')) {
|
|||
let button = elem.querySelector('.button.lmore');
|
||||
|
||||
elem.innerHTML += `<div class='bleh'></div>`;
|
||||
|
||||
|
||||
button.onclick = async function () {
|
||||
let r;
|
||||
await queue;
|
||||
queue = new Promise((resolve, reject) => {
|
||||
r = resolve;
|
||||
});
|
||||
let page = elem.getAttribute('page') * 1 || 0;
|
||||
elem.setAttribute('page', page + 1);
|
||||
let dat = await fetch(`${endpoint}&page=${page}`).then((x) =>
|
||||
|
@ -63,6 +71,7 @@ for (let elem of document.querySelectorAll('.list-wrapper')) {
|
|||
elem.querySelector('div').innerHTML += addProject(entry.title, entry.id, entry.username, entry.date, type, endpoint)
|
||||
}
|
||||
}
|
||||
r();
|
||||
}
|
||||
|
||||
let obv = new IntersectionObserver((entries) => {
|
||||
|
|
|
@ -8,9 +8,9 @@
|
|||
<i class='date' style='font-weight: normal;'><%=(new Date(data.data.date) + "" ).split("GMT")[0] %></i>
|
||||
</div>
|
||||
<div class='area-bottom'>
|
||||
<iframe src="https://create.blokkify.net/?embed=true&data=<%= encodeURIComponent(
|
||||
<iframe src="https://studio.blokkify.net/?embed=true&data=<%= encodeURIComponent(
|
||||
`${backend}raw?sub=projects&id=${data.id}`,
|
||||
) %>" width="640" height="480"
|
||||
) %>" width="760" height="380"
|
||||
title="project">
|
||||
</iframe>
|
||||
</div>
|
||||
|
@ -20,16 +20,19 @@
|
|||
Actions
|
||||
</div>
|
||||
<div class='area-bottom'>
|
||||
<a class="button" href="https://create.blokkify.net/?data=<%= encodeURIComponent(
|
||||
`${backend}raw?sub=projects&id=${data.id}`,
|
||||
) %>">
|
||||
Edit
|
||||
</a>
|
||||
<a class="button" href="https://studio.blokkify.net/?data=<%= encodeURIComponent(
|
||||
`${backend}raw?sub=projects&id=${data.id}`,
|
||||
) %>">
|
||||
Edit
|
||||
</a>
|
||||
<% if(data.data.parent) { %>
|
||||
<a class="button" href="/embed/<%= data.data.parent %>">Original Project</a>
|
||||
<% } if(data.data.root) { %>
|
||||
<a class="button" href="/embed/<%= data.data.root %>">Root Project</a>
|
||||
<% } %>
|
||||
<a class="button" href="https://create.blokkify.net/?data=<%= encodeURIComponent(
|
||||
`${backend}raw?sub=projects&id=${data.id}`,
|
||||
) %>">Legacy Mode</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -1,5 +1,12 @@
|
|||
<%- include('header.ejs') -%>
|
||||
<div class='list-wrapper' endpoint="<%=backend %>list/projects?type=feed¶m=<%=username%>" type='embed'>
|
||||
<div class='list'></div>
|
||||
<div class='area'>
|
||||
<div class='area-top'>
|
||||
Your Feed
|
||||
</div>
|
||||
<div class='area-bottom'>
|
||||
<div class='list-wrapper' endpoint="<%=backend %>list/projects?type=feed¶m=<%=username%>" type='embed'>
|
||||
<div class='list'></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<%- include('footer.ejs') -%>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<div class="top">
|
||||
<a href="/" class='icon'><img src='/blokkify-logo.svg'></a>
|
||||
<a href="https://create.blokkify.net/?token=<%= token %>">Create</a>
|
||||
<a href="https://studio.blokkify.net/?token=<%= token %>">Create</a>
|
||||
<a href="/upload#section_project">Upload</a>
|
||||
<div class="margin"></div>
|
||||
<% if (username) { %>
|
||||
|
|
|
@ -1,26 +1,45 @@
|
|||
<%- include('header.ejs') -%>
|
||||
<div class='area'>
|
||||
<div class='area-top'>
|
||||
Easily Code the Universe
|
||||
Blokkify
|
||||
</div>
|
||||
<div class='area-bottom banner'>
|
||||
<p>
|
||||
Blokkify is a free language accessible to anyone wanting to learn development...
|
||||
<b>
|
||||
Low Floor, Infinite Ceiling
|
||||
</b>
|
||||
</p>
|
||||
<p>
|
||||
with a low floor, high ceiling...
|
||||
</p>
|
||||
<p>
|
||||
that enables anyone to share games and animations with the whole world.
|
||||
Blokkify enables developers of any skillset to create interactive experiences: games, animations, and more!
|
||||
</p>
|
||||
<div class='rows'>
|
||||
<a class="button" href="https://create.blokkify.net/?token=<%= token %>"> Begin </a>
|
||||
<a class="button" href="https://studio.blokkify.net/?token=<%= token %>"> Begin </a>
|
||||
<a class="button" href="https://blokkify.net/users/onez#section_projects"> Examples </a>
|
||||
<a class="button" href="/rules"> Rules </a>
|
||||
<a class="button" href="/rules"> Guidelines </a>
|
||||
<a class="button" href="https://matrix.to/#/@onezpp:matrix.org"> Contact </a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class='area'>
|
||||
<div class='area-top'>
|
||||
Changelog
|
||||
</div>
|
||||
<div class='area-bottom scroller'>
|
||||
<%for (let entry of log) {%>
|
||||
<b>
|
||||
<%= entry.tsrc %> <a href='<%= entry.html_url %>'><%= entry.tag_name %></a>
|
||||
<span class='date'><%= (new Date(entry.published_at) + "").split("GMT")[0] %></span>
|
||||
</b>
|
||||
<p>
|
||||
<%= entry.body %>
|
||||
</p>
|
||||
<%} %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class='area'>
|
||||
<div class='area-top'>
|
||||
Recent Projects
|
||||
|
|
|
@ -5,13 +5,13 @@
|
|||
</div>
|
||||
<div class='area-bottom'>
|
||||
<p>
|
||||
<b>Don't be shady:</b> If it violates United States law, don't bother.
|
||||
<b>Keep everything legal:</b> Prefer to follow the laws within government of the United States.
|
||||
</p>
|
||||
<p>
|
||||
<b>Keep Blokkify safe for all ages:</b> Do not post lewd content on our services.
|
||||
<b>Keep Blokkify safe for all ages:</b> To maintain a welcoming environment, act nice and welcoming to others.
|
||||
</p>
|
||||
<p>
|
||||
<b>Don't be toxic:</b> Do not swear excessively or harrass others.
|
||||
<b>Stay calm:</b> Avoid swearing if you can help it.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -14,13 +14,13 @@
|
|||
<div class='area-bottom'>
|
||||
<p>
|
||||
<i>Projects are how you broadcast your creativity to the world. Don't
|
||||
have a project file? <a href="https://create.blokkify.net/#">Create</a> one!</i>
|
||||
have a project file? <a href="https://studio.blokkify.net">Create</a> one!</i>
|
||||
</p>
|
||||
<form method='POST' enctype='multipart/form-data' action="<%=backend %>upload/project">
|
||||
<input name="title" placeholder="Name" />
|
||||
<input name="root" placeholder="ID to modify or remix" />
|
||||
|
||||
Data: <input type="file" name="file" />
|
||||
Data: <input type="file" name="file" id="projFile" />
|
||||
Thumbnail: <input type="file" name="thumb" />
|
||||
|
||||
<input type="checkbox" name="unlisted" style="display: inline;" />
|
||||
|
|
Loading…
Reference in New Issue