Skip to content

Commit

Permalink
leagan 1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
michmech committed Mar 7, 2024
1 parent ef4ddf8 commit 533b6f5
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 2 deletions.
11 changes: 11 additions & 0 deletions website/package.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,15 @@
{
"name": "terminologue",
"displayName": "Terminologue",
"version": "1.0.0",
"description": "Open-source terminology management tool",
"author": "Gaois Research Group, Fiontar & Scoil na Gaeilge, Dublin City University",
"license": "MIT",
"homepage": "https://www.terminologue.org",
"main": "terminologue.js",
"scripts": {
"start": "node terminologue.js"
},
"dependencies": {
"@sendgrid/mail": "^7.7.0",
"cookie-parser": "^1.4.6",
Expand Down
12 changes: 10 additions & 2 deletions website/terminologue.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,11 @@ app.get(siteconfig.rootPath, function(req, res){
ops.verifyLogin(req.cookies.email, req.cookies.sessionkey, function(user){
ops.getTermbasesByUser(user.email, function(termbases){
var uilang=user.uilang || req.cookies.uilang || siteconfig.uilangDefault;
res.render("sitewide/home.ejs", {siteconfig: siteconfig, user: user, termbases: termbases, uilang: uilang, uilangs: siteconfig.uilangs, L: localizer[uilang].L});
fs.readFile(path.join(__dirname, "package.json"), "utf8", function(err, packageJson){
packageJson=JSON.parse(packageJson);
packageJson.version = packageJson.version || "0.0.0";
res.render("sitewide/home.ejs", {siteconfig: siteconfig, user: user, termbases: termbases, uilang: uilang, uilangs: siteconfig.uilangs, L: localizer[uilang].L, version: packageJson.version});
});
});
});
});
Expand Down Expand Up @@ -243,7 +247,11 @@ app.get(siteconfig.rootPath+"docs/:docID.:uilang/", function(req, res){
if(user.loggedin) ops.saveUilang(req.cookies.email, uilang, function(){});

ops.getDoc(req.params.docID, uilang, function(doc){
res.render("sitewide/doc.ejs", {doc: doc, siteconfig: siteconfig, user: user, uilang: uilang, uilangs: siteconfig.uilangs, L: localizer[uilang].L});
fs.readFile(path.join(__dirname, "package.json"), "utf8", function(err, packageJson){
packageJson=JSON.parse(packageJson);
packageJson.version = packageJson.version || "0.0.0";
res.render("sitewide/doc.ejs", {doc: doc, siteconfig: siteconfig, user: user, uilang: uilang, uilangs: siteconfig.uilangs, L: localizer[uilang].L, version: packageJson.version});
});
});
});
});
Expand Down
1 change: 1 addition & 0 deletions website/views/sitewide/doc.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@
<div class="logolint">
<a class="dcu" target="_blank" href="https://www.dcu.ie/" title="<%=L("Dublin City University")%>"></a>
</div>
<div><%=version%></div>
</div>
</div>

Expand Down
1 change: 1 addition & 0 deletions website/views/sitewide/home.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@
<div class="logolint">
<a class="dcu" target="_blank" href="https://www.dcu.ie/" title="<%=L("Dublin City University")%>"></a>
</div>
<div><%=version%></div>
</div>
</div>

Expand Down

0 comments on commit 533b6f5

Please sign in to comment.