nodebb-plugin-fab-cards 0.1.0 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,68 @@
1
+ <div class="acp-page-container">
2
+ <!-- IMPORT admin/partials/settings/header.tpl -->
3
+
4
+ <div class="row m-0">
5
+ <div id="spy-container" class="col-12 col-md-8 px-0 mb-4" tabindex="0">
6
+ <form role="form" class="quickstart-settings">
7
+ <div class="mb-4">
8
+ <h5 class="fw-bold tracking-tight settings-header">General</h5>
9
+
10
+ <p class="lead">
11
+ Adjust these settings. You can then retrieve these settings in code via:
12
+ <br/><code>await meta.settings.get('quickstart');</code>
13
+ </p>
14
+ <div class="mb-3">
15
+ <label class="form-label" for="setting-1">Setting 1</label>
16
+ <input type="text" id="setting-1" name="setting-1" title="Setting 1" class="form-control" placeholder="Setting 1">
17
+ </div>
18
+ <div class="mb-3">
19
+ <label class="form-label" for="setting-2">Setting 2</label>
20
+ <input type="text" id="setting-2" name="setting-2" title="Setting 2" class="form-control" placeholder="Setting 2">
21
+ </div>
22
+
23
+ <div class="form-check form-switch">
24
+ <input type="checkbox" class="form-check-input" id="setting-3" name="setting-3">
25
+ <label for="setting-3" class="form-check-label">Setting 3</label>
26
+ </div>
27
+ </div>
28
+
29
+ <div class="mb-4">
30
+ <h5 class="fw-bold tracking-tight settings-header">Colors</h5>
31
+
32
+ <p class="alert" id="preview">
33
+ Here is some preview text. Use the inputs below to modify this alert's appearance.
34
+ </p>
35
+ <div class="mb-3 d-flex gap-2">
36
+ <label class="form-label" for="color">Foreground</label>
37
+ <input data-settings="colorpicker" type="color" id="color" name="color" title="Background Color" class="form-control p-1" placeholder="#ffffff" value="#ffffff" style="width: 64px;"/>
38
+ </div>
39
+ <div class="mb-3 d-flex gap-2">
40
+ <label class="form-label" for="bgColor">Background</label>
41
+ <input data-settings="colorpicker" type="color" id="bgColor" name="bgColor" title="Background Color" class="form-control p-1" placeholder="#000000" value="#000000" style="width: 64px;" />
42
+ </div>
43
+ </div>
44
+
45
+ <div class="mb-4">
46
+ <h5 class="fw-bold tracking-tight settings-header">Sorted List</h5>
47
+
48
+ <div class="mb-3" data-type="sorted-list" data-sorted-list="sample-list" data-item-template="admin/plugins/quickstart/partials/sorted-list/item" data-form-template="admin/plugins/quickstart/partials/sorted-list/form">
49
+ <ul data-type="list" class="list-group mb-2"></ul>
50
+ <button type="button" data-type="add" class="btn btn-info">Add Item</button>
51
+ </div>
52
+ </div>
53
+
54
+ <div>
55
+ <h5 class="fw-bold tracking-tight settings-header">Uploads</h5>
56
+
57
+ <label class="form-label" for="uploadedImage">Upload Image</label>
58
+ <div class="d-flex gap-1">
59
+ <input id="uploadedImage" name="uploadedImage" type="text" class="form-control" />
60
+ <input value="Upload" data-action="upload" data-target="uploadedImage" type="button" class="btn btn-light" />
61
+ </div>
62
+ </div>
63
+ </form>
64
+ </div>
65
+
66
+ <!-- IMPORT admin/partials/settings/toc.tpl -->
67
+ </div>
68
+ </div>
@@ -0,0 +1,7 @@
1
+ <div class="card card-body text-bg-light">
2
+ <p>This is a custom page.</p>
3
+ <p>Your uid is {uid}!</p>
4
+ <p id="last-p"></p>
5
+ <hr/>
6
+ <p>[[quickstart:info]]</p>
7
+ </div>
package/test/.eslintrc ADDED
@@ -0,0 +1,9 @@
1
+ {
2
+ "env": {
3
+ "mocha": true
4
+ },
5
+ "rules": {
6
+ "no-unused-vars": "off"
7
+ }
8
+ }
9
+
package/test/index.js ADDED
@@ -0,0 +1,41 @@
1
+ /**
2
+ * You can run these tests by executing `npx mocha test/plugins-installed.js`
3
+ * from the NodeBB root folder. The regular test runner will also run these
4
+ * tests.
5
+ *
6
+ * Keep in mind tests do not activate all plugins, so if you are testing
7
+ * hook listeners, socket.io, or mounted routes, you will need to add your
8
+ * plugin to `config.json`, e.g.
9
+ *
10
+ * {
11
+ * "test_plugins": [
12
+ * "nodebb-plugin-fab-cards"
13
+ * ]
14
+ * }
15
+ */
16
+
17
+ 'use strict';
18
+
19
+ /* globals describe, it, before */
20
+
21
+ const assert = require('assert');
22
+
23
+ const db = require.main.require('./test/mocks/databasemock');
24
+
25
+ describe('nodebb-plugin-fab-cards', () => {
26
+ before(() => {
27
+ // Prepare for tests here
28
+ });
29
+
30
+ it('should pass', (done) => {
31
+ const actual = 'value';
32
+ const expected = 'value';
33
+ assert.strictEqual(actual, expected);
34
+ done();
35
+ });
36
+
37
+ it('should load config object', async () => { // Tests can be async functions too
38
+ const config = await db.getObject('config');
39
+ assert(config);
40
+ });
41
+ });
@@ -1,21 +0,0 @@
1
- name: Publish Package to npmjs
2
- on:
3
- release:
4
- types: [published]
5
- jobs:
6
- build:
7
- runs-on: ubuntu-latest
8
- permissions:
9
- contents: read
10
- id-token: write
11
- steps:
12
- - uses: actions/checkout@v6
13
- # Setup .npmrc file to publish to npm
14
- - uses: actions/setup-node@v6
15
- with:
16
- node-version: "20.x"
17
- registry-url: "https://registry.npmjs.org"
18
- - run: npm ci
19
- - run: npm publish --provenance --access public
20
- env:
21
- NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}