mirror of
https://github.com/PretendoNetwork/juxtaposition-ui.git
synced 2026-04-25 08:04:32 -05:00
Added yeah! support on web. Moved me page icon to top banner on mobile. (hopefully) fixed issue with navigation bar rendering under the gesture bar on iOS
This commit is contained in:
parent
fcff5be3c2
commit
e90d172ffe
200
package-lock.json
generated
200
package-lock.json
generated
|
|
@ -16,7 +16,6 @@
|
|||
"fs-extra": "^9.0.1",
|
||||
"hashmap": "^2.4.0",
|
||||
"image-pixels": "^2.2.2",
|
||||
"indexed-image-converter": "github:PretendoNetwork/indexed-image-converter",
|
||||
"memory-cache": "^0.2.0",
|
||||
"moment": "^2.29.1",
|
||||
"mongoose": "^6.0.13",
|
||||
|
|
@ -499,14 +498,6 @@
|
|||
"color-name": "1.1.3"
|
||||
}
|
||||
},
|
||||
"node_modules/color-id": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/color-id/-/color-id-1.1.0.tgz",
|
||||
"integrity": "sha512-2iRtAn6dC/6/G7bBIo0uupVrIne1NsQJvJxZOBCzQOfk7jRq97feaDZ3RdzuHakRXXnHGNwglto3pqtRx1sX0g==",
|
||||
"dependencies": {
|
||||
"clamp": "^1.0.1"
|
||||
}
|
||||
},
|
||||
"node_modules/color-name": {
|
||||
"version": "1.1.3",
|
||||
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
|
||||
|
|
@ -1233,43 +1224,6 @@
|
|||
"node": ">=4.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/image-encode": {
|
||||
"version": "1.3.1",
|
||||
"resolved": "https://registry.npmjs.org/image-encode/-/image-encode-1.3.1.tgz",
|
||||
"integrity": "sha512-XlDSaqGFrW0Rn08fxJM725+h9Hfx/D9u1RVMP8IrcSRN5Ib74UgVf7yuzoS8YAxKc6HqQ8bhDSvy+rIzCUoAYg==",
|
||||
"dependencies": {
|
||||
"bmp-js": "^0.1.0",
|
||||
"image-palette": "^2.0.1",
|
||||
"image-type": "^3.0.0",
|
||||
"is-plain-obj": "^1.1.0",
|
||||
"jpeg-js": "^0.4.1",
|
||||
"next-pow-2": "^1.0.0",
|
||||
"object-assign": "^4.1.1",
|
||||
"omggif": "^1.0.9",
|
||||
"pngjs": "^3.3.3",
|
||||
"pxls": "^2.3.1",
|
||||
"to-array-buffer": "^3.0.0",
|
||||
"utif": "^2.0.1"
|
||||
}
|
||||
},
|
||||
"node_modules/image-encode/node_modules/pngjs": {
|
||||
"version": "3.4.0",
|
||||
"resolved": "https://registry.npmjs.org/pngjs/-/pngjs-3.4.0.tgz",
|
||||
"integrity": "sha512-NCrCHhWmnQklfH4MtJMRjZ2a8c80qXeMlQMv2uVp9ISJMTt562SbGd6n2oq0PaPgKm7Z6pL9E2UlLIhC+SHL3w==",
|
||||
"engines": {
|
||||
"node": ">=4.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/image-palette": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/image-palette/-/image-palette-2.1.0.tgz",
|
||||
"integrity": "sha512-3ImSEWD26+xuQFdP0RWR4WSXadZwvgrFhjGNpMEapTG1tf2XrBFS2dlKK5hNgH4UIaSQlSUFRn1NeA+zULIWbQ==",
|
||||
"dependencies": {
|
||||
"color-id": "^1.1.0",
|
||||
"pxls": "^2.0.0",
|
||||
"quantize": "^1.0.2"
|
||||
}
|
||||
},
|
||||
"node_modules/image-pixels": {
|
||||
"version": "2.2.2",
|
||||
"resolved": "https://registry.npmjs.org/image-pixels/-/image-pixels-2.2.2.tgz",
|
||||
|
|
@ -1311,17 +1265,6 @@
|
|||
"node": ">=6"
|
||||
}
|
||||
},
|
||||
"node_modules/indexed-image-converter": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "git+ssh://git@github.com/PretendoNetwork/indexed-image-converter.git#f413e562396ac78cb71b6ab8dc8164bc077dd839",
|
||||
"integrity": "sha512-PlbDRmLjwITPjO5nc7FG4XvK0PoSez53pVg9W+pj6iBM5YopZ75gmi1P0uaooh7tCvIJFicWZkuTYE7lY5YLtw==",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"image-encode": "^1.3.1",
|
||||
"image-palette": "^2.1.0",
|
||||
"image-pixels": "^2.2.2"
|
||||
}
|
||||
},
|
||||
"node_modules/inherits": {
|
||||
"version": "2.0.3",
|
||||
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
|
||||
|
|
@ -1514,11 +1457,6 @@
|
|||
"node": ">=8.9.0"
|
||||
}
|
||||
},
|
||||
"node_modules/jpeg-js": {
|
||||
"version": "0.4.3",
|
||||
"resolved": "https://registry.npmjs.org/jpeg-js/-/jpeg-js-0.4.3.tgz",
|
||||
"integrity": "sha512-ru1HWKek8octvUHFHvE5ZzQ1yAsJmIvRdGWvSoKV52XKyuyYA437QWDttXT8eZXDSbuMpHlLzPDZUPd6idIz+Q=="
|
||||
},
|
||||
"node_modules/js-yaml": {
|
||||
"version": "3.14.0",
|
||||
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.0.tgz",
|
||||
|
|
@ -1778,6 +1716,28 @@
|
|||
"url": "https://opencollective.com/mongoose"
|
||||
}
|
||||
},
|
||||
"node_modules/mongoose-cache": {
|
||||
"version": "0.1.5",
|
||||
"resolved": "https://registry.npmjs.org/mongoose-cache/-/mongoose-cache-0.1.5.tgz",
|
||||
"integrity": "sha1-YMb8xtOCP+bG7D2AzffvsN2qEQE=",
|
||||
"dependencies": {
|
||||
"lru-cache": "4.0.x"
|
||||
}
|
||||
},
|
||||
"node_modules/mongoose-cache/node_modules/lru-cache": {
|
||||
"version": "4.0.2",
|
||||
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.0.2.tgz",
|
||||
"integrity": "sha1-HRdnnAac2l0ECZGgnbwsDbN35V4=",
|
||||
"dependencies": {
|
||||
"pseudomap": "^1.0.1",
|
||||
"yallist": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/mongoose-cache/node_modules/yallist": {
|
||||
"version": "2.1.2",
|
||||
"resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz",
|
||||
"integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI="
|
||||
},
|
||||
"node_modules/mongoose-fuzzy-search-next": {
|
||||
"version": "1.0.13",
|
||||
"resolved": "https://registry.npmjs.org/mongoose-fuzzy-search-next/-/mongoose-fuzzy-search-next-1.0.13.tgz",
|
||||
|
|
@ -1909,11 +1869,6 @@
|
|||
"node": ">= 0.6"
|
||||
}
|
||||
},
|
||||
"node_modules/next-pow-2": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/next-pow-2/-/next-pow-2-1.0.0.tgz",
|
||||
"integrity": "sha1-y1wvHa4EDFbN1c2h3FxqOjOPQ2c="
|
||||
},
|
||||
"node_modules/node-abi": {
|
||||
"version": "2.26.0",
|
||||
"resolved": "https://registry.npmjs.org/node-abi/-/node-abi-2.26.0.tgz",
|
||||
|
|
@ -2135,6 +2090,11 @@
|
|||
"node": ">= 0.10"
|
||||
}
|
||||
},
|
||||
"node_modules/pseudomap": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz",
|
||||
"integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM="
|
||||
},
|
||||
"node_modules/psl": {
|
||||
"version": "1.8.0",
|
||||
"resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz",
|
||||
|
|
@ -2178,14 +2138,6 @@
|
|||
"node": ">=0.6"
|
||||
}
|
||||
},
|
||||
"node_modules/quantize": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/quantize/-/quantize-1.0.2.tgz",
|
||||
"integrity": "sha1-0lrCAKd7bXD0ASfKFxoQ4zyFRt4=",
|
||||
"engines": {
|
||||
"node": ">=0.10.21"
|
||||
}
|
||||
},
|
||||
"node_modules/range-parser": {
|
||||
"version": "1.2.1",
|
||||
"resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz",
|
||||
|
|
@ -3442,14 +3394,6 @@
|
|||
"color-name": "1.1.3"
|
||||
}
|
||||
},
|
||||
"color-id": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/color-id/-/color-id-1.1.0.tgz",
|
||||
"integrity": "sha512-2iRtAn6dC/6/G7bBIo0uupVrIne1NsQJvJxZOBCzQOfk7jRq97feaDZ3RdzuHakRXXnHGNwglto3pqtRx1sX0g==",
|
||||
"requires": {
|
||||
"clamp": "^1.0.1"
|
||||
}
|
||||
},
|
||||
"color-name": {
|
||||
"version": "1.1.3",
|
||||
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
|
||||
|
|
@ -4033,42 +3977,6 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"image-encode": {
|
||||
"version": "1.3.1",
|
||||
"resolved": "https://registry.npmjs.org/image-encode/-/image-encode-1.3.1.tgz",
|
||||
"integrity": "sha512-XlDSaqGFrW0Rn08fxJM725+h9Hfx/D9u1RVMP8IrcSRN5Ib74UgVf7yuzoS8YAxKc6HqQ8bhDSvy+rIzCUoAYg==",
|
||||
"requires": {
|
||||
"bmp-js": "^0.1.0",
|
||||
"image-palette": "^2.0.1",
|
||||
"image-type": "^3.0.0",
|
||||
"is-plain-obj": "^1.1.0",
|
||||
"jpeg-js": "^0.4.1",
|
||||
"next-pow-2": "^1.0.0",
|
||||
"object-assign": "^4.1.1",
|
||||
"omggif": "^1.0.9",
|
||||
"pngjs": "^3.3.3",
|
||||
"pxls": "^2.3.1",
|
||||
"to-array-buffer": "^3.0.0",
|
||||
"utif": "^2.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"pngjs": {
|
||||
"version": "3.4.0",
|
||||
"resolved": "https://registry.npmjs.org/pngjs/-/pngjs-3.4.0.tgz",
|
||||
"integrity": "sha512-NCrCHhWmnQklfH4MtJMRjZ2a8c80qXeMlQMv2uVp9ISJMTt562SbGd6n2oq0PaPgKm7Z6pL9E2UlLIhC+SHL3w=="
|
||||
}
|
||||
}
|
||||
},
|
||||
"image-palette": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/image-palette/-/image-palette-2.1.0.tgz",
|
||||
"integrity": "sha512-3ImSEWD26+xuQFdP0RWR4WSXadZwvgrFhjGNpMEapTG1tf2XrBFS2dlKK5hNgH4UIaSQlSUFRn1NeA+zULIWbQ==",
|
||||
"requires": {
|
||||
"color-id": "^1.1.0",
|
||||
"pxls": "^2.0.0",
|
||||
"quantize": "^1.0.2"
|
||||
}
|
||||
},
|
||||
"image-pixels": {
|
||||
"version": "2.2.2",
|
||||
"resolved": "https://registry.npmjs.org/image-pixels/-/image-pixels-2.2.2.tgz",
|
||||
|
|
@ -4107,16 +4015,6 @@
|
|||
"file-type": "^10.9.0"
|
||||
}
|
||||
},
|
||||
"indexed-image-converter": {
|
||||
"version": "git+ssh://git@github.com/PretendoNetwork/indexed-image-converter.git#f413e562396ac78cb71b6ab8dc8164bc077dd839",
|
||||
"integrity": "sha512-PlbDRmLjwITPjO5nc7FG4XvK0PoSez53pVg9W+pj6iBM5YopZ75gmi1P0uaooh7tCvIJFicWZkuTYE7lY5YLtw==",
|
||||
"from": "indexed-image-converter@github:PretendoNetwork/indexed-image-converter",
|
||||
"requires": {
|
||||
"image-encode": "^1.3.1",
|
||||
"image-palette": "^2.1.0",
|
||||
"image-pixels": "^2.2.2"
|
||||
}
|
||||
},
|
||||
"inherits": {
|
||||
"version": "2.0.3",
|
||||
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
|
||||
|
|
@ -4256,11 +4154,6 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"jpeg-js": {
|
||||
"version": "0.4.3",
|
||||
"resolved": "https://registry.npmjs.org/jpeg-js/-/jpeg-js-0.4.3.tgz",
|
||||
"integrity": "sha512-ru1HWKek8octvUHFHvE5ZzQ1yAsJmIvRdGWvSoKV52XKyuyYA437QWDttXT8eZXDSbuMpHlLzPDZUPd6idIz+Q=="
|
||||
},
|
||||
"js-yaml": {
|
||||
"version": "3.14.0",
|
||||
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.0.tgz",
|
||||
|
|
@ -4470,6 +4363,30 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"mongoose-cache": {
|
||||
"version": "0.1.5",
|
||||
"resolved": "https://registry.npmjs.org/mongoose-cache/-/mongoose-cache-0.1.5.tgz",
|
||||
"integrity": "sha1-YMb8xtOCP+bG7D2AzffvsN2qEQE=",
|
||||
"requires": {
|
||||
"lru-cache": "4.0.x"
|
||||
},
|
||||
"dependencies": {
|
||||
"lru-cache": {
|
||||
"version": "4.0.2",
|
||||
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.0.2.tgz",
|
||||
"integrity": "sha1-HRdnnAac2l0ECZGgnbwsDbN35V4=",
|
||||
"requires": {
|
||||
"pseudomap": "^1.0.1",
|
||||
"yallist": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"yallist": {
|
||||
"version": "2.1.2",
|
||||
"resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz",
|
||||
"integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI="
|
||||
}
|
||||
}
|
||||
},
|
||||
"mongoose-fuzzy-search-next": {
|
||||
"version": "1.0.13",
|
||||
"resolved": "https://registry.npmjs.org/mongoose-fuzzy-search-next/-/mongoose-fuzzy-search-next-1.0.13.tgz",
|
||||
|
|
@ -4571,11 +4488,6 @@
|
|||
"resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz",
|
||||
"integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw=="
|
||||
},
|
||||
"next-pow-2": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/next-pow-2/-/next-pow-2-1.0.0.tgz",
|
||||
"integrity": "sha1-y1wvHa4EDFbN1c2h3FxqOjOPQ2c="
|
||||
},
|
||||
"node-abi": {
|
||||
"version": "2.26.0",
|
||||
"resolved": "https://registry.npmjs.org/node-abi/-/node-abi-2.26.0.tgz",
|
||||
|
|
@ -4763,6 +4675,11 @@
|
|||
"ipaddr.js": "1.9.1"
|
||||
}
|
||||
},
|
||||
"pseudomap": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz",
|
||||
"integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM="
|
||||
},
|
||||
"psl": {
|
||||
"version": "1.8.0",
|
||||
"resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz",
|
||||
|
|
@ -4800,11 +4717,6 @@
|
|||
"resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz",
|
||||
"integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ=="
|
||||
},
|
||||
"quantize": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/quantize/-/quantize-1.0.2.tgz",
|
||||
"integrity": "sha1-0lrCAKd7bXD0ASfKFxoQ4zyFRt4="
|
||||
},
|
||||
"range-parser": {
|
||||
"version": "1.2.1",
|
||||
"resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz",
|
||||
|
|
|
|||
|
|
@ -18,9 +18,13 @@ function auth(request, response, next) {
|
|||
|
||||
if(request.subdomains.indexOf('juxt') !== -1) {
|
||||
request.directory = 'web';
|
||||
if(request.path === '/login' || request.path === '/favicon.ico' || request.path.includes('/posts/')) {
|
||||
if(request.path === '/login' || request.path === '/favicon.ico' ||
|
||||
(request.path.includes('/posts/') && !request.path.includes('/empathy'))) {
|
||||
request.lang = util.data.processLanguage();
|
||||
return next()
|
||||
request.pid = util.data.processServiceToken(request.cookies.access_token) || 1000000000;
|
||||
request.paramPackData = null;
|
||||
request.directory = 'web';
|
||||
return next();
|
||||
}
|
||||
else {
|
||||
if(request.cookies.access_token === undefined || request.cookies.access_token === null)
|
||||
|
|
|
|||
|
|
@ -9,14 +9,19 @@ var upload = multer({ dest: 'uploads/' });
|
|||
var router = express.Router();
|
||||
|
||||
router.get('/', async function (req, res) {
|
||||
console.log('recieved')
|
||||
let popularCommunities = await database.getMostPopularCommunities(9);
|
||||
console.log('popular')
|
||||
let newCommunities = await database.getNewCommunities(6);
|
||||
console.log('new')
|
||||
res.render(req.directory + '/communities.ejs', {
|
||||
cache: true,
|
||||
popularCommunities: popularCommunities,
|
||||
newCommunities: newCommunities,
|
||||
cdnURL: config.CDN_domain,
|
||||
lang: req.lang
|
||||
});
|
||||
console.log('rendered')
|
||||
});
|
||||
|
||||
router.get('/all', async function (req, res) {
|
||||
|
|
|
|||
|
|
@ -13,6 +13,8 @@ var router = express.Router();
|
|||
router.post('/empathy', rateLimit, async function (req, res) {
|
||||
let post = await database.getPostByID(req.body.postID);
|
||||
let user = await database.getUserByPID(req.pid);
|
||||
if(!user)
|
||||
return res.sendStatus(423);
|
||||
if(req.body.type === 'up' && user.likes.indexOf(post.id) === -1 && user.id !== post.pid)
|
||||
{
|
||||
post.upEmpathy();
|
||||
|
|
|
|||
|
|
@ -16,10 +16,10 @@
|
|||
</head>
|
||||
<body>
|
||||
<div id="main">
|
||||
<h2 id="title" class="page-header"><%= lang.all_communities.text %></h2>
|
||||
<%- include('nav_bar', { selection: 2 }); %>
|
||||
<div id="toast"></div>
|
||||
<div id="wrapper">
|
||||
<h2 id="title" class="page-header"><%= lang.all_communities.text %></h2>
|
||||
<div id="popular" class="communities-wrapper">
|
||||
<% for(var i = 0; i < communities.length; i++) {%>
|
||||
<div class="community-list-wrapper" data-pjax="/communities/<%= communities[i].community_id %>/new">
|
||||
|
|
|
|||
|
|
@ -17,10 +17,10 @@
|
|||
</head>
|
||||
<body>
|
||||
<div id="main">
|
||||
<h2 id="title" class="page-header"><%= lang.global.communities %></h2>
|
||||
<%- include('nav_bar', { selection: 2 }); %>
|
||||
<div id="toast"></div>
|
||||
<div id="wrapper">
|
||||
<h2 id="title" class="page-header"><%= lang.global.communities %></h2>
|
||||
<h3 class="communities-header"><%= lang.all_communities.popular_places %></h3>
|
||||
<div id="popular" class="communities-wrapper">
|
||||
<% for(var i = 0; i < popularCommunities.length; i++) {%>
|
||||
|
|
|
|||
|
|
@ -37,10 +37,10 @@
|
|||
</head>
|
||||
<body>
|
||||
<div id="main">
|
||||
<h2 id="title" class="page-header"><%= lang.global.communities %></h2>
|
||||
<%- include('nav_bar', { selection: 0 }); %>
|
||||
<div id="toast"></div>
|
||||
<div id="wrapper" class="community-page-post-box">
|
||||
<h2 id="title" class="page-header"><%= lang.global.communities %></h2>
|
||||
<div class="community-top">
|
||||
<image class="banner" src="<%= cdnURL %>/banner/<%= community.community_id %>.png">
|
||||
<div class="community-info">
|
||||
|
|
|
|||
|
|
@ -34,6 +34,8 @@ a:hover {
|
|||
|
||||
#title {
|
||||
color: var(--text);
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
#nav-bar {
|
||||
|
|
@ -110,7 +112,7 @@ header > .selected {
|
|||
|
||||
#main {
|
||||
width: 95%;
|
||||
max-width: 1300px;
|
||||
max-width: 1400px;
|
||||
margin: 0 auto;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
|
@ -226,6 +228,14 @@ header > .selected {
|
|||
padding: 0.5em;
|
||||
}
|
||||
|
||||
.post-buttons-wrapper > span:nth-of-type(2):hover {
|
||||
background: rgba(0, 255, 0, 0.25);
|
||||
}
|
||||
|
||||
.post-buttons-wrapper > span:last-child:hover {
|
||||
background: rgba(0, 150, 255, 0.25);
|
||||
}
|
||||
|
||||
.post-buttons-wrapper > span:hover {
|
||||
cursor: pointer;
|
||||
background: rgba(255, 0, 0, 0.25);
|
||||
|
|
@ -237,6 +247,11 @@ header > .selected {
|
|||
margin: 0;
|
||||
}
|
||||
|
||||
.post-buttons-wrapper > span.selected > svg {
|
||||
fill: red;
|
||||
stroke: red;
|
||||
}
|
||||
|
||||
#load-more-posts-button {
|
||||
width: 632px;
|
||||
margin-bottom: 1em;
|
||||
|
|
@ -321,6 +336,7 @@ iframe {
|
|||
border-bottom: 2px solid var(--btn-secondary);
|
||||
user-select: none;
|
||||
cursor: pointer;
|
||||
font-size: small;
|
||||
}
|
||||
|
||||
.notifications-list-content:hover {
|
||||
|
|
@ -386,6 +402,7 @@ iframe {
|
|||
|
||||
.community-title {
|
||||
padding-left: 0.5em;
|
||||
font-size: larger;
|
||||
}
|
||||
|
||||
.banner {
|
||||
|
|
@ -448,6 +465,18 @@ iframe {
|
|||
header > a:first-child {
|
||||
display: none;
|
||||
}
|
||||
|
||||
header > a:nth-of-type(2) {
|
||||
position: fixed;
|
||||
top: 2px;
|
||||
left: 4px;
|
||||
border-radius: 100%;
|
||||
width: 3em;
|
||||
height: 3em;
|
||||
padding: 0;
|
||||
justify-content: center;
|
||||
z-index: 20;
|
||||
}
|
||||
|
||||
header > a > p {
|
||||
display: none;
|
||||
|
|
@ -484,8 +513,15 @@ iframe {
|
|||
display: flex;
|
||||
justify-content: center;
|
||||
border-bottom: 1px solid var(--text-secondary);
|
||||
margin-top: 0.5em;
|
||||
padding-top: 0.5em;
|
||||
padding-bottom: 0.5em;
|
||||
position: fixed;
|
||||
background: var(--background);
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
#wrapper {
|
||||
margin-top: 4em;
|
||||
}
|
||||
|
||||
.communities-wrapper {
|
||||
|
|
|
|||
|
|
@ -17,10 +17,10 @@
|
|||
</head>
|
||||
<body>
|
||||
<div id="main">
|
||||
<h2 id="title" class="page-header"><%= lang.global.activity_feed %></h2>
|
||||
<%- include('nav_bar', { selection: 1 }); %>
|
||||
<div id="toast"></div>
|
||||
<div id="wrapper">
|
||||
<h2 id="title" class="page-header"><%= lang.global.activity_feed %></h2>
|
||||
<% if(posts.length === 0) {%>
|
||||
<p class="no-posts-text"><%= lang.activity_feed.empty %></p>
|
||||
<%} else { %>
|
||||
|
|
|
|||
|
|
@ -37,10 +37,10 @@
|
|||
</head>
|
||||
<body>
|
||||
<div id="main">
|
||||
<h2 id="title" class="page-header"><%= lang.global.user_page %></h2>
|
||||
<%- include('nav_bar', { selection: 0 }); %>
|
||||
<div id="toast"></div>
|
||||
<div id="wrapper">
|
||||
<h2 id="title" class="page-header"><%= lang.global.user_page %></h2>
|
||||
<div class="community-top">
|
||||
<div class="community-info">
|
||||
<img class="user-icon <%if(user.official) {%>verified<%}%>" src="https://pretendo-cdn.b-cdn.net/mii/<%= user.pid %>/normal_face.png">
|
||||
|
|
|
|||
78
src/webfiles/web/messages.ejs
Normal file
78
src/webfiles/web/messages.ejs
Normal file
|
|
@ -0,0 +1,78 @@
|
|||
<html>
|
||||
<head>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link rel="stylesheet" type="text/css" href="<%= /*cdnURL*/ %>/css/juxt.css">
|
||||
<script src="https://portal.cdn.pretendo.cc/js/pjax.min.js"></script>
|
||||
<script src="https://portal.cdn.pretendo.cc/js/juxt.js"></script>
|
||||
<link rel="manifest" href="/web/manifest.json">
|
||||
<!-- Global site tag (gtag.js) - Google Analytics Testing-->
|
||||
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-195842548-1"></script>
|
||||
<script>
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
function gtag(){dataLayer.push(arguments);}
|
||||
gtag('js', new Date());
|
||||
gtag('config', 'UA-195842548-1');
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div id="main">
|
||||
<h2 id="title" class="page-header"><%= lang.global.messages %></h2>
|
||||
<%- include('nav_bar', { selection: 3 }); %>
|
||||
<div id="toast"></div>
|
||||
<div id="wrapper">
|
||||
<% if(conversations.length === 0) {%>
|
||||
<p class="no-posts-text"><%= lang.messages.coming_soon %></p>
|
||||
<%} else { %>
|
||||
<% conversations.forEach(function(conversation) { %>
|
||||
<a class="notifications-list-content" href="<%=user.notification_list[i].link%>">
|
||||
<div class="unread-badge" <%if(!position.read) {%>style="background-color: unset"<%}%>></div>
|
||||
<td>
|
||||
<%if(position.official) {%>
|
||||
<img class="community-page-post-user-icon verified" src="<%= mii_image_CDN %>/<%= position.pid %>/normal_face.png">
|
||||
<span class="message-page-verified-user-badge community-page-verified" style=""></span>
|
||||
<%} else {%>
|
||||
<img class="community-page-post-user-icon" src="<%= mii_image_CDN %>/<%= position.pid %>/normal_face.png">
|
||||
<span class="community-page-verified-user-badge community-page-verified" style="display: none;"></span>
|
||||
<%}%>
|
||||
</td>
|
||||
<td>
|
||||
<h2 class="message-list-title"><%= position.screen_name %></h2>
|
||||
<h4 class="message-list-timestamp"> - <%= moment(conversation.last_message_sent).fromNow() %></h4>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td colspan="2" class="message-list-preview"><%= conversation.message_preview %></td>
|
||||
</tr>
|
||||
</a>
|
||||
<%});%>
|
||||
<%}%>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
window.onscroll = function(ev) {
|
||||
if ((window.innerHeight + window.scrollY) >= document.body.offsetHeight) {
|
||||
document.getElementById('load-more-posts-button').click();
|
||||
}
|
||||
};
|
||||
function copyToClipboard(text) {
|
||||
let inputc = document.getElementsByTagName("header")[0].appendChild(document.createElement("input"));
|
||||
inputc.value = text;
|
||||
inputc.focus();
|
||||
inputc.select();
|
||||
document.execCommand('copy');
|
||||
inputc.parentNode.removeChild(inputc);
|
||||
Toast("Copied to clipboard.");
|
||||
}
|
||||
function Toast(text) {
|
||||
var x = document.getElementById("toast");
|
||||
x.innerText = text;
|
||||
x.className = "show";
|
||||
setTimeout(function(){ x.className = x.className.replace("show", ""); }, 3000);
|
||||
}
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -10,10 +10,7 @@
|
|||
<p><%= lang.global.user_page %></p>
|
||||
</a>
|
||||
<a href="/activity-feed" <% if(selection === 1) {%>class="selected"<%}%>>
|
||||
<svg id="test" xmlns="http://www.w3.org/2000/svg" width="40" height="48" viewBox="0 0 24 24" fill="none" stroke="#A1A8D9" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-inbox">
|
||||
<polyline points="22 12 16 12 14 15 10 15 8 12 2 12"/>
|
||||
<path d="M5.45 5.11L2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z"/>
|
||||
</svg>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="40" height="48" viewBox="0 0 24 24" fill="none" stroke="#A1A8D9" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-home"><path d="M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"/><polyline points="9 22 9 12 15 12 15 22"/></svg>
|
||||
<p><%= lang.global.activity_feed %></p>
|
||||
</a>
|
||||
<a href="/communities" <% if(selection === 2) {%>class="selected"<%}%>>
|
||||
|
|
|
|||
|
|
@ -17,10 +17,10 @@
|
|||
</head>
|
||||
<body>
|
||||
<div id="main">
|
||||
<h2 id="title" class="page-header"><%= lang.global.notifications %></h2>
|
||||
<%- include('nav_bar', { selection: 4 }); %>
|
||||
<div id="toast"></div>
|
||||
<div id="wrapper">
|
||||
<h2 id="title" class="page-header"><%= lang.global.notifications %></h2>
|
||||
<% if(user.notification_list.length === 0) {%>
|
||||
<p class="no-posts-text"><%= lang.notifications.none %></p>
|
||||
<%} else { %>
|
||||
|
|
|
|||
|
|
@ -49,11 +49,11 @@
|
|||
</head>
|
||||
<body>
|
||||
<div id="main">
|
||||
<h1 id="title" class="page-header">Post</h1>
|
||||
<%- include('nav_bar', { selection: 1 }); %>
|
||||
<div id="toast"></div>
|
||||
<div class="community-page-post-box">
|
||||
<div id="wrapper">
|
||||
<h1 id="title" class="page-header">Post</h1>
|
||||
<div id="wrapper">
|
||||
<%- include('post_template', { post: post, mii_image_CDN: mii_image_CDN, lang: lang, reply: false }); %>
|
||||
<span class="replies-line"></span>
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
<%}%>
|
||||
</div>
|
||||
<div class="post-buttons-wrapper">
|
||||
<span><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-heart"><path d="M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z"/></svg><h4><%= post.empathy_count %></h4></span>
|
||||
<span <%if(user !== null) {%>onclick="yeah(this, '<%= post.id %>')" class="<%if(user.likes.indexOf(post.id) !== -1){ %> selected <%}%> <%}%>"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-heart"><path d="M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z"/></svg><h4 id="yeah-<%= post.id %>"><%= post.empathy_count %> <%= lang.global.yeahs %></h4></span>
|
||||
<span><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 13 13.311"><g id="Icon_feather-corner-down-right" data-name="Icon feather-corner-down-right" transform="translate(-5.25 -5.25)"><path id="Path_47" data-name="Path 47" d="M22.5,15l3.594,3.594L22.5,22.188" transform="translate(-8.594 -4.688)" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"/><path id="Path_48" data-name="Path 48" d="M6,6v5.031a2.875,2.875,0,0,0,2.875,2.875H17.5" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"/></g></svg><h4><%= post.reply_count %></h4></span>
|
||||
<span onclick="copyToClipboard('https://juxt.pretendo.cc/posts/<%=post.id%>');"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-share-2"><circle cx="18" cy="5" r="3"/><circle cx="6" cy="12" r="3"/><circle cx="18" cy="19" r="3"/><line x1="8.59" y1="13.51" x2="15.42" y2="17.49"/><line x1="15.41" y1="6.51" x2="8.59" y2="10.49"/></svg></span>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -37,10 +37,10 @@
|
|||
</head>
|
||||
<body>
|
||||
<div id="main">
|
||||
<h2 id="title" class="page-header"><%= lang.global.user_page %></h2>
|
||||
<%- include('nav_bar', { selection: 0 }); %>
|
||||
<div id="toast"></div>
|
||||
<div id="wrapper">
|
||||
<h2 id="title" class="page-header"><%= lang.global.user_page %></h2>
|
||||
<div class="community-top">
|
||||
<div class="community-info">
|
||||
<img class="user-icon <%if(user.official) {%>verified<%}%>" src="https://pretendo-cdn.b-cdn.net/mii/<%= user.pid %>/normal_face.png">
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user