forked from FOSS/BangleApps
App description can now be markdown
parent
0c0fc9ac8f
commit
ab5861126c
|
@ -19,3 +19,4 @@ Changed for individual apps are listed in `apps/appname/ChangeLog`
|
|||
* If `bin/pre-publish.sh` has been run and recent.csv created, add 'Sort By' chip
|
||||
* New 'espruinotools' which fixes pretokenise issue when ID follows ID (fix #416)
|
||||
* Improve upload of binary files
|
||||
* App description can now be markdown
|
||||
|
|
|
@ -217,7 +217,7 @@ and which gives information about the app for the Launcher.
|
|||
"name": "Readable name", // readable name
|
||||
"shortName": "Short name", // short name for launcher
|
||||
"icon": "icon.png", // icon in apps/
|
||||
"description": "...", // long description
|
||||
"description": "...", // long description (can contain markdown)
|
||||
"type":"...", // optional(if app) - 'app'/'widget'/'launch'/'bootloader'
|
||||
"tags": "", // comma separated tag list for searching
|
||||
|
||||
|
|
|
@ -52,6 +52,11 @@ function showReadme(appid) {
|
|||
}
|
||||
httpGet(appPath+app.readme).then(show).catch(()=>show("Failed to load README."));
|
||||
}
|
||||
function getAppDescription(app) {
|
||||
let appPath = `apps/${app.id}/`;
|
||||
let markedOptions = { baseUrl : appPath };
|
||||
return marked(app.description, markedOptions);
|
||||
}
|
||||
function handleCustomApp(appTemplate) {
|
||||
// Pops up an IFRAME that allows an app to be customised
|
||||
if (!appTemplate.custom) throw new Error("App doesn't have custom HTML");
|
||||
|
@ -259,7 +264,7 @@ function refreshLibrary() {
|
|||
</div>
|
||||
<div class="tile-content">
|
||||
<p class="tile-title text-bold">${escapeHtml(app.name)} ${versionInfo}</p>
|
||||
<p class="tile-subtitle">${escapeHtml(app.description)}${app.readme?`<br/>${readme}`:""}</p>
|
||||
<p class="tile-subtitle">${getAppDescription(app)}${app.readme?`<br/>${readme}`:""}</p>
|
||||
<a href="${url}" target="_blank" class="link-github"><img src="img/github-icon-sml.png" alt="See the code on GitHub"/></a>
|
||||
</div>
|
||||
<div class="tile-action">
|
||||
|
@ -470,7 +475,7 @@ function refreshMyApps() {
|
|||
</div>
|
||||
<div class="tile-content">
|
||||
<p class="tile-title text-bold">${escapeHtml(app.name)} <small>(${version.text})</small></p>
|
||||
<p class="tile-subtitle">${escapeHtml(app.description)}</p>
|
||||
<p class="tile-subtitle">${getAppDescription(app)}</p>
|
||||
<a href="${url}" target="_blank" class="link-github"><img src="img/github-icon-sml.png" alt="See the code on GitHub"/></a>
|
||||
</div>
|
||||
<div class="tile-action">
|
||||
|
|
Loading…
Reference in New Issue