1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/snserver_ynh.git synced 2024-09-03 20:26:22 +02:00
This commit is contained in:
Fabian Wilkens 2021-01-11 22:33:16 +01:00
parent 77182ed4f9
commit 872e7574af
5 changed files with 53 additions and 51 deletions

View file

@ -1,6 +1,6 @@
location = /favicon.ico { location = /favicon.ico {
alias /opt/yunohost/snserver/live/public/favicon/favicon.ico; alias /opt/yunohost/snserver/live/public/favicon/favicon.ico;
expires 30d; expires 30d;
} }
location __PATH__/ { location __PATH__/ {

View file

@ -180,7 +180,7 @@ then
find "../conf/" -name "ext_*.src" -print0 | while read -d $'\0' file find "../conf/" -name "ext_*.src" -print0 | while read -d $'\0' file
do do
basename=$(basename -as .src $file) basename=$(basename -as .src $file)
ynh_setup_source --dest_dir="$final_path/live/public/extensions/src/${basename#'ext_'}" --source_id="$basename" ynh_setup_source --dest_dir="$final_path/live/public/extensions/src/${basename#'ext_'}" --source_id="$basename"
done done
fi fi

View file

@ -1,5 +1,5 @@
body { body {
padding-left: 50px; padding-left: 50px;
} }
td { td {
border: 1px solid #999; border: 1px solid #999;

View file

@ -1,36 +1,38 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head> <head>
<title>StandardNotes Extensions</title> <title>StandardNotes Extensions</title>
<script type="text/javascript" src="extensions/js.js"></script> <script type="text/javascript" src="extensions/js.js"></script>
<link rel="stylesheet" href="extensions/css.css"> <link rel="stylesheet" href="extensions/css.css">
</head> </head>
<body> <body>
<div id="head"> <div id="head">
<h1>Standard Notes - Extensions</h1> <h1>Standard Notes - Extensions</h1>
<h2>These Extensions are open source. You can find them on Github.</br> <h2>These Extensions are open source. You can find them on Github.</br>
<a href=https://github.com/standardnotes/>Standard Notes on Github</a></br> <a href=https://github.com/standardnotes/>Standard Notes on Github</a></br>
<a href=https://github.com/sn-extensions/>SN Extensions on Github</a></br></h2> <a href=https://github.com/sn-extensions/>SN Extensions on Github</a></br>
<h3>To get all original extensions from Standard-Notes please consider to pay for <a href=https://standardnotes.org/extensions>Extended Extensions</a></h3> </h2>
<h3>Install Instructions</h3> <h3>To get all original extensions from Standard-Notes please consider to pay for
<ul> <a href=https://standardnotes.org/extensions>Extended Extensions</a>
<li>Open StandardNotes Web or Desktop App</li> </h3>
<li>Press "Extensions" in the button left corner</li> <h3>Install Instructions</h3>
<li>Press on "Import Extensions" in the button right corner of the new window.</li> <ul>
<li>Enter one of the Extension Links from below.</li> <li>Open StandardNotes Web or Desktop App</li>
<li>Press "Enter" on your keyboard.</li> <li>Press "Extensions" in the button left corner</li>
<li>Press on "Install"</li> <li>Press on "Import Extensions" in the button right corner of the new window.</li>
</ul> <li>Enter one of the Extension Links from below.</li>
</div> <li>Press "Enter" on your keyboard.</li>
<div id="themesData"> <li>Press on "Install"</li>
<h3>Themes</h3> </ul>
</div> </div>
<div id="editorsData"> <div id="themesData">
<h3>Editors</h3> <h3>Themes</h3>
</div> </div>
<div id="componentsData"> <div id="editorsData">
<h3>Components</h3> <h3>Editors</h3>
</div> </div>
<div id="componentsData">
<h3>Components</h3>
</div>
</body> </body>
</html> </html>

View file

@ -1,23 +1,23 @@
loadJSON("extensions/index.json"); loadJSON("extensions/index.json");
function loadJSON(file){ function loadJSON(file){
fetch(file) fetch(file)
.then(function (response) { .then(function (response) {
return response.json(); return response.json();
}) })
.then(function (data) { .then(function (data) {
appendData(data); appendData(data);
}) })
.catch(function (err) { .catch(function (err) {
console.log('error: ' + err); console.log('error: ' + err);
}); });
} }
function appendData(data) { function appendData(data) {
for (var i = 0; i < data.length; i++) { for (var i = 0; i < data.length; i++) {
var mainContainer = document.getElementById(data[i].extension + "sData"); var mainContainer = document.getElementById(data[i].extension + "sData");
var tr = document.createElement("tr"); var tr = document.createElement("tr");
tr.innerHTML = tr.innerHTML =
"<td id='name'>" + data[i].name + "</td>" + "<td id='name'>" + data[i].name + "</td>" +
"<td id='url'><a href=" + data[i].url + ">" + data[i].url + "</a></td>" "<td id='url'><a href=" + data[i].url + ">" + data[i].url + "</a></td>"
mainContainer.appendChild(tr); mainContainer.appendChild(tr);
} }
} }