update auth openpgp.js
5
.gitignore
vendored
@ -5,9 +5,10 @@
|
|||||||
/nationchains/blocks
|
/nationchains/blocks
|
||||||
/nationchains/deals
|
/nationchains/deals
|
||||||
/nationchains/logs
|
/nationchains/logs
|
||||||
/nationchains/towns
|
/nationchains/nations
|
||||||
/nationchains/pagans
|
/nationchains/pagans
|
||||||
/nationchains/nations
|
/nationchains/towns
|
||||||
/nationchains/tribes
|
/nationchains/tribes
|
||||||
|
/nationchains/www/nginx_adminapx.conf
|
||||||
/nationchainssave
|
/nationchainssave
|
||||||
/yarn*
|
/yarn*
|
||||||
|
@ -1,82 +1,95 @@
|
|||||||
const conf = require( '../../nationchains/tribes/conf.json' );
|
const conf = require("../../nationchains/tribes/conf.json");
|
||||||
|
|
||||||
const checkHeaders = ( req, res, next ) => {
|
const checkHeaders = (req, res, next) => {
|
||||||
/**
|
/**
|
||||||
* @apiDefine apxHeader
|
* @apiDefine apxHeader
|
||||||
* @apiGroup Middleware
|
* @apiGroup Middleware
|
||||||
* @apiDescription Header is mandatory to access apxtrib see tribes/townconf.json.exposedHeaders
|
* @apiDescription Header is mandatory to access apxtrib see tribes/townconf.json.exposedHeaders
|
||||||
* A turn around can be done with a simple get params has to be sent in the get url. Usefull to send simple get without header like ?xworkon=tribeName&xlang=en... priority is given to headers
|
* A turn around can be done with a simple get params has to be sent in the get url. Usefull to send simple get without header like ?xworkon=tribeName&xlang=en... priority is given to headers
|
||||||
* For performance, tokens are store globaly in req.app.locals.tokens={xpaganid:xauth}
|
* For performance, tokens are store globaly in req.app.locals.tokens={xpaganid:xauth}
|
||||||
* if xlang is not in conf.languagesAvailable
|
* if xlang is not in conf.languagesAvailable
|
||||||
*
|
*
|
||||||
* @apiHeader {string} xjwt Pagans unique jwt token store in local town Pagans data or "noauth"
|
* @apiHeader {string} xjwt Pagans unique jwt token store in local town Pagans data or "noauth"
|
||||||
* @apiHeader {string} xpseudo Pagans unique Pagan id in uuid format or "nouuid"
|
* @apiHeader {string} xpseudo Pagans unique Pagan id in uuid format or "nouuid"
|
||||||
* @apiHeader {string} xlang the 2 letter langage it request the api (if not exist the 2 first letter of Accept-Language header ) if lang does not exist in the town then en is set (as it always exist in en).
|
* @apiHeader {string} xlang the 2 letter langage it request the api (if not exist the 2 first letter of Accept-Language header ) if lang does not exist in the town then en is set (as it always exist in en).
|
||||||
* @apiHeader {string} xtribe Tribes id where pseudo want to act
|
* @apiHeader {string} xtribe Tribes id where pseudo want to act
|
||||||
* @apiHeader {string} xapp Name of www/xapp folder that host app that send the request
|
* @apiHeader {string} xapp Name of www/xapp folder that host app that send the request
|
||||||
* /tribeid/person/xpseudo.json have accessright on this app store in /tribe/tribeid/www/xapp
|
* /tribeid/person/xpseudo.json have accessright on this app store in /tribe/tribeid/www/xapp
|
||||||
*
|
*
|
||||||
* @apiError missingexposedHeaders it miss an exposedHeaders
|
* @apiError missingexposedHeaders it miss an exposedHeaders
|
||||||
*
|
*
|
||||||
* @apiErrorExample {json} Error-Response:
|
* @apiErrorExample {json} Error-Response:
|
||||||
* HTTP/1/1 404 Not Found
|
* HTTP/1/1 400 Not Found
|
||||||
* {
|
* {
|
||||||
* status:400,
|
* status:400,
|
||||||
* ref:"middleware"
|
* ref:"headers"
|
||||||
* msg:"missingheaders",
|
* msg:"missingheaders",
|
||||||
* data: ["xpseudo","xjwt"]
|
* data: ["headermissing1"]
|
||||||
* }
|
* }
|
||||||
*
|
*@apiErrorExample {json} Error-Response:
|
||||||
* @apiHeaderExample {json} Header-Exemple:
|
* HTTP/1/1 404 Not Found
|
||||||
* {
|
* {
|
||||||
* xtribe:"apache",
|
* status:404,
|
||||||
* xalias:"toto",
|
* ref:"headers"
|
||||||
* xhash:"",
|
* msg:"tribeiddoesnotexist",
|
||||||
* xlang:"en",
|
* data: {xalias}
|
||||||
* xapp:"popular"
|
* }
|
||||||
* }
|
*
|
||||||
*/
|
* @apiHeaderExample {json} Header-Exemple:
|
||||||
req.session = {};
|
* {
|
||||||
const header = {};
|
* xtribe:"apache",
|
||||||
if (!req.header('xlang') && req.header('Content-Language')) req.params.xlang=req.header('Content-Language');
|
* xalias:"toto",
|
||||||
let missingheader = [];
|
* xhash:"",
|
||||||
console.log('req.headers',req.headers)
|
* xdays:"123"
|
||||||
for( const h of conf.api.exposedHeaders ) {
|
* xlang:"en",
|
||||||
//console.log( h, req.header( h ) )
|
* xapp:"popular"
|
||||||
if( req.params[ h ] ) {
|
* }
|
||||||
header[ h ] = req.params[ h ]
|
*/
|
||||||
} else if( req.header( h ) ) {
|
req.session = {};
|
||||||
header[ h ] = req.header( h )
|
const header = {};
|
||||||
} else {
|
if (!req.header("xlang") && req.header("Content-Language"))
|
||||||
missingheader.push(h);
|
req.params.xlang = req.header("Content-Language");
|
||||||
}
|
let missingheader = [];
|
||||||
};
|
console.log("req.headers", req.headers);
|
||||||
//console.log( 'header', header )
|
for (const h of conf.api.exposedHeaders) {
|
||||||
// store in session the header information
|
//console.log( h, req.header( h ) )
|
||||||
req.session.header = header;
|
if (req.params[h]) {
|
||||||
// Each header have to be declared
|
header[h] = req.params[h];
|
||||||
if( missingheader != "" ) {
|
} else if (req.header(h)) {
|
||||||
// bad request
|
header[h] = req.header(h);
|
||||||
return res.status( 400 )
|
} else {
|
||||||
.json( {
|
missingheader.push(h);
|
||||||
ref:"headers",
|
}
|
||||||
msg: "missingheader",
|
}
|
||||||
data: missingheader
|
//console.log( 'header', header )
|
||||||
} );
|
// store in session the header information
|
||||||
};
|
req.session.header = header;
|
||||||
//console.log( req.app.locals.tribeids )
|
// Each header have to be declared
|
||||||
if( !req.app.locals.tribeids.includes( header.xtribe ) ) {
|
if (missingheader != "") {
|
||||||
return res.status( 400 )
|
// bad request
|
||||||
.json( {
|
return res.status(400).json({
|
||||||
ref:"headers",
|
ref: "headers",
|
||||||
msg: 'tribeiddoesnotexist',
|
msg: "missingheader",
|
||||||
moreinfo: header.xtribe
|
data: missingheader,
|
||||||
} );
|
});
|
||||||
}
|
}
|
||||||
if( !conf.api.languages.includes( header.xlang ) ) {
|
//console.log( req.app.locals.tribeids )
|
||||||
console.log('warning language requested does not exist force to en glish')
|
// xtribe == "town" is used during the setup process
|
||||||
header.xlang="en";
|
if (
|
||||||
}
|
!(
|
||||||
next();
|
header.xtribe == "town" || req.app.locals.tribeids.includes(header.xtribe)
|
||||||
|
)
|
||||||
|
) {
|
||||||
|
return res.status(404).json({
|
||||||
|
ref: "headers",
|
||||||
|
msg: "tribeiddoesnotexist",
|
||||||
|
data: { xtribe: header.xtribe },
|
||||||
|
});
|
||||||
|
}
|
||||||
|
if (!conf.api.languages.includes(header.xlang)) {
|
||||||
|
console.log("warning language requested does not exist force to english");
|
||||||
|
header.xlang = "en";
|
||||||
|
}
|
||||||
|
next();
|
||||||
};
|
};
|
||||||
module.exports = checkHeaders;
|
module.exports = checkHeaders;
|
||||||
|
@ -1,42 +1,69 @@
|
|||||||
const fs = require( 'fs-extra' );
|
const fs = require("fs-extra");
|
||||||
const glob = require( 'glob' );
|
const glob = require("glob");
|
||||||
const path = require( 'path' );
|
const path = require("path");
|
||||||
|
|
||||||
const config = require( '../../nationchains/tribes/conf.json' );
|
const config = require("../../nationchains/tribes/conf.json");
|
||||||
|
|
||||||
const hasAccessrighton = ( object, action, ownby ) => {
|
const hasAccessrighton = (object, action, ownby) => {
|
||||||
/*
|
/*
|
||||||
@action (mandatory) : CRUDO
|
@action (mandatory) : CRUDO
|
||||||
@object (mandatory)= name of a folder object in /tribeid space can be a tree for example objects/items
|
@object (mandatory)= name of a folder object in /tribeid space can be a tree for example objects/items
|
||||||
@ownby (option) = list des uuid propriétaire
|
@ownby (option) = list des uuid propriétaire
|
||||||
return next() if all action exist in req.app.local.tokens[UUID].ACCESSRIGHTS.data[object]
|
return next() if all action exist in req.app.local.tokens[UUID].ACCESSRIGHTS.data[object]
|
||||||
OR if last action ="O" and uuid exist in ownBy
|
OR if last action ="O" and uuid exist in ownBy
|
||||||
Careffull if you have many action CRO let O at the end this will force req.right at true if the owner try an action on this object
|
Careffull if you have many action CRO let O at the end this will force req.right at true if the owner try an action on this object
|
||||||
*/
|
|
||||||
return ( req, res, next ) => {
|
need to check first a person exist with this alias in tribe
|
||||||
//console.log( 'err.stack hasAccessrights', err.statck )
|
|
||||||
//console.log( `test accessright on object:${object} for ${req.session.header.xworkon}:`, req.app.locals.tokens[ req.session.header.xpaganid ].ACCESSRIGHTS.data[ req.session.header.xworkon ] )
|
const person = fs.readJsonSync(
|
||||||
req.right = false;
|
`${conf.dirname}/nationchains/tribes/${req.session.header.xtribe}/persons/${req.session.header.xalias}.json`
|
||||||
if( req.app.locals.tokens[ req.session.header.xpaganid ].ACCESSRIGHTS.data[ req.session.header.xworkon ] && req.app.locals.tokens[ req.session.header.xpaganid ].ACCESSRIGHTS.data[ req.session.header.xworkon ][ object ] ) {
|
);
|
||||||
req.right = true;
|
|
||||||
[ ...action ].forEach( a => {
|
|
||||||
if( a == "O" && ownby && ownby.includes( req.session.header.xpaganid ) ) {
|
|
||||||
req.right = true;
|
|
||||||
} else {
|
|
||||||
req.right = req.right && req.app.locals.tokens[ req.session.header.xpaganid ].ACCESSRIGHTS.data[ req.session.header.xworkon ][ object ].includes( a )
|
*/
|
||||||
}
|
|
||||||
} )
|
return (req, res, next) => {
|
||||||
}
|
//console.log( 'err.stack hasAccessrights', err.statck )
|
||||||
//console.log( 'Access data autorise? ', req.right )
|
//console.log( `test accessright on object:${object} for ${req.session.header.xworkon}:`, req.app.locals.tokens[ req.session.header.xpaganid ].ACCESSRIGHTS.data[ req.session.header.xworkon ] )
|
||||||
if( !req.right ) {
|
req.right = false;
|
||||||
return res.status( 403 )
|
if (
|
||||||
.json( {
|
req.app.locals.tokens[req.session.header.xpaganid].ACCESSRIGHTS.data[
|
||||||
info:'forbiddenAccessright',
|
req.session.header.xworkon
|
||||||
ref: 'headers',
|
] &&
|
||||||
moreinfo: {xpaganid:req.session.header.xpaganid,object:object, xworkon:req.session.header.xworkon, action:action}
|
req.app.locals.tokens[req.session.header.xpaganid].ACCESSRIGHTS.data[
|
||||||
} )
|
req.session.header.xworkon
|
||||||
}
|
][object]
|
||||||
next();
|
) {
|
||||||
}
|
req.right = true;
|
||||||
}
|
[...action].forEach((a) => {
|
||||||
|
if (a == "O" && ownby && ownby.includes(req.session.header.xpaganid)) {
|
||||||
|
req.right = true;
|
||||||
|
} else {
|
||||||
|
req.right =
|
||||||
|
req.right &&
|
||||||
|
req.app.locals.tokens[
|
||||||
|
req.session.header.xpaganid
|
||||||
|
].ACCESSRIGHTS.data[req.session.header.xworkon][object].includes(a);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
//console.log( 'Access data autorise? ', req.right )
|
||||||
|
if (!req.right) {
|
||||||
|
return res.status(403).json({
|
||||||
|
info: "forbiddenAccessright",
|
||||||
|
ref: "headers",
|
||||||
|
moreinfo: {
|
||||||
|
xpaganid: req.session.header.xpaganid,
|
||||||
|
object: object,
|
||||||
|
xworkon: req.session.header.xworkon,
|
||||||
|
action: action,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
next();
|
||||||
|
};
|
||||||
|
};
|
||||||
module.exports = hasAccessrighton;
|
module.exports = hasAccessrighton;
|
||||||
|
@ -1,207 +1,106 @@
|
|||||||
const jwt = require("jwt-simple");
|
|
||||||
const fs = require("fs-extra");
|
const fs = require("fs-extra");
|
||||||
const moment = require("moment");
|
|
||||||
const dayjs = require("dayjs");
|
const dayjs = require("dayjs");
|
||||||
const glob = require("glob");
|
const glob = require("glob");
|
||||||
|
const openpgp = require("openpgp");
|
||||||
|
|
||||||
const conf = require("../../nationchains/tribes/conf.json");
|
const conf = require("../../nationchains/tribes/conf.json");
|
||||||
|
|
||||||
const isAuthenticated = (req, res, next) => {
|
const isAuthenticated = async (req, res, next) => {
|
||||||
//once a day rm oldest tokens than 24hours
|
// once a day rm oldest tokens than 24hours tag job by adding tmp/tokensmenagedone{day}
|
||||||
const currentday = dayjs().date();
|
const currentday = dayjs().date();
|
||||||
console.log("dayjs", currentday);
|
|
||||||
console.log(
|
console.log(
|
||||||
"test si menagedone" + currentday,
|
"if menagedone" + currentday,
|
||||||
!fs.existsSync(`${conf.dirname}/tmp/tokensmenagedone${currentday}`)
|
!fs.existsSync(`${__base}tmp/tokensmenagedone${currentday}`)
|
||||||
);
|
);
|
||||||
if (!fs.existsSync(`${conf.dirname}/tmp/tokensmenagedone${currentday}`)) {
|
if (!fs.existsSync(`${__base}/tmp/tokens`))
|
||||||
|
fs.mkdirSync(`${__base}tmp/tokens`);
|
||||||
|
if (!fs.existsSync(`${__base}tmp/tokensmenagedone${currentday}`)) {
|
||||||
// clean oldest
|
// clean oldest
|
||||||
const tsday = dayjs().date();
|
const tsday = dayjs().valueOf(); // now in timestamp format
|
||||||
console.log("tsday", tsday);
|
glob.sync(`${__base}tmp/tokensmenagedone*`).forEach((f) => {
|
||||||
glob.sync(`${conf.dirname}/tmp/tokensmenagedone*`).forEach((f) => {
|
|
||||||
fs.removeSync(f);
|
fs.removeSync(f);
|
||||||
});
|
});
|
||||||
glob.sync(`${conf.dirname}/tmp/tokens/*.json`).forEach((f) => {
|
glob.sync(`${__base}tmp/tokens/*.json`).forEach((f) => {
|
||||||
fs.readJson(f, (err, data) => {
|
if (tsday - parseInt(f.split("_")[1]) > 86400000) fs.remove(f);
|
||||||
if (!err && tsday - data.timestamp > 86400000) fs.remove(f);
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
//Check register in tmp/tokens/
|
//Check register in tmp/tokens/
|
||||||
console.log("isRegister?");
|
console.log("isAuthenticate?");
|
||||||
const resnotauth = {
|
const resnotauth = {
|
||||||
ref: "headers",
|
ref: "headers",
|
||||||
msg: "notauthenticated",
|
msg: "notauthenticated",
|
||||||
data: {
|
data: {
|
||||||
xalias: req.session.header.xalias,
|
xalias: req.session.header.xalias,
|
||||||
xtribe: req.session.header.xtribe,
|
xaliasexists: true,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
console.lolg(req.session.header)
|
console.log(req.session.header);
|
||||||
if (req.session.header.xalias == "anonymous") res.status(401).json(resnotauth);
|
if (req.session.header.xalias == "anonymous") {
|
||||||
|
console.log("alias anonymous means not auth");
|
||||||
const tmpfs = `${conf.dirname}/tmp/tokens/${req.session.header.xtribe}_${req.session.header.xalias}_${req.session.header.hash}.json`;
|
return res.status(401).json(resnotauth);
|
||||||
if (!fs.exists(tmpfs)) {
|
|
||||||
//check if pseudo exist as a pagan in pagans/ and as a person in xtribe/persons/ and check hash is coming from publickey
|
|
||||||
if (
|
|
||||||
!fs.existsSync(
|
|
||||||
`${conf.dirname}/nationchains/tribes/${req.session.header.xtribe}/persons/${req.session.header.xalias}.json`
|
|
||||||
)
|
|
||||||
) {
|
|
||||||
console.log(
|
|
||||||
`pseudo:${req.session.header.xalias} does not exist for xtribe ${req.session.header.xtribe}`
|
|
||||||
);
|
|
||||||
res.status(401).json(resnotauth);
|
|
||||||
}
|
|
||||||
if (
|
|
||||||
!fs.existsSync(
|
|
||||||
`${conf.dirname}/nationchains/pagans/${req.session.header.xalias}.json`
|
|
||||||
)
|
|
||||||
) {
|
|
||||||
console.log(
|
|
||||||
`pseudo:${req.session.header.xalias} does not exist as a pagan`
|
|
||||||
);
|
|
||||||
res.status(401).json(resnotauth);
|
|
||||||
}
|
|
||||||
const person = fs.readJsonSync(
|
|
||||||
`${conf.dirname}/nationchains/tribes/${req.session.header.xtribe}/persons/${req.session.header.xalias}.json`
|
|
||||||
);
|
|
||||||
const pagan = fs.readJsonSync(
|
|
||||||
`${conf.dirname}/nationchains/pagans/${req.session.header.xalias}.json`
|
|
||||||
);
|
|
||||||
//check hash with publickey pagan.publickey
|
|
||||||
// if good => create a /tmp/tokens/xtribe_xalias_xhash.json ={timestamp}
|
|
||||||
// if not good res.json(resnotauth)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const tmpfs = `${__base}tmp/tokens/${req.session.header.xalias}_${
|
||||||
|
req.session.header.xdays
|
||||||
|
}_${req.session.header.xhash.substring(20, 200)}`;
|
||||||
|
console.log(tmpfs);
|
||||||
|
if (!fs.existsSync(tmpfs)) {
|
||||||
|
// need to check detached sign
|
||||||
|
let publickey;
|
||||||
|
if (
|
||||||
|
fs.existsSync(
|
||||||
|
`${__base}nationchains/pagans/itm/${req.session.header.xalias}.json`
|
||||||
|
)
|
||||||
|
) {
|
||||||
|
const pagan = fs.readJsonSync(
|
||||||
|
`${__base}nationchains/pagans/itm/${req.session.header.xalias}.json`
|
||||||
|
);
|
||||||
|
publickey = pagan.publicKey;
|
||||||
|
} else {
|
||||||
|
resnotauth.data.xaliasexists = false;
|
||||||
|
if (req.body.publickey) {
|
||||||
|
publickey = req.body.publickey;
|
||||||
|
} else {
|
||||||
|
console.log("alias unknown");
|
||||||
|
return res.status(404).send(resnotauth);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
console.log(publickey);
|
||||||
|
console.log(Buffer.from(req.session.header.xhash, "base64").toString());
|
||||||
|
const publicKey = await openpgp.readKey({ armoredKey: publickey });
|
||||||
|
const msg = await openpgp.createMessage({
|
||||||
|
text: `${req.session.header.xalias}_${req.session.header.xdays}`,
|
||||||
|
});
|
||||||
|
const signature = await openpgp.readSignature({
|
||||||
|
armoredSignature: Buffer.from(
|
||||||
|
req.session.header.xhash,
|
||||||
|
"base64"
|
||||||
|
).toString(),
|
||||||
|
});
|
||||||
|
console.log(msg);
|
||||||
|
console.log(signature);
|
||||||
|
console.log(publicKey);
|
||||||
|
const checkauth = await openpgp.verify({
|
||||||
|
message: msg,
|
||||||
|
signature: signature,
|
||||||
|
verificationKeys: publicKey,
|
||||||
|
});
|
||||||
|
console.log(checkauth);
|
||||||
|
console.log(checkauth.signatures[0].keyID);
|
||||||
|
//console.log(await checkauth.signatures[0].signature);
|
||||||
|
//console.log(await checkauth.signatures[0].verified);
|
||||||
|
|
||||||
|
const { check, keyID } = checkauth.signatures[0];
|
||||||
|
try {
|
||||||
|
await check; // raise an error if necessary
|
||||||
|
fs.outputFileSync(tmpfs, req.session.header.xhash, "utf8");
|
||||||
|
} catch (e) {
|
||||||
|
resnotauth.msg = "signaturefailed";
|
||||||
|
console.log("not auth fail sign");
|
||||||
|
return res.status(401).send(resnotauth);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
console.log("Authenticated");
|
||||||
next();
|
next();
|
||||||
};
|
};
|
||||||
const isAuthenticatedold = (req, res, next) => {
|
|
||||||
/*
|
|
||||||
check if authenticated with valid token
|
|
||||||
if not => set req.session.header.xjwt=1
|
|
||||||
if yes => set for xWorkon
|
|
||||||
req.session.header.accessrights={
|
|
||||||
app:{'tribeid:website':[liste of menu]},
|
|
||||||
data:{ "sitewebsrc": "RWCDO",
|
|
||||||
"contacts": "RWCDO"}}
|
|
||||||
Liste of menu is linked with the app tht h
|
|
||||||
ave to be consistent with accessrights.data
|
|
||||||
data, list of object accessright Read Write Create Delete Owner
|
|
||||||
a xuuid can read any objet if R
|
|
||||||
if O wner means that it can only read write its object create by himself
|
|
||||||
*/
|
|
||||||
console.log("isAuthenticated()?");
|
|
||||||
//console.log( 'req.app.locals.tokens', req.app.locals.tokens )
|
|
||||||
//console.log( 'req.session.header', req.session.header );
|
|
||||||
// Check if token exist or not
|
|
||||||
req.session.header.accessrights = { app: "", data: {} };
|
|
||||||
if (
|
|
||||||
req.session.header.xalias == "1" ||
|
|
||||||
!req.app.locals.tokens[req.session.header.xalias]
|
|
||||||
) {
|
|
||||||
console.log(
|
|
||||||
`isAuthenticated no : uuid=1 (value=${req.session.header.xalias}) or locals.tokens[uuid] empty `
|
|
||||||
);
|
|
||||||
console.log(
|
|
||||||
"req.app.locals.tokens de xalias",
|
|
||||||
req.app.locals.tokens[req.session.header.xalias]
|
|
||||||
);
|
|
||||||
console.log(
|
|
||||||
"list key uuid de req.app.locals.tokens",
|
|
||||||
Object.keys(req.app.locals.tokens)
|
|
||||||
);
|
|
||||||
req.session.header.xjwt = "1";
|
|
||||||
} else if (
|
|
||||||
req.app.locals.tokens[req.session.header.xalias].TOKEN !==
|
|
||||||
req.session.header.xjwt
|
|
||||||
) {
|
|
||||||
// console.log(req.session.header.xuuid);
|
|
||||||
// console.log(req.session.header.xjwt);
|
|
||||||
// update tokens from file in case recently logged
|
|
||||||
try {
|
|
||||||
console.log(
|
|
||||||
"token not in list of token (req.app.locals.tokens) try to refresh from file"
|
|
||||||
);
|
|
||||||
req.app.locals.tokens = fs.readJsonSync(`${conf.tmp}/tokens.json`);
|
|
||||||
} catch (err) {
|
|
||||||
console.log(
|
|
||||||
`check isAuthenticated issue in reading ${conf.tmp}/tokens.json`
|
|
||||||
);
|
|
||||||
}
|
|
||||||
if (
|
|
||||||
req.app.locals.tokens[req.session.header.xalias].TOKEN !==
|
|
||||||
req.session.header.xjwt
|
|
||||||
) {
|
|
||||||
// if still does not exist then out
|
|
||||||
console.log("isAuthenticated no, token outdated");
|
|
||||||
req.session.header.xjwt = "1";
|
|
||||||
req.session.header.xalias = "1";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (req.session.header.xjwt == "1") {
|
|
||||||
//return res.status( 403 )
|
|
||||||
return res.status(403).json({
|
|
||||||
info: ["forbiddenAccess"],
|
|
||||||
model: "Pagans",
|
|
||||||
moreinfo: "isAuthenticated faill",
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
console.log("isAuthenticated yes");
|
|
||||||
if (req.app.locals.tokens[req.session.header.xalias]) {
|
|
||||||
//console.log( `accessright pour ${req.session.header.xalias}`, req.app.locals.tokens[ req.session.header.xalias ].ACCESSRIGHTS );
|
|
||||||
//set header.accessrights from tokens.json
|
|
||||||
req.session.header.accessrights =
|
|
||||||
req.app.locals.tokens[req.session.header.xalias].ACCESSRIGHTS;
|
|
||||||
} else {
|
|
||||||
// case of bypass no accessright available
|
|
||||||
req.session.header.accessrights = {};
|
|
||||||
}
|
|
||||||
// Once per day, clean old token
|
|
||||||
const currentday = moment().date();
|
|
||||||
console.log(
|
|
||||||
"test si menagedone" + currentday,
|
|
||||||
!fs.existsSync(`${conf.tmp}/menagedone${currentday}`)
|
|
||||||
);
|
|
||||||
if (!fs.existsSync(`${conf.tmp}/menagedone${currentday}`)) {
|
|
||||||
glob.sync(`${conf.tmp}/menagedone*`).forEach((f) => {
|
|
||||||
fs.remove(f, (err) => {
|
|
||||||
if (err) {
|
|
||||||
console.log("err remove menagedone", err);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
glob.sync(`${conf.tmp}/mdcreator*.log`).forEach((f) => {
|
|
||||||
fs.remove(f, (err) => {
|
|
||||||
if (err) {
|
|
||||||
console.log("err remove mdcreator log", err);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
const newtokens = {};
|
|
||||||
for (const k of Object.keys(req.app.locals.tokens)) {
|
|
||||||
try {
|
|
||||||
const decodedToken = jwt.decode(
|
|
||||||
req.app.locals.tokens[k].TOKEN,
|
|
||||||
conf.jwtSecret
|
|
||||||
);
|
|
||||||
//console.log( moment( decodedToken.expiration ), moment() )
|
|
||||||
//console.log( moment( decodedToken.expiration ) >= moment() )
|
|
||||||
if (moment(decodedToken.expiration) >= moment()) {
|
|
||||||
newtokens[k] = req.app.locals.tokens[k];
|
|
||||||
}
|
|
||||||
} catch (err) {
|
|
||||||
console.log("Check isAuthenticated cleaning token ", err);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
req.app.locals.tokens = newtokens;
|
|
||||||
fs.outputJsonSync(`${conf.tmp}/tokens.json`, newtokens);
|
|
||||||
fs.writeFileSync(
|
|
||||||
`${conf.tmp}/menagedone${currentday}`,
|
|
||||||
"fichier semaphore to clean data each day can be deleted with no consequence",
|
|
||||||
"utf-8"
|
|
||||||
);
|
|
||||||
}
|
|
||||||
next();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
module.exports = isAuthenticated;
|
module.exports = isAuthenticated;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"missingheader":"Some header miss to have a valid request: {{#data}} {{.}} {{/data}}",
|
"missingheader": "Some header miss to have a valid request: {{#data}} {{.}} {{/data}}",
|
||||||
"tribeiddoesnotexist":"Header xtribe: {{data}} does not exist in this town",
|
"tribeiddoesnotexist": "Header xtribe: {{data.xtribe}} does not exist in this town",
|
||||||
"authenticated":"Your perso{{{xpseudo}}} is register for tribe {{{xtribe}}}",
|
"authenticated": "Your alias{{{data.xalias}}} is authenticated",
|
||||||
"notauthenticated":"Your pseudo {{xpseudo}} are not register into tribe {{xtribe}} ",
|
"notauthenticated": "Your alias: {{data.xalias}} is not authenticated {{^data.aliasexists}} and this alias does not exist !{{/data.aliasexists}}",
|
||||||
"forbiddenAccessright":"Pagan {{data.xpseudo}} has not access right to act {{data.action}} onto object {{data.object}} for tribe {{mor.xworkon}}"
|
"forbiddenAccessright": "Pagan {{data.xalias}} has not access right to act {{data.action}} onto object {{data.object}} for tribe {{mor.xworkon}}"
|
||||||
}
|
}
|
||||||
|
20
api/models/Notifications.js
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
const glob = require("glob");
|
||||||
|
const path = require("path");
|
||||||
|
const fs = require("fs-extra");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* To manage any communication between Pagan
|
||||||
|
* mayor druid emailing/sms/paper from tribe register smtp, simcard, mail api to Person(s) / Pagan(s)
|
||||||
|
* volatile notification message from tribe activities to Pagans / person ()
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
const Notifications = {};
|
||||||
|
|
||||||
|
Notifications.send = (data) => {
|
||||||
|
const ret = {};
|
||||||
|
console.log("TODO dev notification emailing");
|
||||||
|
return ret;
|
||||||
|
};
|
||||||
|
|
||||||
|
module.exports = Notifications;
|
@ -1,97 +1,125 @@
|
|||||||
const glob = require("glob");
|
const glob = require("glob");
|
||||||
const path = require("path");
|
const path = require("path");
|
||||||
|
const dayjs = require("dayjs");
|
||||||
const fs = require("fs-extra");
|
const fs = require("fs-extra");
|
||||||
const axios = require('axios');
|
const axios = require("axios");
|
||||||
const openpgp = require('openpgp');
|
const openpgp = require("openpgp");
|
||||||
const conf=require('../../nationchains/tribes/conf.json')
|
var conf = {};
|
||||||
|
if (fs.existsSync("../../nationchains/tribes/conf.json")) {
|
||||||
|
conf = require("../../nationchains/tribes/conf.json");
|
||||||
|
}
|
||||||
|
console.log(conf);
|
||||||
/**
|
/**
|
||||||
* Pagan Management numeric Identity
|
* Pagan Management numeric Identity and Person (Person = Pagan Id + tribe)
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const Pagans= {}
|
const Pagans = {};
|
||||||
|
|
||||||
Pagans.createId = async (alias,passphrase) =>{
|
Pagans.create = (alias, publicKey) => {
|
||||||
/**
|
/**
|
||||||
* @param {string} alias a unique alias that identify an identity
|
* @param {string} alias a unique alias that identify an identity
|
||||||
* @param {string} passphrase a string to cipher the publicKey (can be empty, less secure but simpler)
|
* @param {string} publicKey a publicKey
|
||||||
* @return {publicKey,privateKey} with userIds = [{alias}]
|
* @return {object} { status: 200, data: { alias, publicKey } }
|
||||||
*/
|
* xhash was checked by isauthenticated
|
||||||
let apxpagans={};
|
* @todo use Odmdb to add a pagan
|
||||||
if (fs.existsSync(`${conf.dirname}/nationchains/pagans/idx/alias_all.json`)){
|
*/
|
||||||
apxpagans = fs.readJsonSync(
|
let apxpagans = {};
|
||||||
`${conf.dirname}/nationchains/pagans/idx/alias_all.json`
|
if (fs.existsSync(`${__base}nationchains/pagans/idx/alias_all.json`)) {
|
||||||
);
|
apxpagans = fs.readJsonSync(
|
||||||
}
|
`${__base}nationchains/pagans/idx/alias_all.json`
|
||||||
if (Object.keys(apxpagans).includes(alias)){
|
);
|
||||||
return {status:409,ref:"pagans",msg:"aliasalreadyexist"}
|
}
|
||||||
};
|
apxpagans[alias] = { alias, publicKey };
|
||||||
const {privateKey,publicKey} = await openpgp.generateKey({
|
fs.outputJsonSync(
|
||||||
type: "ecc", // Type of the key, defaults to ECC
|
`${__base}nationchains/pagans/idx/alias_all.json`,
|
||||||
curve: "curve25519", // ECC curve name, defaults to curve25519
|
apxpagans
|
||||||
userIDs: [{ alias: alias }], // you can pass multiple user IDs
|
);
|
||||||
passphrase: passphrase, // protects the private key
|
fs.outputJsonSync(`${__base}nationchains/pagans/itm/${alias}.json`, {
|
||||||
format: "armored", // output key format, defaults to 'armored' (other options: 'binary' or 'object')
|
|
||||||
});
|
|
||||||
apxpagans[alias]={alias,publicKey};
|
|
||||||
fs.outputJsonSync(`${conf.dirname}/nationchains/pagans/idx/alias_all.json`,apxpagans);
|
|
||||||
fs.outputJsonSync(`${conf.dirname}/nationchains/pagans/itm/${alias}.json`,{alias,publicKey});
|
|
||||||
return {status:200, data:{alias,privateKey,publicKey}}
|
|
||||||
}
|
|
||||||
|
|
||||||
//console.log( Pagans.generateKey('toto',''))
|
|
||||||
Pagans.detachedSignature = async (pubK, privK, passphrase, message) => {
|
|
||||||
/**
|
|
||||||
* @pubK {string} a text public key
|
|
||||||
* @privK {string} a test priv key
|
|
||||||
* @passphrase {string} used to read privK
|
|
||||||
* @message {string} message to sign
|
|
||||||
* @Return a detached Signature of the message
|
|
||||||
*/
|
|
||||||
const publicKey = await openpgp.readKey({ armoredKey: pubK });
|
|
||||||
const privateKey = await openpgp.decryptKey({
|
|
||||||
privateKey: await openpgp.readPrivateKey({ armoredKey: privK }),
|
|
||||||
passphrase,
|
|
||||||
});
|
|
||||||
const msg = await openpgp.createMessage({ text: message });
|
|
||||||
return await openpgp.sign({ msg, signinKeys: privK, detached: true });
|
|
||||||
};
|
|
||||||
Pagans.checkdetachedSignature = async (
|
|
||||||
alias,
|
alias,
|
||||||
pubK,
|
publicKey,
|
||||||
detachedSignature,
|
});
|
||||||
message
|
return { status: 200, data: { alias, publicKey } };
|
||||||
) => {
|
};
|
||||||
/**
|
|
||||||
* @alias {string} alias link to the publicKey
|
Pagans.personupdate = (alias, tribe, persondata) => {
|
||||||
* @pubK {string} publiKey text format
|
//later use Odmdb ans schema person to manage this
|
||||||
* @detachedSignature {string} a detachedsignatured get from apx.detachedSignature
|
/**
|
||||||
* @message {string} the message signed
|
* @Param {string} alias pagan unique id
|
||||||
* @return {boolean} true the message was signed by alias
|
* @Param {string} tribe tribe id in this town
|
||||||
* false the message was not signed by alias
|
* @Param {object} persondata that respect /nationchains/schema/person.json + nationchains/tribe/tribeid/schema/personextented.json
|
||||||
*/
|
* @return create or update a person /tribe/tribeid/person/alias.json
|
||||||
const publicKey = await openpgp.readKey({ armoredKey: pubK });
|
*/
|
||||||
const msg = await openpgp.createMessage({ text: message });
|
let person = {
|
||||||
const signature = await openpgp.readSignature({
|
alias: alias,
|
||||||
armoredSignature: detachedSignature, // parse detached signature
|
dt_create: dayjs(),
|
||||||
});
|
accessrights: { profil: "user" },
|
||||||
const verificationResult = await openpgp.verify({
|
|
||||||
msg, // Message object
|
|
||||||
signature,
|
|
||||||
verificationKeys: publicKey
|
|
||||||
});
|
|
||||||
const { verified, keyID } = verificationResult.signatures[0];
|
|
||||||
try {
|
|
||||||
await verified; // throws on invalid signature
|
|
||||||
console.log("Signed by key id " + keyID.toHex());
|
|
||||||
return KeyId.toHex().alias == alias;
|
|
||||||
} catch (e) {
|
|
||||||
console.log("Signature could not be verified: " + e.message);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
if (fs.existsSync(`${__base}tribes/${tribe}/person/itm/${alias}.json`)) {
|
||||||
module.exports=Pagans;
|
person = fs.readJsonSync(
|
||||||
|
`${__base}tribes/${tribe}/person/itm/${alias}.json`
|
||||||
|
);
|
||||||
|
person.dt_update = dayjs();
|
||||||
|
}
|
||||||
|
Object.keys(persondata).forEach((d) => {
|
||||||
|
person[d] = persondata[d];
|
||||||
|
});
|
||||||
|
//const checkjson= Checkjson.schema.data = (fs.readJsonSync(`${__base}}nationchains/schema/person.json`, person, false)
|
||||||
|
// if checkjson.status==200 create /update with odmdb to update index data
|
||||||
|
// see odmdb that did all and return standard message
|
||||||
|
fs.outputJSONSync(
|
||||||
|
`${__base}tribes/${tribe}/person/itm/${alias}.json`,
|
||||||
|
person,
|
||||||
|
{
|
||||||
|
space: 2,
|
||||||
|
}
|
||||||
|
);
|
||||||
|
return {
|
||||||
|
status: 200,
|
||||||
|
ref: "Pagans",
|
||||||
|
msg: "successfullupdate",
|
||||||
|
data: { tribe: tribe },
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
Pagans.authenticatedetachedSignature = async (
|
||||||
|
alias,
|
||||||
|
pubK,
|
||||||
|
detachedSignature,
|
||||||
|
message
|
||||||
|
) => {
|
||||||
|
/**
|
||||||
|
* Check that a message was signed with a privateKey from a publicKey
|
||||||
|
* This is not necessary if isAuthenticated, but can be usefull to double check
|
||||||
|
* @TODO finish it and implement it also in /apxpagan.js for browser
|
||||||
|
* @alias {string} alias link to the publicKey
|
||||||
|
* @pubK {string} publiKey text format
|
||||||
|
* @detachedSignature {string} a detachedsignatured get from apx.detachedSignature
|
||||||
|
* @message {string} the message signed
|
||||||
|
* @return {boolean} true the message was signed by alias
|
||||||
|
* false the message was not signed by alias
|
||||||
|
*/
|
||||||
|
const publicKey = await openpgp.readKey({ armoredKey: pubK });
|
||||||
|
const msg = await openpgp.createMessage({ text: message });
|
||||||
|
const signature = await openpgp.readSignature({
|
||||||
|
armoredSignature: detachedSignature, // parse detached signature
|
||||||
|
});
|
||||||
|
const verificationResult = await openpgp.verify({
|
||||||
|
msg, // Message object
|
||||||
|
signature,
|
||||||
|
verificationKeys: publicKey,
|
||||||
|
});
|
||||||
|
const { verified, keyID } = verificationResult.signatures[0];
|
||||||
|
try {
|
||||||
|
await verified; // throws on invalid signature
|
||||||
|
console.log("Signed by key id " + keyID.toHex());
|
||||||
|
return KeyId.toHex().alias == alias;
|
||||||
|
} catch (e) {
|
||||||
|
console.log("Signature could not be verified: " + e.message);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
module.exports = Pagans;
|
||||||
|
@ -4,6 +4,7 @@ const dnsSync = require("dns-sync");
|
|||||||
const mustache = require("mustache");
|
const mustache = require("mustache");
|
||||||
const readlineSync = require("readline-sync");
|
const readlineSync = require("readline-sync");
|
||||||
|
|
||||||
|
const Wwws = require("../models/Wwws.js");
|
||||||
/**
|
/**
|
||||||
* This Setup is run at the first installation
|
* This Setup is run at the first installation
|
||||||
* This is not an exportable module
|
* This is not an exportable module
|
||||||
@ -28,9 +29,9 @@ Setup.check = () => {
|
|||||||
);
|
);
|
||||||
process.exit();
|
process.exit();
|
||||||
}
|
}
|
||||||
if (fs.existsSync("./nationchains/tribes/conf.json")) {
|
if (fs.existsSync("./nationchains/www/nginx_adminapx.conf")) {
|
||||||
console.log(
|
console.log(
|
||||||
"\x1b[31m Be carefull you already have a town set in ./nationchains/tribes/index.conf.json, check and remove it if you want to setup this town."
|
"\x1b[31m Be carefull you already have a town set, check http://adminapx or remove ./nationchains/www/nginx_adminapx.conf to reset a sync with the last nationchains"
|
||||||
);
|
);
|
||||||
process.exit();
|
process.exit();
|
||||||
}
|
}
|
||||||
@ -38,19 +39,51 @@ Setup.check = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
Setup.init = async () => {
|
Setup.init = async () => {
|
||||||
|
/**
|
||||||
|
* create empty nationchains
|
||||||
|
* rsync all subfolder nationchains except the tribes/ and /www/nginx_adminapx.conf
|
||||||
|
*
|
||||||
|
* Then to send new version we fix a master production
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
const initconf = fs.readJSONSync(
|
||||||
|
"./nationchains/www/adminapx/static/tpldata/initconf.json"
|
||||||
|
);
|
||||||
|
initconf.sudoerUser = process.env.USER;
|
||||||
|
initconf.dirname = path.resolve(`${__dirname}/../../`);
|
||||||
|
// To allow to serve the nation website until the end
|
||||||
|
initconf.nginx.include.push(
|
||||||
|
`${townconf.dirname}/nationchains/www/nginx_*.conf`
|
||||||
|
);
|
||||||
|
// To allow to serve tribes web site
|
||||||
|
initconf.nginx.include.push(
|
||||||
|
`${townconf.dirname}/nationchains/tribes/*/www/nginx_*.conf`
|
||||||
|
);
|
||||||
|
initconf.nginx.logs = `${townconf.dirname}/nationchains/logs/nginx`;
|
||||||
|
initconf.nginx.website = "adminapx";
|
||||||
|
initconf.nginx.fswww = "nationchains/"; //for a local tribe nationchains/tribes/tribeid
|
||||||
|
initconf.nginx.tribeid = "town";
|
||||||
|
initconf.nginx.pageindex = "index_en.html";
|
||||||
|
const nginxconf = Wwws.apxtribinstall(initconf);
|
||||||
|
if (nginxconf.status == 200) {
|
||||||
|
}
|
||||||
|
};
|
||||||
|
if (Setup.check()) Setup.init();
|
||||||
|
|
||||||
|
// After testing remove all stuff after this line
|
||||||
|
|
||||||
|
Setup.initold = async () => {
|
||||||
// Get standard conf and current data
|
// Get standard conf and current data
|
||||||
const townconf = fs.readJsonSync("./nationchains/www/adminapx/townconf.json");
|
const townconf = fs.readJsonSync("./nationchains/www/adminapx/townconf.json");
|
||||||
const apxnations = fs.readJsonSync(
|
const apxnations = fs.readJsonSync(
|
||||||
`./nationchains/nations/idx/nationId_all.json`
|
`./nationchains/nations/idx/nationId_all.json`
|
||||||
);
|
);
|
||||||
const apxtowns = fs.readJsonSync(`./nationchains/towns/idx/townId_all.json`);
|
const apxtowns = fs.readJsonSync(`./nationchains/towns/idx/townId_all.json`);
|
||||||
|
|
||||||
let apxpagans={}
|
let apxpagans = {};
|
||||||
if (fs.existsSync(`./nationchains/pagans/idx/alias_all.json`)){
|
if (fs.existsSync(`./nationchains/pagans/idx/alias_all.json`)) {
|
||||||
apxpagans = fs.readJsonSync(
|
apxpagans = fs.readJsonSync(`./nationchains/pagans/idx/alias_all.json`);
|
||||||
`./nationchains/pagans/idx/alias_all.json`
|
}
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!Object.keys(apxnations).includes(townconf.nationId)) {
|
if (!Object.keys(apxnations).includes(townconf.nationId)) {
|
||||||
console.log(
|
console.log(
|
||||||
@ -95,7 +128,7 @@ Setup.init = async () => {
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
process.exit();
|
process.exit();
|
||||||
|
|
||||||
// saved and change nginx conf
|
// saved and change nginx conf
|
||||||
if (!fs.existsSync("/etc/nginx/nginxconf.saved")) {
|
if (!fs.existsSync("/etc/nginx/nginxconf.saved")) {
|
||||||
fs.moveSync("/etc/nginx/nginx.conf", "/etc/nginx/nginxconf.saved");
|
fs.moveSync("/etc/nginx/nginx.conf", "/etc/nginx/nginxconf.saved");
|
||||||
@ -112,6 +145,16 @@ Setup.init = async () => {
|
|||||||
mustache.render(tplnginxconf, townconf),
|
mustache.render(tplnginxconf, townconf),
|
||||||
"utf8"
|
"utf8"
|
||||||
);
|
);
|
||||||
|
//proxyparam
|
||||||
|
const proxy_params = fs.readFileSync(
|
||||||
|
"./nationchains/www/adminapx/nginx/proxy_params.mustache",
|
||||||
|
"utf8"
|
||||||
|
);
|
||||||
|
fs.outputFileSync(
|
||||||
|
"/etc/nginx/proxy_params",
|
||||||
|
mustache.render(proxy_params, townconf),
|
||||||
|
"utf8"
|
||||||
|
);
|
||||||
const tplnginxwww = fs.readFileSync(
|
const tplnginxwww = fs.readFileSync(
|
||||||
"./nationchains/www/adminapx/nginx/modelwebsite.conf.mustache",
|
"./nationchains/www/adminapx/nginx/modelwebsite.conf.mustache",
|
||||||
"utf8"
|
"utf8"
|
||||||
@ -124,8 +167,10 @@ Setup.init = async () => {
|
|||||||
fs.outputJsonSync("./nationchains/tribes/conf.json", townconf, {
|
fs.outputJsonSync("./nationchains/tribes/conf.json", townconf, {
|
||||||
spaces: 2,
|
spaces: 2,
|
||||||
});
|
});
|
||||||
|
// Integrer cette partie du setup en inteactif.
|
||||||
|
// l'objectif du setup est de rendere accessible adminapx en local (IP local) ou production IP public
|
||||||
//CREATE A TOWN setup local voir utiliser towns.create
|
//CREATE A TOWN setup local voir utiliser towns.create
|
||||||
townconf.town = {
|
/* townconf.town = {
|
||||||
townId: townconf.townId,
|
townId: townconf.townId,
|
||||||
nationId: townconf.nationId,
|
nationId: townconf.nationId,
|
||||||
url: `http://${townconf.dns[0]}`,
|
url: `http://${townconf.dns[0]}`,
|
||||||
@ -133,9 +178,13 @@ Setup.init = async () => {
|
|||||||
mayorid: townconf.mayorId,
|
mayorid: townconf.mayorId,
|
||||||
status: "unchain",
|
status: "unchain",
|
||||||
};
|
};
|
||||||
apxtowns[townconf.townId]=townconf.town;
|
apxtowns[townconf.townId] = townconf.town;
|
||||||
fs.outputJsonSync(`./nationchains/towns/idx/townId_all.json`,apxtowns);
|
fs.outputJsonSync(`./nationchains/towns/idx/townId_all.json`, apxtowns);
|
||||||
fs.outputJsonSync(`./nationchains/towns/itm/${townconf.townId}.json`,townconf.town,{spaces:2});
|
fs.outputJsonSync(
|
||||||
|
`./nationchains/towns/itm/${townconf.townId}.json`,
|
||||||
|
townconf.town,
|
||||||
|
{ spaces: 2 }
|
||||||
|
);
|
||||||
// Create tribe id voir a utiliser tribes.create()
|
// Create tribe id voir a utiliser tribes.create()
|
||||||
townconf.tribe = {
|
townconf.tribe = {
|
||||||
tribeId: townconf.tribeId,
|
tribeId: townconf.tribeId,
|
||||||
@ -145,27 +194,47 @@ Setup.init = async () => {
|
|||||||
townId: townconf.townId,
|
townId: townconf.townId,
|
||||||
};
|
};
|
||||||
//tribe does not exist in a new town
|
//tribe does not exist in a new town
|
||||||
apxtribes={}
|
apxtribes = {};
|
||||||
apxtribes[townconf.tribeId]=townconf.tribe;
|
apxtribes[townconf.tribeId] = townconf.tribe;
|
||||||
fs.outputJsonSync(`./nationchains/tribes/idx/tribeId_all.json`,apxtribes);
|
fs.outputJsonSync(`./nationchains/tribes/idx/tribeId_all.json`, apxtribes);
|
||||||
fs.outputJsonSync(`./nationchains/tribes/itm/${townconf.tribeId}.json`,townconf.tribe,{spaces:2});
|
fs.outputJsonSync(
|
||||||
|
`./nationchains/tribes/itm/${townconf.tribeId}.json`,
|
||||||
|
townconf.tribe,
|
||||||
|
{ spaces: 2 }
|
||||||
|
);
|
||||||
fs.ensureDirSync(`./nationchains/tribes/${townconf.tribeId}/logs/nginx`);
|
fs.ensureDirSync(`./nationchains/tribes/${townconf.tribeId}/logs/nginx`);
|
||||||
|
|
||||||
//CREATE a mayorId pagans if it does not exist
|
//CREATE a mayorId pagans if it does not exist
|
||||||
if (!apxpagans[townconf.mayorId]){
|
if (!apxpagans[townconf.mayorId]) {
|
||||||
const Pagans=require('./Pagans');
|
const Pagans = require("./Pagans");
|
||||||
const createPagans=await Pagans.createId(townconf.mayorId,townconf.passphrase);
|
const createPagans = await Pagans.createId(
|
||||||
if (createPagans.status==200){
|
townconf.mayorId,
|
||||||
fs.outputFileSync(`./${townconf.mayorId}_PrivateKey.txt`,createPagans.data.privateKey,"utf8");
|
townconf.passphrase
|
||||||
fs.outputFileSync(`./${townconf.mayorId}_PublicKey.txt`,createPagans.data.publicKey,"utf8");
|
);
|
||||||
console.log(`\x1b[43mCut paste your keys /${townconf.mayorId}_PrivateKey.txt /${townconf.mayorId}_PublicKey.txt \x1b[0m`)
|
if (createPagans.status == 200) {
|
||||||
}else{
|
fs.outputFileSync(
|
||||||
console.log('Error at Pagan creation ');
|
`./${townconf.mayorId}_PrivateKey.txt`,
|
||||||
|
createPagans.data.privateKey,
|
||||||
|
"utf8"
|
||||||
|
);
|
||||||
|
fs.outputFileSync(
|
||||||
|
`./${townconf.mayorId}_PublicKey.txt`,
|
||||||
|
createPagans.data.publicKey,
|
||||||
|
"utf8"
|
||||||
|
);
|
||||||
|
console.log(
|
||||||
|
`\x1b[43mCut paste your keys /${townconf.mayorId}_PrivateKey.txt /${townconf.mayorId}_PublicKey.txt \x1b[0m`
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
console.log("Error at Pagan creation ");
|
||||||
console.log(createPagans);
|
console.log(createPagans);
|
||||||
process.exit();
|
process.exit();
|
||||||
}
|
}
|
||||||
}
|
}*/
|
||||||
//restart nginx
|
|
||||||
|
//fin de partie à integer dans l'interface graphique adminapx
|
||||||
|
|
||||||
|
//restart nginx
|
||||||
const { exec } = require("child_process");
|
const { exec } = require("child_process");
|
||||||
exec(townconf.nginx.restart, (error, stdout, stderr) => {
|
exec(townconf.nginx.restart, (error, stdout, stderr) => {
|
||||||
if (error) {
|
if (error) {
|
||||||
|
118
api/models/Wwws.js
Normal file
@ -0,0 +1,118 @@
|
|||||||
|
const fs = require("fs-extra");
|
||||||
|
const path = require("path");
|
||||||
|
const dnsSync = require("dns-sync");
|
||||||
|
const mustache = require("mustache");
|
||||||
|
const readlineSync = require("readline-sync");
|
||||||
|
|
||||||
|
const conf = fs.existsSync("../../nationchains/tribes/conf.json")
|
||||||
|
? require("../../nationchains/tribes/conf.json")
|
||||||
|
: {};
|
||||||
|
const Wwws = {};
|
||||||
|
|
||||||
|
Wwws.apxtribinstall = (paramconf) => {
|
||||||
|
/**
|
||||||
|
* First install for a setup
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
if (fs.existsSync("../../nationchains/www/nginx_adminapx.conf")) {
|
||||||
|
console.log("You already have a conf on this town");
|
||||||
|
process.exit();
|
||||||
|
}
|
||||||
|
//first install
|
||||||
|
const nginxconf = fs.readFileSync(
|
||||||
|
"../../nationchains/www/adminapx/static/tpl/nginx.conf.mustache",
|
||||||
|
"utf8"
|
||||||
|
);
|
||||||
|
const proxyparams = fs.readFileSync(
|
||||||
|
"../../nationchains/www/adminapx/static/tpl/nginxproxy_params.mustache",
|
||||||
|
"utf8"
|
||||||
|
);
|
||||||
|
// saved and change nginx conf
|
||||||
|
if (!fs.existsSync("/etc/nginx/nginxconf.saved")) {
|
||||||
|
fs.moveSync("/etc/nginx/nginx.conf", "/etc/nginx/nginxconf.saved");
|
||||||
|
console.log(
|
||||||
|
"your previous /etc/nginx/nginx.conf was backup in /etc/nginx/nginxconf.saved"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
fs.outputFileSync(
|
||||||
|
"/etc/nginx/nginx.conf",
|
||||||
|
mustache.render(nginxconf, paramconf),
|
||||||
|
"utf8"
|
||||||
|
);
|
||||||
|
fs.outputFileSync(
|
||||||
|
"/etc/nginx/proxy_params",
|
||||||
|
mustache.render(proxyparams, paramconf),
|
||||||
|
"utf8"
|
||||||
|
);
|
||||||
|
if (!fs.existsSync(paramconf.nginx.logs)) fs.mkdirSync(paramconf.nginx.logs);
|
||||||
|
paramconf.nginx.firstinstall = true;
|
||||||
|
fs.outputJsonSync("../../nationchains/tribes/conf.json", paramconf, {
|
||||||
|
space: 2,
|
||||||
|
});
|
||||||
|
|
||||||
|
return Www.create(paramconf.nginx);
|
||||||
|
};
|
||||||
|
|
||||||
|
Wwws.create = (paramnginx) => {
|
||||||
|
/**
|
||||||
|
* Create an nginx conf to make available https://adminapx on a local network
|
||||||
|
* paramconf nginx.fswww place where the www folder is /tribeId/
|
||||||
|
*/
|
||||||
|
const res = {
|
||||||
|
status: 200,
|
||||||
|
ref: "Www",
|
||||||
|
msg: "successfulwww",
|
||||||
|
data: { website: paramnginx.website },
|
||||||
|
};
|
||||||
|
const nginxwebsite = fs.readFileSync(
|
||||||
|
"../../nationchains/www/adminapx/static/tpl/nginxmodelwebsite.conf.mustache",
|
||||||
|
"utf8"
|
||||||
|
);
|
||||||
|
fs.outputFileSync(
|
||||||
|
`./${paramnginx.fswww}www/nginx_${paramnginx.website}.conf`,
|
||||||
|
mustache.render(nginxwebsite, paramnginx),
|
||||||
|
"utf8"
|
||||||
|
);
|
||||||
|
if (!fs.existsSync(`./${paramnginx.fswww}www/${paramnginx.website}`)) {
|
||||||
|
//See later how to generate specific template of webapp
|
||||||
|
fs.mkdirSync(`./${paramnginx.fswww}www/${paramnginx.website}`);
|
||||||
|
}
|
||||||
|
if (!fs.existsSync(`./${paramnginx.fswww}www/cdn`)) {
|
||||||
|
//See later how to generate specific template of webapp
|
||||||
|
fs.mkdirSync(`./${paramnginx.fswww}www/cdn`);
|
||||||
|
}
|
||||||
|
//restart nginx
|
||||||
|
const { exec } = require("child_process");
|
||||||
|
exec(paramnginx.restart, (error, stdout, stderr) => {
|
||||||
|
if (error) {
|
||||||
|
if (paramnginx.firstinstall) {
|
||||||
|
console.log("\x1b[42m", error, stdout, stderr, "x1b[0m");
|
||||||
|
}
|
||||||
|
//@todo supprimer la derniere config et relancer
|
||||||
|
res.status = 500;
|
||||||
|
res.msg = "nginxError";
|
||||||
|
res.data = { msg: `${error}<br>${stdout}<br>${stderr}` };
|
||||||
|
} else {
|
||||||
|
if (paramnginx.firstinstall) {
|
||||||
|
// the tribes/conf.json is saved in apxtribinstall
|
||||||
|
console.log(
|
||||||
|
`\x1b[42m###########################################################################################\x1b[0m\n\x1b[42mWellcome into apxtrib, you can now 'yarn dev' for dev or 'yarn startpm2' for prod or \n'yarn unittest' for testing purpose. Access to your town here \x1b[0m\x1b[32mhttp://adminapx\x1b[0m \x1b[42m \nto finish your town setup. Don't forget to set your localhost /etc/hosts by adding 127.0.0.1 adminapx or {LAN IP} adminapx . Check README's project to learn more. \x1b[0m\n\x1b[42m###########################################################################################\x1b[0m`
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
// add website to tribe conf
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return res;
|
||||||
|
};
|
||||||
|
Wwws.setssl = () => {
|
||||||
|
// Run process to change nginx conf to get a ssl
|
||||||
|
};
|
||||||
|
|
||||||
|
Wwws.configlist = (tribeId) => {
|
||||||
|
//if accessright R return list of conf parameter {webapp:{conf parameter}}
|
||||||
|
const res = { status: 200, data: {} };
|
||||||
|
return res;
|
||||||
|
};
|
||||||
|
|
||||||
|
module.exports = Wwws;
|
@ -1,3 +1,5 @@
|
|||||||
{
|
{
|
||||||
|
"successfullcreate": "Alias creation for {{alias}} successfull. {{#withemail}} An email was sent to {{email}}, if you do not receive it, please download your keys before living this page.{{/withemail}}",
|
||||||
}
|
"successfulluppdate": "Your alias as a Person is now update into {{tribe}}",
|
||||||
|
"tribedoesnotexist": "Your tribe {{tribe}} does not exist in this town"
|
||||||
|
}
|
||||||
|
@ -33,5 +33,9 @@ router.post( '/push', checkHeaders, ( req, res ) => {
|
|||||||
res.send( { status: 200, payload: { moreinfo: fs.readFileSync( `${config.tribes}/${config.mayorId}/nationchains/nodes/${config.rootURL}`, 'utf-8' ) } } )
|
res.send( { status: 200, payload: { moreinfo: fs.readFileSync( `${config.tribes}/${config.mayorId}/nationchains/nodes/${config.rootURL}`, 'utf-8' ) } } )
|
||||||
} )
|
} )
|
||||||
|
|
||||||
|
router.get('/synchro',checkHeaders, isAuthenticated,(req,res)=>{
|
||||||
|
// run a sync from a list of electedtown to update nationchains folder
|
||||||
|
console.log('TODO')
|
||||||
|
})
|
||||||
|
|
||||||
module.exports = router;
|
module.exports = router;
|
||||||
|
@ -32,6 +32,7 @@ router.get(
|
|||||||
* @apiSuccess (200) {object} data contains indexfile requested
|
* @apiSuccess (200) {object} data contains indexfile requested
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
console.log("pzasse");
|
||||||
// indexname = objectname_key_value.json
|
// indexname = objectname_key_value.json
|
||||||
let objectLocation = "../../nationchains/";
|
let objectLocation = "../../nationchains/";
|
||||||
if (!conf.api.nationObjects.includes(req.params.objectname)) {
|
if (!conf.api.nationObjects.includes(req.params.objectname)) {
|
||||||
@ -42,13 +43,11 @@ router.get(
|
|||||||
if (fs.existsSync(indexpath)) {
|
if (fs.existsSync(indexpath)) {
|
||||||
res.status(200).json({ data: fs.readJsonSync(indexpath) });
|
res.status(200).json({ data: fs.readJsonSync(indexpath) });
|
||||||
} else {
|
} else {
|
||||||
res
|
res.status(404).json({
|
||||||
.status(404)
|
ref: "Odmdb",
|
||||||
.json({
|
msg: "objectfiledoesnotexist",
|
||||||
ref: "Odmdb",
|
data: { indexpath },
|
||||||
msg: "objectfiledoesnotexist",
|
});
|
||||||
data: { indexpath },
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
@ -88,13 +87,11 @@ router.get(
|
|||||||
if (fs.existsSync(objectpath)) {
|
if (fs.existsSync(objectpath)) {
|
||||||
res.status(200).json({ data: fs.readJsonSync(objectpath) });
|
res.status(200).json({ data: fs.readJsonSync(objectpath) });
|
||||||
} else {
|
} else {
|
||||||
res
|
res.status(404).json({
|
||||||
.status(404)
|
ref: "Odmdb",
|
||||||
.json({
|
msg: "objectfiledoesnotexist",
|
||||||
ref: "Odmdb",
|
data: { objectpath },
|
||||||
msg: "objectfiledoesnotexist",
|
});
|
||||||
data: { objectpath },
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
@ -1,12 +1,13 @@
|
|||||||
const express = require( 'express' );
|
const express = require("express");
|
||||||
const path = require( 'path' );
|
const path = require("path");
|
||||||
|
|
||||||
// Classes
|
// Classes
|
||||||
const Pagans = require( '../models/Pagans.js' );
|
const Pagans = require("../models/Pagans.js");
|
||||||
|
const Notifications = require("../models/Notifications.js");
|
||||||
// Middlewares
|
// Middlewares
|
||||||
const checkHeaders = require( '../middlewares/checkHeaders' );
|
const checkHeaders = require("../middlewares/checkHeaders");
|
||||||
const isAuthenticated = require( '../middlewares/isAuthenticated' );
|
const isAuthenticated = require("../middlewares/isAuthenticated");
|
||||||
const hasAccessrighton = require( '../middlewares/hasAccessrighton' );
|
const hasAccessrighton = require("../middlewares/hasAccessrighton");
|
||||||
const router = express.Router();
|
const router = express.Router();
|
||||||
/*
|
/*
|
||||||
models/Pagans.js
|
models/Pagans.js
|
||||||
@ -47,53 +48,107 @@ Owner means it can be Write/Delete if field OWNER contain the UUID that try to a
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
router.get('/isregister', checkHeaders, isAuthenticated,(req,res)=>{
|
router.get("/isauth", checkHeaders, isAuthenticated, (req, res) => {
|
||||||
/**
|
/**
|
||||||
* @api {get} /pagans/isregister
|
* @api {get} /pagans/isregister
|
||||||
* @apiName Is register check xalias and xhash
|
* @apiName Is register check xalias and xhash
|
||||||
* @apiGroup Odmdb
|
* @apiGroup Pagans
|
||||||
*
|
*
|
||||||
* @apiUse apxHeader
|
* @apiUse apxHeader
|
||||||
*
|
*
|
||||||
* @apiParam {String} indexname Mandatory if in conf.nationObjects then file is into nationchains/ else in /nationchains/tribes/xtribe/objectname/idx/indexname indexname contains the ObjectName .*_ (before the first _)
|
* @apiError (400) {object} status missingheaders / xalias does not exist / signaturefailled
|
||||||
*
|
* @apiError (401) {object} alias anonymous (not authenticated)
|
||||||
* @apiError (404) {string} status the file does not exist
|
* @apiError (404) {string} tribe does not exist
|
||||||
* @apiError (404) {string} ref objectmodel to get in the right language
|
*
|
||||||
* @apiError (404) {string} msg key to get template from objectmodel
|
*
|
||||||
* @apiError (404) {object} data use to pagansmodel: 'Pagans' } );render lg/objectmodel_lg.json
|
*
|
||||||
*
|
* @apiSuccess (200) {object} data contains indexfile requested
|
||||||
* @apiSuccess (200) {object} data contains indexfile requested
|
*
|
||||||
*
|
*/
|
||||||
*/
|
res.send({
|
||||||
res.send(Pagans.checkdetachedSignature(req.session.header.xalias,req.session.header.xhash));
|
status: 200,
|
||||||
|
ref: "headers",
|
||||||
|
msg: "authenticated",
|
||||||
|
data: {
|
||||||
|
xalias: req.session.header.xalias,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
});
|
||||||
|
router.post("/", checkHeaders, isAuthenticated, (req, res) => {
|
||||||
|
/**
|
||||||
|
* Create a pagan account from alias, publickey, if trusted recovery =>
|
||||||
|
* Create a person in xtribe/person/xalias.json with profil.auth={email,privatekey, passphrase}
|
||||||
|
* Middleware isAuthenticated check that:
|
||||||
|
* - xhash is well signed from private key linked to the publickey of alias
|
||||||
|
* - check that alias does not already exist (if yes then verifiedsigne would be false)
|
||||||
|
* Need to wait next block chain to be sure that alias is register in the blokchain
|
||||||
|
*/
|
||||||
|
console.log("pass ici", req.body);
|
||||||
|
const feedback = { alias: req.body.alias, publickey: req.body.publickey };
|
||||||
|
const newpagan = Pagans.create(req.body.alias, req.body.publickey);
|
||||||
|
if (newpagan.status == 200) {
|
||||||
|
if (req.body.email) {
|
||||||
|
feedback.withemail = true;
|
||||||
|
feedback.email = req.body.email;
|
||||||
|
feedback.privatekey = req.body.privatekey;
|
||||||
|
feedback.passphrase = req.body.passphrase;
|
||||||
|
Notifications.send({
|
||||||
|
type: "email",
|
||||||
|
from: "",
|
||||||
|
dest: [req.body.email],
|
||||||
|
tpl: "registeremail",
|
||||||
|
tribe: req.session.header.xtribe,
|
||||||
|
data: feedback,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
if (req.body.trustedtribe) {
|
||||||
|
if (req.app.locals.tribeids.includes(req.body.trustedtribe)) {
|
||||||
|
delete feedback.withemail;
|
||||||
|
const persondata = { recovery: feedback };
|
||||||
|
res.send(
|
||||||
|
Pagans.personupdate(req.body.alias, req.body.trustedtribe, persondata)
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
res.send({
|
||||||
|
status: 404,
|
||||||
|
ref: "Pagans",
|
||||||
|
msg: "tribedoesnotexist",
|
||||||
|
data: { tribe: req.body.trustedtribe },
|
||||||
|
});
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
newpagan.data = feedback;
|
||||||
|
res.send(newpagan);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
//error to create pagan
|
||||||
|
res.send(newpagan);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
router.put("/person", checkHeaders, isAuthenticated, (req, res) => {
|
||||||
|
/**
|
||||||
|
* add/update a person = alias + tribe with specific accessright and specific schema link to tribe
|
||||||
|
* @todo add tribe/schema/person.json
|
||||||
|
*/
|
||||||
|
console.log(req.body);
|
||||||
|
res.send(
|
||||||
|
Pagans.personupdate(req.body.alias, req.session.header.xtribe, req.body)
|
||||||
|
);
|
||||||
|
});
|
||||||
|
router.delete("/:alias", checkHeaders, isAuthenticated, (req, res) => {
|
||||||
|
console.log(`DELETE pagans nationchains/pagans/${req.params.alias}.json`);
|
||||||
|
const result = Pagans.delete(req.params.id, req.session.header);
|
||||||
|
res.status(result.status).send(result.data);
|
||||||
|
});
|
||||||
|
|
||||||
res.send({status:200,ref:"headers",msg:"authenticated",data:{xalias:req.session.header.xalias,xtribe:req.session.header.xtribe}})
|
/*router.get("/isauth", checkHeaders, isAuthenticated, (req, res) => {
|
||||||
})
|
if (req.session.header.xpseudo == "1") {
|
||||||
router.post('/', checkHeaders, (req,res)=>{
|
return res.status(401).send({ info: "not authenticate" });
|
||||||
// create a pagan account from alias, publickey, if trusted recovery={email,privatekey}
|
} else return res.status(200).send({ info: "well authenticated" });
|
||||||
console.log(req.body)
|
});*/
|
||||||
|
router.post("/login", checkHeaders, async (req, res) => {
|
||||||
} )
|
// console.log('POST /users/login with: ', req.app.locals.header);
|
||||||
router.delete( '/:alias', checkHeaders, isAuthenticated, ( req, res ) => {
|
/*
|
||||||
console.log( `DELETE pagans nationchains/pagans/${req.params.alias}.json` );
|
|
||||||
const result = Pagans.delete( req.params.id, req.session.header );
|
|
||||||
res.status( result.status )
|
|
||||||
.send( result.data );
|
|
||||||
} );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
router.get( '/isauth', checkHeaders, isAuthenticated, ( req, res ) => {
|
|
||||||
if( req.session.header.xpseudo == "1" ) {
|
|
||||||
return res.status( 401 )
|
|
||||||
.send( { info: "not authenticate" } );
|
|
||||||
} else return res.status( 200 )
|
|
||||||
.send( { info: "well authenticated" } )
|
|
||||||
} )
|
|
||||||
router.post( '/login', checkHeaders, async ( req, res ) => {
|
|
||||||
// console.log('POST /users/login with: ', req.app.locals.header);
|
|
||||||
/*
|
|
||||||
Check un mot de passe pour un login pour obtenir un token d'authentification
|
Check un mot de passe pour un login pour obtenir un token d'authentification
|
||||||
valable 1 hour, 1 day
|
valable 1 hour, 1 day
|
||||||
@header
|
@header
|
||||||
@ -104,21 +159,22 @@ router.post( '/login', checkHeaders, async ( req, res ) => {
|
|||||||
utile le temps de reinitialisé son mot de passe.
|
utile le temps de reinitialisé son mot de passe.
|
||||||
@return
|
@return
|
||||||
*/
|
*/
|
||||||
console.log( 'login for ', req.body, "in", req.session.header )
|
console.log("login for ", req.body, "in", req.session.header);
|
||||||
const log = await Pagans.loginUser( req.session.header, req.body, true );
|
const log = await Pagans.loginUser(req.session.header, req.body, true);
|
||||||
console.log( "log user login", log );
|
console.log("log user login", log);
|
||||||
if( log.status == 200 ) {
|
if (log.status == 200) {
|
||||||
// update req.app.locals.tokens for this uuid just after login success then next isAuth will be valid
|
// update req.app.locals.tokens for this uuid just after login success then next isAuth will be valid
|
||||||
req.app.locals.tokens[ log.data.user.UUID ] = { TOKEN: log.data.user.TOKEN, ACCESSRIGHTS: log.data.user.ACCESSRIGHTS }
|
req.app.locals.tokens[log.data.user.UUID] = {
|
||||||
console.log( req.app.locals )
|
TOKEN: log.data.user.TOKEN,
|
||||||
}
|
ACCESSRIGHTS: log.data.user.ACCESSRIGHTS,
|
||||||
return res.status( log.status )
|
};
|
||||||
.send( log.data );
|
console.log(req.app.locals);
|
||||||
} );
|
}
|
||||||
|
return res.status(log.status).send(log.data);
|
||||||
|
});
|
||||||
|
|
||||||
|
router.get("/getlinkwithoutpsw/:email", checkHeaders, async (req, res) => {
|
||||||
router.get( '/getlinkwithoutpsw/:email', checkHeaders, async ( req, res ) => {
|
/*
|
||||||
/*
|
|
||||||
Permet pour un email existant de renvoyer un email avec un lien valable 1h
|
Permet pour un email existant de renvoyer un email avec un lien valable 1h
|
||||||
@email est le compte pour lequel on demande un accès
|
@email est le compte pour lequel on demande un accès
|
||||||
Réponse:
|
Réponse:
|
||||||
@ -134,109 +190,161 @@ router.get( '/getlinkwithoutpsw/:email', checkHeaders, async ( req, res ) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
console.log( `GET /users/getlinkwithoutpsw for email: ${req.params.email} tribeid :${req.header('X-Client-Id')}` );
|
console.log(
|
||||||
if( !req.params.email ) {
|
`GET /users/getlinkwithoutpsw for email: ${
|
||||||
return res.status( 404 )
|
req.params.email
|
||||||
.send( {
|
} tribeid :${req.header("X-Client-Id")}`
|
||||||
info: [ 'emailmissing' ],
|
);
|
||||||
model: 'Pagans'
|
if (!req.params.email) {
|
||||||
} );
|
return res.status(404).send({
|
||||||
} else {
|
info: ["emailmissing"],
|
||||||
try {
|
model: "Pagans",
|
||||||
const getlink = await Pagans.getlinkwithoutpsw( req.params.email, req.session.header );
|
});
|
||||||
console.log( 'getlink', getlink )
|
} else {
|
||||||
//met à jour le token créer pour le uuid
|
try {
|
||||||
req.app.locals.tokens[ getlink.data.info.xuuid ] = getlink.data.info.token;
|
const getlink = await Pagans.getlinkwithoutpsw(
|
||||||
// attention si on relance le serveur le token temporaire est perdu
|
req.params.email,
|
||||||
return res.status( getlink.status )
|
req.session.header
|
||||||
.send( getlink.data );
|
);
|
||||||
} catch ( err ) {
|
console.log("getlink", getlink);
|
||||||
console.log( err )
|
//met à jour le token créer pour le uuid
|
||||||
}
|
req.app.locals.tokens[getlink.data.info.xuuid] = getlink.data.info.token;
|
||||||
}
|
// attention si on relance le serveur le token temporaire est perdu
|
||||||
} );
|
return res.status(getlink.status).send(getlink.data);
|
||||||
router.post( '/register', checkHeaders, async ( req, res ) => {
|
} catch (err) {
|
||||||
console.log( `POST /users for ${req.session.header.xtribe}` );
|
console.log(err);
|
||||||
if( req.session.header.xjwt == '123123' ) {
|
}
|
||||||
// Creation d'un utilisateur avec information de base aucun droit
|
}
|
||||||
// On modifie le contenu du form pour n egarder que login/email et psw
|
});
|
||||||
// pour le client_id permet de traiter un user en attente de validation
|
router.post("/register", checkHeaders, async (req, res) => {
|
||||||
console.log( 'req du post', req );
|
console.log(`POST /users for ${req.session.header.xtribe}`);
|
||||||
}
|
if (req.session.header.xjwt == "123123") {
|
||||||
} );
|
// Creation d'un utilisateur avec information de base aucun droit
|
||||||
router.get( '/info/:listindex', checkHeaders, isAuthenticated, hasAccessrighton( 'users', 'R' ), async ( req, res ) => {
|
// On modifie le contenu du form pour n egarder que login/email et psw
|
||||||
console.log( `get users info on tribeid ${req.session.header.xworkon} for ${req.params.listindex} with accessright`, req.session.header.accessrights.data );
|
// pour le client_id permet de traiter un user en attente de validation
|
||||||
const result = await Pagans.getinfoPagans( req.session.header.xpresworkon, req.session.header.accessrights, req.params.listindex );
|
console.log("req du post", req);
|
||||||
res.status( result.status )
|
}
|
||||||
.send( result.data );
|
});
|
||||||
} );
|
router.get(
|
||||||
router.get( '/list/:filter/:field', checkHeaders, isAuthenticated, hasAccessrighton( 'users', 'R' ), async ( req, res ) => {
|
"/info/:listindex",
|
||||||
console.log( 'GET /users/list/filtre/champs list for ' + req.session.header.xworkon );
|
checkHeaders,
|
||||||
if(
|
isAuthenticated,
|
||||||
[ 'admin', 'manager' ].includes( req.session.header.decodetoken[ 'apps' + req.session.header.xworkon + 'profil' ] ) ) {
|
hasAccessrighton("users", "R"),
|
||||||
try {
|
async (req, res) => {
|
||||||
const userslist = await Pagans.getUserlist( req.session.header, req.params.filter, req.params.field );
|
console.log(
|
||||||
console.log( 'userslist', userslist );
|
`get users info on tribeid ${req.session.header.xworkon} for ${req.params.listindex} with accessright`,
|
||||||
if( userslist.status == 200 ) {
|
req.session.header.accessrights.data
|
||||||
return res.status( userslist.status )
|
);
|
||||||
.send( userslist.data );
|
const result = await Pagans.getinfoPagans(
|
||||||
}
|
req.session.header.xpresworkon,
|
||||||
} catch ( err ) {
|
req.session.header.accessrights,
|
||||||
console.log( err );
|
req.params.listindex
|
||||||
return res.status( 400 )
|
);
|
||||||
.send( { info: 'erreur' } );
|
res.status(result.status).send(result.data);
|
||||||
}
|
}
|
||||||
} else {
|
);
|
||||||
res.status( 403 )
|
router.get(
|
||||||
.send( {
|
"/list/:filter/:field",
|
||||||
info: [ 'forbiddenAccess' ],
|
checkHeaders,
|
||||||
model: 'Pagans'
|
isAuthenticated,
|
||||||
} );
|
hasAccessrighton("users", "R"),
|
||||||
}
|
async (req, res) => {
|
||||||
} );
|
console.log(
|
||||||
router.get( '/uuid/:id', checkHeaders, isAuthenticated, hasAccessrighton( 'users', 'R' ), async ( req, res ) => {
|
"GET /users/list/filtre/champs list for " + req.session.header.xworkon
|
||||||
console.log( `GET /users/uuid/${req.params.id}` );
|
);
|
||||||
//console.log('req.app.locals: ', req.app.locals);
|
if (
|
||||||
//console.log('req.session', req.session);
|
["admin", "manager"].includes(
|
||||||
const result = await Pagans.getUser( req.params.id, req.session.header.xworkon, req.session.header.accessrights );
|
req.session.header.decodetoken[
|
||||||
res.status( result.status )
|
"apps" + req.session.header.xworkon + "profil"
|
||||||
.send( result.data );
|
]
|
||||||
} );
|
)
|
||||||
router.put( '/chgpsw/:id', checkHeaders, isAuthenticated, async ( req, res ) => {
|
) {
|
||||||
console.log( `PUT update /users/chgpsw/${req.params.id}` );
|
try {
|
||||||
try {
|
const userslist = await Pagans.getUserlist(
|
||||||
const majpsw = await Pagans.updateUserpassword( req.params.id, req.session.header, req.body );
|
req.session.header,
|
||||||
res.status( majpsw.status )
|
req.params.filter,
|
||||||
.send( majpsw.data );
|
req.params.field
|
||||||
} catch ( {
|
);
|
||||||
status,
|
console.log("userslist", userslist);
|
||||||
data
|
if (userslist.status == 200) {
|
||||||
} ) {
|
return res.status(userslist.status).send(userslist.data);
|
||||||
res.status( status )
|
}
|
||||||
.send( data );
|
} catch (err) {
|
||||||
}
|
console.log(err);
|
||||||
} );
|
return res.status(400).send({ info: "erreur" });
|
||||||
router.post( '/uuid', checkHeaders, isAuthenticated, hasAccessrighton( 'users', 'C' ), async ( req, res ) => {
|
}
|
||||||
console.log( 'POST /users create for ' + req.session.header.xworkon, req.body );
|
} else {
|
||||||
const usercreate = await Pagans.createUser( req.session.header, req.body );
|
res.status(403).send({
|
||||||
return res.status( usercreate.status )
|
info: ["forbiddenAccess"],
|
||||||
.send( usercreate.data );
|
model: "Pagans",
|
||||||
} );
|
});
|
||||||
router.put( '/uuid/:id', checkHeaders, isAuthenticated, hasAccessrighton( 'users', 'U' ), async ( req, res ) => {
|
}
|
||||||
console.log( `PUT update /users/${req.params.id}` );
|
}
|
||||||
// console.log('req.app.locals: ', req.app.locals);
|
);
|
||||||
// console.log('req.session', req.session);
|
router.get(
|
||||||
try {
|
"/uuid/:id",
|
||||||
const majUser = await Pagans.updateUser( req.params.id, req.session.header, req.body );
|
checkHeaders,
|
||||||
res.status( majUser.status )
|
isAuthenticated,
|
||||||
.send( majUser.data );
|
hasAccessrighton("users", "R"),
|
||||||
} catch ( {
|
async (req, res) => {
|
||||||
status,
|
console.log(`GET /users/uuid/${req.params.id}`);
|
||||||
data
|
//console.log('req.app.locals: ', req.app.locals);
|
||||||
} ) {
|
//console.log('req.session', req.session);
|
||||||
res.status( status )
|
const result = await Pagans.getUser(
|
||||||
.send( data );
|
req.params.id,
|
||||||
}
|
req.session.header.xworkon,
|
||||||
} );
|
req.session.header.accessrights
|
||||||
|
);
|
||||||
|
res.status(result.status).send(result.data);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
router.put("/chgpsw/:id", checkHeaders, isAuthenticated, async (req, res) => {
|
||||||
|
console.log(`PUT update /users/chgpsw/${req.params.id}`);
|
||||||
|
try {
|
||||||
|
const majpsw = await Pagans.updateUserpassword(
|
||||||
|
req.params.id,
|
||||||
|
req.session.header,
|
||||||
|
req.body
|
||||||
|
);
|
||||||
|
res.status(majpsw.status).send(majpsw.data);
|
||||||
|
} catch ({ status, data }) {
|
||||||
|
res.status(status).send(data);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
router.post(
|
||||||
|
"/uuid",
|
||||||
|
checkHeaders,
|
||||||
|
isAuthenticated,
|
||||||
|
hasAccessrighton("users", "C"),
|
||||||
|
async (req, res) => {
|
||||||
|
console.log(
|
||||||
|
"POST /users create for " + req.session.header.xworkon,
|
||||||
|
req.body
|
||||||
|
);
|
||||||
|
const usercreate = await Pagans.createUser(req.session.header, req.body);
|
||||||
|
return res.status(usercreate.status).send(usercreate.data);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
router.put(
|
||||||
|
"/uuid/:id",
|
||||||
|
checkHeaders,
|
||||||
|
isAuthenticated,
|
||||||
|
hasAccessrighton("users", "U"),
|
||||||
|
async (req, res) => {
|
||||||
|
console.log(`PUT update /users/${req.params.id}`);
|
||||||
|
// console.log('req.app.locals: ', req.app.locals);
|
||||||
|
// console.log('req.session', req.session);
|
||||||
|
try {
|
||||||
|
const majUser = await Pagans.updateUser(
|
||||||
|
req.params.id,
|
||||||
|
req.session.header,
|
||||||
|
req.body
|
||||||
|
);
|
||||||
|
res.status(majUser.status).send(majUser.data);
|
||||||
|
} catch ({ status, data }) {
|
||||||
|
res.status(status).send(data);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
module.exports = router;
|
module.exports = router;
|
||||||
|
45
api/routes/wwws.js
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
const express = require("express");
|
||||||
|
const path = require("path");
|
||||||
|
|
||||||
|
// Classes
|
||||||
|
const Wwws = require("../models/Wwws.js");
|
||||||
|
// Middlewares
|
||||||
|
const checkHeaders = require("../middlewares/checkHeaders");
|
||||||
|
const isAuthenticated = require("../middlewares/isAuthenticated");
|
||||||
|
const hasAccessrighton = require("../middlewares/hasAccessrighton");
|
||||||
|
const router = express.Router();
|
||||||
|
/**
|
||||||
|
* To manage an nginx conf
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
router.get("/tribes/:tribeId", checkHeaders, isAuthenticated, (req, res) => {
|
||||||
|
/**
|
||||||
|
* @api {get} /www/tribes/:tribeId
|
||||||
|
* @apiName Get list of application Name
|
||||||
|
* @apiGroup Www
|
||||||
|
*
|
||||||
|
* @apiUse apxHeader
|
||||||
|
*
|
||||||
|
* @apiParam {String} tribeId Mandatory that have to exist in current town and
|
||||||
|
*
|
||||||
|
* @apiError (404) {string} status the folder does not exist
|
||||||
|
* @apiError (404) {string} ref objectmodel to get in the right language
|
||||||
|
* @apiError (404) {string} msg key to get template from objectmodel
|
||||||
|
* @apiError (404) {object} data use to www's model: 'Www' } );render lg/objectmodel_lg.json
|
||||||
|
*
|
||||||
|
* @apiSuccess (200) {object} data contains liste of www conf of a tribe
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
res.send(Www.configlist(req.params.tribeId));
|
||||||
|
});
|
||||||
|
router.post("/:webappname", checkHeaders, isAuthenticated, (req, res) => {
|
||||||
|
/**
|
||||||
|
* Create a space web /tribes/www/webappname
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* */
|
||||||
|
res.send(Wwws.create(req.params.tribeId));
|
||||||
|
});
|
||||||
|
module.exports = router;
|
225
apxtrib.js
@ -1,137 +1,146 @@
|
|||||||
const fs = require( 'fs-extra' );
|
const fs = require("fs-extra");
|
||||||
const bodyParser = require( 'body-parser' );
|
const bodyParser = require("body-parser");
|
||||||
const glob = require( 'glob' );
|
const glob = require("glob");
|
||||||
const path = require( 'path' );
|
const path = require("path");
|
||||||
const cors = require( 'cors' );
|
const cors = require("cors");
|
||||||
const express = require( 'express' );
|
const express = require("express");
|
||||||
const process = require('process');
|
const process = require("process");
|
||||||
/*******************************************
|
/*******************************************
|
||||||
|
|
||||||
SEE https://gitea.ndda.fr/apxtrib/apxtrib/wiki/Devrules
|
SEE https://gitea.ndda.fr/apxtrib/apxtrib/wiki/Devrules
|
||||||
To have a quick understanding and convention before doing deeply in source code
|
To have a quick understanding and convention before doing deeply in source code
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
// Global data : add here globale variable that take care between RAM space anf fs access
|
||||||
// to make absolute path with `${__base}relativepath`
|
// to make absolute path with `${__base}relativepath`
|
||||||
global.__base = __dirname +'/';
|
global.__base = __dirname + "/";
|
||||||
|
// app.locals.tribeids is defined later in apixtrib.js and allow express app to always have in memory a dynamic of tribeId available in req.app.locals.tribeids
|
||||||
|
|
||||||
// check setup
|
// check setup
|
||||||
if( !fs.existsSync( '/etc/nginx/nginx.conf' ) ) {
|
if (!fs.existsSync("/etc/nginx/nginx.conf")) {
|
||||||
console.log( '\x1b[31m Check documentation, nginx have to be installed on this server first, no /etc/nginx/nginx.conf available, install then rerun yarn command.' );
|
console.log(
|
||||||
process.exit();
|
"\x1b[31m Check documentation, nginx have to be installed on this server first, no /etc/nginx/nginx.conf available, install then rerun yarn command."
|
||||||
|
);
|
||||||
|
process.exit();
|
||||||
}
|
}
|
||||||
if( !fs.existsSync( './nationchains/tribes/conf.json' ) ) {
|
if (!fs.existsSync(`${__base}nationchains/tribes/conf.json`)) {
|
||||||
// this town is not set
|
// this town is not set
|
||||||
console.log( `\x1b[42m############################################################################################\x1b[0m\n\x1b[42mWellcome into apxtrib, you must first init your town and tribes by a 'yarn setup'. \x1b[0m \n\x1b[42mThen 'yarn dev' or 'yarn startpm2' or 'yarn unittest'. Check README's project to learn more.\x1b[0m\n\x1b[42m############################################################################################\x1b[0m` );
|
console.log(
|
||||||
process.exit();
|
`\x1b[42m############################################################################################\x1b[0m\n\x1b[42mWellcome into apxtrib, you must first init your town and tribes by a 'yarn setup'. \x1b[0m \n\x1b[42mThen 'yarn dev' or 'yarn startpm2' or 'yarn unittest'. Check README's project to learn more.\x1b[0m\n\x1b[42m############################################################################################\x1b[0m`
|
||||||
|
);
|
||||||
|
process.exit();
|
||||||
}
|
}
|
||||||
const conf = require( './nationchains/tribes/conf.json' );
|
const conf = require(`${__base}nationchains/tribes/conf.json`);
|
||||||
// To make public this conf, careffull this localconf will be public, this the only difference between all apxtrib node
|
// To make public this conf, careffull this localconf will be public, this the only difference between all apxtrib node
|
||||||
const localconf={nationId:conf.nationId,townId:conf.townId,tribeId:conf.tribeId,comment:"Generate by apxtrib.js with minimum of information"};
|
const localconf = {
|
||||||
fs.outputJsonSync('./nationchains/www/adminapx/static/tpldata/conf_en.json',localconf);
|
nationId: conf.nationId,
|
||||||
// Tribes allow to get local apxtrib instance context
|
townId: conf.townId,
|
||||||
|
tribeId: conf.tribeId,
|
||||||
|
comment: "Generate by apxtrib.js with minimum of information",
|
||||||
|
};
|
||||||
|
fs.outputJsonSync(
|
||||||
|
`${__base}nationchains/www/adminapx/static/tpldata/setup_en.json`,
|
||||||
|
localconf
|
||||||
|
);
|
||||||
|
// Run main express process
|
||||||
|
|
||||||
|
// Each tribe has a context (domain, plugins route, website ) are all describe into idx tribeId_all.json
|
||||||
|
// {"tribename":{"tribeId":"tribename","dns":[array of domain],"status":"unchain","nationId":"ants","townId":"usbfarm"}}
|
||||||
|
|
||||||
// dataclient .tribeids [] .DOMs [] .routes (plugins {url:name route:path}) .appname {tribeid:[website]}
|
// dataclient .tribeids [] .DOMs [] .routes (plugins {url:name route:path}) .appname {tribeid:[website]}
|
||||||
//const dataclient = require( './api/models/Tribes' ).init();
|
//const dataclient = require( './api/models/Tribes' ).init();
|
||||||
const tribelist=fs.readJsonSync(`./nationchains/tribes/idx/tribeId_all.json`);
|
const tribelist = fs.readJsonSync(
|
||||||
let doms=conf.dns
|
`${__base}/nationchains/tribes/idx/tribeId_all.json`
|
||||||
let tribeIds=[]
|
);
|
||||||
let routes = glob.sync( './api/routes/*.js' )
|
let doms = conf.dns; // only dns of town during the init process
|
||||||
.map( f => {
|
let tribeIds = [];
|
||||||
return { url: `/${path.basename(f,'.js')}`, route: f }
|
let routes = glob.sync(`${__base}/api/routes/*.js`).map((f) => {
|
||||||
} );
|
return { url: `/${path.basename(f, ".js")}`, route: f };
|
||||||
//routes={url,route} check how to add plugin tribe route
|
});
|
||||||
Object.keys(tribelist).forEach(t=>{
|
//routes={url,route} check how to add plugin tribe route later
|
||||||
tribelist[t].dns.forEach(d=>{
|
// keep only the 2 last part (.) of domain name to validate cors with it (generic domain)
|
||||||
const dm=d.split('.').slice(-2).join('.')
|
Object.keys(tribelist).forEach((t) => {
|
||||||
if (!doms.includes(dm)) doms.push(dm)
|
tribelist[t].dns.forEach((d) => {
|
||||||
})
|
const dm = d.split(".").slice(-2).join(".");
|
||||||
tribeIds.push(t)
|
if (!doms.includes(dm)) doms.push(dm);
|
||||||
})
|
});
|
||||||
console.log('Allowed DOMs to access to this apxtrib server: ', doms )
|
tribeIds.push(t);
|
||||||
|
});
|
||||||
|
console.log("Allowed DOMs to access to this apxtrib server: ", doms);
|
||||||
|
|
||||||
const app = express();
|
const app = express();
|
||||||
Object.keys(conf.api.appset).forEach(p=>{
|
// load express parameter from conf
|
||||||
app.set(p,conf.api.appset[p])
|
Object.keys(conf.api.appset).forEach((p) => {
|
||||||
})
|
app.set(p, conf.api.appset[p]);
|
||||||
|
});
|
||||||
// To set depending of data form or get size to send
|
// To set depending of data form or get size to send
|
||||||
app.use( bodyParser.urlencoded( conf.api.bodyparse.urlencoded ) );
|
app.use(bodyParser.urlencoded(conf.api.bodyparse.urlencoded));
|
||||||
// To set depending of post put json data size to send
|
// To set depending of post put json data size to send
|
||||||
app.use( express.json() )
|
app.use(express.json());
|
||||||
app.use( bodyParser.json( conf.api.bodyparse.json ) );
|
app.use(bodyParser.json(conf.api.bodyparse.json));
|
||||||
app.locals.tribeids = tribeIds;
|
app.locals.tribeids = tribeIds;
|
||||||
console.log( 'app.locals.tribeids', app.locals.tribeids );
|
console.log("app.locals.tribeids", app.locals.tribeids);
|
||||||
// token will be store in /tmp/token/pseudo_token to check if isauthenticated
|
|
||||||
// User token authentification and user init user search
|
|
||||||
/*const datauser = require( './api/models/Pagans' )
|
|
||||||
.init( dataclient.tribeids );
|
|
||||||
app.locals.tokens = datauser.tokens;
|
|
||||||
console.log( 'app.locals.tokens key ', Object.keys( app.locals.tokens ) )
|
|
||||||
*/
|
|
||||||
// Cors management
|
// Cors management
|
||||||
const corsOptions = {
|
const corsOptions = {
|
||||||
origin: ( origin, callback ) => {
|
origin: (origin, callback) => {
|
||||||
if( origin === undefined ) {
|
if (origin === undefined) {
|
||||||
callback( null, true );
|
callback(null, true);
|
||||||
} else if( origin.indexOf( 'chrome-extension' ) > -1 ) {
|
} else if (origin.indexOf("chrome-extension") > -1) {
|
||||||
callback( null, true );
|
callback(null, true);
|
||||||
} else {
|
} else {
|
||||||
//console.log( 'origin', origin )
|
//console.log( 'origin', origin )
|
||||||
//marchais avant modif eslint const rematch = ( /^https?\:\/\/(.*)\:.*/g ).exec( origin )
|
//marchais avant modif eslint const rematch = ( /^https?\:\/\/(.*)\:.*/g ).exec( origin )
|
||||||
const rematch = ( /^https?:\/\/(.*):.*/g )
|
const rematch = /^https?:\/\/(.*):.*/g.exec(origin);
|
||||||
.exec( origin )
|
//console.log( rematch )
|
||||||
//console.log( rematch )
|
let tmp = origin.replace(/http.?:\/\//g, "").split(".");
|
||||||
let tmp = origin.replace( /http.?:\/\//g, '' )
|
|
||||||
.split( '.' )
|
|
||||||
|
|
||||||
if( rematch && rematch.length > 1 ) tmp = rematch[ 1 ].split( '.' );
|
if (rematch && rematch.length > 1) tmp = rematch[1].split(".");
|
||||||
//console.log( 'tmp', tmp )
|
//console.log( 'tmp', tmp )
|
||||||
let dom = tmp[ tmp.length - 1 ];
|
let dom = tmp[tmp.length - 1];
|
||||||
if( tmp.length > 1 ) {
|
if (tmp.length > 1) {
|
||||||
dom = `${tmp[tmp.length-2]}.${tmp[tmp.length-1]}`
|
dom = `${tmp[tmp.length - 2]}.${tmp[tmp.length - 1]}`;
|
||||||
}
|
}
|
||||||
console.log( `origin: ${origin}, dom:${dom}, CORS allowed? : ${dataclient.DOMs.includes( dom )}` );
|
console.log(
|
||||||
if( dataclient.DOMs.includes( dom ) ) {
|
`origin: ${origin}, dom:${dom}, CORS allowed? : ${doms.includes(dom)}`
|
||||||
callback( null, true )
|
);
|
||||||
} else {
|
if (doms.includes(dom)) {
|
||||||
console.log( `Origin is not allowed by CORS` );
|
callback(null, true);
|
||||||
callback( new Error( 'Not allowed by CORS' ) );
|
} else {
|
||||||
}
|
console.log(`Origin is not allowed by CORS`);
|
||||||
}
|
callback(new Error("Not allowed by CORS"));
|
||||||
},
|
}
|
||||||
exposedHeaders: Object.keys( conf.api.exposedHeaders )
|
}
|
||||||
|
},
|
||||||
|
exposedHeaders: Object.keys(conf.api.exposedHeaders),
|
||||||
};
|
};
|
||||||
// CORS
|
// CORS
|
||||||
app.use( cors( corsOptions ) );
|
app.use(cors(corsOptions));
|
||||||
// Static Routes
|
// Static Routes // try to use nginx route instead in comments
|
||||||
/*app.use( express.static( `${__dirname}/nationchains/tribes/${conf.mayorId}/www/cdn/public`, {
|
/*app.use( express.static( `${__dirname}/nationchains/tribes/${conf.mayorId}/www/cdn/public`, {
|
||||||
dotfiles: 'allow'
|
dotfiles: 'allow'
|
||||||
} ) );
|
} ) );
|
||||||
*/
|
*/
|
||||||
//Allow to public access a space dev delivered by apxtrib
|
|
||||||
// this is just a static open route for dev purpose,
|
|
||||||
// for production, we'll use a nginx static set to /www/app/appname
|
|
||||||
/*console.log( `${conf.dnsapxtrib}/space/tribeid/website`, dataclient.appname );
|
|
||||||
Object.keys( dataclient.appname )
|
|
||||||
.forEach( cid => {
|
|
||||||
dataclient.appname[ cid ].forEach( website => {
|
|
||||||
app.use( `/space/${cid}/${website}`, express.static( `${conf.tribes}/${cid}/spacedev/${website}` ) );
|
|
||||||
} )
|
|
||||||
} );
|
|
||||||
*/
|
|
||||||
// Routers add any routes from /routes and /plugins
|
// Routers add any routes from /routes and /plugins
|
||||||
console.log( 'Routes available on this apxtrib instance' );
|
console.log("Routes available on this apxtrib instance");
|
||||||
console.log( routes );
|
console.log(routes);
|
||||||
// prefix only use for dev purpose in production a proxy nginx redirect /app/ to node apxtrib
|
routes.forEach((r) => {
|
||||||
|
try {
|
||||||
|
app.use(r.url, require(r.route));
|
||||||
|
} catch (err) {
|
||||||
|
console.log(
|
||||||
|
`\x1b[31m!!! WARNING issue with route ${r.route} from ${r.url} check err if route is key then solve err, if not just be aware that this route won't work on your server. If you are not the maintainer and no turn around please contact the email maintainer.\x1b[0m`
|
||||||
|
);
|
||||||
|
console.log("raise err-:", err);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
routes.forEach( r => {
|
app.listen(conf.api.port, () => {
|
||||||
try {
|
console.log(
|
||||||
app.use( r.url, require( r.route ) );
|
`check in your browser that api works http://${conf.dns}:${conf.api.port}`
|
||||||
} catch ( err ) {
|
);
|
||||||
console.log( `\x1b[31m!!! WARNING issue with route ${r.route} from ${r.url} check err if route is key then solve err, if not just be aware that this route won't work on your server. If you are not the maintainer and no turn around please contact the email maintainer.\x1b[0m` )
|
});
|
||||||
console.log( 'raise err-:', err );
|
console.log(
|
||||||
}
|
"\x1b[42m\x1b[37m",
|
||||||
} )
|
"Made with love for people's freedom, enjoy !!!",
|
||||||
|
"\x1b[0m"
|
||||||
app.listen( conf.api.port, () => {
|
);
|
||||||
console.log( `check in your browser that api works http://${conf.dns}:${conf.api.port}` );
|
|
||||||
} );
|
|
||||||
|
|
||||||
console.log( "\x1b[42m\x1b[37m", "Made with love for people's freedom, enjoy !!!", "\x1b[0m" );
|
|
||||||
|
1
electedtown.json
Normal file
@ -0,0 +1 @@
|
|||||||
|
["https://wallants.ndda.fr/nations/synchro"]
|
11
nationchains/www/adminapx/ASUPnginx/proxy_params.mustache
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
proxy_set_header Host $http_host;
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
|
client_max_body_size 10m;
|
||||||
|
client_body_buffer_size 128k;
|
||||||
|
proxy_connect_timeout 90;
|
||||||
|
proxy_send_timeout 90;
|
||||||
|
proxy_read_timeout 90;
|
||||||
|
proxy_buffers 32 4k;
|
||||||
|
proxy_set_header X-NginX-Proxy true;
|
@ -3,33 +3,38 @@
|
|||||||
|
|
||||||
<head>
|
<head>
|
||||||
<title>setup apXtrib</title>
|
<title>setup apXtrib</title>
|
||||||
|
<link rel="icon" type="image/png" href="cdn/share/logo/favicon.png">
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css" rel="stylesheet">
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css" rel="stylesheet">
|
||||||
<!-- fontawesome icon cdn -->
|
<!-- fontawesome icon cdn -->
|
||||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.1.1/css/all.css">
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.1.1/css/all.css">
|
||||||
<script>
|
<script>
|
||||||
const apxlocal={
|
const apxlocal = {
|
||||||
headers:{xalias:"anonymous",xhash:"anonymous",xtribe:"devenv", xapp:"smatchapp", xlang:"en" },
|
headers: { xalias: "anonymous", xhash: "anonymous", xdays: 0, xtribe: "devenv", xapp: "adminapx", xlang: "en" },
|
||||||
firsttimeload:true,
|
firsttimeload: true,
|
||||||
forcereload:true,
|
forcereload: true,
|
||||||
tpl:{
|
tpl: {
|
||||||
title:"<h1>apXtrib </h1><p>Nation:{{nationId}} Town:{{townId}}</p><p><p> Manage an apXtrib</p></p>",
|
title: "<h1>apXtrib </h1><p>Nation:{{nationId}} Town:{{townId}}</p><p><p> Manage an apXtrib</p></p>",
|
||||||
footer:"{{{msg}}}"
|
footer: "{{{msg}}}"
|
||||||
},
|
},
|
||||||
tpldata:{
|
tpldata: {
|
||||||
footer:{msg:"<p>apXtrib, made with love for people freedom, enjoy!</p>"}
|
footer: { msg: "<p>apXtrib, made with love for people freedom, enjoy!</p>" },
|
||||||
},
|
apxmodal: { title: "exemple title", body: "exemple body", actions: [{ btndescription: "hello", onclick: "console.log('hello')" }] }
|
||||||
object:{}
|
}
|
||||||
};
|
};
|
||||||
// @todo check version control to force a reload with forceload
|
// @todo check version control to force a reload with forceload
|
||||||
</script>
|
</script>
|
||||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/js/bootstrap.bundle.min.js"></script>
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/js/bootstrap.bundle.min.js"></script>
|
||||||
<script src="static/js/editor.js"></script>
|
<script src="cdn/share/js/dayjs.min.js"></script>
|
||||||
<script src="static/js/openpgp.min.js"></script>
|
<script src="cdn/share/js/editor.js"></script>
|
||||||
<script src="static/js/mustache.min.js"></script>
|
<script src="cdn/share/js/openpgp.min.js"></script>
|
||||||
<script src="static/js/axios.min.js"></script>
|
<script src="cdn/share/js/mustache.min.js"></script>
|
||||||
|
<script src="cdn/share/js/axios.min.js"></script>
|
||||||
<script src="static/js/apxtribcli.js"></script>
|
<script src="static/js/apxtribcli.js"></script>
|
||||||
|
<script src="static/js/apxpagans.js"></script>
|
||||||
|
<script src="static/js/apxtribes.js"></script>
|
||||||
|
<script src="static/js/apxtowns.js"></script>
|
||||||
<script src="static/js/apxapp.js"></script>
|
<script src="static/js/apxapp.js"></script>
|
||||||
<style>
|
<style>
|
||||||
.fakeimg {
|
.fakeimg {
|
||||||
@ -38,97 +43,113 @@
|
|||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<div id="apxtitle" class="p-5 bg-primary text-white text-center" apptoload="app.load('apxtitle','title','conf')" add2data tpldata="static/tpldata/conf_en.json">
|
<div id="apxtitle" class="p-5 bg-primary text-white text-center" apptoload="app.load('apxtitle','title','setup')"
|
||||||
<h1>apXtrib</h1>
|
add2data tpldata="static/tpldata/setup_en.json">
|
||||||
<p> Manage and understand apXtrib back-end</p>
|
<h1>apXtrib</h1>
|
||||||
</div>
|
<p> Manage and understand apXtrib back-end</p>
|
||||||
<nav class="navbar navbar-expand-sm bg-dark navbar-dark">
|
</div>
|
||||||
<div class="container-fluid">
|
<nav class="navbar navbar-expand-sm bg-dark navbar-dark">
|
||||||
<ul class="navbar-nav">
|
<div class="container-fluid">
|
||||||
<li class="nav-item">
|
<ul class="navbar-nav">
|
||||||
<a class="nav-link" add2data tpl="static/tpl/listofarticle_en.mustache" onclick="app.load('apxmain','listofarticle','listofarticle')" >Home</a>
|
<li class="nav-item">
|
||||||
</li>
|
<a class="nav-link" add2data tpl="static/tpl/articleslist_en.mustache"
|
||||||
<li class="nav-item dropdown">
|
onclick="app.load('apxmain','articleslist','articleslist')"><i class="fa-solid fa-house"></i></a>
|
||||||
<a class="nav-link dropdown-toggle" data-bs-toggle="dropdown" href="#" role="button" aria-expanded="false">Pagans</a>
|
</li>
|
||||||
<ul class="dropdown-menu">
|
<li class="nav-item dropdown">
|
||||||
<li><a class="dropdown-item" add2data tpl="static/tpl/pagancreate_en.mustache" object="nationchains/pagans/idx/alias_all.json" onclick="app.load('apxmain','pagancreate',{})">Create</a></li>
|
<a class="nav-link dropdown-toggle" data-bs-toggle="dropdown" href="#" role="button"
|
||||||
<li><a class="dropdown-item" add2data tpl="static/tpl/loginout_en.mustache" tpldata="static/tpldata/loginout_en.json" onclick="app.load('apxmain','loginout',{})">Login/Logout</a></li>
|
aria-expanded="false">Articles</a>
|
||||||
<li><hr class="dropdown-divider"></li>
|
<ul class="dropdown-menu">
|
||||||
<li><a class="dropdown-item" href="#">Cipher</a></li>
|
<li><a class="dropdown-item" add2data tpl="static/tpl/articleeditor_en.mustache"
|
||||||
<li><a class="dropdown-item" href="#">AccessRights</a></li>
|
onclick="app.load('apxmain','articleeditor',{})">Create</a></li>
|
||||||
<li><hr class="dropdown-divider"></li>
|
<li><a class="dropdown-item" href="#">Manage Articles</a></li>
|
||||||
<li><a class="dropdown-item" href="#">Wallet management</a></li>
|
</ul>
|
||||||
<li><a class="dropdown-item" href="#">Signed Contracts</a></li>
|
</li>
|
||||||
<li><a class="dropdown-item" href="#">NFT generator</a></li>
|
<li class="nav-item dropdown">
|
||||||
</ul>
|
<div class="" d-none" add2data object="nationchains/towns/idx/townId_all.json"></div>
|
||||||
</li>
|
<a class="nav-link dropdown-toggle" data-bs-toggle="dropdown" href="#" role="button"
|
||||||
<li class="nav-item dropdown">
|
aria-expanded="false">Pagan</a>
|
||||||
<a class="nav-link dropdown-toggle" data-bs-toggle="dropdown" href="#" role="button" aria-expanded="false">Mayor's Town</a>
|
<ul class="dropdown-menu">
|
||||||
<ul class="dropdown-menu">
|
<li><a class="dropdown-item" add2data tpl="static/tpl/pagancreate_en.mustache"
|
||||||
<li><a class="dropdown-item" href="#">Chain a town</a></li>
|
object="nationchains/pagans/idx/alias_all.json"
|
||||||
<li><a class="dropdown-item" href="#">Create Tribe</a></li>
|
onclick="app.load('apxmain','pagancreate',pagans.loadtpldata())">Create / Login / Logout</a></li>
|
||||||
<li><a class="dropdown-item" href="#">Manage Druids</a></li>
|
<hr class="dropdown-divider">
|
||||||
<li><hr class="dropdown-divider"></li>
|
</li>
|
||||||
</ul>
|
<li><a class="dropdown-item" href="#">Cipher/Uncipher</a></li>
|
||||||
</li>
|
<li><a class="dropdown-item" href="#">My messages</a></li>
|
||||||
<li class="nav-item dropdown">
|
<li><a class="dropdown-item" href="#">Notifications</a></li>
|
||||||
<a class="nav-link dropdown-toggle" data-bs-toggle="dropdown" href="#" role="button" aria-expanded="false">Druid's Tribe</a>
|
<li><a class="dropdown-item" href="#">Wallet management</a></li>
|
||||||
<ul class="dropdown-menu ">
|
<li><a class="dropdown-item" href="#">Signed Contracts</a></li>
|
||||||
<li><a class="dropdown-item" tribe="" href="#">Manage Persons</a></li>
|
|
||||||
<li><a class="dropdown-item" tribe="" href="#">Manage web space</a></li>
|
|
||||||
<li><a class="dropdown-item" tribe="" href="#">Create Objects</a></li>
|
|
||||||
<li><a class="dropdown-item" tribe="" href="#">Manage Objects</a></li>
|
|
||||||
<li><hr class="dropdown-divider"></li>
|
|
||||||
</ul>
|
|
||||||
<ul class="dropdown-menu">
|
|
||||||
<li><a class="dropdown-item" onclick="" href="#">My Tribe nameA</a></li>
|
|
||||||
<li><a class="dropdown-item" onclick="" href="#">My tribe nameB</a></li>
|
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item dropdown">
|
<li class="nav-item dropdown">
|
||||||
<a class="nav-link dropdown-toggle" data-bs-toggle="dropdown" href="#" role="button" aria-expanded="false">Person's Tribe</a>
|
<a class="nav-link dropdown-toggle" data-bs-toggle="dropdown" href="#" role="button"
|
||||||
|
aria-expanded="false">Mayor's Town</a>
|
||||||
<ul class="dropdown-menu">
|
<ul class="dropdown-menu">
|
||||||
<li><a class="dropdown-item" href="#">My tribes</a></li>
|
<li><a class="dropdown-item" add2data tpl="static/tpl/townsetup_en.mustache"
|
||||||
<li><a class="dropdown-item" href="#">My Profile</a></li>
|
onclick="app.load('apxmain','townsetup','setup')">Chain a town</a></li>
|
||||||
<li><a class="dropdown-item" href="#">My Objects</a></li>
|
<li><a class="dropdown-item" href="#">Create Tribe</a></li>
|
||||||
<li><a class="dropdown-item" href="#">Message</a></li>
|
<li><a class="dropdown-item" href="#">Manage Tribes</a></li>
|
||||||
<li><hr class="dropdown-divider"></li>
|
<li>
|
||||||
|
<hr class="dropdown-divider">
|
||||||
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<ul class="dropdown-menu">
|
</li>
|
||||||
<li><a class="dropdown-item" onclick="" href="#">My Tribe nameA</a></li>
|
|
||||||
<li><a class="dropdown-item" onclick="" href="#">My tribe nameB</a></li>
|
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
<li class="nav-item dropdown">
|
<li class="nav-item dropdown">
|
||||||
<a class="nav-link dropdown-toggle" data-bs-toggle="dropdown" href="#" role="button" aria-expanded="false">DevOp's space</a>
|
<a class="nav-link dropdown-toggle" data-bs-toggle="dropdown" href="#" role="button"
|
||||||
|
aria-expanded="false">Druid's Tribe</a>
|
||||||
|
<ul class="dropdown-menu ">
|
||||||
|
<li><a class="dropdown-item" tribe="" href="#">Manage Persons</a></li>
|
||||||
|
<li><a class="dropdown-item" tribe="" href="#">Manage web space</a></li>
|
||||||
|
<li><a class="dropdown-item" tribe="" href="#">NFT generator</a></li>
|
||||||
|
<li><a class="dropdown-item" tribe="" href="#">Create Objects</a></li>
|
||||||
|
<li><a class="dropdown-item" tribe="" href="#">Manage Objects</a></li>
|
||||||
|
<li>
|
||||||
|
<hr class="dropdown-divider">
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item dropdown">
|
||||||
|
<a class="nav-link dropdown-toggle" data-bs-toggle="dropdown" href="#" role="button"
|
||||||
|
aria-expanded="false">Person's Tribe</a>
|
||||||
|
<ul class="dropdown-menu">
|
||||||
|
<li><a class="dropdown-item" onclick="" href="#">My Tribe A</a></li>
|
||||||
|
<li><a class="dropdown-item" onclick="" href="#">My tribe B</a></li>
|
||||||
|
<li><a class="dropdown-item" onclick="" href="#">My tribe X</a></li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item dropdown">
|
||||||
|
<a class="nav-link dropdown-toggle" data-bs-toggle="dropdown" href="#" role="button"
|
||||||
|
aria-expanded="false">DevOp's space</a>
|
||||||
<ul class="dropdown-menu">
|
<ul class="dropdown-menu">
|
||||||
<li><a class="dropdown-item" href="#">Odmdb Schema</a></li>
|
<li><a class="dropdown-item" href="#">Odmdb Schema</a></li>
|
||||||
<li><a class="dropdown-item" href="#">Odmdb CRUD</a></li>
|
<li><a class="dropdown-item" href="#">Odmdb CRUD</a></li>
|
||||||
<li><a class="dropdown-item" href="#">Host a web app</a></li>
|
<li><a class="dropdown-item" href="#">Host a web app</a></li>
|
||||||
<li><hr class="dropdown-divider"></li>
|
<li>
|
||||||
|
<hr class="dropdown-divider">
|
||||||
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link" href="#">Utils</a>
|
<a class="nav-link" href="#">Utils</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item">
|
</ul>
|
||||||
<a class="nav-link disabled" href="#">Disabled</a>
|
</div>
|
||||||
</li>
|
</nav>
|
||||||
</ul>
|
<div id="apxmain" apptoload="app.load('apxmain','articleslist','articleslist')" class="container mt-5">
|
||||||
</div>
|
<div class="d-flex justify-content-center">
|
||||||
</nav>
|
<div class="spinner-border" role="status">
|
||||||
<div id="apxmain" apptoload="app.load('apxmain','listofarticle','listofarticle')" class="container mt-5">
|
<span class="visually-hidden">Loading...</span>
|
||||||
<div class="d-flex justify-content-center">
|
</div>
|
||||||
<div class="spinner-border" role="status">
|
|
||||||
<span class="visually-hidden">Loading...</span>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="apxfooter" apptoload="app.load('apxfooter','footer','footer')" class="mt-5 p-4 bg-dark text-white text-center">
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
<div id="apxfooter" apptoload="app.load('apxfooter','footer','footer')"
|
||||||
|
class="mt-5 p-4 bg-dark text-white text-center">
|
||||||
|
</div>
|
||||||
|
<div id="apxmodal" add2data tpl="static/tpl/apxmodal_en.mustache"></div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
|
||||||
|
</html>
|
BIN
nationchains/www/adminapx/static/img/logo/favicon.png
Normal file
After Width: | Height: | Size: 3.7 KiB |
BIN
nationchains/www/adminapx/static/img/logo/logobgdark.png
Normal file
After Width: | Height: | Size: 7.0 KiB |
168
nationchains/www/adminapx/static/img/logo/logobgdark.svg
Normal file
@ -0,0 +1,168 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||||
|
|
||||||
|
<svg
|
||||||
|
width="74.422066mm"
|
||||||
|
height="39.408447mm"
|
||||||
|
viewBox="0 0 74.422066 39.408447"
|
||||||
|
version="1.1"
|
||||||
|
id="svg5"
|
||||||
|
inkscape:version="1.2.2 (732a01da63, 2022-12-09, custom)"
|
||||||
|
sodipodi:docname="planchelogoapXtrib.svg"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg">
|
||||||
|
<sodipodi:namedview
|
||||||
|
id="namedview7"
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#000000"
|
||||||
|
borderopacity="0.25"
|
||||||
|
inkscape:showpageshadow="2"
|
||||||
|
inkscape:pageopacity="0.0"
|
||||||
|
inkscape:pagecheckerboard="0"
|
||||||
|
inkscape:deskcolor="#d1d1d1"
|
||||||
|
inkscape:document-units="mm"
|
||||||
|
showgrid="false"
|
||||||
|
inkscape:zoom="2.3786088"
|
||||||
|
inkscape:cx="429.03231"
|
||||||
|
inkscape:cy="188.5556"
|
||||||
|
inkscape:window-width="1868"
|
||||||
|
inkscape:window-height="1141"
|
||||||
|
inkscape:window-x="0"
|
||||||
|
inkscape:window-y="0"
|
||||||
|
inkscape:window-maximized="1"
|
||||||
|
inkscape:current-layer="layer1" />
|
||||||
|
<defs
|
||||||
|
id="defs2">
|
||||||
|
<inkscape:path-effect
|
||||||
|
effect="powerclip"
|
||||||
|
id="path-effect4281-6"
|
||||||
|
is_visible="true"
|
||||||
|
lpeversion="1"
|
||||||
|
inverse="true"
|
||||||
|
flatten="false"
|
||||||
|
hide_clip="false"
|
||||||
|
message="Utilise la règle de remplissage « fill-rule: evenodd » de la boîte de dialogue <b>Fond et contour</b> en l'absence de résultat de mise à plat après une conversion en chemin." />
|
||||||
|
<inkscape:path-effect
|
||||||
|
effect="powerclip"
|
||||||
|
id="path-effect4223-1-5"
|
||||||
|
is_visible="true"
|
||||||
|
lpeversion="1"
|
||||||
|
inverse="true"
|
||||||
|
flatten="false"
|
||||||
|
hide_clip="false"
|
||||||
|
message="Utilise la règle de remplissage « fill-rule: evenodd » de la boîte de dialogue <b>Fond et contour</b> en l'absence de résultat de mise à plat après une conversion en chemin." />
|
||||||
|
<clipPath
|
||||||
|
clipPathUnits="userSpaceOnUse"
|
||||||
|
id="clipath_lpe_path-effect4281-6">
|
||||||
|
<rect
|
||||||
|
style="display:none;fill:none;stroke:#000000;stroke-width:2.965;stroke-miterlimit:5"
|
||||||
|
id="rect12221"
|
||||||
|
width="3.9103701"
|
||||||
|
height="17.277628"
|
||||||
|
x="72.929848"
|
||||||
|
y="18.71629"
|
||||||
|
d="m 72.929848,18.71629 h 3.91037 v 17.277627 h -3.91037 z" />
|
||||||
|
<path
|
||||||
|
id="lpe_path-effect4281-6"
|
||||||
|
style="fill:none;stroke:#000000;stroke-width:2.965;stroke-miterlimit:5"
|
||||||
|
class="powerclip"
|
||||||
|
d="M 39.612377,7.7145809 H 79.612633 V 47.714838 H 39.612377 Z M 72.929848,18.71629 v 17.277627 h 3.91037 V 18.71629 Z" />
|
||||||
|
</clipPath>
|
||||||
|
<clipPath
|
||||||
|
clipPathUnits="userSpaceOnUse"
|
||||||
|
id="clipath_lpe_path-effect4223-1-5">
|
||||||
|
<rect
|
||||||
|
style="display:none;fill:none;stroke:#000000;stroke-width:0.890744;stroke-miterlimit:5;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
id="rect12226"
|
||||||
|
width="29.109257"
|
||||||
|
height="29.109257"
|
||||||
|
x="45.057877"
|
||||||
|
y="13.160081"
|
||||||
|
clip-path="none"
|
||||||
|
d="M 45.057877,13.160081 H 74.167133 V 42.269338 H 45.057877 Z" />
|
||||||
|
<path
|
||||||
|
id="lpe_path-effect4223-1-5"
|
||||||
|
style="fill:none;stroke:#000000;stroke-width:0.890744;stroke-miterlimit:5;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
class="powerclip"
|
||||||
|
d="M 35.399339,3.8513256 H 75.39934 V 43.851326 H 35.399339 Z m 9.658538,9.3087554 V 42.269338 H 74.167133 V 13.160081 Z" />
|
||||||
|
</clipPath>
|
||||||
|
</defs>
|
||||||
|
<g
|
||||||
|
inkscape:label="Calque 1"
|
||||||
|
inkscape:groupmode="layer"
|
||||||
|
id="layer1"
|
||||||
|
transform="translate(-33.762223,-52.949721)">
|
||||||
|
<rect
|
||||||
|
style="fill:none;fill-opacity:1;stroke:none;stroke-width:0.264999;stroke-miterlimit:5;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
id="rect12066-9"
|
||||||
|
width="74.422066"
|
||||||
|
height="39.408443"
|
||||||
|
x="33.685085"
|
||||||
|
y="52.371716" />
|
||||||
|
<rect
|
||||||
|
style="fill:#ffffff;fill-opacity:0.0159938;stroke:none;stroke-width:0.264999;stroke-miterlimit:5;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
id="rect12066-6"
|
||||||
|
width="74.422066"
|
||||||
|
height="39.408443"
|
||||||
|
x="33.762222"
|
||||||
|
y="52.949718"
|
||||||
|
inkscape:export-filename="../6e81e123/logobglight.svg"
|
||||||
|
inkscape:export-xdpi="105.58897"
|
||||||
|
inkscape:export-ydpi="105.58897" />
|
||||||
|
<path
|
||||||
|
style="display:block;fill:none;stroke:#ffffff;stroke-width:0.891;stroke-miterlimit:5;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
id="rect4221-6"
|
||||||
|
width="29.109257"
|
||||||
|
height="29.109257"
|
||||||
|
x="45.057877"
|
||||||
|
y="13.160081"
|
||||||
|
clip-path="url(#clipath_lpe_path-effect4281-6)"
|
||||||
|
inkscape:path-effect="#path-effect4281-6"
|
||||||
|
d="M 45.057877,13.160081 H 74.167133 V 42.269338 H 45.057877 Z"
|
||||||
|
sodipodi:type="rect"
|
||||||
|
transform="translate(0.7877763,47.235812)" />
|
||||||
|
<path
|
||||||
|
style="display:block;fill:none;stroke:#ffffff;stroke-width:0.890744;stroke-miterlimit:5;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
id="rect4212-5-3"
|
||||||
|
width="29.109257"
|
||||||
|
height="29.109257"
|
||||||
|
x="40.844711"
|
||||||
|
y="9.2966976"
|
||||||
|
clip-path="url(#clipath_lpe_path-effect4223-1-5)"
|
||||||
|
inkscape:path-effect="#path-effect4223-1-5"
|
||||||
|
d="M 40.844711,9.2966976 H 69.953968 V 38.405954 H 40.844711 Z"
|
||||||
|
sodipodi:type="rect"
|
||||||
|
transform="translate(1.2107703,47.421564)" />
|
||||||
|
<text
|
||||||
|
xml:space="preserve"
|
||||||
|
style="font-size:3.175px;fill:#2e7fc8;fill-opacity:1;stroke-width:0.265;stroke-dasharray:none"
|
||||||
|
x="48.645107"
|
||||||
|
y="76.664268"
|
||||||
|
id="text168-9"
|
||||||
|
inkscape:highlight-color="#2e7fc8"><tspan
|
||||||
|
sodipodi:role="line"
|
||||||
|
id="tspan166-4"
|
||||||
|
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:14.1111px;font-family:Quicksand;-inkscape-font-specification:'Quicksand, Bold';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;fill:#2e7fc8;fill-opacity:1;stroke-width:0.265;stroke-dasharray:none"
|
||||||
|
x="48.645107"
|
||||||
|
y="76.664268"><tspan
|
||||||
|
style="fill:#ffffff;fill-opacity:1"
|
||||||
|
id="tspan12445">ap</tspan><tspan
|
||||||
|
style="fill:#ffc332;fill-opacity:1"
|
||||||
|
id="tspan11889-8">X</tspan><tspan
|
||||||
|
style="fill:#ffffff;fill-opacity:0.985099"
|
||||||
|
id="tspan12341">trib</tspan></tspan></text>
|
||||||
|
<text
|
||||||
|
xml:space="preserve"
|
||||||
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:2.82222px;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;fill:#2e7fc8;fill-opacity:1;stroke-width:0.264583"
|
||||||
|
x="54.550327"
|
||||||
|
y="82.090439"
|
||||||
|
id="text168-0-1"><tspan
|
||||||
|
sodipodi:role="line"
|
||||||
|
id="tspan166-9-2"
|
||||||
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:2.82222px;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;fill:#ffffff;fill-opacity:1;stroke-width:0.264583"
|
||||||
|
x="54.550327"
|
||||||
|
y="82.090439">BLOCKCHAIN OF DEMOCRACY</tspan></text>
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 7.2 KiB |
BIN
nationchains/www/adminapx/static/img/logo/logobglight.png
Normal file
After Width: | Height: | Size: 10 KiB |
156
nationchains/www/adminapx/static/img/logo/logobglight.svg
Normal file
@ -0,0 +1,156 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||||
|
|
||||||
|
<svg
|
||||||
|
width="74.687065mm"
|
||||||
|
height="39.673443mm"
|
||||||
|
viewBox="0 0 74.687065 39.673443"
|
||||||
|
version="1.1"
|
||||||
|
id="svg5"
|
||||||
|
inkscape:version="1.2.2 (732a01da63, 2022-12-09, custom)"
|
||||||
|
sodipodi:docname="planchelogoapXtrib.svg"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg">
|
||||||
|
<sodipodi:namedview
|
||||||
|
id="namedview7"
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#000000"
|
||||||
|
borderopacity="0.25"
|
||||||
|
inkscape:showpageshadow="2"
|
||||||
|
inkscape:pageopacity="0.0"
|
||||||
|
inkscape:pagecheckerboard="0"
|
||||||
|
inkscape:deskcolor="#d1d1d1"
|
||||||
|
inkscape:document-units="mm"
|
||||||
|
showgrid="false"
|
||||||
|
inkscape:zoom="2.3786088"
|
||||||
|
inkscape:cx="429.03231"
|
||||||
|
inkscape:cy="188.5556"
|
||||||
|
inkscape:window-width="1868"
|
||||||
|
inkscape:window-height="1141"
|
||||||
|
inkscape:window-x="0"
|
||||||
|
inkscape:window-y="0"
|
||||||
|
inkscape:window-maximized="1"
|
||||||
|
inkscape:current-layer="layer1" />
|
||||||
|
<defs
|
||||||
|
id="defs2">
|
||||||
|
<inkscape:path-effect
|
||||||
|
effect="powerclip"
|
||||||
|
id="path-effect4281"
|
||||||
|
is_visible="true"
|
||||||
|
lpeversion="1"
|
||||||
|
inverse="true"
|
||||||
|
flatten="false"
|
||||||
|
hide_clip="false"
|
||||||
|
message="Utilise la règle de remplissage « fill-rule: evenodd » de la boîte de dialogue <b>Fond et contour</b> en l'absence de résultat de mise à plat après une conversion en chemin." />
|
||||||
|
<clipPath
|
||||||
|
clipPathUnits="userSpaceOnUse"
|
||||||
|
id="clipPath4219-7">
|
||||||
|
<rect
|
||||||
|
style="display:none;fill:none;stroke:#000000;stroke-width:0.890744;stroke-miterlimit:5;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
id="rect4221-7"
|
||||||
|
width="29.109257"
|
||||||
|
height="29.109257"
|
||||||
|
x="45.057877"
|
||||||
|
y="13.160081"
|
||||||
|
clip-path="none"
|
||||||
|
d="M 45.057877,13.160081 H 74.167133 V 42.269338 H 45.057877 Z" />
|
||||||
|
<path
|
||||||
|
id="lpe_path-effect4223-1"
|
||||||
|
style="fill:none;stroke:#000000;stroke-width:0.890744;stroke-miterlimit:5;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
class="powerclip"
|
||||||
|
d="M 35.399339,3.8513256 H 75.39934 V 43.851326 H 35.399339 Z m 9.658538,9.3087554 V 42.269338 H 74.167133 V 13.160081 Z" />
|
||||||
|
</clipPath>
|
||||||
|
<inkscape:path-effect
|
||||||
|
effect="powerclip"
|
||||||
|
id="path-effect4223-1"
|
||||||
|
is_visible="true"
|
||||||
|
lpeversion="1"
|
||||||
|
inverse="true"
|
||||||
|
flatten="false"
|
||||||
|
hide_clip="false"
|
||||||
|
message="Utilise la règle de remplissage « fill-rule: evenodd » de la boîte de dialogue <b>Fond et contour</b> en l'absence de résultat de mise à plat après une conversion en chemin." />
|
||||||
|
<clipPath
|
||||||
|
clipPathUnits="userSpaceOnUse"
|
||||||
|
id="clipPath4277">
|
||||||
|
<rect
|
||||||
|
style="display:none;fill:none;stroke:#000000;stroke-width:2.965;stroke-miterlimit:5"
|
||||||
|
id="rect4279"
|
||||||
|
width="3.9103701"
|
||||||
|
height="17.277628"
|
||||||
|
x="72.929848"
|
||||||
|
y="18.71629"
|
||||||
|
d="m 72.929848,18.71629 h 3.91037 v 17.277627 h -3.91037 z" />
|
||||||
|
<path
|
||||||
|
id="lpe_path-effect4281"
|
||||||
|
style="fill:none;stroke:#000000;stroke-width:2.965;stroke-miterlimit:5"
|
||||||
|
class="powerclip"
|
||||||
|
d="M 39.612377,7.7145809 H 79.612633 V 47.714838 H 39.612377 Z M 72.929848,18.71629 v 17.277627 h 3.91037 V 18.71629 Z" />
|
||||||
|
</clipPath>
|
||||||
|
</defs>
|
||||||
|
<g
|
||||||
|
inkscape:label="Calque 1"
|
||||||
|
inkscape:groupmode="layer"
|
||||||
|
id="layer1"
|
||||||
|
transform="translate(-32.764809,-5.0034045)">
|
||||||
|
<path
|
||||||
|
style="display:block;fill:none;stroke:#2e7fc8;stroke-width:0.891;stroke-miterlimit:5;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
id="rect4221"
|
||||||
|
width="29.109257"
|
||||||
|
height="29.109257"
|
||||||
|
x="45.057877"
|
||||||
|
y="13.160081"
|
||||||
|
clip-path="url(#clipPath4277)"
|
||||||
|
inkscape:path-effect="#path-effect4281"
|
||||||
|
d="M 45.057877,13.160081 H 74.167133 V 42.269338 H 45.057877 Z"
|
||||||
|
sodipodi:type="rect" />
|
||||||
|
<path
|
||||||
|
style="display:block;fill:none;stroke:#2e7fc8;stroke-width:0.890744;stroke-miterlimit:5;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
id="rect4212-5"
|
||||||
|
width="29.109257"
|
||||||
|
height="29.109257"
|
||||||
|
x="40.844711"
|
||||||
|
y="9.2966976"
|
||||||
|
clip-path="url(#clipPath4219-7)"
|
||||||
|
inkscape:path-effect="#path-effect4223-1"
|
||||||
|
d="M 40.844711,9.2966976 H 69.953968 V 38.405954 H 40.844711 Z"
|
||||||
|
sodipodi:type="rect"
|
||||||
|
transform="translate(0.42299389,0.18575204)" />
|
||||||
|
<text
|
||||||
|
xml:space="preserve"
|
||||||
|
style="font-size:3.175px;fill:#2e7fc8;fill-opacity:1;stroke-width:0.265;stroke-dasharray:none"
|
||||||
|
x="47.857334"
|
||||||
|
y="29.428459"
|
||||||
|
id="text168"
|
||||||
|
inkscape:highlight-color="#2e7fc8"><tspan
|
||||||
|
sodipodi:role="line"
|
||||||
|
id="tspan166"
|
||||||
|
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:14.1111px;font-family:Quicksand;-inkscape-font-specification:'Quicksand, Bold';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;fill:#2e7fc8;fill-opacity:1;stroke-width:0.265;stroke-dasharray:none"
|
||||||
|
x="47.857334"
|
||||||
|
y="29.428459">ap<tspan
|
||||||
|
style="fill:#ffc332;fill-opacity:1"
|
||||||
|
id="tspan11889">X</tspan>trib</tspan></text>
|
||||||
|
<text
|
||||||
|
xml:space="preserve"
|
||||||
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:2.82222px;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;fill:#2e7fc8;fill-opacity:1;stroke-width:0.264583"
|
||||||
|
x="53.762562"
|
||||||
|
y="34.85463"
|
||||||
|
id="text168-0"><tspan
|
||||||
|
sodipodi:role="line"
|
||||||
|
id="tspan166-9"
|
||||||
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:2.82222px;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;fill:#2e7fc8;fill-opacity:1;stroke-width:0.264583"
|
||||||
|
x="53.762562"
|
||||||
|
y="34.85463">BLOCKCHAIN OF DEMOCRACY</tspan></text>
|
||||||
|
<rect
|
||||||
|
style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:0.264999;stroke-miterlimit:5;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
id="rect12066"
|
||||||
|
width="74.422066"
|
||||||
|
height="39.408443"
|
||||||
|
x="32.897308"
|
||||||
|
y="5.1359038"
|
||||||
|
inkscape:export-filename="../6e81e123/logobglight.svg"
|
||||||
|
inkscape:export-xdpi="105.58897"
|
||||||
|
inkscape:export-ydpi="105.58897" />
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 6.6 KiB |
BIN
nationchains/www/adminapx/static/img/logo/logocarredark.png
Normal file
After Width: | Height: | Size: 4.5 KiB |
BIN
nationchains/www/adminapx/static/img/logo/logocarrelight.png
Normal file
After Width: | Height: | Size: 4.2 KiB |
@ -4,46 +4,61 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
var app = app || {};
|
var app = app || {};
|
||||||
|
|
||||||
app.createIdentity=(alias,passphrase="")=>{
|
app.runapirequest = (destmodalid, axiosreq, modalcontent) => {
|
||||||
if (alias.length<3 || apx.data.object['index_pagans_alias_all'].includes(alias) ){
|
/**
|
||||||
alert('Please chose another alias')
|
* Axios option
|
||||||
return;
|
* {method: GET POST,...,
|
||||||
}
|
* url:'/relativepath'
|
||||||
const keys = apx.generateKey(alias,passphrase)
|
* data:{anydata to pass}
|
||||||
for(let tag of ['inputalias','inputpassphrase']){
|
* responseType:'json'}
|
||||||
document.getElementById(tag).classList.add('disabled')
|
*/
|
||||||
}
|
if (!modalcontent) {
|
||||||
document.getElementById('privatekey').setAttribute("key",keys.privateKey);
|
modalcontent = {
|
||||||
document.getElementById('publickey').setAttribute("key",keys.publicKey);
|
title: "An axios request",
|
||||||
document.getElementById('generatekeys').classList.add('d-none');
|
body: "",
|
||||||
document.getElementById('downloadkeys').classList.remove('d-none');
|
actions: [],
|
||||||
document.getElementById('createId').classList.remove('d-none');
|
};
|
||||||
}
|
}
|
||||||
|
modalcontent.body += JSON.stringify(axiosreq);
|
||||||
app.registerIdentity=()=>{
|
console.log(apx.data.headers);
|
||||||
const data={
|
axiosreq.headers = apx.data.headers;
|
||||||
alias:document.getElementById('inputalias').value,
|
axios(axiosreq)
|
||||||
privateKey:document.getElementById('privatekey').getAttribute('key'),
|
.then((rep) => {
|
||||||
publicKey:document.getElementById('publickey').getAttribute('key'),
|
console.log(rep);
|
||||||
passphrase:document.getElementById('inputpassphrase').value
|
modalcontent.body += "<br>" + JSON.stringify(rep.data);
|
||||||
}
|
app.modalmanagement("reqaxios", apx.data.tpl.apxmodal, modalcontent);
|
||||||
axios.post('api/pagans',data,apx.data.headers)
|
|
||||||
.then(rep=>{
|
|
||||||
// genere authentification headers.xalias, xhash store object.pagans_alias={privateKey, passphrase}; console.log(rep)})
|
|
||||||
// if check trust add data email recovery axios.post('api/persons,data, apx.data.headers)
|
|
||||||
})
|
})
|
||||||
.catch(err=>{
|
.catch((err, rep) => {
|
||||||
console.log('sorry',err);
|
console.log(err);
|
||||||
})
|
modalcontent.title += " - Status :" + err.response.status;
|
||||||
}
|
modalcontent.body += JSON.stringify(err.response.data);
|
||||||
|
app.modalmanagement("reqaxios", apx.data.tpl.apxmodal, modalcontent);
|
||||||
|
});
|
||||||
|
};
|
||||||
|
app.modalmanagement = (modalid, tpl, data, optionmodal) => {
|
||||||
|
/**
|
||||||
|
* Pre-request in hatml
|
||||||
|
* <div id="apxmodal" add2data tpl="static/tpl/apxmodal_en.mustache" ></div>
|
||||||
|
* data must be online with tpl
|
||||||
|
* optionmodal see https://getbootstrap.com/docs/5.0/components/modal/
|
||||||
|
*/
|
||||||
|
if (!optionmodal)
|
||||||
|
optionmodal = { backdrop: true, keyboard: true, focus: true };
|
||||||
|
if (document.getElementById(modalid)) {
|
||||||
|
document.getElementById(modalid).remove();
|
||||||
|
}
|
||||||
|
data.modalid = modalid;
|
||||||
|
document.getElementById("apxmodal").innerHTML += Mustache.render(tpl, data);
|
||||||
|
var currentmodal = new bootstrap.Modal(
|
||||||
|
document.getElementById(modalid),
|
||||||
|
optionmodal
|
||||||
|
);
|
||||||
|
//var currentmodal = bootstrap.Modal.getOrCreateInstance(modalid);
|
||||||
|
|
||||||
|
currentmodal.show();
|
||||||
|
};
|
||||||
app.search = (elt) => {
|
app.search = (elt) => {
|
||||||
//@todo get search string from input then return tpldata.listofarticles={"search":[]}
|
//@todo get search string from input then return tpldata.articleslist={"search":[]}
|
||||||
console.log("A FAIRE");
|
console.log("A FAIRE");
|
||||||
};
|
};
|
||||||
app.downloadlink = (keys, object, prefix) => {
|
app.downloadlink = (keys, object, prefix) => {
|
||||||
@ -81,50 +96,52 @@ app.downloadlink = (keys, object, prefix) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
app.setupdata = () => {
|
app.setupdata = () => {
|
||||||
//todo generate tpldata.listofarticle get html from /static/html
|
//todo generate tpldata.articleslist get html from /static/html
|
||||||
apx.data.tpldata.listofarticle = {
|
apx.data.tpldata.articleslist = {
|
||||||
mostread: [{}],
|
mostread: [{}],
|
||||||
news: [{}],
|
news: [{}],
|
||||||
search: [],
|
search: [],
|
||||||
articles: "html",
|
articles: "html",
|
||||||
};
|
};
|
||||||
const list = {}
|
const list = {};
|
||||||
document.querySelectorAll("[add2data]").forEach((e) => {
|
document.querySelectorAll("[add2data]").forEach((e) => {
|
||||||
/** Collect from any tag with add2data url attribute (tpl tpldata object)
|
/** Collect from any tag with add2data url attribute (tpl tpldata object)
|
||||||
* name is the filename :
|
* name is the filename :
|
||||||
* for tpl and tpldata (relativepath/filename_xx.ext) name=filename
|
* for tpl and tpldata (relativepath/filename_xx.ext) name=filename
|
||||||
* For public object (pagans, towns, nations, block) not tribes object are gettable (only)
|
* For public object (pagans, towns, nations, block) not tribes object are gettable (only)
|
||||||
* with /nationchains/objectName/idx/existingindex.json
|
* with /nationchains/objectName/idx/existingindex.json
|
||||||
* or for an item /itm//primarykey_value_of_item.json
|
* or for an item /itm//primarykey_value_of_item.json
|
||||||
*
|
*
|
||||||
* For tribe object get or for modification you need to use api and to have accessright setup properly:
|
* For tribe object get or for modification you need to use api and to have accessright setup properly:
|
||||||
* for object index (/api/odmdb/objectname/idx/filename.json) name =objectname_filename
|
* for object index (/api/odmdb/objectname/idx/filename.json) name =objectname_filename
|
||||||
* for object item (/api/odmdb/objectname/itm/primarykey.json) name =objectname_primarykey
|
* for object item (/api/odmdb/objectname/itm/primarykey.json) name =objectname_primarykey
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (e.getAttribute('object')){
|
if (e.getAttribute("object")) {
|
||||||
const url = e.getAttribute('object')
|
const url = e.getAttribute("object");
|
||||||
const spliturlobj=url.split("/").slice(-3);
|
const spliturlobj = url.split("/").slice(-3);
|
||||||
const objectname=spliturlobj[0];
|
const objectname = spliturlobj[0];
|
||||||
const objecttype=spliturlobj[1];
|
const objecttype = spliturlobj[1];
|
||||||
const objectkey=spliturlobj[2].substring(0,spliturlobj[2].length-5)
|
const objectkey = spliturlobj[2].substring(0, spliturlobj[2].length - 5);
|
||||||
if (!list[objectname]) list[objectname]={};
|
if (!list[objectname]) list[objectname] = {};
|
||||||
list[objectname][`${objecttype}${objectkey}`]= url;
|
list[objectname][`${objecttype}${objectkey}`] = url;
|
||||||
};
|
|
||||||
for (let k of ["tpl", "tpldata"]) {
|
|
||||||
if (e.getAttribute(k)){
|
|
||||||
const url=e.getAttribute(k);
|
|
||||||
let localname=url.split('/').slice(-1)[0];
|
|
||||||
if (url.includes('.mustache')) localname=localname.substring(0,localname.length-12);
|
|
||||||
if (url.includes('.html') || url.includes('.json') ) localname=localname.substring(0,localname.length-8);
|
|
||||||
if (!list[k]) list[k]={};
|
|
||||||
list[k][localname]=url;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
for (let k of ["tpl", "tpldata"]) {
|
||||||
|
if (e.getAttribute(k)) {
|
||||||
|
const url = e.getAttribute(k);
|
||||||
|
let localname = url.split("/").slice(-1)[0];
|
||||||
|
if (url.includes(".mustache"))
|
||||||
|
localname = localname.substring(0, localname.length - 12);
|
||||||
|
if (url.includes(".html") || url.includes(".json"))
|
||||||
|
localname = localname.substring(0, localname.length - 8);
|
||||||
|
if (!list[k]) list[k] = {};
|
||||||
|
list[k][localname] = url;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
// load external template and data
|
// load external template and data
|
||||||
|
|
||||||
for (let k of Object.keys(list) ) {
|
for (let k of Object.keys(list)) {
|
||||||
console.log(k, list[k]);
|
console.log(k, list[k]);
|
||||||
apx.loadfile(list[k], k);
|
apx.loadfile(list[k], k);
|
||||||
}
|
}
|
||||||
@ -132,21 +149,21 @@ app.setupdata = () => {
|
|||||||
if (apx.data.firsttimeload) {
|
if (apx.data.firsttimeload) {
|
||||||
// Need to wait the first time apx.data fully load
|
// Need to wait the first time apx.data fully load
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
app.setuppage();
|
app.setuppage();
|
||||||
}, 300);
|
}, 500);
|
||||||
delete apx.data.firsttimeload;
|
delete apx.data.firsttimeload;
|
||||||
apx.save();
|
apx.save();
|
||||||
}else{
|
} else {
|
||||||
app.setuppage();
|
app.setuppage();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
app.load = (idtoload, tplname, tpldata) => {
|
app.load = (idtoload, tplname, tpldata) => {
|
||||||
const tpl = apx.data.tpl[tplname]
|
const tpl = apx.data.tpl[tplname]
|
||||||
? apx.data.tpl[tplname]
|
? apx.data.tpl[tplname]
|
||||||
: `missing template ${tplname}`;
|
: `missing template ${tplname}`;
|
||||||
const data = typeof tpldata == "string" ? apx.data.tpldata[tpldata] : tpldata;
|
const data = typeof tpldata == "string" ? apx.data.tpldata[tpldata] : tpldata;
|
||||||
document.getElementById(idtoload).innerHTML = Mustache.render(tpl, data);
|
document.getElementById(idtoload).innerHTML = Mustache.render(tpl, data);
|
||||||
};
|
};
|
||||||
app.setuppage = () => {
|
app.setuppage = () => {
|
||||||
// load partial template
|
// load partial template
|
||||||
document.querySelectorAll("[apptoload]").forEach((e) => {
|
document.querySelectorAll("[apptoload]").forEach((e) => {
|
||||||
|
232
nationchains/www/adminapx/static/js/apxpagans.js
Normal file
@ -0,0 +1,232 @@
|
|||||||
|
/*eslint no-undef:0*/
|
||||||
|
/*eslint-env browser*/
|
||||||
|
|
||||||
|
"use strict";
|
||||||
|
var pagans = pagans || {};
|
||||||
|
/**
|
||||||
|
* pagans.generateKey(params) create a public/private key compatible with apXtrib backend and store it in apx.data
|
||||||
|
* pagans.detachedSignature(params) generate a detachedSignature for a Message that backend can check with the publicKey of the alias
|
||||||
|
* pagans.checkdetachedSignature(params) check a detachedSignature for a Message (used on the backend as well)
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
pagans.loadtpldata = () => {
|
||||||
|
// adapte tpldata to template tpl
|
||||||
|
// get list of tribes from nationchains/towns/idx/townId_all.json
|
||||||
|
const datacreatepagan = { tribes: [] };
|
||||||
|
|
||||||
|
apx.data.towns.idxtownId_all[apx.data.tpldata.setup.townId].tribes.forEach(
|
||||||
|
(t) => {
|
||||||
|
if (t == apx.data.tpldata.setup.tribeId) {
|
||||||
|
datacreatepagan.tribes.push({ selected: true, tribeId: t });
|
||||||
|
} else {
|
||||||
|
datacreatepagan.tribes.push({ tribeId: t });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
return datacreatepagan;
|
||||||
|
};
|
||||||
|
|
||||||
|
pagans.generateKey = async (alias, passphrase) => {
|
||||||
|
/**
|
||||||
|
* @param {string} alias a unique alias that identify an identity
|
||||||
|
* @param {string} passphrase a string to cipher the publicKey (can be empty, less secure but simpler)
|
||||||
|
* @return {publicKey,privateKey} with userIds = [{alias}]
|
||||||
|
*/
|
||||||
|
const pgpparam = {
|
||||||
|
type: "ecc", // Type of the key, defaults to ECC
|
||||||
|
curve: "curve25519", // ECC curve name, defaults to curve25519
|
||||||
|
userIDs: [{ alias: alias }], // you can pass multiple user IDs
|
||||||
|
passphrase: passphrase, // protects the private key
|
||||||
|
format: "armored", // output key format, defaults to 'armored' (other options: 'binary' or 'object')
|
||||||
|
};
|
||||||
|
const { privateKey, publicKey } = await openpgp.generateKey(pgpparam);
|
||||||
|
// key start by '-----BEGIN PGP PRIVATE KEY BLOCK ... '
|
||||||
|
// get liste of alias:pubklickey await axios.get('api/v0/pagans')
|
||||||
|
// check alias does not exist
|
||||||
|
return { alias, privateKey, publicKey };
|
||||||
|
};
|
||||||
|
pagans.detachedSignature = async (pubK, privK, passphrase, message) => {
|
||||||
|
/**
|
||||||
|
* @pubK {string} a text public key
|
||||||
|
* @privK {string} a test priv key
|
||||||
|
* @passphrase {string} used to read privK
|
||||||
|
* @message {string} message to sign
|
||||||
|
* @Return a detached Signature of the message
|
||||||
|
*/
|
||||||
|
const publicKey = await openpgp.readKey({ armoredKey: pubK });
|
||||||
|
let privateKey;
|
||||||
|
if (passphrase == "") {
|
||||||
|
privateKey = await openpgp.readPrivateKey({ armoredKey: privK });
|
||||||
|
} else {
|
||||||
|
privateKey = await openpgp.decryptKey({
|
||||||
|
privateKey: await openpgp.readPrivateKey({ armoredKey: privK }),
|
||||||
|
passphrase,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
console.log(message);
|
||||||
|
const msg = await openpgp.createMessage({ text: message });
|
||||||
|
console.log(msg);
|
||||||
|
const sig = await openpgp.sign({
|
||||||
|
message: msg,
|
||||||
|
signingKeys: privateKey,
|
||||||
|
detached: true,
|
||||||
|
});
|
||||||
|
return btoa(sig);
|
||||||
|
};
|
||||||
|
pagans.authenticatedetachedSignature = async (
|
||||||
|
alias,
|
||||||
|
pubK,
|
||||||
|
detachedSignature,
|
||||||
|
message
|
||||||
|
) => {
|
||||||
|
/**
|
||||||
|
* Check that alias (pubkey) signe a message
|
||||||
|
* @alias {string} alias link to the publicKey
|
||||||
|
* @pubK {string} publiKey text format
|
||||||
|
* @detachedSignature {string} a detachedsignatured get from apx.detachedSignature
|
||||||
|
* @message {string} the message signed
|
||||||
|
* @return {boolean} true the message was signed by alias
|
||||||
|
* false the message was not signed by alias
|
||||||
|
*/
|
||||||
|
const publicKey = await openpgp.readKey({ armoredKey: pubK });
|
||||||
|
const msg = await openpgp.createMessage({ text: message });
|
||||||
|
const signature = await openpgp.readSignature({
|
||||||
|
armoredSignature: atob(detachedSignature), // parse detached signature
|
||||||
|
});
|
||||||
|
const verificationResult = await openpgp.verify({
|
||||||
|
msg, // Message object
|
||||||
|
signature,
|
||||||
|
verificationKeys: publicKey,
|
||||||
|
});
|
||||||
|
const { verified, keyID } = verificationResult.signatures[0];
|
||||||
|
try {
|
||||||
|
await verified; // throws on invalid signature
|
||||||
|
console.log("Signed by key id " + keyID.toHex());
|
||||||
|
return KeyId.toHex().alias == alias;
|
||||||
|
} catch (e) {
|
||||||
|
console.log("Signature could not be verified: " + e.message);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
pagans.createIdentity = async (alias, passphrase = "") => {
|
||||||
|
console.log(Object.keys(apx.data.pagans["idxalias_all"]));
|
||||||
|
if (
|
||||||
|
alias.length < 3 ||
|
||||||
|
Object.keys(apx.data.pagans["idxalias_all"]).includes(alias)
|
||||||
|
) {
|
||||||
|
alert("Please chose another alias");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const keys = await pagans.generateKey(alias, passphrase);
|
||||||
|
for (let tag of ["inputalias", "inputpassphrase"]) {
|
||||||
|
document.getElementById(tag).classList.add("disabled");
|
||||||
|
}
|
||||||
|
console.log(keys);
|
||||||
|
document.getElementById("privatekey").setAttribute("key", keys.privateKey);
|
||||||
|
document.getElementById("publickey").setAttribute("key", keys.publicKey);
|
||||||
|
document.getElementById("generatekeys").classList.add("d-none");
|
||||||
|
document.getElementById("trustintribe").classList.remove("d-none");
|
||||||
|
document.getElementById("downloadkeys").classList.remove("d-none");
|
||||||
|
document.getElementById("createId").classList.remove("d-none");
|
||||||
|
};
|
||||||
|
|
||||||
|
pagans.registerIdentity = async () => {
|
||||||
|
const emailregex =
|
||||||
|
/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
|
||||||
|
const data = {};
|
||||||
|
data.alias = document.getElementById("inputalias").value;
|
||||||
|
data.publickey = document.getElementById("publickey").getAttribute("key");
|
||||||
|
|
||||||
|
if (document.getElementById("inputemailrecovery").value != "") {
|
||||||
|
data.email = document.getElementById("inputemailrecovery").value;
|
||||||
|
}
|
||||||
|
if (data.email && !emailregex.test(data.email)) {
|
||||||
|
alert("Check your email");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
var select = document.getElementById("trustedtribe");
|
||||||
|
if (document.getElementById("trustedcheck").checked) {
|
||||||
|
data.trustedtribe = select.options[select.selectedIndex].value;
|
||||||
|
data.privatekey = document.getElementById("privatekey").getAttribute("key");
|
||||||
|
data.passphrase = document.getElementById("inputpassphrase").value;
|
||||||
|
}
|
||||||
|
if (document.getElementById("trustedcheck").checked && !data.email) {
|
||||||
|
alert("Please provide a valid email");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
console.log(data);
|
||||||
|
//store and create authentification by signing 'alias_timestamp'
|
||||||
|
/* const passp = data.passphrase ? data.passphrase : "";
|
||||||
|
apx.data.auth = {
|
||||||
|
alias: data.alias,
|
||||||
|
publickey: data.publickey,
|
||||||
|
privatekey: document.getElementById("privatekey").getAttribute("key"),
|
||||||
|
passphrase: passp,
|
||||||
|
};
|
||||||
|
apx.data.headers.xalias = data.alias;
|
||||||
|
apx.data.headers.xdays = dayjs().valueOf();
|
||||||
|
apx.save();
|
||||||
|
const msg = `${data.alias}_${apx.data.headers.xdays}`;
|
||||||
|
apx.data.headers.xhash = await pagans.detachedSignature(
|
||||||
|
apx.data.auth.publickey,
|
||||||
|
apx.data.auth.privatekey,
|
||||||
|
passp,
|
||||||
|
msg
|
||||||
|
);
|
||||||
|
apx.save();*/
|
||||||
|
await pagans.authentifyme(
|
||||||
|
data.alias,
|
||||||
|
data.passphrase,
|
||||||
|
document.getElementById("privatekey").getAttribute("key"),
|
||||||
|
document.getElementById("publickey").getAttribute("key")
|
||||||
|
);
|
||||||
|
console.log("header", apx.data.headers);
|
||||||
|
axios
|
||||||
|
.post("api/pagans", data, { headers: apx.data.headers })
|
||||||
|
.then((reppagan) => {
|
||||||
|
console.log(reppagan);
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
console.log("sorry", err);
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
pagans.authentifyme = async (
|
||||||
|
alias,
|
||||||
|
passphrase,
|
||||||
|
privatekey,
|
||||||
|
publickeycreate
|
||||||
|
) => {
|
||||||
|
/**
|
||||||
|
* Set apx.data.auth with pub, priv, passphrase alias that allow authentification
|
||||||
|
* set headers with xdays (timestamp) and xhash of message: {alias}_{timestamp} generate with pub & priv key
|
||||||
|
*
|
||||||
|
* @Param {key} publickeycreate optional when alias does not exist
|
||||||
|
*/
|
||||||
|
console.log(alias, passphrase);
|
||||||
|
console.log(privatekey);
|
||||||
|
const passp = passphrase ? passphrase : "";
|
||||||
|
const publickey = publickeycreate
|
||||||
|
? publickeycreate
|
||||||
|
: apx.data.pagans.idxalias_all[alias].publicKey;
|
||||||
|
apx.data.auth = {
|
||||||
|
alias: alias,
|
||||||
|
publickey: publickey,
|
||||||
|
privatekey: privatekey,
|
||||||
|
passphrase: passp,
|
||||||
|
};
|
||||||
|
apx.data.headers.xalias = alias;
|
||||||
|
apx.data.headers.xdays = dayjs().valueOf();
|
||||||
|
apx.save();
|
||||||
|
const msg = `${alias}_${apx.data.headers.xdays}`;
|
||||||
|
|
||||||
|
apx.data.headers.xhash = await pagans.detachedSignature(
|
||||||
|
apx.data.auth.publickey,
|
||||||
|
apx.data.auth.privatekey,
|
||||||
|
passp,
|
||||||
|
msg
|
||||||
|
);
|
||||||
|
apx.save();
|
||||||
|
};
|
0
nationchains/www/adminapx/static/js/apxtowns.js
Normal file
@ -21,93 +21,12 @@ var apx = apx || {};
|
|||||||
},
|
},
|
||||||
objects:{}
|
objects:{}
|
||||||
};
|
};
|
||||||
* apx.generateKey(params) create a public/private key compatible with apXtrib backend and store it in apx.data
|
|
||||||
* apx.detachedSignature(params) generate a detachedSignature for a Message that backend can check with the publicKey of the alias
|
|
||||||
* apx.checkdetachedSignature(params) check a detachedSignature for a Message (used on the backend as well)
|
|
||||||
|
|
||||||
* apx.ready(callback) equivalent of jquery Document.ready()
|
* apx.ready(callback) equivalent of jquery Document.ready()
|
||||||
* apx.save() save apx.data as xapp value in localStorage
|
* apx.save() save apx.data as xapp value in localStorage
|
||||||
* apx.update() get localStorage up to date
|
* apx.update() get localStorage up to date
|
||||||
* apx.loadfile({url:name},dest,axiosoptions) async that wait to load a list of relativ url and store it in a apx.data[dest]
|
* apx.loadfile({url:name},dest,axiosoptions) async that wait to load a list of relativ url and store it in a apx.data[dest]
|
||||||
*/
|
*/
|
||||||
|
|
||||||
apx.generateKey = async (alias, passphrase) => {
|
|
||||||
/**
|
|
||||||
* @param {string} alias a unique alias that identify an identity
|
|
||||||
* @param {string} passphrase a string to cipher the publicKey (can be empty, less secure but simpler)
|
|
||||||
* @return {publicKey,privateKey} with userIds = [{alias}]
|
|
||||||
*/
|
|
||||||
const { privateKey, publicKey } = await openpgp.generateKey({
|
|
||||||
type: "ecc", // Type of the key, defaults to ECC
|
|
||||||
curve: "curve25519", // ECC curve name, defaults to curve25519
|
|
||||||
userIDs: [{ alias: alias }], // you can pass multiple user IDs
|
|
||||||
passphrase: passphrase, // protects the private key
|
|
||||||
format: "armored", // output key format, defaults to 'armored' (other options: 'binary' or 'object')
|
|
||||||
});
|
|
||||||
// key start by '-----BEGIN PGP PRIVATE KEY BLOCK ... '
|
|
||||||
// get liste of alias:pubklickey await axios.get('api/v0/pagans')
|
|
||||||
// check alias does not exist
|
|
||||||
return { alias, privateKey, publicKey };
|
|
||||||
/* document.getElementById('privatekey').innerHTML=privateKey;
|
|
||||||
document.getElementById('publickey').innerHTML=publicKey;
|
|
||||||
apx.data.pagans={}
|
|
||||||
apx.data.pagans.privateKey=privateKey;
|
|
||||||
apx.data.pagans.publicKey=publicKey;
|
|
||||||
apx.save();
|
|
||||||
console.log(apx.data)
|
|
||||||
*/
|
|
||||||
};
|
|
||||||
apx.detachedSignature = async (pubK, privK, passphrase, message) => {
|
|
||||||
/**
|
|
||||||
* @pubK {string} a text public key
|
|
||||||
* @privK {string} a test priv key
|
|
||||||
* @passphrase {string} used to read privK
|
|
||||||
* @message {string} message to sign
|
|
||||||
* @Return a detached Signature of the message
|
|
||||||
*/
|
|
||||||
const publicKey = await openpgp.readKey({ armoredKey: pubK });
|
|
||||||
const privateKey = await openpgp.decryptKey({
|
|
||||||
privateKey: await openpgp.readPrivateKey({ armoredKey: privK }),
|
|
||||||
passphrase,
|
|
||||||
});
|
|
||||||
const msg = await openpgp.createMessage({ text: message });
|
|
||||||
return await openpgp.sign({ msg, signinKeys: privK, detached: true });
|
|
||||||
};
|
|
||||||
apx.checkdetachedSignature = async (
|
|
||||||
alias,
|
|
||||||
pubK,
|
|
||||||
detachedSignature,
|
|
||||||
message
|
|
||||||
) => {
|
|
||||||
/**
|
|
||||||
* @alias {string} alias link to the publicKey
|
|
||||||
* @pubK {string} publiKey text format
|
|
||||||
* @detachedSignature {string} a detachedsignatured get from apx.detachedSignature
|
|
||||||
* @message {string} the message signed
|
|
||||||
* @return {boolean} true the message was signed by alias
|
|
||||||
* false the message was not signed by alias
|
|
||||||
*/
|
|
||||||
const publicKey = await openpgp.readKey({ armoredKey: pubK });
|
|
||||||
const msg = await openpgp.createMessage({ text: message });
|
|
||||||
const signature = await openpgp.readSignature({
|
|
||||||
armoredSignature: detachedSignature, // parse detached signature
|
|
||||||
});
|
|
||||||
const verificationResult = await openpgp.verify({
|
|
||||||
msg, // Message object
|
|
||||||
signature,
|
|
||||||
verificationKeys: publicKey
|
|
||||||
});
|
|
||||||
const { verified, keyID } = verificationResult.signatures[0];
|
|
||||||
try {
|
|
||||||
await verified; // throws on invalid signature
|
|
||||||
console.log("Signed by key id " + keyID.toHex());
|
|
||||||
return KeyId.toHex().alias == alias;
|
|
||||||
} catch (e) {
|
|
||||||
console.log("Signature could not be verified: " + e.message);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
apx.ready = (callback) => {
|
apx.ready = (callback) => {
|
||||||
/**
|
/**
|
||||||
* Wait loading DOM, when ready run callback function
|
* Wait loading DOM, when ready run callback function
|
||||||
@ -156,13 +75,17 @@ apx.loadfile = async (list, dest, axiosoptions) => {
|
|||||||
};
|
};
|
||||||
const urls = Object.keys(invertlist);
|
const urls = Object.keys(invertlist);
|
||||||
if (!axiosoptions) {
|
if (!axiosoptions) {
|
||||||
|
// force no cache browser
|
||||||
|
apx.data.headers["Cache-Control"] = "no-cache";
|
||||||
|
apx.data.headers["Pragma"] = "no-cache";
|
||||||
|
apx.data.headers["Expires"] = 0;
|
||||||
axiosoptions = { headers: apx.data.headers };
|
axiosoptions = { headers: apx.data.headers };
|
||||||
}
|
}
|
||||||
console.log('axiosiptions',axiosoptions)
|
console.log("axiosiptions", axiosoptions);
|
||||||
const promiseArray = urls.map((r) => fetchURL(r, axiosoptions));
|
const promiseArray = urls.map((r) => fetchURL(r, axiosoptions));
|
||||||
await Promise.all(promiseArray)
|
await Promise.all(promiseArray)
|
||||||
.then((data) => {
|
.then((data) => {
|
||||||
console.log(data)
|
console.log(data);
|
||||||
for (let pos = 0; pos < urls.length; pos++) {
|
for (let pos = 0; pos < urls.length; pos++) {
|
||||||
//console.log( 'url', urls[ pos ] )
|
//console.log( 'url', urls[ pos ] )
|
||||||
//console.log( data[ pos ] );
|
//console.log( data[ pos ] );
|
||||||
|
0
nationchains/www/adminapx/static/js/apxtribes.js
Normal file
93
nationchains/www/adminapx/static/style/fonts/logo/OFL.txt
Normal file
@ -0,0 +1,93 @@
|
|||||||
|
Copyright 2011 The Quicksand Project Authors (https://github.com/andrew-paglinawan/QuicksandFamily), with Reserved Font Name “Quicksand”.
|
||||||
|
|
||||||
|
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
||||||
|
This license is copied below, and is also available with a FAQ at:
|
||||||
|
http://scripts.sil.org/OFL
|
||||||
|
|
||||||
|
|
||||||
|
-----------------------------------------------------------
|
||||||
|
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
||||||
|
-----------------------------------------------------------
|
||||||
|
|
||||||
|
PREAMBLE
|
||||||
|
The goals of the Open Font License (OFL) are to stimulate worldwide
|
||||||
|
development of collaborative font projects, to support the font creation
|
||||||
|
efforts of academic and linguistic communities, and to provide a free and
|
||||||
|
open framework in which fonts may be shared and improved in partnership
|
||||||
|
with others.
|
||||||
|
|
||||||
|
The OFL allows the licensed fonts to be used, studied, modified and
|
||||||
|
redistributed freely as long as they are not sold by themselves. The
|
||||||
|
fonts, including any derivative works, can be bundled, embedded,
|
||||||
|
redistributed and/or sold with any software provided that any reserved
|
||||||
|
names are not used by derivative works. The fonts and derivatives,
|
||||||
|
however, cannot be released under any other type of license. The
|
||||||
|
requirement for fonts to remain under this license does not apply
|
||||||
|
to any document created using the fonts or their derivatives.
|
||||||
|
|
||||||
|
DEFINITIONS
|
||||||
|
"Font Software" refers to the set of files released by the Copyright
|
||||||
|
Holder(s) under this license and clearly marked as such. This may
|
||||||
|
include source files, build scripts and documentation.
|
||||||
|
|
||||||
|
"Reserved Font Name" refers to any names specified as such after the
|
||||||
|
copyright statement(s).
|
||||||
|
|
||||||
|
"Original Version" refers to the collection of Font Software components as
|
||||||
|
distributed by the Copyright Holder(s).
|
||||||
|
|
||||||
|
"Modified Version" refers to any derivative made by adding to, deleting,
|
||||||
|
or substituting -- in part or in whole -- any of the components of the
|
||||||
|
Original Version, by changing formats or by porting the Font Software to a
|
||||||
|
new environment.
|
||||||
|
|
||||||
|
"Author" refers to any designer, engineer, programmer, technical
|
||||||
|
writer or other person who contributed to the Font Software.
|
||||||
|
|
||||||
|
PERMISSION & CONDITIONS
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining
|
||||||
|
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
||||||
|
redistribute, and sell modified and unmodified copies of the Font
|
||||||
|
Software, subject to the following conditions:
|
||||||
|
|
||||||
|
1) Neither the Font Software nor any of its individual components,
|
||||||
|
in Original or Modified Versions, may be sold by itself.
|
||||||
|
|
||||||
|
2) Original or Modified Versions of the Font Software may be bundled,
|
||||||
|
redistributed and/or sold with any software, provided that each copy
|
||||||
|
contains the above copyright notice and this license. These can be
|
||||||
|
included either as stand-alone text files, human-readable headers or
|
||||||
|
in the appropriate machine-readable metadata fields within text or
|
||||||
|
binary files as long as those fields can be easily viewed by the user.
|
||||||
|
|
||||||
|
3) No Modified Version of the Font Software may use the Reserved Font
|
||||||
|
Name(s) unless explicit written permission is granted by the corresponding
|
||||||
|
Copyright Holder. This restriction only applies to the primary font name as
|
||||||
|
presented to the users.
|
||||||
|
|
||||||
|
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
||||||
|
Software shall not be used to promote, endorse or advertise any
|
||||||
|
Modified Version, except to acknowledge the contribution(s) of the
|
||||||
|
Copyright Holder(s) and the Author(s) or with their explicit written
|
||||||
|
permission.
|
||||||
|
|
||||||
|
5) The Font Software, modified or unmodified, in part or in whole,
|
||||||
|
must be distributed entirely under this license, and must not be
|
||||||
|
distributed under any other license. The requirement for fonts to
|
||||||
|
remain under this license does not apply to any document created
|
||||||
|
using the Font Software.
|
||||||
|
|
||||||
|
TERMINATION
|
||||||
|
This license becomes null and void if any of the above conditions are
|
||||||
|
not met.
|
||||||
|
|
||||||
|
DISCLAIMER
|
||||||
|
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
||||||
|
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
||||||
|
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
||||||
|
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||||
|
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
||||||
|
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||||
|
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
||||||
|
OTHER DEALINGS IN THE FONT SOFTWARE.
|
BIN
nationchains/www/adminapx/static/style/fonts/logo/Quicksand.zip
Normal file
67
nationchains/www/adminapx/static/style/fonts/logo/README.txt
Normal file
@ -0,0 +1,67 @@
|
|||||||
|
Quicksand Variable Font
|
||||||
|
=======================
|
||||||
|
|
||||||
|
This download contains Quicksand as both a variable font and static fonts.
|
||||||
|
|
||||||
|
Quicksand is a variable font with this axis:
|
||||||
|
wght
|
||||||
|
|
||||||
|
This means all the styles are contained in a single file:
|
||||||
|
Quicksand-VariableFont_wght.ttf
|
||||||
|
|
||||||
|
If your app fully supports variable fonts, you can now pick intermediate styles
|
||||||
|
that aren’t available as static fonts. Not all apps support variable fonts, and
|
||||||
|
in those cases you can use the static font files for Quicksand:
|
||||||
|
static/Quicksand-Light.ttf
|
||||||
|
static/Quicksand-Regular.ttf
|
||||||
|
static/Quicksand-Medium.ttf
|
||||||
|
static/Quicksand-SemiBold.ttf
|
||||||
|
static/Quicksand-Bold.ttf
|
||||||
|
|
||||||
|
Get started
|
||||||
|
-----------
|
||||||
|
|
||||||
|
1. Install the font files you want to use
|
||||||
|
|
||||||
|
2. Use your app's font picker to view the font family and all the
|
||||||
|
available styles
|
||||||
|
|
||||||
|
Learn more about variable fonts
|
||||||
|
-------------------------------
|
||||||
|
|
||||||
|
https://developers.google.com/web/fundamentals/design-and-ux/typography/variable-fonts
|
||||||
|
https://variablefonts.typenetwork.com
|
||||||
|
https://medium.com/variable-fonts
|
||||||
|
|
||||||
|
In desktop apps
|
||||||
|
|
||||||
|
https://theblog.adobe.com/can-variable-fonts-illustrator-cc
|
||||||
|
https://helpx.adobe.com/nz/photoshop/using/fonts.html#variable_fonts
|
||||||
|
|
||||||
|
Online
|
||||||
|
|
||||||
|
https://developers.google.com/fonts/docs/getting_started
|
||||||
|
https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Fonts/Variable_Fonts_Guide
|
||||||
|
https://developer.microsoft.com/en-us/microsoft-edge/testdrive/demos/variable-fonts
|
||||||
|
|
||||||
|
Installing fonts
|
||||||
|
|
||||||
|
MacOS: https://support.apple.com/en-us/HT201749
|
||||||
|
Linux: https://www.google.com/search?q=how+to+install+a+font+on+gnu%2Blinux
|
||||||
|
Windows: https://support.microsoft.com/en-us/help/314960/how-to-install-or-remove-a-font-in-windows
|
||||||
|
|
||||||
|
Android Apps
|
||||||
|
|
||||||
|
https://developers.google.com/fonts/docs/android
|
||||||
|
https://developer.android.com/guide/topics/ui/look-and-feel/downloadable-fonts
|
||||||
|
|
||||||
|
License
|
||||||
|
-------
|
||||||
|
Please read the full license text (OFL.txt) to understand the permissions,
|
||||||
|
restrictions and requirements for usage, redistribution, and modification.
|
||||||
|
|
||||||
|
You can use them in your products & projects – print or digital,
|
||||||
|
commercial or otherwise.
|
||||||
|
|
||||||
|
This isn't legal advice, please consider consulting a lawyer and see the full
|
||||||
|
license for all details.
|
93
nationchains/www/adminapx/static/style/fonts/texte/OFL.txt
Normal file
@ -0,0 +1,93 @@
|
|||||||
|
Copyright 2011 The Questrial Project Authors (https://github.com/googlefonts/questrial)
|
||||||
|
|
||||||
|
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
||||||
|
This license is copied below, and is also available with a FAQ at:
|
||||||
|
http://scripts.sil.org/OFL
|
||||||
|
|
||||||
|
|
||||||
|
-----------------------------------------------------------
|
||||||
|
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
||||||
|
-----------------------------------------------------------
|
||||||
|
|
||||||
|
PREAMBLE
|
||||||
|
The goals of the Open Font License (OFL) are to stimulate worldwide
|
||||||
|
development of collaborative font projects, to support the font creation
|
||||||
|
efforts of academic and linguistic communities, and to provide a free and
|
||||||
|
open framework in which fonts may be shared and improved in partnership
|
||||||
|
with others.
|
||||||
|
|
||||||
|
The OFL allows the licensed fonts to be used, studied, modified and
|
||||||
|
redistributed freely as long as they are not sold by themselves. The
|
||||||
|
fonts, including any derivative works, can be bundled, embedded,
|
||||||
|
redistributed and/or sold with any software provided that any reserved
|
||||||
|
names are not used by derivative works. The fonts and derivatives,
|
||||||
|
however, cannot be released under any other type of license. The
|
||||||
|
requirement for fonts to remain under this license does not apply
|
||||||
|
to any document created using the fonts or their derivatives.
|
||||||
|
|
||||||
|
DEFINITIONS
|
||||||
|
"Font Software" refers to the set of files released by the Copyright
|
||||||
|
Holder(s) under this license and clearly marked as such. This may
|
||||||
|
include source files, build scripts and documentation.
|
||||||
|
|
||||||
|
"Reserved Font Name" refers to any names specified as such after the
|
||||||
|
copyright statement(s).
|
||||||
|
|
||||||
|
"Original Version" refers to the collection of Font Software components as
|
||||||
|
distributed by the Copyright Holder(s).
|
||||||
|
|
||||||
|
"Modified Version" refers to any derivative made by adding to, deleting,
|
||||||
|
or substituting -- in part or in whole -- any of the components of the
|
||||||
|
Original Version, by changing formats or by porting the Font Software to a
|
||||||
|
new environment.
|
||||||
|
|
||||||
|
"Author" refers to any designer, engineer, programmer, technical
|
||||||
|
writer or other person who contributed to the Font Software.
|
||||||
|
|
||||||
|
PERMISSION & CONDITIONS
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining
|
||||||
|
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
||||||
|
redistribute, and sell modified and unmodified copies of the Font
|
||||||
|
Software, subject to the following conditions:
|
||||||
|
|
||||||
|
1) Neither the Font Software nor any of its individual components,
|
||||||
|
in Original or Modified Versions, may be sold by itself.
|
||||||
|
|
||||||
|
2) Original or Modified Versions of the Font Software may be bundled,
|
||||||
|
redistributed and/or sold with any software, provided that each copy
|
||||||
|
contains the above copyright notice and this license. These can be
|
||||||
|
included either as stand-alone text files, human-readable headers or
|
||||||
|
in the appropriate machine-readable metadata fields within text or
|
||||||
|
binary files as long as those fields can be easily viewed by the user.
|
||||||
|
|
||||||
|
3) No Modified Version of the Font Software may use the Reserved Font
|
||||||
|
Name(s) unless explicit written permission is granted by the corresponding
|
||||||
|
Copyright Holder. This restriction only applies to the primary font name as
|
||||||
|
presented to the users.
|
||||||
|
|
||||||
|
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
||||||
|
Software shall not be used to promote, endorse or advertise any
|
||||||
|
Modified Version, except to acknowledge the contribution(s) of the
|
||||||
|
Copyright Holder(s) and the Author(s) or with their explicit written
|
||||||
|
permission.
|
||||||
|
|
||||||
|
5) The Font Software, modified or unmodified, in part or in whole,
|
||||||
|
must be distributed entirely under this license, and must not be
|
||||||
|
distributed under any other license. The requirement for fonts to
|
||||||
|
remain under this license does not apply to any document created
|
||||||
|
using the Font Software.
|
||||||
|
|
||||||
|
TERMINATION
|
||||||
|
This license becomes null and void if any of the above conditions are
|
||||||
|
not met.
|
||||||
|
|
||||||
|
DISCLAIMER
|
||||||
|
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
||||||
|
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
||||||
|
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
||||||
|
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||||
|
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
||||||
|
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||||
|
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
||||||
|
OTHER DEALINGS IN THE FONT SOFTWARE.
|
BIN
nationchains/www/adminapx/static/style/fonts/texte/Questrial.zip
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
# Font Squirrel Font-face Generator Configuration File
|
||||||
|
# Upload this file to the generator to recreate the settings
|
||||||
|
# you used to create these fonts.
|
||||||
|
|
||||||
|
{"mode":"optimal","formats":["woff","woff2"],"tt_instructor":"default","fix_gasp":"xy","fix_vertical_metrics":"Y","metrics_ascent":"","metrics_descent":"","metrics_linegap":"","add_spaces":"Y","add_hyphens":"Y","fallback":"none","fallback_custom":"100","options_subset":"basic","subset_custom":"","subset_custom_range":"","subset_ot_features_list":"","css_stylesheet":"stylesheet.css","filename_suffix":"-webfont","emsquare":"2048","spacing_adjustment":"0"}
|
@ -0,0 +1,706 @@
|
|||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||||
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
||||||
|
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" type="text/javascript" charset="utf-8"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
(function($) {
|
||||||
|
$.fn.easyTabs = function(option) {
|
||||||
|
var param = jQuery.extend({ fadeSpeed: 'fast', defaultContent: 1, activeClass: 'active' }, option);
|
||||||
|
$(this).each(function() {
|
||||||
|
var thisId = '#' + this.id;
|
||||||
|
if ( param.defaultContent == '' )
|
||||||
|
{
|
||||||
|
param.defaultContent = 1;
|
||||||
|
}
|
||||||
|
if ( typeof param.defaultContent == 'number' )
|
||||||
|
{
|
||||||
|
var defaultTab = $(thisId + ' .tabs li:eq(' + (param.defaultContent - 1) + ') a').attr('href').substr(1);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var defaultTab = param.defaultContent;
|
||||||
|
}
|
||||||
|
$(thisId + ' .tabs li a').each(function() {
|
||||||
|
var tabToHide = $(this).attr('href').substr(1);
|
||||||
|
$('#' + tabToHide).addClass('easytabs-tab-content');
|
||||||
|
});
|
||||||
|
hideAll();
|
||||||
|
changeContent(defaultTab);
|
||||||
|
|
||||||
|
function hideAll() {$(thisId + ' .easytabs-tab-content').hide();}
|
||||||
|
|
||||||
|
function changeContent(tabId)
|
||||||
|
{
|
||||||
|
hideAll();
|
||||||
|
$(thisId + ' .tabs li').removeClass(param.activeClass);
|
||||||
|
$(thisId + ' .tabs li a[href=#' + tabId + ']').closest('li').addClass(param.activeClass);
|
||||||
|
if ( param.fadeSpeed != 'none' )
|
||||||
|
{
|
||||||
|
$(thisId + ' #' + tabId).fadeIn(param.fadeSpeed);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$(thisId + ' #' + tabId).show();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$(thisId + ' .tabs li').click(function() {
|
||||||
|
var tabId = $(this).find('a').attr('href').substr(1);
|
||||||
|
changeContent(tabId);
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
})(jQuery);
|
||||||
|
</script>
|
||||||
|
<link rel="stylesheet" href="specimen_files/specimen_stylesheet.css" type="text/css" charset="utf-8"/>
|
||||||
|
<link rel="stylesheet" href="stylesheet.css" type="text/css" charset="utf-8"/>
|
||||||
|
|
||||||
|
<style type="text/css">
|
||||||
|
body {
|
||||||
|
font-family: 'questrialregular';
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<title>Questrial Regular Specimen</title>
|
||||||
|
|
||||||
|
|
||||||
|
<script type="text/javascript" charset="utf-8">
|
||||||
|
$(document).ready(function() {
|
||||||
|
$('#container').easyTabs({ defaultContent: 1 });
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<div id="container">
|
||||||
|
<div id="header">
|
||||||
|
Questrial Regular </div>
|
||||||
|
<ul class="tabs">
|
||||||
|
<li><a href="#specimen">Specimen</a></li>
|
||||||
|
<li><a href="#layout">Sample Layout</a></li>
|
||||||
|
<li><a href="#glyphs">Glyphs & Languages</a></li>
|
||||||
|
<li><a href="#installing">Installing Webfonts</a></li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<div id="main_content">
|
||||||
|
|
||||||
|
|
||||||
|
<div id="specimen">
|
||||||
|
|
||||||
|
<div class="section">
|
||||||
|
<div class="grid12 firstcol">
|
||||||
|
<div class="huge">AaBb</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="section">
|
||||||
|
<div class="glyph_range">A​B​C​D​E​F​G​H​I​J​K​L​M​N​O​P​Q​R​S​T​U​V​W​X​Y​Z​a​b​c​d​e​f​g​h​i​j​k​l​m​n​o​p​q​r​s​t​u​v​w​x​y​z​1​2​3​4​5​6​7​8​9​0​&​.​,​?​!​@​(​)​#​$​%​*​+​-​=​:​;</div>
|
||||||
|
</div>
|
||||||
|
<div class="section">
|
||||||
|
<div class="grid12 firstcol">
|
||||||
|
<table class="sample_table">
|
||||||
|
<tr>
|
||||||
|
<td>10</td>
|
||||||
|
<td class="size10">abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>11</td>
|
||||||
|
<td class="size11">abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>12</td>
|
||||||
|
<td class="size12">abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>13</td>
|
||||||
|
<td class="size13">abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>14</td>
|
||||||
|
<td class="size14">abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>16</td>
|
||||||
|
<td class="size16">abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>18</td>
|
||||||
|
<td class="size18">abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>20</td>
|
||||||
|
<td class="size20">abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>24</td>
|
||||||
|
<td class="size24">abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>30</td>
|
||||||
|
<td class="size30">abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>36</td>
|
||||||
|
<td class="size36">abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>48</td>
|
||||||
|
<td class="size48">abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>60</td>
|
||||||
|
<td class="size60">abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>72</td>
|
||||||
|
<td class="size72">abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>90</td>
|
||||||
|
<td class="size90">abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="section" id="bodycomparison">
|
||||||
|
|
||||||
|
|
||||||
|
<div id="xheight">
|
||||||
|
<div class="fontbody">◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼body</div>
|
||||||
|
<div class="arialbody">body</div>
|
||||||
|
<div class="verdanabody">body</div>
|
||||||
|
<div class="georgiabody">body</div>
|
||||||
|
</div>
|
||||||
|
<div class="fontbody" style="z-index:1">
|
||||||
|
body<span>Questrial Regular</span>
|
||||||
|
</div>
|
||||||
|
<div class="arialbody" style="z-index:1">
|
||||||
|
body<span>Arial</span>
|
||||||
|
</div>
|
||||||
|
<div class="verdanabody" style="z-index:1">
|
||||||
|
body<span>Verdana</span>
|
||||||
|
</div>
|
||||||
|
<div class="georgiabody" style="z-index:1">
|
||||||
|
body<span>Georgia</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="section psample psample_row1" id="">
|
||||||
|
|
||||||
|
<div class="grid2 firstcol">
|
||||||
|
<p class="size10"><span>10.</span>Aenean lacinia bibendum nulla sed consectetur. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Nullam id dolor id nibh ultricies vehicula ut id elit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nulla vitae elit libero, a pharetra augue.</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="grid3">
|
||||||
|
<p class="size11"><span>11.</span>Aenean lacinia bibendum nulla sed consectetur. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Nullam id dolor id nibh ultricies vehicula ut id elit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nulla vitae elit libero, a pharetra augue.</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="grid3">
|
||||||
|
<p class="size12"><span>12.</span>Aenean lacinia bibendum nulla sed consectetur. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Nullam id dolor id nibh ultricies vehicula ut id elit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nulla vitae elit libero, a pharetra augue.</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="grid4">
|
||||||
|
<p class="size13"><span>13.</span>Aenean lacinia bibendum nulla sed consectetur. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Nullam id dolor id nibh ultricies vehicula ut id elit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nulla vitae elit libero, a pharetra augue.</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="white_blend"></div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="section psample psample_row2" id="">
|
||||||
|
<div class="grid3 firstcol">
|
||||||
|
<p class="size14"><span>14.</span>Aenean lacinia bibendum nulla sed consectetur. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Nullam id dolor id nibh ultricies vehicula ut id elit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nulla vitae elit libero, a pharetra augue.</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="grid4">
|
||||||
|
<p class="size16"><span>16.</span>Aenean lacinia bibendum nulla sed consectetur. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Nullam id dolor id nibh ultricies vehicula ut id elit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nulla vitae elit libero, a pharetra augue.</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="grid5">
|
||||||
|
<p class="size18"><span>18.</span>Aenean lacinia bibendum nulla sed consectetur. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Nullam id dolor id nibh ultricies vehicula ut id elit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nulla vitae elit libero, a pharetra augue.</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="white_blend"></div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="section psample psample_row3" id="">
|
||||||
|
<div class="grid5 firstcol">
|
||||||
|
<p class="size20"><span>20.</span>Aenean lacinia bibendum nulla sed consectetur. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Nullam id dolor id nibh ultricies vehicula ut id elit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nulla vitae elit libero, a pharetra augue.</p>
|
||||||
|
</div>
|
||||||
|
<div class="grid7">
|
||||||
|
<p class="size24"><span>24.</span>Aenean lacinia bibendum nulla sed consectetur. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Nullam id dolor id nibh ultricies vehicula ut id elit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nulla vitae elit libero, a pharetra augue.</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="white_blend"></div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="section psample psample_row4" id="">
|
||||||
|
<div class="grid12 firstcol">
|
||||||
|
<p class="size30"><span>30.</span>Aenean lacinia bibendum nulla sed consectetur. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Nullam id dolor id nibh ultricies vehicula ut id elit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nulla vitae elit libero, a pharetra augue.</p>
|
||||||
|
</div>
|
||||||
|
<div class="white_blend"></div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="section psample psample_row1 fullreverse">
|
||||||
|
<div class="grid2 firstcol">
|
||||||
|
<p class="size10"><span>10.</span>Aenean lacinia bibendum nulla sed consectetur. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Nullam id dolor id nibh ultricies vehicula ut id elit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nulla vitae elit libero, a pharetra augue.</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="grid3">
|
||||||
|
<p class="size11"><span>11.</span>Aenean lacinia bibendum nulla sed consectetur. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Nullam id dolor id nibh ultricies vehicula ut id elit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nulla vitae elit libero, a pharetra augue.</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="grid3">
|
||||||
|
<p class="size12"><span>12.</span>Aenean lacinia bibendum nulla sed consectetur. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Nullam id dolor id nibh ultricies vehicula ut id elit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nulla vitae elit libero, a pharetra augue.</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="grid4">
|
||||||
|
<p class="size13"><span>13.</span>Aenean lacinia bibendum nulla sed consectetur. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Nullam id dolor id nibh ultricies vehicula ut id elit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nulla vitae elit libero, a pharetra augue.</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="black_blend"></div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="section psample psample_row2 fullreverse">
|
||||||
|
<div class="grid3 firstcol">
|
||||||
|
<p class="size14"><span>14.</span>Aenean lacinia bibendum nulla sed consectetur. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Nullam id dolor id nibh ultricies vehicula ut id elit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nulla vitae elit libero, a pharetra augue.</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="grid4">
|
||||||
|
<p class="size16"><span>16.</span>Aenean lacinia bibendum nulla sed consectetur. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Nullam id dolor id nibh ultricies vehicula ut id elit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nulla vitae elit libero, a pharetra augue.</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="grid5">
|
||||||
|
<p class="size18"><span>18.</span>Aenean lacinia bibendum nulla sed consectetur. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Nullam id dolor id nibh ultricies vehicula ut id elit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nulla vitae elit libero, a pharetra augue.</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="black_blend"></div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="section psample fullreverse psample_row3" id="">
|
||||||
|
<div class="grid5 firstcol">
|
||||||
|
<p class="size20"><span>20.</span>Aenean lacinia bibendum nulla sed consectetur. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Nullam id dolor id nibh ultricies vehicula ut id elit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nulla vitae elit libero, a pharetra augue.</p>
|
||||||
|
</div>
|
||||||
|
<div class="grid7">
|
||||||
|
<p class="size24"><span>24.</span>Aenean lacinia bibendum nulla sed consectetur. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Nullam id dolor id nibh ultricies vehicula ut id elit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nulla vitae elit libero, a pharetra augue.</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="black_blend"></div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="section psample fullreverse psample_row4" id="" style="border-bottom: 20px #000 solid;">
|
||||||
|
<div class="grid12 firstcol">
|
||||||
|
<p class="size30"><span>30.</span>Aenean lacinia bibendum nulla sed consectetur. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Nullam id dolor id nibh ultricies vehicula ut id elit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nulla vitae elit libero, a pharetra augue.</p>
|
||||||
|
</div>
|
||||||
|
<div class="black_blend"></div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="layout">
|
||||||
|
|
||||||
|
<div class="section">
|
||||||
|
|
||||||
|
<div class="grid12 firstcol">
|
||||||
|
<h1>Lorem Ipsum Dolor</h1>
|
||||||
|
<h2>Etiam porta sem malesuada magna mollis euismod</h2>
|
||||||
|
|
||||||
|
<p class="byline">By <a href="#link">Aenean Lacinia</a></p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section">
|
||||||
|
<div class="grid8 firstcol">
|
||||||
|
<p class="large">Donec sed odio dui. Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. </p>
|
||||||
|
|
||||||
|
|
||||||
|
<h3>Pellentesque ornare sem</h3>
|
||||||
|
|
||||||
|
<p>Maecenas sed diam eget risus varius blandit sit amet non magna. Maecenas faucibus mollis interdum. Donec ullamcorper nulla non metus auctor fringilla. Nullam id dolor id nibh ultricies vehicula ut id elit. Nullam id dolor id nibh ultricies vehicula ut id elit. </p>
|
||||||
|
|
||||||
|
<p>Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. </p>
|
||||||
|
|
||||||
|
<p>Nulla vitae elit libero, a pharetra augue. Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Aenean lacinia bibendum nulla sed consectetur. </p>
|
||||||
|
|
||||||
|
<p>Nullam quis risus eget urna mollis ornare vel eu leo. Nullam quis risus eget urna mollis ornare vel eu leo. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec ullamcorper nulla non metus auctor fringilla. </p>
|
||||||
|
|
||||||
|
<h3>Cras mattis consectetur</h3>
|
||||||
|
|
||||||
|
<p>Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum. Aenean lacinia bibendum nulla sed consectetur. Integer posuere erat a ante venenatis dapibus posuere velit aliquet. Cras mattis consectetur purus sit amet fermentum. </p>
|
||||||
|
|
||||||
|
<p>Nullam id dolor id nibh ultricies vehicula ut id elit. Nullam quis risus eget urna mollis ornare vel eu leo. Cras mattis consectetur purus sit amet fermentum.</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="grid4 sidebar">
|
||||||
|
|
||||||
|
<div class="box reverse">
|
||||||
|
<p class="last">Nullam quis risus eget urna mollis ornare vel eu leo. Donec ullamcorper nulla non metus auctor fringilla. Cras mattis consectetur purus sit amet fermentum. Sed posuere consectetur est at lobortis. Lorem ipsum dolor sit amet, consectetur adipiscing elit. </p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<p class="caption">Maecenas sed diam eget risus varius.</p>
|
||||||
|
|
||||||
|
<p>Vestibulum id ligula porta felis euismod semper. Integer posuere erat a ante venenatis dapibus posuere velit aliquet. Vestibulum id ligula porta felis euismod semper. Sed posuere consectetur est at lobortis. Maecenas sed diam eget risus varius blandit sit amet non magna. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. </p>
|
||||||
|
|
||||||
|
|
||||||
|
<p>Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Aenean lacinia bibendum nulla sed consectetur. Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor. Aenean lacinia bibendum nulla sed consectetur. Nullam quis risus eget urna mollis ornare vel eu leo. </p>
|
||||||
|
|
||||||
|
<p>Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Donec ullamcorper nulla non metus auctor fringilla. Maecenas faucibus mollis interdum. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. </p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div id="glyphs">
|
||||||
|
<div class="section">
|
||||||
|
<div class="grid12 firstcol">
|
||||||
|
|
||||||
|
<h1>Language Support</h1>
|
||||||
|
<p>The subset of Questrial Regular in this kit supports the following languages:<br/>
|
||||||
|
|
||||||
|
Albanian, Basque, Breton, Chamorro, Danish, Dutch, English, Faroese, Finnish, French, Frisian, Galician, German, Icelandic, Italian, Malagasy, Norwegian, Portuguese, Spanish, Alsatian, Aragonese, Arapaho, Arrernte, Asturian, Aymara, Bislama, Cebuano, Corsican, Fijian, French_creole, Genoese, Gilbertese, Greenlandic, Haitian_creole, Hiligaynon, Hmong, Hopi, Ibanag, Iloko_ilokano, Indonesian, Interglossa_glosa, Interlingua, Irish_gaelic, Jerriais, Lojban, Lombard, Luxembourgeois, Manx, Mohawk, Norfolk_pitcairnese, Occitan, Oromo, Pangasinan, Papiamento, Piedmontese, Potawatomi, Rhaeto-romance, Romansh, Rotokas, Sami_lule, Samoan, Sardinian, Scots_gaelic, Seychelles_creole, Shona, Sicilian, Somali, Southern_ndebele, Swahili, Swati_swazi, Tagalog_filipino_pilipino, Tetum, Tok_pisin, Uyghur_latinized, Volapuk, Walloon, Warlpiri, Xhosa, Yapese, Zulu, Latinbasic, Ubasic, Demo </p>
|
||||||
|
<h1>Glyph Chart</h1>
|
||||||
|
<p>The subset of Questrial Regular in this kit includes all the glyphs listed below. Unicode entities are included above each glyph to help you insert individual characters into your layout.</p>
|
||||||
|
<div id="glyph_chart">
|
||||||
|
|
||||||
|
<div><p>&#13;</p> </div>
|
||||||
|
<div><p>&#32;</p> </div>
|
||||||
|
<div><p>&#33;</p>!</div>
|
||||||
|
<div><p>&#34;</p>"</div>
|
||||||
|
<div><p>&#35;</p>#</div>
|
||||||
|
<div><p>&#36;</p>$</div>
|
||||||
|
<div><p>&#37;</p>%</div>
|
||||||
|
<div><p>&#38;</p>&</div>
|
||||||
|
<div><p>&#39;</p>'</div>
|
||||||
|
<div><p>&#40;</p>(</div>
|
||||||
|
<div><p>&#41;</p>)</div>
|
||||||
|
<div><p>&#42;</p>*</div>
|
||||||
|
<div><p>&#43;</p>+</div>
|
||||||
|
<div><p>&#44;</p>,</div>
|
||||||
|
<div><p>&#45;</p>-</div>
|
||||||
|
<div><p>&#46;</p>.</div>
|
||||||
|
<div><p>&#47;</p>/</div>
|
||||||
|
<div><p>&#48;</p>0</div>
|
||||||
|
<div><p>&#49;</p>1</div>
|
||||||
|
<div><p>&#50;</p>2</div>
|
||||||
|
<div><p>&#51;</p>3</div>
|
||||||
|
<div><p>&#52;</p>4</div>
|
||||||
|
<div><p>&#53;</p>5</div>
|
||||||
|
<div><p>&#54;</p>6</div>
|
||||||
|
<div><p>&#55;</p>7</div>
|
||||||
|
<div><p>&#56;</p>8</div>
|
||||||
|
<div><p>&#57;</p>9</div>
|
||||||
|
<div><p>&#58;</p>:</div>
|
||||||
|
<div><p>&#59;</p>;</div>
|
||||||
|
<div><p>&#60;</p><</div>
|
||||||
|
<div><p>&#61;</p>=</div>
|
||||||
|
<div><p>&#62;</p>></div>
|
||||||
|
<div><p>&#63;</p>?</div>
|
||||||
|
<div><p>&#64;</p>@</div>
|
||||||
|
<div><p>&#65;</p>A</div>
|
||||||
|
<div><p>&#66;</p>B</div>
|
||||||
|
<div><p>&#67;</p>C</div>
|
||||||
|
<div><p>&#68;</p>D</div>
|
||||||
|
<div><p>&#69;</p>E</div>
|
||||||
|
<div><p>&#70;</p>F</div>
|
||||||
|
<div><p>&#71;</p>G</div>
|
||||||
|
<div><p>&#72;</p>H</div>
|
||||||
|
<div><p>&#73;</p>I</div>
|
||||||
|
<div><p>&#74;</p>J</div>
|
||||||
|
<div><p>&#75;</p>K</div>
|
||||||
|
<div><p>&#76;</p>L</div>
|
||||||
|
<div><p>&#77;</p>M</div>
|
||||||
|
<div><p>&#78;</p>N</div>
|
||||||
|
<div><p>&#79;</p>O</div>
|
||||||
|
<div><p>&#80;</p>P</div>
|
||||||
|
<div><p>&#81;</p>Q</div>
|
||||||
|
<div><p>&#82;</p>R</div>
|
||||||
|
<div><p>&#83;</p>S</div>
|
||||||
|
<div><p>&#84;</p>T</div>
|
||||||
|
<div><p>&#85;</p>U</div>
|
||||||
|
<div><p>&#86;</p>V</div>
|
||||||
|
<div><p>&#87;</p>W</div>
|
||||||
|
<div><p>&#88;</p>X</div>
|
||||||
|
<div><p>&#89;</p>Y</div>
|
||||||
|
<div><p>&#90;</p>Z</div>
|
||||||
|
<div><p>&#91;</p>[</div>
|
||||||
|
<div><p>&#92;</p>\</div>
|
||||||
|
<div><p>&#93;</p>]</div>
|
||||||
|
<div><p>&#94;</p>^</div>
|
||||||
|
<div><p>&#95;</p>_</div>
|
||||||
|
<div><p>&#96;</p>`</div>
|
||||||
|
<div><p>&#97;</p>a</div>
|
||||||
|
<div><p>&#98;</p>b</div>
|
||||||
|
<div><p>&#99;</p>c</div>
|
||||||
|
<div><p>&#100;</p>d</div>
|
||||||
|
<div><p>&#101;</p>e</div>
|
||||||
|
<div><p>&#102;</p>f</div>
|
||||||
|
<div><p>&#103;</p>g</div>
|
||||||
|
<div><p>&#104;</p>h</div>
|
||||||
|
<div><p>&#105;</p>i</div>
|
||||||
|
<div><p>&#106;</p>j</div>
|
||||||
|
<div><p>&#107;</p>k</div>
|
||||||
|
<div><p>&#108;</p>l</div>
|
||||||
|
<div><p>&#109;</p>m</div>
|
||||||
|
<div><p>&#110;</p>n</div>
|
||||||
|
<div><p>&#111;</p>o</div>
|
||||||
|
<div><p>&#112;</p>p</div>
|
||||||
|
<div><p>&#113;</p>q</div>
|
||||||
|
<div><p>&#114;</p>r</div>
|
||||||
|
<div><p>&#115;</p>s</div>
|
||||||
|
<div><p>&#116;</p>t</div>
|
||||||
|
<div><p>&#117;</p>u</div>
|
||||||
|
<div><p>&#118;</p>v</div>
|
||||||
|
<div><p>&#119;</p>w</div>
|
||||||
|
<div><p>&#120;</p>x</div>
|
||||||
|
<div><p>&#121;</p>y</div>
|
||||||
|
<div><p>&#122;</p>z</div>
|
||||||
|
<div><p>&#123;</p>{</div>
|
||||||
|
<div><p>&#124;</p>|</div>
|
||||||
|
<div><p>&#125;</p>}</div>
|
||||||
|
<div><p>&#126;</p>~</div>
|
||||||
|
<div><p>&#160;</p> </div>
|
||||||
|
<div><p>&#161;</p>¡</div>
|
||||||
|
<div><p>&#162;</p>¢</div>
|
||||||
|
<div><p>&#163;</p>£</div>
|
||||||
|
<div><p>&#164;</p>¤</div>
|
||||||
|
<div><p>&#165;</p>¥</div>
|
||||||
|
<div><p>&#166;</p>¦</div>
|
||||||
|
<div><p>&#167;</p>§</div>
|
||||||
|
<div><p>&#168;</p>¨</div>
|
||||||
|
<div><p>&#169;</p>©</div>
|
||||||
|
<div><p>&#170;</p>ª</div>
|
||||||
|
<div><p>&#171;</p>«</div>
|
||||||
|
<div><p>&#172;</p>¬</div>
|
||||||
|
<div><p>&#173;</p>­</div>
|
||||||
|
<div><p>&#174;</p>®</div>
|
||||||
|
<div><p>&#175;</p>¯</div>
|
||||||
|
<div><p>&#176;</p>°</div>
|
||||||
|
<div><p>&#177;</p>±</div>
|
||||||
|
<div><p>&#178;</p>²</div>
|
||||||
|
<div><p>&#179;</p>³</div>
|
||||||
|
<div><p>&#180;</p>´</div>
|
||||||
|
<div><p>&#181;</p>µ</div>
|
||||||
|
<div><p>&#182;</p>¶</div>
|
||||||
|
<div><p>&#183;</p>·</div>
|
||||||
|
<div><p>&#184;</p>¸</div>
|
||||||
|
<div><p>&#185;</p>¹</div>
|
||||||
|
<div><p>&#186;</p>º</div>
|
||||||
|
<div><p>&#187;</p>»</div>
|
||||||
|
<div><p>&#188;</p>¼</div>
|
||||||
|
<div><p>&#189;</p>½</div>
|
||||||
|
<div><p>&#190;</p>¾</div>
|
||||||
|
<div><p>&#191;</p>¿</div>
|
||||||
|
<div><p>&#192;</p>À</div>
|
||||||
|
<div><p>&#193;</p>Á</div>
|
||||||
|
<div><p>&#194;</p>Â</div>
|
||||||
|
<div><p>&#195;</p>Ã</div>
|
||||||
|
<div><p>&#196;</p>Ä</div>
|
||||||
|
<div><p>&#197;</p>Å</div>
|
||||||
|
<div><p>&#198;</p>Æ</div>
|
||||||
|
<div><p>&#199;</p>Ç</div>
|
||||||
|
<div><p>&#200;</p>È</div>
|
||||||
|
<div><p>&#201;</p>É</div>
|
||||||
|
<div><p>&#202;</p>Ê</div>
|
||||||
|
<div><p>&#203;</p>Ë</div>
|
||||||
|
<div><p>&#204;</p>Ì</div>
|
||||||
|
<div><p>&#205;</p>Í</div>
|
||||||
|
<div><p>&#206;</p>Î</div>
|
||||||
|
<div><p>&#207;</p>Ï</div>
|
||||||
|
<div><p>&#208;</p>Ð</div>
|
||||||
|
<div><p>&#209;</p>Ñ</div>
|
||||||
|
<div><p>&#210;</p>Ò</div>
|
||||||
|
<div><p>&#211;</p>Ó</div>
|
||||||
|
<div><p>&#212;</p>Ô</div>
|
||||||
|
<div><p>&#213;</p>Õ</div>
|
||||||
|
<div><p>&#214;</p>Ö</div>
|
||||||
|
<div><p>&#215;</p>×</div>
|
||||||
|
<div><p>&#216;</p>Ø</div>
|
||||||
|
<div><p>&#217;</p>Ù</div>
|
||||||
|
<div><p>&#218;</p>Ú</div>
|
||||||
|
<div><p>&#219;</p>Û</div>
|
||||||
|
<div><p>&#220;</p>Ü</div>
|
||||||
|
<div><p>&#221;</p>Ý</div>
|
||||||
|
<div><p>&#222;</p>Þ</div>
|
||||||
|
<div><p>&#223;</p>ß</div>
|
||||||
|
<div><p>&#224;</p>à</div>
|
||||||
|
<div><p>&#225;</p>á</div>
|
||||||
|
<div><p>&#226;</p>â</div>
|
||||||
|
<div><p>&#227;</p>ã</div>
|
||||||
|
<div><p>&#228;</p>ä</div>
|
||||||
|
<div><p>&#229;</p>å</div>
|
||||||
|
<div><p>&#230;</p>æ</div>
|
||||||
|
<div><p>&#231;</p>ç</div>
|
||||||
|
<div><p>&#232;</p>è</div>
|
||||||
|
<div><p>&#233;</p>é</div>
|
||||||
|
<div><p>&#234;</p>ê</div>
|
||||||
|
<div><p>&#235;</p>ë</div>
|
||||||
|
<div><p>&#236;</p>ì</div>
|
||||||
|
<div><p>&#237;</p>í</div>
|
||||||
|
<div><p>&#238;</p>î</div>
|
||||||
|
<div><p>&#239;</p>ï</div>
|
||||||
|
<div><p>&#240;</p>ð</div>
|
||||||
|
<div><p>&#241;</p>ñ</div>
|
||||||
|
<div><p>&#242;</p>ò</div>
|
||||||
|
<div><p>&#243;</p>ó</div>
|
||||||
|
<div><p>&#244;</p>ô</div>
|
||||||
|
<div><p>&#245;</p>õ</div>
|
||||||
|
<div><p>&#246;</p>ö</div>
|
||||||
|
<div><p>&#247;</p>÷</div>
|
||||||
|
<div><p>&#248;</p>ø</div>
|
||||||
|
<div><p>&#249;</p>ù</div>
|
||||||
|
<div><p>&#250;</p>ú</div>
|
||||||
|
<div><p>&#251;</p>û</div>
|
||||||
|
<div><p>&#252;</p>ü</div>
|
||||||
|
<div><p>&#253;</p>ý</div>
|
||||||
|
<div><p>&#254;</p>þ</div>
|
||||||
|
<div><p>&#255;</p>ÿ</div>
|
||||||
|
<div><p>&#338;</p>Œ</div>
|
||||||
|
<div><p>&#339;</p>œ</div>
|
||||||
|
<div><p>&#376;</p>Ÿ</div>
|
||||||
|
<div><p>&#710;</p>ˆ</div>
|
||||||
|
<div><p>&#732;</p>˜</div>
|
||||||
|
<div><p>&#8192;</p> </div>
|
||||||
|
<div><p>&#8193;</p> </div>
|
||||||
|
<div><p>&#8194;</p> </div>
|
||||||
|
<div><p>&#8195;</p> </div>
|
||||||
|
<div><p>&#8196;</p> </div>
|
||||||
|
<div><p>&#8197;</p> </div>
|
||||||
|
<div><p>&#8198;</p> </div>
|
||||||
|
<div><p>&#8199;</p> </div>
|
||||||
|
<div><p>&#8200;</p> </div>
|
||||||
|
<div><p>&#8201;</p> </div>
|
||||||
|
<div><p>&#8202;</p> </div>
|
||||||
|
<div><p>&#8208;</p>‐</div>
|
||||||
|
<div><p>&#8209;</p>‑</div>
|
||||||
|
<div><p>&#8210;</p>‒</div>
|
||||||
|
<div><p>&#8211;</p>–</div>
|
||||||
|
<div><p>&#8212;</p>—</div>
|
||||||
|
<div><p>&#8216;</p>‘</div>
|
||||||
|
<div><p>&#8217;</p>’</div>
|
||||||
|
<div><p>&#8218;</p>‚</div>
|
||||||
|
<div><p>&#8220;</p>“</div>
|
||||||
|
<div><p>&#8221;</p>”</div>
|
||||||
|
<div><p>&#8222;</p>„</div>
|
||||||
|
<div><p>&#8226;</p>•</div>
|
||||||
|
<div><p>&#8230;</p>…</div>
|
||||||
|
<div><p>&#8239;</p> </div>
|
||||||
|
<div><p>&#8249;</p>‹</div>
|
||||||
|
<div><p>&#8250;</p>›</div>
|
||||||
|
<div><p>&#8287;</p> </div>
|
||||||
|
<div><p>&#8364;</p>€</div>
|
||||||
|
<div><p>&#8482;</p>™</div>
|
||||||
|
<div><p>&#9724;</p>◼</div>
|
||||||
|
<div><p>&#64257;</p>fi</div>
|
||||||
|
<div><p>&#64258;</p>fl</div>
|
||||||
|
<div><p>&#64259;</p>ffi</div>
|
||||||
|
<div><p>&#64260;</p>ffl</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div id="specs">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="installing">
|
||||||
|
<div class="section">
|
||||||
|
<div class="grid7 firstcol">
|
||||||
|
<h1>Installing Webfonts</h1>
|
||||||
|
|
||||||
|
<p>Webfonts are supported by all major browser platforms but not all in the same way. There are currently four different font formats that must be included in order to target all browsers. This includes TTF, WOFF, EOT and SVG.</p>
|
||||||
|
|
||||||
|
<h2>1. Upload your webfonts</h2>
|
||||||
|
<p>You must upload your webfont kit to your website. They should be in or near the same directory as your CSS files.</p>
|
||||||
|
|
||||||
|
<h2>2. Include the webfont stylesheet</h2>
|
||||||
|
<p>A special CSS @font-face declaration helps the various browsers select the appropriate font it needs without causing you a bunch of headaches. Learn more about this syntax by reading the <a href="https://www.fontspring.com/blog/further-hardening-of-the-bulletproof-syntax">Fontspring blog post</a> about it. The code for it is as follows:</p>
|
||||||
|
|
||||||
|
|
||||||
|
<code>
|
||||||
|
@font-face{
|
||||||
|
font-family: 'MyWebFont';
|
||||||
|
src: url('WebFont.eot');
|
||||||
|
src: url('WebFont.eot?#iefix') format('embedded-opentype'),
|
||||||
|
url('WebFont.woff') format('woff'),
|
||||||
|
url('WebFont.ttf') format('truetype'),
|
||||||
|
url('WebFont.svg#webfont') format('svg');
|
||||||
|
}
|
||||||
|
</code>
|
||||||
|
|
||||||
|
<p>We've already gone ahead and generated the code for you. All you have to do is link to the stylesheet in your HTML, like this:</p>
|
||||||
|
<code><link rel="stylesheet" href="stylesheet.css" type="text/css" charset="utf-8" /></code>
|
||||||
|
|
||||||
|
<h2>3. Modify your own stylesheet</h2>
|
||||||
|
<p>To take advantage of your new fonts, you must tell your stylesheet to use them. Look at the original @font-face declaration above and find the property called "font-family." The name linked there will be what you use to reference the font. Prepend that webfont name to the font stack in the "font-family" property, inside the selector you want to change. For example:</p>
|
||||||
|
<code>p { font-family: 'WebFont', Arial, sans-serif; }</code>
|
||||||
|
|
||||||
|
<h2>4. Test</h2>
|
||||||
|
<p>Getting webfonts to work cross-browser <em>can</em> be tricky. Use the information in the sidebar to help you if you find that fonts aren't loading in a particular browser.</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="grid5 sidebar">
|
||||||
|
<div class="box">
|
||||||
|
<h2>Troubleshooting<br/>Font-Face Problems</h2>
|
||||||
|
<p>Having trouble getting your webfonts to load in your new website? Here are some tips to sort out what might be the problem.</p>
|
||||||
|
|
||||||
|
<h3>Fonts not showing in any browser</h3>
|
||||||
|
|
||||||
|
<p>This sounds like you need to work on the plumbing. You either did not upload the fonts to the correct directory, or you did not link the fonts properly in the CSS. If you've confirmed that all this is correct and you still have a problem, take a look at your .htaccess file and see if requests are getting intercepted.</p>
|
||||||
|
|
||||||
|
<h3>Fonts not loading in iPhone or iPad</h3>
|
||||||
|
|
||||||
|
<p>The most common problem here is that you are serving the fonts from an IIS server. IIS refuses to serve files that have unknown MIME types. If that is the case, you must set the MIME type for SVG to "image/svg+xml" in the server settings. Follow these instructions from Microsoft if you need help.</p>
|
||||||
|
|
||||||
|
<h3>Fonts not loading in Firefox</h3>
|
||||||
|
|
||||||
|
<p>The primary reason for this failure? You are still using a version Firefox older than 3.5. So upgrade already! If that isn't it, then you are very likely serving fonts from a different domain. Firefox requires that all font assets be served from the same domain. Lastly it is possible that you need to add WOFF to your list of MIME types (if you are serving via IIS.)</p>
|
||||||
|
|
||||||
|
<h3>Fonts not loading in IE</h3>
|
||||||
|
|
||||||
|
<p>Are you looking at Internet Explorer on an actual Windows machine or are you cheating by using a service like Adobe BrowserLab? Many of these screenshot services do not render @font-face for IE. Best to test it on a real machine.</p>
|
||||||
|
|
||||||
|
<h3>Fonts not loading in IE9</h3>
|
||||||
|
|
||||||
|
<p>IE9, like Firefox, requires that fonts be served from the same domain as the website. Make sure that is the case.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div id="footer">
|
||||||
|
<p>©2010-2017 Font Squirrel. All rights reserved.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
@ -0,0 +1,370 @@
|
|||||||
|
/*Notes about grid:
|
||||||
|
Columns: 12
|
||||||
|
Grid Width: 825px
|
||||||
|
Column Width: 55px
|
||||||
|
Gutter Width: 15px
|
||||||
|
-------------------------------*/
|
||||||
|
|
||||||
|
|
||||||
|
.section {
|
||||||
|
margin-bottom: 18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.section:after {
|
||||||
|
content: '.';
|
||||||
|
display: block;
|
||||||
|
height: 0;
|
||||||
|
clear: both;
|
||||||
|
visibility: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.section {
|
||||||
|
*zoom: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.section .firstcolumn,
|
||||||
|
.section .firstcol {
|
||||||
|
margin-left: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Border on left hand side of a column. */
|
||||||
|
.border {
|
||||||
|
padding-left: 7px;
|
||||||
|
margin-left: 7px;
|
||||||
|
border-left: 1px solid #eee;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Border with more whitespace, spans one column. */
|
||||||
|
.colborder {
|
||||||
|
padding-left: 42px;
|
||||||
|
margin-left: 42px;
|
||||||
|
border-left: 1px solid #eee;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* The Grid Classes */
|
||||||
|
.grid1, .grid1_2cols, .grid1_3cols, .grid1_4cols, .grid2, .grid2_3cols, .grid2_4cols, .grid3, .grid3_2cols, .grid3_4cols, .grid4, .grid4_3cols, .grid5, .grid5_2cols, .grid5_3cols, .grid5_4cols, .grid6, .grid6_4cols, .grid7, .grid7_2cols, .grid7_3cols, .grid7_4cols, .grid8, .grid8_3cols, .grid9, .grid9_2cols, .grid9_4cols, .grid10, .grid10_3cols, .grid10_4cols, .grid11, .grid11_2cols, .grid11_3cols, .grid11_4cols, .grid12 {
|
||||||
|
margin-left: 15px;
|
||||||
|
float: left;
|
||||||
|
display: inline;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.width1, .grid1, .span-1 {
|
||||||
|
width: 55px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.width1_2cols, .grid1_2cols {
|
||||||
|
width: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.width1_3cols, .grid1_3cols {
|
||||||
|
width: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.width1_4cols, .grid1_4cols {
|
||||||
|
width: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.input_width1 {
|
||||||
|
width: 49px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.width2, .grid2, .span-2 {
|
||||||
|
width: 125px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.width2_3cols, .grid2_3cols {
|
||||||
|
width: 31px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.width2_4cols, .grid2_4cols {
|
||||||
|
width: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.input_width2 {
|
||||||
|
width: 119px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.width3, .grid3, .span-3 {
|
||||||
|
width: 195px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.width3_2cols, .grid3_2cols {
|
||||||
|
width: 90px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.width3_4cols, .grid3_4cols {
|
||||||
|
width: 37px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.input_width3 {
|
||||||
|
width: 189px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.width4, .grid4, .span-4 {
|
||||||
|
width: 265px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.width4_3cols, .grid4_3cols {
|
||||||
|
width: 78px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.input_width4 {
|
||||||
|
width: 259px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.width5, .grid5, .span-5 {
|
||||||
|
width: 335px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.width5_2cols, .grid5_2cols {
|
||||||
|
width: 160px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.width5_3cols, .grid5_3cols {
|
||||||
|
width: 101px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.width5_4cols, .grid5_4cols {
|
||||||
|
width: 72px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.input_width5 {
|
||||||
|
width: 329px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.width6, .grid6, .span-6 {
|
||||||
|
width: 405px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.width6_4cols, .grid6_4cols {
|
||||||
|
width: 90px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.input_width6 {
|
||||||
|
width: 399px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.width7, .grid7, .span-7 {
|
||||||
|
width: 475px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.width7_2cols, .grid7_2cols {
|
||||||
|
width: 230px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.width7_3cols, .grid7_3cols {
|
||||||
|
width: 148px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.width7_4cols, .grid7_4cols {
|
||||||
|
width: 107px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.input_width7 {
|
||||||
|
width: 469px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.width8, .grid8, .span-8 {
|
||||||
|
width: 545px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.width8_3cols, .grid8_3cols {
|
||||||
|
width: 171px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.input_width8 {
|
||||||
|
width: 539px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.width9, .grid9, .span-9 {
|
||||||
|
width: 615px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.width9_2cols, .grid9_2cols {
|
||||||
|
width: 300px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.width9_4cols, .grid9_4cols {
|
||||||
|
width: 142px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.input_width9 {
|
||||||
|
width: 609px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.width10, .grid10, .span-10 {
|
||||||
|
width: 685px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.width10_3cols, .grid10_3cols {
|
||||||
|
width: 218px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.width10_4cols, .grid10_4cols {
|
||||||
|
width: 160px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.input_width10 {
|
||||||
|
width: 679px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.width11, .grid11, .span-11 {
|
||||||
|
width: 755px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.width11_2cols, .grid11_2cols {
|
||||||
|
width: 370px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.width11_3cols, .grid11_3cols {
|
||||||
|
width: 241px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.width11_4cols, .grid11_4cols {
|
||||||
|
width: 177px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.input_width11 {
|
||||||
|
width: 749px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.width12, .grid12, .span-12 {
|
||||||
|
width: 825px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.input_width12 {
|
||||||
|
width: 819px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Subdivided grid spaces */
|
||||||
|
.emptycols_left1, .prepend-1 {
|
||||||
|
padding-left: 70px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.emptycols_right1, .append-1 {
|
||||||
|
padding-right: 70px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.emptycols_left2, .prepend-2 {
|
||||||
|
padding-left: 140px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.emptycols_right2, .append-2 {
|
||||||
|
padding-right: 140px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.emptycols_left3, .prepend-3 {
|
||||||
|
padding-left: 210px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.emptycols_right3, .append-3 {
|
||||||
|
padding-right: 210px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.emptycols_left4, .prepend-4 {
|
||||||
|
padding-left: 280px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.emptycols_right4, .append-4 {
|
||||||
|
padding-right: 280px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.emptycols_left5, .prepend-5 {
|
||||||
|
padding-left: 350px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.emptycols_right5, .append-5 {
|
||||||
|
padding-right: 350px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.emptycols_left6, .prepend-6 {
|
||||||
|
padding-left: 420px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.emptycols_right6, .append-6 {
|
||||||
|
padding-right: 420px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.emptycols_left7, .prepend-7 {
|
||||||
|
padding-left: 490px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.emptycols_right7, .append-7 {
|
||||||
|
padding-right: 490px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.emptycols_left8, .prepend-8 {
|
||||||
|
padding-left: 560px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.emptycols_right8, .append-8 {
|
||||||
|
padding-right: 560px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.emptycols_left9, .prepend-9 {
|
||||||
|
padding-left: 630px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.emptycols_right9, .append-9 {
|
||||||
|
padding-right: 630px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.emptycols_left10, .prepend-10 {
|
||||||
|
padding-left: 700px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.emptycols_right10, .append-10 {
|
||||||
|
padding-right: 700px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.emptycols_left11, .prepend-11 {
|
||||||
|
padding-left: 770px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.emptycols_right11, .append-11 {
|
||||||
|
padding-right: 770px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pull-1 {
|
||||||
|
margin-left: -70px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.push-1 {
|
||||||
|
margin-right: -70px;
|
||||||
|
margin-left: 18px;
|
||||||
|
float: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pull-2 {
|
||||||
|
margin-left: -140px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.push-2 {
|
||||||
|
margin-right: -140px;
|
||||||
|
margin-left: 18px;
|
||||||
|
float: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pull-3 {
|
||||||
|
margin-left: -210px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.push-3 {
|
||||||
|
margin-right: -210px;
|
||||||
|
margin-left: 18px;
|
||||||
|
float: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pull-4 {
|
||||||
|
margin-left: -280px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.push-4 {
|
||||||
|
margin-right: -280px;
|
||||||
|
margin-left: 18px;
|
||||||
|
float: right;
|
||||||
|
}
|
@ -0,0 +1,502 @@
|
|||||||
|
@import url('grid_12-825-55-15.css');
|
||||||
|
|
||||||
|
/*
|
||||||
|
CSS Reset by Eric Meyer - Released under Public Domain
|
||||||
|
http://meyerweb.com/eric/tools/css/reset/
|
||||||
|
*/
|
||||||
|
html, body, div, span, applet, object, iframe,
|
||||||
|
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
|
||||||
|
a, abbr, acronym, address, big, cite, code,
|
||||||
|
del, dfn, em, font, img, ins, kbd, q, s, samp,
|
||||||
|
small, strike, strong, sub, sup, tt, var,
|
||||||
|
b, u, i, center, dl, dt, dd, ol, ul, li,
|
||||||
|
fieldset, form, label, legend, table,
|
||||||
|
caption, tbody, tfoot, thead, tr, th, td {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
border: 0;
|
||||||
|
outline: 0;
|
||||||
|
font-size: 100%;
|
||||||
|
vertical-align: baseline;
|
||||||
|
background: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
line-height: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
ol, ul {
|
||||||
|
list-style: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
blockquote, q {
|
||||||
|
quotes: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
blockquote:before, blockquote:after,
|
||||||
|
q:before, q:after {
|
||||||
|
content: '';
|
||||||
|
content: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
:focus {
|
||||||
|
outline: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
ins {
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
del {
|
||||||
|
text-decoration: line-through;
|
||||||
|
}
|
||||||
|
|
||||||
|
table {
|
||||||
|
border-collapse: collapse;
|
||||||
|
border-spacing: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
body {
|
||||||
|
color: #000;
|
||||||
|
background-color: #dcdcdc;
|
||||||
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
text-decoration: none;
|
||||||
|
color: #1883ba;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1 {
|
||||||
|
font-size: 32px;
|
||||||
|
font-weight: normal;
|
||||||
|
font-style: normal;
|
||||||
|
margin-bottom: 18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
h2 {
|
||||||
|
font-size: 18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#container {
|
||||||
|
width: 865px;
|
||||||
|
margin: 0px auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#header {
|
||||||
|
padding: 20px;
|
||||||
|
font-size: 36px;
|
||||||
|
background-color: #000;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
#header span {
|
||||||
|
color: #666;
|
||||||
|
}
|
||||||
|
|
||||||
|
#main_content {
|
||||||
|
background-color: #fff;
|
||||||
|
padding: 60px 20px 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#footer p {
|
||||||
|
margin: 0;
|
||||||
|
padding-top: 10px;
|
||||||
|
padding-bottom: 50px;
|
||||||
|
color: #333;
|
||||||
|
font: 10px Arial, sans-serif;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tabs {
|
||||||
|
width: 100%;
|
||||||
|
height: 31px;
|
||||||
|
background-color: #444;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tabs li {
|
||||||
|
float: left;
|
||||||
|
margin: 0;
|
||||||
|
overflow: hidden;
|
||||||
|
background-color: #444;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tabs li a {
|
||||||
|
display: block;
|
||||||
|
color: #fff;
|
||||||
|
text-decoration: none;
|
||||||
|
font: bold 11px/11px 'Arial';
|
||||||
|
text-transform: uppercase;
|
||||||
|
padding: 10px 15px;
|
||||||
|
border-right: 1px solid #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tabs li a:hover {
|
||||||
|
background-color: #00b3ff;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.tabs li.active a {
|
||||||
|
color: #000;
|
||||||
|
background-color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
div.huge {
|
||||||
|
|
||||||
|
font-size: 300px;
|
||||||
|
line-height: 1em;
|
||||||
|
padding: 0;
|
||||||
|
letter-spacing: -.02em;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.glyph_range {
|
||||||
|
font-size: 72px;
|
||||||
|
line-height: 1.1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.size10 {
|
||||||
|
font-size: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.size11 {
|
||||||
|
font-size: 11px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.size12 {
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.size13 {
|
||||||
|
font-size: 13px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.size14 {
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.size16 {
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.size18 {
|
||||||
|
font-size: 18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.size20 {
|
||||||
|
font-size: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.size24 {
|
||||||
|
font-size: 24px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.size30 {
|
||||||
|
font-size: 30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.size36 {
|
||||||
|
font-size: 36px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.size48 {
|
||||||
|
font-size: 48px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.size60 {
|
||||||
|
font-size: 60px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.size72 {
|
||||||
|
font-size: 72px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.size90 {
|
||||||
|
font-size: 90px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.psample_row1 {
|
||||||
|
height: 120px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.psample_row1 {
|
||||||
|
height: 120px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.psample_row2 {
|
||||||
|
height: 160px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.psample_row3 {
|
||||||
|
height: 160px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.psample_row4 {
|
||||||
|
height: 160px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.psample {
|
||||||
|
overflow: hidden;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.psample p {
|
||||||
|
line-height: 1.3em;
|
||||||
|
display: block;
|
||||||
|
overflow: hidden;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.psample span {
|
||||||
|
margin-right: .5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.white_blend {
|
||||||
|
width: 100%;
|
||||||
|
height: 61px;
|
||||||
|
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAVkAAAA9CAYAAAAH4BojAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAO1JREFUeNrs3TsKgFAMRUE/eer+NxztxMYuEWQG3ECKwwUF58ycAKixOAGAyAKILAAiCyCyACILgMgCiCyAyAIgsgAiCyCyAIgsgMgCiCwAIgsgsgAiC4DIAogsACIL0CWuZ3UGgLrIhjMA1EV2OAOAJQtgyQLwjOzmDAAiCyCyAIgsQFtkd2cAEFkAkQVAZAHaIns4A4AlC2DJAiCyACILILIAiCzAV5H1dQGAJQsgsgCILIDIAvwisl58AViyAJYsACILILIAIgvAe2T9EhxAZAFEFgCRBeiL7HAGgLrIhjMAWLIAliwAt1OAAQDwygTBulLIlQAAAABJRU5ErkJggg==);
|
||||||
|
position: absolute;
|
||||||
|
bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.black_blend {
|
||||||
|
width: 100%;
|
||||||
|
height: 61px;
|
||||||
|
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAVkAAAA9CAYAAAAH4BojAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAPJJREFUeNrs3TEKhTAQRVGjibr/9QoxhY2N3Ywo50A28IrLwP9g6b1PAMSYTQAgsgAiC4DIAogsgMgCILIAIgsgsgCILIDIAogsACILILIAIguAyAKILIDIAiCyACILgMgCZCnjLWYAiFGvB0BQZJsZAFyyAC5ZAO6RXc0AILIAIguAyAKkRXYzA4DIAogsACILkBbZ3QwALlkAlywAIgsgsgAiC4DIArwVWf8uAHDJAogsACILILIAv4isH74AXLIALlkARBZAZAFEFoDnyPokOIDIAogsACILkBfZZgaAuMhWMwC4ZAE+p4x3mAEgxinAAJ+XBbPWGkwAAAAAAElFTkSuQmCC);
|
||||||
|
position: absolute;
|
||||||
|
bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fullreverse {
|
||||||
|
background: #000 !important;
|
||||||
|
color: #fff !important;
|
||||||
|
margin-left: -20px;
|
||||||
|
padding-left: 20px;
|
||||||
|
margin-right: -20px;
|
||||||
|
padding-right: 20px;
|
||||||
|
padding: 20px;
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.sample_table td {
|
||||||
|
padding-top: 3px;
|
||||||
|
padding-bottom: 5px;
|
||||||
|
padding-left: 5px;
|
||||||
|
vertical-align: middle;
|
||||||
|
line-height: 1.2em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sample_table td:first-child {
|
||||||
|
background-color: #eee;
|
||||||
|
text-align: right;
|
||||||
|
padding-right: 5px;
|
||||||
|
padding-left: 0;
|
||||||
|
padding: 5px;
|
||||||
|
font: 11px/12px 'Courier New', Courier, mono;
|
||||||
|
}
|
||||||
|
|
||||||
|
code {
|
||||||
|
white-space: pre;
|
||||||
|
background-color: #eee;
|
||||||
|
display: block;
|
||||||
|
padding: 10px;
|
||||||
|
margin-bottom: 18px;
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.bottom, .last {
|
||||||
|
margin-bottom: 0 !important;
|
||||||
|
padding-bottom: 0 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.box {
|
||||||
|
padding: 18px;
|
||||||
|
margin-bottom: 18px;
|
||||||
|
background: #eee;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reverse, .reversed {
|
||||||
|
background: #000 !important;
|
||||||
|
color: #fff !important;
|
||||||
|
border: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
#bodycomparison {
|
||||||
|
position: relative;
|
||||||
|
overflow: hidden;
|
||||||
|
font-size: 72px;
|
||||||
|
height: 90px;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
#bodycomparison div {
|
||||||
|
font-size: 72px;
|
||||||
|
line-height: 90px;
|
||||||
|
display: inline;
|
||||||
|
margin: 0 15px 0 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#bodycomparison div span {
|
||||||
|
font: 10px Arial;
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#xheight {
|
||||||
|
float: none;
|
||||||
|
position: absolute;
|
||||||
|
color: #d9f3ff;
|
||||||
|
font-size: 72px;
|
||||||
|
line-height: 90px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fontbody {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.arialbody {
|
||||||
|
font-family: Arial;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.verdanabody {
|
||||||
|
font-family: Verdana;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.georgiabody {
|
||||||
|
font-family: Georgia;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* @group Layout page
|
||||||
|
*/
|
||||||
|
|
||||||
|
#layout h1 {
|
||||||
|
font-size: 36px;
|
||||||
|
line-height: 42px;
|
||||||
|
font-weight: normal;
|
||||||
|
font-style: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
#layout h2 {
|
||||||
|
font-size: 24px;
|
||||||
|
line-height: 23px;
|
||||||
|
font-weight: normal;
|
||||||
|
font-style: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
#layout h3 {
|
||||||
|
font-size: 22px;
|
||||||
|
line-height: 1.4em;
|
||||||
|
margin-top: 1em;
|
||||||
|
font-weight: normal;
|
||||||
|
font-style: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#layout p.byline {
|
||||||
|
font-size: 12px;
|
||||||
|
margin-top: 18px;
|
||||||
|
line-height: 12px;
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#layout p {
|
||||||
|
font-size: 14px;
|
||||||
|
line-height: 21px;
|
||||||
|
margin-bottom: .5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
#layout p.large {
|
||||||
|
font-size: 18px;
|
||||||
|
line-height: 26px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#layout .sidebar p {
|
||||||
|
font-size: 12px;
|
||||||
|
line-height: 1.4em;
|
||||||
|
}
|
||||||
|
|
||||||
|
#layout p.caption {
|
||||||
|
font-size: 10px;
|
||||||
|
margin-top: -16px;
|
||||||
|
margin-bottom: 18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* @end */
|
||||||
|
|
||||||
|
/* @group Glyphs */
|
||||||
|
|
||||||
|
#glyph_chart div {
|
||||||
|
background-color: #d9f3ff;
|
||||||
|
color: black;
|
||||||
|
float: left;
|
||||||
|
font-size: 36px;
|
||||||
|
height: 1.2em;
|
||||||
|
line-height: 1.2em;
|
||||||
|
margin-bottom: 1px;
|
||||||
|
margin-right: 1px;
|
||||||
|
text-align: center;
|
||||||
|
width: 1.2em;
|
||||||
|
position: relative;
|
||||||
|
padding: .6em .2em .2em;
|
||||||
|
}
|
||||||
|
|
||||||
|
#glyph_chart div p {
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
top: 0;
|
||||||
|
display: block;
|
||||||
|
text-align: center;
|
||||||
|
font: bold 9px Arial, sans-serif;
|
||||||
|
background-color: #3a768f;
|
||||||
|
width: 100%;
|
||||||
|
color: #fff;
|
||||||
|
padding: 2px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#glyphs h1 {
|
||||||
|
font-family: Arial, sans-serif;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* @end */
|
||||||
|
|
||||||
|
/* @group Installing */
|
||||||
|
|
||||||
|
#installing {
|
||||||
|
font: 13px Arial, sans-serif;
|
||||||
|
}
|
||||||
|
|
||||||
|
#installing p,
|
||||||
|
#glyphs p {
|
||||||
|
line-height: 1.2em;
|
||||||
|
margin-bottom: 18px;
|
||||||
|
font: 13px Arial, sans-serif;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#installing h3 {
|
||||||
|
font-size: 15px;
|
||||||
|
margin-top: 18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* @end */
|
||||||
|
|
||||||
|
#rendering h1 {
|
||||||
|
font-family: Arial, sans-serif;
|
||||||
|
}
|
||||||
|
|
||||||
|
.render_table td {
|
||||||
|
font: 11px 'Courier New', Courier, mono;
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -0,0 +1,12 @@
|
|||||||
|
/*! Generated by Font Squirrel (https://www.fontsquirrel.com) on May 3, 2023 */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: 'questrialregular';
|
||||||
|
src: url('questrial-regular-webfont.woff2') format('woff2'),
|
||||||
|
url('questrial-regular-webfont.woff') format('woff');
|
||||||
|
font-weight: normal;
|
||||||
|
font-style: normal;
|
||||||
|
|
||||||
|
}
|
29
nationchains/www/adminapx/static/tpl/apxmodal_en.mustache
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
<!-- Modal
|
||||||
|
To populate app.load('apxmodal','apxmodal',{title,body,actions[{btndescription:'xx',onclick:'js function'}]})
|
||||||
|
To activate show
|
||||||
|
<button type="button" class="btn btn-outline-success btn-sm" data-bs-toggle="modal" data-bs-target="#modalinfo">
|
||||||
|
-->
|
||||||
|
<div class="modal fade" id="{{{modalid}}}" tabindex="-1" aria-labelledby="{{{modalid}}}Label" aria-hidden="true">
|
||||||
|
<div class="modal-dialog {{classmodaldialog}}">
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-header">
|
||||||
|
<h5 class="modal-title" id="{{{modalid}}}Label">{{{title}}}</h5>
|
||||||
|
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
{{{body}}}
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
|
||||||
|
{{#actions}}
|
||||||
|
<button type="button" onclick="{{{onclick}}}" class="btn btn-primary">{{btndescription}}</button>
|
||||||
|
{{/actions}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1 @@
|
|||||||
|
<p>Set up editorjs here</p>
|
@ -0,0 +1,17 @@
|
|||||||
|
<h1>Your account is register</h1>
|
||||||
|
<p>Please find your confidential information in a safe space</p>
|
||||||
|
<p>Your alias: {{alias}}</p>
|
||||||
|
<p>Your passphrase: {{passphrase}}</p>
|
||||||
|
<p>Your public key that you can share with anyone:</p>
|
||||||
|
<textarea>{{pubk}}</textarea>
|
||||||
|
<p>Your private key that you keep secret and use to proove you own the public key:</p>
|
||||||
|
<textarea>{{privk}}</textarea>
|
||||||
|
{{#trustedtribe}}
|
||||||
|
<p>Thanks to trust us to keep your private key,
|
||||||
|
we'll be able to send back to this email address in case you need it</p>
|
||||||
|
{{/trustedtribe}}
|
||||||
|
{{^trustedtribe}}
|
||||||
|
<p>You decide to keep secret this private key,
|
||||||
|
Please save it in a safe place that noone else than you can access to proove you own it</p>
|
||||||
|
{{/trustedtribe}}
|
||||||
|
<p>Never share with someone else your privbatekey if someone can access, it will be possible to usurp your identity.</p>
|
@ -0,0 +1,17 @@
|
|||||||
|
Your account is register \n\r
|
||||||
|
Please find your confidential information in a safe space\n\r
|
||||||
|
Your alias: {{alias}}\n\r
|
||||||
|
Your passphrase: {{passphrase}}\n\r
|
||||||
|
Your public key that you can share with anyone:\n\r
|
||||||
|
<textarea>{{pubk}}</textarea>
|
||||||
|
Your private key that you keep secret and use to proove you own the public key:\n\r
|
||||||
|
<textarea>{{privk}}</textarea>
|
||||||
|
{{#trustedtribe}}
|
||||||
|
Thanks to trust us to keep your private key,
|
||||||
|
we'll be able to send back to this email address in case you need it\n\r
|
||||||
|
{{/trustedtribe}}
|
||||||
|
{{^trustedtribe}}
|
||||||
|
You decide to keep secret this private key,
|
||||||
|
Please save it in a safe place that noone else than you can access to proove you own it\n\r
|
||||||
|
{{/trustedtribe}}
|
||||||
|
Never share with someone else your privbatekey if someone can access, it will be possible to usurp your identity.\n\r
|
34
nationchains/www/adminapx/static/tpl/nginx.conf.mustache
Executable file
@ -0,0 +1,34 @@
|
|||||||
|
user {{{sudoerUser}}};
|
||||||
|
worker_processes auto;
|
||||||
|
error_log {{{ }}}/var/log/nginx/error.log notice;
|
||||||
|
pid /var/run/nginx.pid;
|
||||||
|
#include /etc/nginx/modules-enabled/*.conf;
|
||||||
|
|
||||||
|
events {
|
||||||
|
worker_connections 1024;
|
||||||
|
}
|
||||||
|
http {
|
||||||
|
include /etc/nginx/mime.types;
|
||||||
|
default_type application/octet-stream;
|
||||||
|
|
||||||
|
log_format main '[$time_local]##"$http_x_forwarded_for"##"$request" '
|
||||||
|
'"$http_user_agent"';
|
||||||
|
|
||||||
|
log_format mainold '$remote_addr - $remote_user [$time_local] "$request" '
|
||||||
|
'$status $body_bytes_sent "$http_referer" '
|
||||||
|
'"$http_user_agent" "$http_x_forwarded_for"';
|
||||||
|
log_format trace '$remote_addr - $remote_user [$time_local] '
|
||||||
|
'$host "$request" $status $body_bytes_sent '
|
||||||
|
'"$http_referer" "$http_user_agent" '
|
||||||
|
'"$http_x_forwarded_for" $request_id';
|
||||||
|
access_log /var/log/nginx/access.log main;
|
||||||
|
sendfile on;
|
||||||
|
keepalive_timeout 65;
|
||||||
|
gzip on;
|
||||||
|
##
|
||||||
|
# Virtual Host Configs
|
||||||
|
##
|
||||||
|
{{#nginx.include}}
|
||||||
|
include {{{.}}};
|
||||||
|
{{/nginx.include}}
|
||||||
|
}
|
@ -0,0 +1,11 @@
|
|||||||
|
proxy_set_header Host $http_host;
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
|
client_max_body_size 10m;
|
||||||
|
client_body_buffer_size 128k;
|
||||||
|
proxy_connect_timeout 90;
|
||||||
|
proxy_send_timeout 90;
|
||||||
|
proxy_read_timeout 90;
|
||||||
|
proxy_buffers 32 4k;
|
||||||
|
proxy_set_header X-NginX-Proxy true;
|
@ -1,57 +1,130 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-sm-6" data-spacename="explain">
|
<div class="col-sm-6" data-spacename="explain">
|
||||||
<h2>How it works</h2>
|
<h2>How it works</h2>
|
||||||
<p> Alias is a unique string that humainly help to match a PublicKey to check existing alias</p>
|
<p class="small">
|
||||||
<code>
|
Mandatory: apixtrib header have to set with:<br>
|
||||||
GET /api/odmdb/idx/pagans/pagans_alias_all.json with a correct headers
|
* {xalias,xhash,xdays,xtribe,xlang,xapp}<br>
|
||||||
RESULT
|
* xhash is a detached signature done with public and private key of message: 'alias_xdays' where xdays is a time
|
||||||
data:{alias:publicKey}
|
stamp
|
||||||
</code>
|
a xhash has an elapse of 24hours after it has to be recreate.<br>
|
||||||
<p>
|
|
||||||
Run
|
|
||||||
</p>
|
|
||||||
|
|
||||||
</div>
|
We need in local storage auth for this example {alias,passphrase,privatekey, publickey} to be able to create a
|
||||||
<div class="col-sm-6" data-spacename="userinterface">
|
detached signature<br>
|
||||||
|
On the server side we check that signature xhash of alias_timestamp is valid with the public key
|
||||||
|
</p>
|
||||||
|
<p> Alias is a unique string that humainly help to find a PublicKey that is the real identity.
|
||||||
|
To get the list of existing alias</p>
|
||||||
|
<button type="button" class="btn btn-outline-success btn-sm"
|
||||||
|
onclick="app.runapirequest('modalinfo',{method:'GET',url:'nationchains/pagans/idx/alias_all.json'},{title:'Alias list',body:'',actions:[], classmodaldialog:'modal-xl'})">show
|
||||||
|
it</button>
|
||||||
|
</p>
|
||||||
|
<code>
|
||||||
|
GET nationchains/pagans/idx/alias_all.json -> data:{alias:{alias:publicKey}}
|
||||||
|
</code>
|
||||||
|
<p>To allow trustable Tribe to store the Private and Passphrase Key, you get from the townId_all.json key:tribes</p>
|
||||||
|
<button type="button" class="btn btn-outline-success btn-sm"
|
||||||
|
onclick="app.runapirequest('modalinfo',{method:'GET',url:'nationchains/towns/idx/townId_all.json'},{title:'Tribes list',body:'',actions:[], classmodaldialog:'modal-xl'})">show
|
||||||
|
it</button>
|
||||||
|
<code>
|
||||||
|
GET /nationchains/towns/idx/townId_all.json -> data:{townId:{tribes:[list of tribeId inside a town]}}
|
||||||
|
</code>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-6" data-spacename="userinterface">
|
||||||
<div class="row g-3">
|
<div class="row g-3">
|
||||||
<h3>A decentralized Identity</h3>
|
<h3>Am i authenticated to api?</h3>
|
||||||
<p>apXtrib allow you to create keys to identify yourself with a universal alias</p>
|
<button type="button" id="btntestauth" class="btn btn-outline-success btn-sm"
|
||||||
<div class="col-md-6">
|
onclick="app.runapirequest('modalinfo',{method:'GET',url:'api/pagans/isauth'},{title:'Am i authenticated',body:'',actions:[], classmodaldialog:'modal-xl'})">
|
||||||
<label for="inputalias" class="form-label">Your alias</label>
|
Test it</button>
|
||||||
<input type="text" class="form-control" id="inputalias" placeholder="A public alias that any one see">
|
<code>
|
||||||
</div>
|
GET 'api/pagans/isauth' -> status 200 : Well authenticated with alias, status 400: not authenticated
|
||||||
<div class="col-md-6">
|
</code>
|
||||||
<label for="inputemailrecovery" class="form-label">Email Recovery</label>
|
<hr>
|
||||||
<input type="email" class="form-control" id="inputemailrecovery" placeholder="optional, if you want to receive by mail your keys">
|
<h3>Logout</h3>
|
||||||
</div>
|
<button type="button" class="btn btn-outline-success btn-sm"
|
||||||
<div class="col-12">
|
onclick="delete apx.data.auth;apx.data.headers=apxlocal.headers;apx.save();alert('delete apx.data.auth and reinit apx.data.header')">
|
||||||
<label for="inputpassphrase" class="form-label">A passphrase</label>
|
Remove headers</button>
|
||||||
<input type="text" class="form-control" id="inputpassphrase" placeholder="optional, a passphrase to remember, each time something try to use your privateKey this passphrase will be requested">
|
<hr>
|
||||||
</div>
|
<h3>I proove that i own this alias</h3>
|
||||||
<div class="col-12">
|
<div class="col-md-6">
|
||||||
<button type="button" id="generatekeys" onclick="app.createIdentity(document.getElementById('inputalias').value,document.getElementById('inputpassphrase').value)" class="btn btn-primary">Generate keys</button>
|
<label for="inputaliasauth" class="form-label">Your alias</label>
|
||||||
</div>
|
<input type="text" class="form-control" id="inputaliasauth" placeholder="A public alias that any one see">
|
||||||
<div class="col-12">
|
</div>
|
||||||
|
<div class="col-12">
|
||||||
<div class="form-check">
|
<label for="inputpassphraseauth" class="form-label">A passphrase</label>
|
||||||
<input class="form-check-input" type="checkbox" id="gridCheck">
|
<input type="text" class="form-control" id="inputpassphraseauth"
|
||||||
<label class="form-check-label small" for="gridCheck">
|
placeholder="optional, a passphrase to remember, each time something try to use your privateKey this passphrase will be requested">
|
||||||
<b>I trust smatchit to keep my private key and email </b><br>
|
</div>
|
||||||
<b>If i don't trust</b> please download your keys (be aware, none than you can have access to your cipher data).<br>
|
<textarea rows="5" id="privatekeyauth"></textarea>
|
||||||
If you set a correct email then you will receive your keys on your mailbox (Carefull by sending email, smatchit and anyone that access to your email can see your keys).<br>
|
<button class="btn btn-primary"
|
||||||
The safer to be sure no one else than your local browser can see it, just download localy and save it on a personnal cold support (usb key).<br>
|
onclick="pagans.authentifyme(document.getElementById('inputaliasauth').value,document.getElementById('inputpassphraseauth').value,document.getElementById('privatekeyauth').value);document.getElementById('btntestauth').click()">I
|
||||||
If you use a browser that <b>can be accessible by someone else, don't forget to "logout"</b> to clean up any trace.<br>
|
am alias</button>
|
||||||
If you have any suspicious please
|
<hr>
|
||||||
</label>
|
<h3>Create a decentralized Identity</h3>
|
||||||
|
<p>apXtrib allow you to create keys to identify yourself with a universal alias</p>
|
||||||
|
<div class="col-md-6">
|
||||||
|
<label for="inputalias" class="form-label">Your alias</label>
|
||||||
|
<input type="text" class="form-control" id="inputalias" placeholder="A public alias that any one see">
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6">
|
||||||
|
<label for="inputemailrecovery" class="form-label">Email Recovery</label>
|
||||||
|
<input type="email" class="form-control" id="inputemailrecovery"
|
||||||
|
placeholder="optional, if you want to receive by mail your keys">
|
||||||
|
</div>
|
||||||
|
<div class="col-12">
|
||||||
|
<label for="inputpassphrase" class="form-label">A passphrase</label>
|
||||||
|
<input type="text" class="form-control" id="inputpassphrase"
|
||||||
|
placeholder="optional, a passphrase to remember, each time something try to use your privateKey this passphrase will be requested">
|
||||||
|
</div>
|
||||||
|
<button type="button" id="generatekeys"
|
||||||
|
onclick="pagans.createIdentity(document.getElementById('inputalias').value,document.getElementById('inputpassphrase').value)"
|
||||||
|
class="btn btn-primary">Generate keys</button>
|
||||||
|
<div id="trustintribe" class="d-none">
|
||||||
|
<div class="mb-3 row">
|
||||||
|
<div class="col-12">
|
||||||
|
<div class="form-check">
|
||||||
|
<input class="form-check-input" type="checkbox" id="trustedcheck"
|
||||||
|
onclick="document.getElementById('selecttrusttribe').classList.toggle('d-none');">
|
||||||
|
<label class="form-check-label small" for="trustedcheck">
|
||||||
|
<b>I trust a tribe to keep my private key and email, doing this i automaticaly create a Person space in
|
||||||
|
tribe i trust. </b>
|
||||||
|
I understand that someone with tribe accessrights(druid) from this tribe can read my personnal data by
|
||||||
|
unciphering my
|
||||||
|
data.<br>
|
||||||
|
<b>If i don't trust</b> i understand that if i loose my privatekey i also loose my data.<br>
|
||||||
|
If you set a correct email then you will receive your keys on your mailbox, this email is not store if
|
||||||
|
you do not trust<br>
|
||||||
|
If you use a browser that <b>can be accessible by someone else, don't forget to "logout"</b> to clean up
|
||||||
|
any trace.<br>
|
||||||
|
<b>In any case please download your keys and move it on a usb key or/and print it</b><br>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div id="selecttrusttribe" class="d-none">
|
||||||
|
<label for="selectnationid" class="col-12 col-form-label">If you want to trust in a Tribe to store your
|
||||||
|
private key, please chose a tribe which you trust in</label>
|
||||||
|
<div class="col-12">
|
||||||
|
<select class="form-select" id="trustedtribe" aria-label="" placeholder="A tribe to store my private key">
|
||||||
|
{{#tribes}}
|
||||||
|
<option {{#selected}}selected{{/selected}} value="{{tribeId}}">{{tribeId}}</option>
|
||||||
|
{{/tribes}}
|
||||||
|
</select>
|
||||||
|
<input class="d-none" id="inputtribeId" value="{{tribeId}}">
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="downloadkeys" class="btn-group d-none">
|
</div>
|
||||||
<p>Download your keys at least PrivateKey this have to save in a secret place</p>
|
<div id="downloadkeys" class="btn-group d-none">
|
||||||
<button id="privatekey" key="" class="btn btn-outline-primary" onclick="app.downloadlink('pagans.privateKey',apx.data,apx.data.headers.xapp);" >Download PrivateKey</button>
|
<p>Download your keys at least PrivateKey this have to save in a secret place</p>
|
||||||
<button id="publickey" key="" class="btn btn-outline-primary" onclick="app.downloadlink('publicKey',this.getAttribute('key'),apx.data.headers.xapp);">Download PublicKey</button>
|
<button id="privatekey" key="" class="btn btn-outline-primary"
|
||||||
</div>
|
onclick="app.downloadlink('auth.privateKey',apx.data,apx.data.headers.xapp);">Download PrivateKey</button>
|
||||||
<div id="createId" class="col-12 d-none">
|
<button id="publickey" key="" class="btn btn-outline-primary"
|
||||||
<button class="btn btn-primary" onclick="app.registerIdentity()">Create this identity</button>
|
onclick="app.downloadlink('auth.publicKey',this.getAttribute('key'),apx.data.headers.xapp);">Download
|
||||||
</div>
|
PublicKey</button>
|
||||||
|
</div>
|
||||||
|
<div id="createId" class="col-12 d-none">
|
||||||
|
<button class="btn btn-primary" onclick="pagans.registerIdentity();">Create
|
||||||
|
this identity</button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
50
nationchains/www/adminapx/static/tpl/townsetup_en.mustache
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
<div class="container">
|
||||||
|
<div class="row">
|
||||||
|
<h4> Setup a new town</h4>
|
||||||
|
<p>This form let you start joining a nation.</p>
|
||||||
|
<p>For dev you can stay like this and use http instead of https. To join a nation you need:</p>
|
||||||
|
<ul>
|
||||||
|
<li> Get a domain name register to a publicIP that route web traffic from 80 and 443 to this machine</li>
|
||||||
|
<li> Get a pagan identity and be authenticated <a onclick="app.load('apxmain','pagancreate',{})"> click here to create or authentify yoursefl</a>
|
||||||
|
<li> Synchronize the nations, to update your nationchains (carefful all your local stuff will be deleted)</li>
|
||||||
|
<li> Ready to your new mayor role of this town</li>
|
||||||
|
<li> Start saling your hosting</li>
|
||||||
|
</ul>
|
||||||
|
<div class="col-sm-2">
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<div class="mb-3 row">
|
||||||
|
<label for="selectnationid" class="col-sm-6 col-form-label">Select the nation to join</label>
|
||||||
|
<div class="col-sm-6">
|
||||||
|
<select class="form-select" data-nationId="{{nationId}}" aria-label="" placeholder="A nation">
|
||||||
|
{{#nations}}
|
||||||
|
<option {{#selected}}selected{{/selected}} value="{{nationId}}">{{nationId}}</option>
|
||||||
|
{{/nations}}
|
||||||
|
</select>
|
||||||
|
<input class="d-none" id="inputnationId" value="{{nationId}}">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="mb-3 row">
|
||||||
|
<label for="inputtownid" class="col-sm-6 col-form-label">Your Town</label>
|
||||||
|
<div class="col-sm-6">
|
||||||
|
<input type="text" value="{{townId}}" class="form-control" id="inputtownid">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="mb-3 row">
|
||||||
|
<label for="inputtribeid" class="col-sm-6 col-form-label">Your Tribes</label>
|
||||||
|
<div class="col-sm-6">
|
||||||
|
<input type="text" value="{{tribeId}}" class="form-control" id="inputreibeid">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="mb-3 row">
|
||||||
|
<label for="inputdnstown" class="col-sm-6 col-form-label">Domain name of your town (to access this app from the web)</label>
|
||||||
|
<div class="col-sm-6">
|
||||||
|
<input type="text" value="{{dns}}" class="form-control" id="inputdnstown">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-auto">
|
||||||
|
<button onclick="setup.lauchtown(document.getElementById('inputnationId').value, document.getElementById('inputtownId').value,document.getElementById('inputdns').value)" class="btn btn-primary mb-3">Launch this town</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
@ -1,9 +1,9 @@
|
|||||||
{
|
{
|
||||||
"nationId": "ants",
|
"nationId": "ants",
|
||||||
"townId": "wall",
|
"townId": "usbfarm",
|
||||||
"IP":"213.32.65.213",
|
"IP":"192.168.1.1",
|
||||||
"tribeId":"ndda",
|
"tribeId":"ndda",
|
||||||
"dns": ["wallant.ndda.fr"],
|
"dns": ["wallant.ndda.fr","adminapx"],
|
||||||
"mayorId":"philc",
|
"mayorId":"philc",
|
||||||
"passphrase":"",
|
"passphrase":"",
|
||||||
"api": {
|
"api": {
|
31
nationchains/www/adminapx/static/tpldata/initconf.json
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
{
|
||||||
|
"dns": ["adminapx"],
|
||||||
|
"api": {
|
||||||
|
"port": 3020,
|
||||||
|
"languages": ["en", "fr"],
|
||||||
|
"exposedHeaders": ["xdays", "xhash", "xalias", "xlang", "xtribe", "xapp"],
|
||||||
|
"nationObjects": [
|
||||||
|
"schema",
|
||||||
|
"blocks",
|
||||||
|
"nations",
|
||||||
|
"towns",
|
||||||
|
"tribes",
|
||||||
|
"pagans"
|
||||||
|
],
|
||||||
|
"unittesting": ["middlewares", "models", "routes", "nationchains"],
|
||||||
|
"appset": { "trust proxy": true },
|
||||||
|
"bodyparse": {
|
||||||
|
"urlencoded": {
|
||||||
|
"limit": "50mb",
|
||||||
|
"extended": true
|
||||||
|
},
|
||||||
|
"json": { "limit": "500mb" }
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nginx": {
|
||||||
|
"restart": "sudo systemctl restart nginx",
|
||||||
|
"worker_connections": 1024,
|
||||||
|
"include": ["/etc/nginx/conf.d/*.conf"],
|
||||||
|
"pageindex": "index_en.html"
|
||||||
|
}
|
||||||
|
}
|
1
nationchains/www/cdn/share/js/dayjs.min.js
vendored
Normal file
43562
nationchains/www/cdn/share/js/openpgp.js
Normal file
BIN
nationchains/www/cdn/share/logo/favicon.png
Normal file
After Width: | Height: | Size: 3.7 KiB |
BIN
nationchains/www/cdn/share/logo/logobgdark.png
Normal file
After Width: | Height: | Size: 7.0 KiB |
168
nationchains/www/cdn/share/logo/logobgdark.svg
Normal file
@ -0,0 +1,168 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||||
|
|
||||||
|
<svg
|
||||||
|
width="74.422066mm"
|
||||||
|
height="39.408447mm"
|
||||||
|
viewBox="0 0 74.422066 39.408447"
|
||||||
|
version="1.1"
|
||||||
|
id="svg5"
|
||||||
|
inkscape:version="1.2.2 (732a01da63, 2022-12-09, custom)"
|
||||||
|
sodipodi:docname="planchelogoapXtrib.svg"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg">
|
||||||
|
<sodipodi:namedview
|
||||||
|
id="namedview7"
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#000000"
|
||||||
|
borderopacity="0.25"
|
||||||
|
inkscape:showpageshadow="2"
|
||||||
|
inkscape:pageopacity="0.0"
|
||||||
|
inkscape:pagecheckerboard="0"
|
||||||
|
inkscape:deskcolor="#d1d1d1"
|
||||||
|
inkscape:document-units="mm"
|
||||||
|
showgrid="false"
|
||||||
|
inkscape:zoom="2.3786088"
|
||||||
|
inkscape:cx="429.03231"
|
||||||
|
inkscape:cy="188.5556"
|
||||||
|
inkscape:window-width="1868"
|
||||||
|
inkscape:window-height="1141"
|
||||||
|
inkscape:window-x="0"
|
||||||
|
inkscape:window-y="0"
|
||||||
|
inkscape:window-maximized="1"
|
||||||
|
inkscape:current-layer="layer1" />
|
||||||
|
<defs
|
||||||
|
id="defs2">
|
||||||
|
<inkscape:path-effect
|
||||||
|
effect="powerclip"
|
||||||
|
id="path-effect4281-6"
|
||||||
|
is_visible="true"
|
||||||
|
lpeversion="1"
|
||||||
|
inverse="true"
|
||||||
|
flatten="false"
|
||||||
|
hide_clip="false"
|
||||||
|
message="Utilise la règle de remplissage « fill-rule: evenodd » de la boîte de dialogue <b>Fond et contour</b> en l'absence de résultat de mise à plat après une conversion en chemin." />
|
||||||
|
<inkscape:path-effect
|
||||||
|
effect="powerclip"
|
||||||
|
id="path-effect4223-1-5"
|
||||||
|
is_visible="true"
|
||||||
|
lpeversion="1"
|
||||||
|
inverse="true"
|
||||||
|
flatten="false"
|
||||||
|
hide_clip="false"
|
||||||
|
message="Utilise la règle de remplissage « fill-rule: evenodd » de la boîte de dialogue <b>Fond et contour</b> en l'absence de résultat de mise à plat après une conversion en chemin." />
|
||||||
|
<clipPath
|
||||||
|
clipPathUnits="userSpaceOnUse"
|
||||||
|
id="clipath_lpe_path-effect4281-6">
|
||||||
|
<rect
|
||||||
|
style="display:none;fill:none;stroke:#000000;stroke-width:2.965;stroke-miterlimit:5"
|
||||||
|
id="rect12221"
|
||||||
|
width="3.9103701"
|
||||||
|
height="17.277628"
|
||||||
|
x="72.929848"
|
||||||
|
y="18.71629"
|
||||||
|
d="m 72.929848,18.71629 h 3.91037 v 17.277627 h -3.91037 z" />
|
||||||
|
<path
|
||||||
|
id="lpe_path-effect4281-6"
|
||||||
|
style="fill:none;stroke:#000000;stroke-width:2.965;stroke-miterlimit:5"
|
||||||
|
class="powerclip"
|
||||||
|
d="M 39.612377,7.7145809 H 79.612633 V 47.714838 H 39.612377 Z M 72.929848,18.71629 v 17.277627 h 3.91037 V 18.71629 Z" />
|
||||||
|
</clipPath>
|
||||||
|
<clipPath
|
||||||
|
clipPathUnits="userSpaceOnUse"
|
||||||
|
id="clipath_lpe_path-effect4223-1-5">
|
||||||
|
<rect
|
||||||
|
style="display:none;fill:none;stroke:#000000;stroke-width:0.890744;stroke-miterlimit:5;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
id="rect12226"
|
||||||
|
width="29.109257"
|
||||||
|
height="29.109257"
|
||||||
|
x="45.057877"
|
||||||
|
y="13.160081"
|
||||||
|
clip-path="none"
|
||||||
|
d="M 45.057877,13.160081 H 74.167133 V 42.269338 H 45.057877 Z" />
|
||||||
|
<path
|
||||||
|
id="lpe_path-effect4223-1-5"
|
||||||
|
style="fill:none;stroke:#000000;stroke-width:0.890744;stroke-miterlimit:5;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
class="powerclip"
|
||||||
|
d="M 35.399339,3.8513256 H 75.39934 V 43.851326 H 35.399339 Z m 9.658538,9.3087554 V 42.269338 H 74.167133 V 13.160081 Z" />
|
||||||
|
</clipPath>
|
||||||
|
</defs>
|
||||||
|
<g
|
||||||
|
inkscape:label="Calque 1"
|
||||||
|
inkscape:groupmode="layer"
|
||||||
|
id="layer1"
|
||||||
|
transform="translate(-33.762223,-52.949721)">
|
||||||
|
<rect
|
||||||
|
style="fill:none;fill-opacity:1;stroke:none;stroke-width:0.264999;stroke-miterlimit:5;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
id="rect12066-9"
|
||||||
|
width="74.422066"
|
||||||
|
height="39.408443"
|
||||||
|
x="33.685085"
|
||||||
|
y="52.371716" />
|
||||||
|
<rect
|
||||||
|
style="fill:#ffffff;fill-opacity:0.0159938;stroke:none;stroke-width:0.264999;stroke-miterlimit:5;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
id="rect12066-6"
|
||||||
|
width="74.422066"
|
||||||
|
height="39.408443"
|
||||||
|
x="33.762222"
|
||||||
|
y="52.949718"
|
||||||
|
inkscape:export-filename="../6e81e123/logobglight.svg"
|
||||||
|
inkscape:export-xdpi="105.58897"
|
||||||
|
inkscape:export-ydpi="105.58897" />
|
||||||
|
<path
|
||||||
|
style="display:block;fill:none;stroke:#ffffff;stroke-width:0.891;stroke-miterlimit:5;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
id="rect4221-6"
|
||||||
|
width="29.109257"
|
||||||
|
height="29.109257"
|
||||||
|
x="45.057877"
|
||||||
|
y="13.160081"
|
||||||
|
clip-path="url(#clipath_lpe_path-effect4281-6)"
|
||||||
|
inkscape:path-effect="#path-effect4281-6"
|
||||||
|
d="M 45.057877,13.160081 H 74.167133 V 42.269338 H 45.057877 Z"
|
||||||
|
sodipodi:type="rect"
|
||||||
|
transform="translate(0.7877763,47.235812)" />
|
||||||
|
<path
|
||||||
|
style="display:block;fill:none;stroke:#ffffff;stroke-width:0.890744;stroke-miterlimit:5;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
id="rect4212-5-3"
|
||||||
|
width="29.109257"
|
||||||
|
height="29.109257"
|
||||||
|
x="40.844711"
|
||||||
|
y="9.2966976"
|
||||||
|
clip-path="url(#clipath_lpe_path-effect4223-1-5)"
|
||||||
|
inkscape:path-effect="#path-effect4223-1-5"
|
||||||
|
d="M 40.844711,9.2966976 H 69.953968 V 38.405954 H 40.844711 Z"
|
||||||
|
sodipodi:type="rect"
|
||||||
|
transform="translate(1.2107703,47.421564)" />
|
||||||
|
<text
|
||||||
|
xml:space="preserve"
|
||||||
|
style="font-size:3.175px;fill:#2e7fc8;fill-opacity:1;stroke-width:0.265;stroke-dasharray:none"
|
||||||
|
x="48.645107"
|
||||||
|
y="76.664268"
|
||||||
|
id="text168-9"
|
||||||
|
inkscape:highlight-color="#2e7fc8"><tspan
|
||||||
|
sodipodi:role="line"
|
||||||
|
id="tspan166-4"
|
||||||
|
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:14.1111px;font-family:Quicksand;-inkscape-font-specification:'Quicksand, Bold';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;fill:#2e7fc8;fill-opacity:1;stroke-width:0.265;stroke-dasharray:none"
|
||||||
|
x="48.645107"
|
||||||
|
y="76.664268"><tspan
|
||||||
|
style="fill:#ffffff;fill-opacity:1"
|
||||||
|
id="tspan12445">ap</tspan><tspan
|
||||||
|
style="fill:#ffc332;fill-opacity:1"
|
||||||
|
id="tspan11889-8">X</tspan><tspan
|
||||||
|
style="fill:#ffffff;fill-opacity:0.985099"
|
||||||
|
id="tspan12341">trib</tspan></tspan></text>
|
||||||
|
<text
|
||||||
|
xml:space="preserve"
|
||||||
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:2.82222px;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;fill:#2e7fc8;fill-opacity:1;stroke-width:0.264583"
|
||||||
|
x="54.550327"
|
||||||
|
y="82.090439"
|
||||||
|
id="text168-0-1"><tspan
|
||||||
|
sodipodi:role="line"
|
||||||
|
id="tspan166-9-2"
|
||||||
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:2.82222px;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;fill:#ffffff;fill-opacity:1;stroke-width:0.264583"
|
||||||
|
x="54.550327"
|
||||||
|
y="82.090439">BLOCKCHAIN OF DEMOCRACY</tspan></text>
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 7.2 KiB |
BIN
nationchains/www/cdn/share/logo/logobglight.png
Normal file
After Width: | Height: | Size: 10 KiB |
156
nationchains/www/cdn/share/logo/logobglight.svg
Normal file
@ -0,0 +1,156 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||||
|
|
||||||
|
<svg
|
||||||
|
width="74.687065mm"
|
||||||
|
height="39.673443mm"
|
||||||
|
viewBox="0 0 74.687065 39.673443"
|
||||||
|
version="1.1"
|
||||||
|
id="svg5"
|
||||||
|
inkscape:version="1.2.2 (732a01da63, 2022-12-09, custom)"
|
||||||
|
sodipodi:docname="planchelogoapXtrib.svg"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg">
|
||||||
|
<sodipodi:namedview
|
||||||
|
id="namedview7"
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#000000"
|
||||||
|
borderopacity="0.25"
|
||||||
|
inkscape:showpageshadow="2"
|
||||||
|
inkscape:pageopacity="0.0"
|
||||||
|
inkscape:pagecheckerboard="0"
|
||||||
|
inkscape:deskcolor="#d1d1d1"
|
||||||
|
inkscape:document-units="mm"
|
||||||
|
showgrid="false"
|
||||||
|
inkscape:zoom="2.3786088"
|
||||||
|
inkscape:cx="429.03231"
|
||||||
|
inkscape:cy="188.5556"
|
||||||
|
inkscape:window-width="1868"
|
||||||
|
inkscape:window-height="1141"
|
||||||
|
inkscape:window-x="0"
|
||||||
|
inkscape:window-y="0"
|
||||||
|
inkscape:window-maximized="1"
|
||||||
|
inkscape:current-layer="layer1" />
|
||||||
|
<defs
|
||||||
|
id="defs2">
|
||||||
|
<inkscape:path-effect
|
||||||
|
effect="powerclip"
|
||||||
|
id="path-effect4281"
|
||||||
|
is_visible="true"
|
||||||
|
lpeversion="1"
|
||||||
|
inverse="true"
|
||||||
|
flatten="false"
|
||||||
|
hide_clip="false"
|
||||||
|
message="Utilise la règle de remplissage « fill-rule: evenodd » de la boîte de dialogue <b>Fond et contour</b> en l'absence de résultat de mise à plat après une conversion en chemin." />
|
||||||
|
<clipPath
|
||||||
|
clipPathUnits="userSpaceOnUse"
|
||||||
|
id="clipPath4219-7">
|
||||||
|
<rect
|
||||||
|
style="display:none;fill:none;stroke:#000000;stroke-width:0.890744;stroke-miterlimit:5;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
id="rect4221-7"
|
||||||
|
width="29.109257"
|
||||||
|
height="29.109257"
|
||||||
|
x="45.057877"
|
||||||
|
y="13.160081"
|
||||||
|
clip-path="none"
|
||||||
|
d="M 45.057877,13.160081 H 74.167133 V 42.269338 H 45.057877 Z" />
|
||||||
|
<path
|
||||||
|
id="lpe_path-effect4223-1"
|
||||||
|
style="fill:none;stroke:#000000;stroke-width:0.890744;stroke-miterlimit:5;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
class="powerclip"
|
||||||
|
d="M 35.399339,3.8513256 H 75.39934 V 43.851326 H 35.399339 Z m 9.658538,9.3087554 V 42.269338 H 74.167133 V 13.160081 Z" />
|
||||||
|
</clipPath>
|
||||||
|
<inkscape:path-effect
|
||||||
|
effect="powerclip"
|
||||||
|
id="path-effect4223-1"
|
||||||
|
is_visible="true"
|
||||||
|
lpeversion="1"
|
||||||
|
inverse="true"
|
||||||
|
flatten="false"
|
||||||
|
hide_clip="false"
|
||||||
|
message="Utilise la règle de remplissage « fill-rule: evenodd » de la boîte de dialogue <b>Fond et contour</b> en l'absence de résultat de mise à plat après une conversion en chemin." />
|
||||||
|
<clipPath
|
||||||
|
clipPathUnits="userSpaceOnUse"
|
||||||
|
id="clipPath4277">
|
||||||
|
<rect
|
||||||
|
style="display:none;fill:none;stroke:#000000;stroke-width:2.965;stroke-miterlimit:5"
|
||||||
|
id="rect4279"
|
||||||
|
width="3.9103701"
|
||||||
|
height="17.277628"
|
||||||
|
x="72.929848"
|
||||||
|
y="18.71629"
|
||||||
|
d="m 72.929848,18.71629 h 3.91037 v 17.277627 h -3.91037 z" />
|
||||||
|
<path
|
||||||
|
id="lpe_path-effect4281"
|
||||||
|
style="fill:none;stroke:#000000;stroke-width:2.965;stroke-miterlimit:5"
|
||||||
|
class="powerclip"
|
||||||
|
d="M 39.612377,7.7145809 H 79.612633 V 47.714838 H 39.612377 Z M 72.929848,18.71629 v 17.277627 h 3.91037 V 18.71629 Z" />
|
||||||
|
</clipPath>
|
||||||
|
</defs>
|
||||||
|
<g
|
||||||
|
inkscape:label="Calque 1"
|
||||||
|
inkscape:groupmode="layer"
|
||||||
|
id="layer1"
|
||||||
|
transform="translate(-32.764809,-5.0034045)">
|
||||||
|
<path
|
||||||
|
style="display:block;fill:none;stroke:#2e7fc8;stroke-width:0.891;stroke-miterlimit:5;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
id="rect4221"
|
||||||
|
width="29.109257"
|
||||||
|
height="29.109257"
|
||||||
|
x="45.057877"
|
||||||
|
y="13.160081"
|
||||||
|
clip-path="url(#clipPath4277)"
|
||||||
|
inkscape:path-effect="#path-effect4281"
|
||||||
|
d="M 45.057877,13.160081 H 74.167133 V 42.269338 H 45.057877 Z"
|
||||||
|
sodipodi:type="rect" />
|
||||||
|
<path
|
||||||
|
style="display:block;fill:none;stroke:#2e7fc8;stroke-width:0.890744;stroke-miterlimit:5;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
id="rect4212-5"
|
||||||
|
width="29.109257"
|
||||||
|
height="29.109257"
|
||||||
|
x="40.844711"
|
||||||
|
y="9.2966976"
|
||||||
|
clip-path="url(#clipPath4219-7)"
|
||||||
|
inkscape:path-effect="#path-effect4223-1"
|
||||||
|
d="M 40.844711,9.2966976 H 69.953968 V 38.405954 H 40.844711 Z"
|
||||||
|
sodipodi:type="rect"
|
||||||
|
transform="translate(0.42299389,0.18575204)" />
|
||||||
|
<text
|
||||||
|
xml:space="preserve"
|
||||||
|
style="font-size:3.175px;fill:#2e7fc8;fill-opacity:1;stroke-width:0.265;stroke-dasharray:none"
|
||||||
|
x="47.857334"
|
||||||
|
y="29.428459"
|
||||||
|
id="text168"
|
||||||
|
inkscape:highlight-color="#2e7fc8"><tspan
|
||||||
|
sodipodi:role="line"
|
||||||
|
id="tspan166"
|
||||||
|
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:14.1111px;font-family:Quicksand;-inkscape-font-specification:'Quicksand, Bold';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;fill:#2e7fc8;fill-opacity:1;stroke-width:0.265;stroke-dasharray:none"
|
||||||
|
x="47.857334"
|
||||||
|
y="29.428459">ap<tspan
|
||||||
|
style="fill:#ffc332;fill-opacity:1"
|
||||||
|
id="tspan11889">X</tspan>trib</tspan></text>
|
||||||
|
<text
|
||||||
|
xml:space="preserve"
|
||||||
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:2.82222px;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;fill:#2e7fc8;fill-opacity:1;stroke-width:0.264583"
|
||||||
|
x="53.762562"
|
||||||
|
y="34.85463"
|
||||||
|
id="text168-0"><tspan
|
||||||
|
sodipodi:role="line"
|
||||||
|
id="tspan166-9"
|
||||||
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:2.82222px;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;fill:#2e7fc8;fill-opacity:1;stroke-width:0.264583"
|
||||||
|
x="53.762562"
|
||||||
|
y="34.85463">BLOCKCHAIN OF DEMOCRACY</tspan></text>
|
||||||
|
<rect
|
||||||
|
style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:0.264999;stroke-miterlimit:5;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
id="rect12066"
|
||||||
|
width="74.422066"
|
||||||
|
height="39.408443"
|
||||||
|
x="32.897308"
|
||||||
|
y="5.1359038"
|
||||||
|
inkscape:export-filename="../6e81e123/logobglight.svg"
|
||||||
|
inkscape:export-xdpi="105.58897"
|
||||||
|
inkscape:export-ydpi="105.58897" />
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 6.6 KiB |
BIN
nationchains/www/cdn/share/logo/logocarredark.png
Normal file
After Width: | Height: | Size: 4.5 KiB |
BIN
nationchains/www/cdn/share/logo/logocarrelight.png
Normal file
After Width: | Height: | Size: 4.2 KiB |
@ -1,18 +1,18 @@
|
|||||||
server {
|
server {
|
||||||
server_name wallants.ndda.fr ;
|
server_name adminapx wallant.ndda.fr;
|
||||||
access_log /home/phil/workspace/apxtrib/nationchains/logs/nginx/adminapx.town.access.log main;
|
access_log /media/phil/usbfarm/apxtrib/nationchains/logs/nginx/adminapx.town.access.log main;
|
||||||
|
|
||||||
location ~* /nationchains/(schema|blocks|pagans|towns|nations)/ {
|
location ~* /nationchains/(schema|blocks|pagans|towns|nations)/ {
|
||||||
# Warning: never add tribes for keeping it private
|
# Warning: never add tribes for keeping it private
|
||||||
root /home/phil/workspace/apxtrib/;
|
root /media/phil/usbfarm/apxtrib/;
|
||||||
}
|
}
|
||||||
|
|
||||||
# /plugins/pluginame/components/xxx?plugin=pluginname&pluginkey=key
|
# /plugins/pluginame/components/xxx?plugin=pluginname&pluginkey=key
|
||||||
# acess if exist pluginkey
|
# acess if exist pluginkey
|
||||||
location /plugins/ {
|
location /plugins/ {
|
||||||
add_header X-debug "plugins local $arg_plugin/keys/$arg_pluginkey sent";
|
add_header X-debug "plugins local $arg_plugin/keys/$arg_pluginkey sent";
|
||||||
root /home/phil/workspace/apxtrib/nationchains//plugins/;
|
root /media/phil/usbfarm/apxtrib/nationchains//plugins/;
|
||||||
if (-f /home/phil/workspace/apxtrib/nationchains//plugins/$arg_plugin/keys/$arg_pluginkey) {
|
if (-f /media/phil/usbfarm/apxtrib/nationchains//plugins/$arg_plugin/keys/$arg_pluginkey) {
|
||||||
rewrite /plugins/([^/]+)/components/([^\?]+) /$1/components/$2 break;
|
rewrite /plugins/([^/]+)/components/([^\?]+) /$1/components/$2 break;
|
||||||
}
|
}
|
||||||
return 403 "No valid token access for plugin:$arg_plugin with token:$arg_pluginkey please ask your admin";
|
return 403 "No valid token access for plugin:$arg_plugin with token:$arg_pluginkey please ask your admin";
|
||||||
@ -20,12 +20,12 @@ server {
|
|||||||
|
|
||||||
location /cdn/ {
|
location /cdn/ {
|
||||||
rewrite /cdn/(.*$) /$1 break;
|
rewrite /cdn/(.*$) /$1 break;
|
||||||
root /home/phil/workspace/apxtrib/nationchains/www/cdn/;
|
root /media/phil/usbfarm/apxtrib/nationchains/www/cdn/;
|
||||||
}
|
}
|
||||||
|
|
||||||
location /spacedev/ {
|
location /spacedev/ {
|
||||||
rewrite /spacedev/(.*$) /$1 break;
|
rewrite /spacedev/(.*$) /$1 break;
|
||||||
root /home/phil/workspace/apxtrib/nationchains/spacedev/adminapx/dist/;
|
root /media/phil/usbfarm/apxtrib/nationchains/spacedev/adminapx/dist/;
|
||||||
}
|
}
|
||||||
|
|
||||||
location /api/ {
|
location /api/ {
|
||||||
@ -36,7 +36,7 @@ server {
|
|||||||
}
|
}
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
root /home/phil/workspace/apxtrib/nationchains/www/adminapx;
|
root /media/phil/usbfarm/apxtrib/nationchains/www/adminapx;
|
||||||
index index.html index_en.html;
|
index index.html index_en.html;
|
||||||
}
|
}
|
||||||
error_page 404 /404.html;
|
error_page 404 /404.html;
|
||||||
@ -46,24 +46,4 @@ server {
|
|||||||
location = /50x.html {
|
location = /50x.html {
|
||||||
root /usr/local/nginx/html;
|
root /usr/local/nginx/html;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
listen 443 ssl; # managed by Certbot
|
|
||||||
ssl_certificate /etc/letsencrypt/live/wallants.ndda.fr/fullchain.pem; # managed by Certbot
|
|
||||||
ssl_certificate_key /etc/letsencrypt/live/wallants.ndda.fr/privkey.pem; # managed by Certbot
|
|
||||||
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
|
|
||||||
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
|
|
||||||
|
|
||||||
}
|
}
|
||||||
server {
|
|
||||||
if ($host = wallants.ndda.fr) {
|
|
||||||
return 301 https://$host$request_uri;
|
|
||||||
} # managed by Certbot
|
|
||||||
|
|
||||||
|
|
||||||
server_name wallants.ndda.fr ;
|
|
||||||
listen 80;
|
|
||||||
return 404; # managed by Certbot
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
1
tribes/devenv/person/itm/testerC.json
Normal file
@ -0,0 +1 @@
|
|||||||
|
{"alias":"testerC","dt_create":"2023-05-11T22:24:52.415Z","accessrights":{"profil":"user"},"recovery":{"alias":"testerC","publickey":"-----BEGIN PGP PUBLIC KEY BLOCK-----\n\nxjMEZF1jnhYJKwYBBAHaRw8BAQdAk+vWTLhIdrKmkDCs5JFfJ2/nlEaKfi6w\nC2RMVjV2od/NAMKMBBAWCgA+BYJkXWOeBAsJBwgJkA1+VJX1lEhqAxUICgQW\nAAIBAhkBApsDAh4BFiEEjtlC0YBMG5A+5hfsDX5UlfWUSGoAAO+NAP4jOgmP\ns7HvHfUp94EOc3w2QzyFuNJ2JA3Y60H/6JbEogD/b5eMgdWlwB9CuxRHdFnB\noLWKl4GrcYuAmeHlboN+lALOOARkXWOeEgorBgEEAZdVAQUBAQdADY96UpTX\nqzYlNVaRYtqqUiv2N9MhXJGvMwDhEvm6jWkDAQgHwngEGBYIACoFgmRdY54J\nkA1+VJX1lEhqApsMFiEEjtlC0YBMG5A+5hfsDX5UlfWUSGoAAHSdAP9GqJZ/\ncbgv3K+tXVDjmDsXl7E4sNwQVPsoXvGfzeGOpwD/VyrB9a4O+9peLnuxBad9\nyEa5D2PAxVAXkKySOhH8BA8=\n=aCoC\n-----END PGP PUBLIC KEY BLOCK-----\n","email":"phc@ndda.fr","privatekey":"-----BEGIN PGP PRIVATE KEY BLOCK-----\n\nxVgEZF1jnhYJKwYBBAHaRw8BAQdAk+vWTLhIdrKmkDCs5JFfJ2/nlEaKfi6w\nC2RMVjV2od8AAQDxcHGEzdDOSI2Jk/pE55gHLh8eAv0B2chn9r7Axj9C3xGE\nzQDCjAQQFgoAPgWCZF1jngQLCQcICZANflSV9ZRIagMVCAoEFgACAQIZAQKb\nAwIeARYhBI7ZQtGATBuQPuYX7A1+VJX1lEhqAADvjQD+IzoJj7Ox7x31KfeB\nDnN8NkM8hbjSdiQN2OtB/+iWxKIA/2+XjIHVpcAfQrsUR3RZwaC1ipeBq3GL\ngJnh5W6DfpQCx10EZF1jnhIKKwYBBAGXVQEFAQEHQA2PelKU16s2JTVWkWLa\nqlIr9jfTIVyRrzMA4RL5uo1pAwEIBwAA/1N4ewKv9m1cHOzm+Ukgx+1GQg0K\nfM5BFhYAHkXrm8FoDyHCeAQYFggAKgWCZF1jngmQDX5UlfWUSGoCmwwWIQSO\n2ULRgEwbkD7mF+wNflSV9ZRIagAAdJ0A/0aoln9xuC/cr61dUOOYOxeXsTiw\n3BBU+yhe8Z/N4Y6nAP9XKsH1rg772l4ue7EFp33IRrkPY8DFUBeQrJI6EfwE\nDw==\n=XbiQ\n-----END PGP PRIVATE KEY BLOCK-----\n","passphrase":""},"dt_update":"2023-05-11T22:27:24.499Z"}
|