Commit 0d83e39e authored by Alain Takoudjou's avatar Alain Takoudjou

erp5_web_mynij_search: Add about Mynij page

parent 7d6826ea
<!doctype html>
<html>
<head>
<title>Mynij Search About</title>
<script src="rsvp.js" type="text/javascript"></script>
<script src="renderjs.js" type="text/javascript"></script>
<script src="gadget_erp5_page_mynij_about.js" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="mynij-style.css">
</head>
<body>
<div class="about-content">
<div><img src="mynij_search_img.png" /></div>
<p><meta charset="utf-8" />Mynij&nbsp;is an experimental personal search engine implemented as a progressive web application. The goal of this experiment was to identify possible applications of a personal search engine as a replacement or complement to a web search engine such as Google.
<br/>Mynij can add fast indices to public web sites, provide focused results on specialised content such as education, complement product search engines with new business models and circumvent the growing censorship in public search engines.
</p>
<p>Its implementation was sponsored by&nbsp;<a href="https://nlnet.nl/NGI/" target="_blank">NLNet NGI</a>, without which it would have never existed. It relies on&nbsp;<a href="https://github.com/nextapps-de/flexsearch" target="_blank">flexsearch</a>, an impressive full-text search engine implemented in Javascript, and on&nbsp;<a href="https://renderjs.nexedi.com/" target="_blank">RenderJS</a>&nbsp;framework.</p>
<p>Check <a href="https://blog.mynij.com" target="_blank">blog.mynij.com</a> to read more about Mynij.</p>
</div>
</body>
</html>
\ No newline at end of file
/*jslint nomen: true, indent: 2, maxerr: 3, maxlen: 80*/
/*global window, RSVP, rJS, document*/
(function (window, document, rJS, RSVP) {
var gadget;
rJS(window)
.declareAcquiredMethod("updateHeader", "updateHeader")
.declareAcquiredMethod("updatePanel", "updatePanel")
.declareAcquiredMethod("getUrlFor", "getUrlFor")
.onStateChange(function () {
})
.declareMethod("render", function (options) {
var gadget = this;
return gadget.updatePanel({view_action_dict: {}})
.push(function () {
return gadget.getUrlFor({command: 'display',
options: {page: "mynij_search"}});
})
.push(function (previous_url) {
return gadget.updateHeader({
page_title: "Return to Search",
selection_url: previous_url
});
});
});
}(window, document, rJS, RSVP));
\ No newline at end of file
......@@ -8,6 +8,15 @@
<link rel="stylesheet" type="text/css" href="mynij-style.css">
</head>
<body>
<div class="search-mbar">
<header class="search-header">
<ul>
<li><a href="#" class="about">&nbsp;About Mynij&nbsp;</a></li>
<li class="sep"></li>
<li><a href="https://blog.mynij.com" target="_blank">Blog</a></li>
</ul>
</header>
</div>
<div class="search" id="logo-search">
<img class="logo-search" src="mynij_logo.png" />
</div>
......
......@@ -242,7 +242,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>991.43171.61051.50124</string> </value>
<value> <string>995.30738.59279.31761</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -260,7 +260,7 @@
</tuple>
<state>
<tuple>
<float>1619531070.14</float>
<float>1634247619.64</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -15,11 +15,13 @@
.declareAcquiredMethod("getSetting", "getSetting")
.declareAcquiredMethod("updatePanel", "updatePanel")
.declareAcquiredMethod("notifySubmitted", "notifySubmitted")
.declareAcquiredMethod("getUrlFor", "getUrlFor")
.ready(function () {
var model_gadget,
result_gadget,
gadget = this;
result_gadget,
gadget = this,
about_url;
return gadget.getDeclaredGadget("model")
.push(function (model) {
......@@ -28,6 +30,12 @@
})
.push(function (result) {
result_gadget = result;
return gadget.getUrlFor({command: 'display', options: {
page: "mynij_about"
}});
})
.push(function (result) {
about_url = result;
return model_gadget.getConfig();
})
.push(function (config) {
......@@ -39,6 +47,7 @@
return gadget.changeState({
model_gadget : model_gadget,
result_gadget : result_gadget,
about_url: about_url,
proxies: config.proxies.urls || proxies,
searx: config.searx.url || searx,
store: config.store.url || store
......@@ -48,7 +57,9 @@
.onStateChange(function () {
var gadget = this,
msg;
msg,
about = gadget.element.querySelector('.about');
about.href = gadget.state.about_url;
if (this.state.notify) {
msg = gadget.state.notify;
gadget.state.notify = undefined;
......
......@@ -242,7 +242,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>995.7469.40491.12902</string> </value>
<value> <string>995.30660.45437.22203</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -260,7 +260,7 @@
</tuple>
<state>
<tuple>
<float>1632937826.03</float>
<float>1634243052.5</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -72,6 +72,52 @@ div[data-gadget-scope='header'] .ui-header .ui-controlgroup-controls button[data
.logo-mynij {
margin-bottom: 5px;
}
.search-mbar {
position: relative;
}
.search-header {
position: absolute;
top: -3em;
right: 0;
}
.search-header ul {
list-style: none;
}
.search-header ul li {
float: left;
}
.search-header ul li.sep {
border-right: 1px solid #d7d4d4;
height: 20px;
margin: 5px;
width: 1px;
}
.search-header ul li a {
display: inline-block;
color: #41575c;
padding: 5px;
min-width: 4em;
text-align: center;
border-radius: 4px;
font-size: 1.1em;
}
.search-header ul li a:hover {
background: #f1f1f1;
text-decoration: none;
}
.about-content {
max-width: 50em;
font-size: 1.1em;
}
.about-content p {
margin: 20px 0;
}
.about-content h1 {
font-size: 1.5em;
margin-bottom: 40px;
margin-top: 10px;
}
#mynij-results, #searx-results {
display: inline-block;
width: 100%;
......@@ -777,6 +823,9 @@ button::-moz-focus-inner {
.search-form {
padding: 0 1rem;
}
.search-header ul li a {
font-size: 1em;
}
}
@media screen and (max-width: 560px) {
......
......@@ -242,7 +242,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>995.15830.49246.35396</string> </value>
<value> <string>995.30743.40827.28928</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -260,7 +260,7 @@
</tuple>
<state>
<tuple>
<float>1633353438.17</float>
<float>1634247970.27</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -3,6 +3,10 @@ url_list = [
"gadget_officejs_mynij_search_router.html",
"gadget_erp5_mynij_panel.html",
"gadget_erp5_mynij_panel.js",
"gadget_erp5_mynij_field_image.html",
"gadget_erp5_mynij_field_image.js",
"gadget_erp5_mynij_field_link.html",
"gadget_erp5_mynij_field_link.js",
"gadget_erp5_page_mynij_search.html",
"gadget_erp5_page_mynij_search.js",
"gadget_erp5_mynij_webtorrent.html",
......@@ -15,6 +19,8 @@ url_list = [
"gadget_erp5_page_mynij_activities.js",
"gadget_erp5_page_load_source.html",
"gadget_erp5_page_load_source.js",
"gadget_erp5_page_mynij_about.html",
"gadget_erp5_page_mynij_about.js",
"gadget_mynij_model.html",
"gadget_mynij_model.js",
"gadget_mynij_parser.html",
......@@ -26,6 +32,7 @@ url_list = [
"mynij_logo.png",
"favicon.ico",
"mynij_google_logo.png",
"mynij_search_img.png",
"action_mynij_search_build_index.html",
"action_mynij_search_build_index.js",
"action_mynij_search_import_torrent.html",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment