Page MenuHomeDevCentral

D552.id1345.diff
No OneTemporary

D552.id1345.diff

diff --git a/src/data/.gitkeep b/src/data/.gitkeep
deleted file mode 100644
--- a/src/data/.gitkeep
+++ /dev/null
@@ -1 +0,0 @@
-# You can delete this file. It's just here to make Git happy.
diff --git a/src/data/communities.yml b/src/data/communities.yml
new file mode 100644
--- /dev/null
+++ b/src/data/communities.yml
@@ -0,0 +1,4 @@
+- nasqueron
+- vikidia
+- wikimedia
+- wolfplex
diff --git a/src/data/dev_resources.yml b/src/data/dev_resources.yml
new file mode 100644
--- /dev/null
+++ b/src/data/dev_resources.yml
@@ -0,0 +1,24 @@
+- workboard:
+ title: Project workboard
+ link:
+ href: https://devcentral.nasqueron.org/tag/d%C3%A6ghrefn/
+ text: "#Dæghrefn"
+ content: bugs and tasks
+- rVIPER:
+ title: Core code
+ link:
+ href: https://devcentral.nasqueron.org/diffusion/VIPER/
+ text: rVIPER
+ content: TCL
+- rDWD:
+ title: Wikidata access layer
+ link:
+ href: https://devcentral.nasqueron.org/diffusion/DWD/
+ text: rDWD
+ content: Python
+- rVIPERWWW:
+ title: This site
+ link:
+ href: https://devcentral.nasqueron.org/diffusion/VIPERWWW/
+ text: rVIPERWWW
+ content: HTML, CSS, Gulp
diff --git a/src/data/doc_links.yml b/src/data/doc_links.yml
new file mode 100644
--- /dev/null
+++ b/src/data/doc_links.yml
@@ -0,0 +1,8 @@
+- wolfplex:
+ url: https://www.wolfplex.be/wiki/D%C3%A6ghrefn
+ location: On Wolfplex wiki
+ content: describes server commands
+- wikidata:
+ url: https://www.wikidata.org/wiki/User:D%C3%A6ghrefnBot
+ location: On Wikidata
+ content: describes Wikidata commands
diff --git a/src/data/tasks.yml b/src/data/tasks.yml
new file mode 100644
--- /dev/null
+++ b/src/data/tasks.yml
@@ -0,0 +1,14 @@
+request_channel:
+ action: Request new channel
+ url: https://devcentral.nasqueron.org/maniphest/task/edit/form/1/
+ parameters:
+ tags: dæghrefn
+ subscribers: Dereckson
+ title: "Add Dæghrefn to <write here the channel name>"
+ description: "[Write here what problems you want the bot to solve.]"
+
+report_issue:
+ action: Report issue
+ url: https://devcentral.nasqueron.org/maniphest/task/edit/form/1/
+ parameters:
+ tags: dæghrefn
diff --git a/src/helpers/ucfirst.js b/src/helpers/ucfirst.js
new file mode 100644
--- /dev/null
+++ b/src/helpers/ucfirst.js
@@ -0,0 +1,16 @@
+/**
+ * Handlebars helper to capitalize.
+ *
+ * @param {string} str - The string to capitalize the first character
+ * @example
+ * {{ucfirst foo}}
+ * @returns string The string capitalized
+ */
+module.exports = function (str) {
+ if (str && typeof str === "string") {
+ return str.charAt(0).toUpperCase() + str.slice(1);
+ }
+
+ console.warn("helpers: ucfirst called with a non string parameter.");
+ return '';
+}
diff --git a/src/pages/index.html b/src/pages/index.html
--- a/src/pages/index.html
+++ b/src/pages/index.html
@@ -18,8 +18,9 @@
<p>You use some Dæghrefn feature? You can contribute to write documentation.</p>
<p>Currently, some elements could be found at the following places:</p>
<ul>
- <li><a href="https://www.wolfplex.be/wiki/D%C3%A6ghrefn">On Wolfplex wiki</a> — describes server commands</li>
- <li><a href="https://www.wikidata.org/wiki/User:D%C3%A6ghrefnBot">On Wikidata</a> — describes Wikidata commands</li>
+ {{#each doc_links}}
+ <li><a href="{{ url }}">{{ location }}</a> — {{ content }}</li>
+ {{/each}}
</ul>
</div>
</div>
@@ -33,10 +34,12 @@
<p>Dæghrefn and Wearg live on the IRC Freenode network, where any channel could benefit of our solutions.</p>
<p>The server infrastructure is maintained by Nasqueron as a service offered to the free culture communities.</p>
<div class="row small-up-1 medium-up-2 large-up-4 text-center blockgrid white black-margin">
- <div class="column">Nasqueron<br /><img src="{{root}}assets/img/logo-nasqueron.png"></div>
- <div class="column">Vikidia<br /><img src="{{root}}assets/img/logo-vikidia.png"></div>
- <div class="column">Wikimedia<br /><img src="{{root}}assets/img/logo-wikimedia.png"></div>
- <div class="column">Wolfplex<br /><img src="{{root}}assets/img/logo-wolfplex.png"></div>
+ {{#each communities}}
+ <div class="column">
+ {{ ucfirst this }}<br />
+ <img src="{{root}}assets/img/logo-{{ this }}.png">
+ </div>
+ {{/each}}
</div>
</div>
</div>
@@ -62,7 +65,13 @@
</p>
<p>Explain your needs and we'll offer you a solution. We create
<em>sur mesure</em> code for each community.</p>
- <a href="https://devcentral.nasqueron.org/maniphest/task/edit/form/1/?tags=d%C3%A6ghrefn&subscribers=Dereckson&title=Add%20D%C3%A6ghrefn%20to%20%3Cwrite%20here%20the%20channel%20name%3E&description=[Write%20here%20what%20problems%20you%20want%20the%20bot%20to%20solve.]" class="button round">Request new channel</a>
+ <form action="{{tasks.request_channel.url}}">
+ {{#each tasks.request_channel.parameters}}
+ <input type="hidden" name="{{@key}}" value="{{ this }}">
+ {{/each}}
+ <input type="submit" class="button round"
+ value="{{tasks.request_channel.action}}">
+ </form>
</div>
</div>
@@ -76,13 +85,22 @@
A few third-party software components could have their own licence.</p>
<p>You're welcome to contribute.</p>
<ul>
- <li><strong>Project workboard:</strong> <a href="https://devcentral.nasqueron.org/tag/d%C3%A6ghrefn/">#Dæghrefn</a> (bugs and tasks)</li>
- <li><strong>Core code:</strong> <a href="https://devcentral.nasqueron.org/diffusion/VIPER/">rVIPER</a> (TCL)</li>
- <li><strong>Wikidata access layer:</strong> <a href="https://devcentral.nasqueron.org/diffusion/DWD/">rDWD</a> (Python)</li>
- <li><strong>This site:</strong> <a href="https://devcentral.nasqueron.org/diffusion/VIPERWWW/">rVIPERWWW</a> (HTML, CSS, Gulp)</li>
+ {{#each dev_resources}}
+ <li>
+ <strong>{{ title }}:</strong>
+ <a href="{{ link.href }}">{{ link.text }}</a>
+ ({{content}})
+ </li>
+ {{/each}}
</ul>
- <a href="https://devcentral.nasqueron.org/maniphest/task/edit/form/1/?tags=d%C3%A6ghrefn" class="button round">Report an issue</a>
+ <form action="{{tasks.report_issue.url}}">
+ {{#each tasks.report_issue.parameters}}
+ <input type="hidden" name="{{@key}}" value="{{ this }}">
+ {{/each}}
+ <input type="submit" class="button round"
+ value="{{tasks.report_issue.action}}">
+ </form>
</div>
</div>
</section>

File Metadata

Mime Type
text/plain
Expires
Mon, Nov 25, 23:17 (20 h, 30 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2263455
Default Alt Text
D552.id1345.diff (7 KB)

Event Timeline