Commit 45187e9a authored by Przemyslaw Kaminski's avatar Przemyslaw Kaminski

Merge branch 'dev-bootstrap-v4-upgrade' of...

Merge branch 'dev-bootstrap-v4-upgrade' of ssh://gitlab.iscpif.fr:20022/gargantext/purescript-gargantext into dev-bootstrap-v4-upgrade
parents 63d4d9c9 24a035b5
...@@ -30,3 +30,5 @@ bundle.js ...@@ -30,3 +30,5 @@ bundle.js
# docker # docker
/.bash_history /.bash_history
/.lesshst /.lesshst
/dist/js/**/*.map
/dist/styles/**/*.map
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
<meta charset="utf-8"/> <meta charset="utf-8"/>
<title>CNRS GarganText</title> <title>CNRS GarganText</title>
<link rel="stylesheet" href="icons/forkawesome.css"> <link rel="stylesheet" href="icons/forkawesome.css">
<link href="styles/login.min.css" rel="stylesheet">
<link href="styles/bootstrap.min.css" rel="stylesheet"> <link href="styles/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="styles/highlightjs-solarized-light.css"/> <link rel="stylesheet" type="text/css" href="styles/highlightjs-solarized-light.css"/>
<link href="styles/sass.css" rel="stylesheet" type="text/css" /> <link href="styles/sass.css" rel="stylesheet" type="text/css" />
......
This diff is collapsed.
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
/*!
* Bootstrap Reboot v4.4.1 (https://getbootstrap.com/)
* Copyright 2011-2019 The Bootstrap Authors
* Copyright 2011-2019 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md)
*/
*,
*::before,
*::after {
box-sizing: border-box;
}
html {
font-family: sans-serif;
line-height: 1.15;
-webkit-text-size-adjust: 100%;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
article, aside, figcaption, figure, footer, header, hgroup, main, nav, section {
display: block;
}
body {
margin: 0;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
font-size: 1rem;
font-weight: 400;
line-height: 1.5;
color: #212529;
text-align: left;
background-color: #fff;
}
[tabindex="-1"]:focus:not(:focus-visible) {
outline: 0 !important;
}
hr {
box-sizing: content-box;
height: 0;
overflow: visible;
}
h1, h2, h3, h4, h5, h6 {
margin-top: 0;
margin-bottom: 0.5rem;
}
p {
margin-top: 0;
margin-bottom: 1rem;
}
abbr[title],
abbr[data-original-title] {
text-decoration: underline;
-webkit-text-decoration: underline dotted;
text-decoration: underline dotted;
cursor: help;
border-bottom: 0;
-webkit-text-decoration-skip-ink: none;
text-decoration-skip-ink: none;
}
address {
margin-bottom: 1rem;
font-style: normal;
line-height: inherit;
}
ol,
ul,
dl {
margin-top: 0;
margin-bottom: 1rem;
}
ol ol,
ul ul,
ol ul,
ul ol {
margin-bottom: 0;
}
dt {
font-weight: 700;
}
dd {
margin-bottom: .5rem;
margin-left: 0;
}
blockquote {
margin: 0 0 1rem;
}
b,
strong {
font-weight: bolder;
}
small {
font-size: 80%;
}
sub,
sup {
position: relative;
font-size: 75%;
line-height: 0;
vertical-align: baseline;
}
sub {
bottom: -.25em;
}
sup {
top: -.5em;
}
a {
color: #007bff;
text-decoration: none;
background-color: transparent;
}
a:hover {
color: #0056b3;
text-decoration: underline;
}
a:not([href]) {
color: inherit;
text-decoration: none;
}
a:not([href]):hover {
color: inherit;
text-decoration: none;
}
pre,
code,
kbd,
samp {
font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
font-size: 1em;
}
pre {
margin-top: 0;
margin-bottom: 1rem;
overflow: auto;
}
figure {
margin: 0 0 1rem;
}
img {
vertical-align: middle;
border-style: none;
}
svg {
overflow: hidden;
vertical-align: middle;
}
table {
border-collapse: collapse;
}
caption {
padding-top: 0.75rem;
padding-bottom: 0.75rem;
color: #6c757d;
text-align: left;
caption-side: bottom;
}
th {
text-align: inherit;
}
label {
display: inline-block;
margin-bottom: 0.5rem;
}
button {
border-radius: 0;
}
button:focus {
outline: 1px dotted;
outline: 5px auto -webkit-focus-ring-color;
}
input,
button,
select,
optgroup,
textarea {
margin: 0;
font-family: inherit;
font-size: inherit;
line-height: inherit;
}
button,
input {
overflow: visible;
}
button,
select {
text-transform: none;
}
select {
word-wrap: normal;
}
button,
[type="button"],
[type="reset"],
[type="submit"] {
-webkit-appearance: button;
}
button:not(:disabled),
[type="button"]:not(:disabled),
[type="reset"]:not(:disabled),
[type="submit"]:not(:disabled) {
cursor: pointer;
}
button::-moz-focus-inner,
[type="button"]::-moz-focus-inner,
[type="reset"]::-moz-focus-inner,
[type="submit"]::-moz-focus-inner {
padding: 0;
border-style: none;
}
input[type="radio"],
input[type="checkbox"] {
box-sizing: border-box;
padding: 0;
}
input[type="date"],
input[type="time"],
input[type="datetime-local"],
input[type="month"] {
-webkit-appearance: listbox;
}
textarea {
overflow: auto;
resize: vertical;
}
fieldset {
min-width: 0;
padding: 0;
margin: 0;
border: 0;
}
legend {
display: block;
width: 100%;
max-width: 100%;
padding: 0;
margin-bottom: .5rem;
font-size: 1.5rem;
line-height: inherit;
color: inherit;
white-space: normal;
}
progress {
vertical-align: baseline;
}
[type="number"]::-webkit-inner-spin-button,
[type="number"]::-webkit-outer-spin-button {
height: auto;
}
[type="search"] {
outline-offset: -2px;
-webkit-appearance: none;
}
[type="search"]::-webkit-search-decoration {
-webkit-appearance: none;
}
::-webkit-file-upload-button {
font: inherit;
-webkit-appearance: button;
}
output {
display: inline-block;
}
summary {
display: list-item;
cursor: pointer;
}
template {
display: none;
}
[hidden] {
display: none !important;
}
/*# sourceMappingURL=bootstrap-reboot.css.map */
\ No newline at end of file
/*!
* Bootstrap Reboot v4.4.1 (https://getbootstrap.com/)
* Copyright 2011-2019 The Bootstrap Authors
* Copyright 2011-2019 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md)
*/*,::after,::before{box-sizing:border-box}html{font-family:sans-serif;line-height:1.15;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:transparent}article,aside,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";font-size:1rem;font-weight:400;line-height:1.5;color:#212529;text-align:left;background-color:#fff}[tabindex="-1"]:focus:not(:focus-visible){outline:0!important}hr{box-sizing:content-box;height:0;overflow:visible}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem}p{margin-top:0;margin-bottom:1rem}abbr[data-original-title],abbr[title]{text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;cursor:help;border-bottom:0;-webkit-text-decoration-skip-ink:none;text-decoration-skip-ink:none}address{margin-bottom:1rem;font-style:normal;line-height:inherit}dl,ol,ul{margin-top:0;margin-bottom:1rem}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-left:0}blockquote{margin:0 0 1rem}b,strong{font-weight:bolder}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{color:#007bff;text-decoration:none;background-color:transparent}a:hover{color:#0056b3;text-decoration:underline}a:not([href]){color:inherit;text-decoration:none}a:not([href]):hover{color:inherit;text-decoration:none}code,kbd,pre,samp{font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-size:1em}pre{margin-top:0;margin-bottom:1rem;overflow:auto}figure{margin:0 0 1rem}img{vertical-align:middle;border-style:none}svg{overflow:hidden;vertical-align:middle}table{border-collapse:collapse}caption{padding-top:.75rem;padding-bottom:.75rem;color:#6c757d;text-align:left;caption-side:bottom}th{text-align:inherit}label{display:inline-block;margin-bottom:.5rem}button{border-radius:0}button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}button,input,optgroup,select,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button,input{overflow:visible}button,select{text-transform:none}select{word-wrap:normal}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]:not(:disabled),[type=reset]:not(:disabled),[type=submit]:not(:disabled),button:not(:disabled){cursor:pointer}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{padding:0;border-style:none}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=date],input[type=datetime-local],input[type=month],input[type=time]{-webkit-appearance:listbox}textarea{overflow:auto;resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;max-width:100%;padding:0;margin-bottom:.5rem;font-size:1.5rem;line-height:inherit;color:inherit;white-space:normal}progress{vertical-align:baseline}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:none}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}summary{display:list-item;cursor:pointer}template{display:none}[hidden]{display:none!important}
/*# sourceMappingURL=bootstrap-reboot.min.css.map */
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
/* styles for menu.html template (navbar etc) */ /* styles for menu.html template (navbar etc) */
#dafixedtop .navbar-text, #graphsfixedtop .navbar-text { /* #dafixedtop .navbar-text, #graphsfixedtop .navbar-text */
margin: 0; /* margin: 0 */
padding-top: 15px; /* padding-top: 15px */
padding-bottom: 15px; /* padding-bottom: 15px */
float: none; /* float: none */
}
#corporatop.nav-tabs > li { #corporatop.nav-tabs > li {
padding-left: 1; padding-left: 1;
padding-right: 1; padding-right: 1;
...@@ -85,56 +83,22 @@ ...@@ -85,56 +83,22 @@
display: none; display: none;
} }
#graph-explorer #toolbar { #graph-explorer {
display: flex; padding-top: 0px;
flex-direction: column;
}
#graph-explorer #toolbar ul {
display: flex;
flex-direction: row;
margin: 0;
}
#graph-explorer #toolbar ul li {
display: flex;
max-width: 200px;
}
#graph-explorer #toggle-container {
position: fixed;
z-index: 999;
right: 25%;
top: 10px;
width: 50%;
}
#graph-explorer #toggle-container .container-fluid {
padding-top: 90px;
}
#graph-explorer #controls-container {
position: fixed;
z-index: 999;
backdrop-filter: blur(4px);
background: rgba(255, 255, 255, 0.75);
overflow: auto;
left: 0;
right: 0;
top: 60px;
} }
#graph-explorer .graph-tree {
.graph-container {
position: absolute; position: absolute;
max-height: 600px; /* #toggle-container */
top: 170px; /* position: fixed */
background-color: #fff; /* z-index: 999 // needs to appear above solid menu bar */
z-index: 1; /* right: 25% */
} /* top: 10px */
#graph-explorer .lefthanded .graph-tree { /* width: 50% */
left: 80%; /* .container-fluid */
} /* padding-top: 90px */
#graph-explorer .righthanded .graph-tree { }
left: 0%; .graph-container #sp-container {
}
#graph-explorer #graph-view {
height: 95%;
}
#graph-explorer #sp-container {
position: absolute; position: absolute;
max-height: 600px; max-height: 600px;
top: 170px; top: 170px;
...@@ -143,25 +107,66 @@ ...@@ -143,25 +107,66 @@
width: 28%; width: 28%;
z-index: 15; z-index: 15;
} }
#graph-explorer #sp-container #myTab { .graph-container #sp-container #myTab {
marginBottom: 18px; marginBottom: 18px;
marginTop: 18px; marginTop: 18px;
} }
#graph-explorer #sp-container #myTabContent { .graph-container #sp-container #myTabContent {
borderBottom: 1px solid black; borderBottom: 1px solid black;
paddingBottom: 19px; paddingBottom: 19px;
} }
#graph-explorer #sp-container #horizontal-checkbox ul { .graph-container #sp-container #horizontal-checkbox ul {
display: inline; display: inline;
float: left; float: left;
} }
#graph-explorer .lefthanded #sp-container { .graph-container .lefthanded #sp-container {
left: 0%; left: 0%;
} }
#graph-explorer .righthanded #sp-container { .graph-container .righthanded #sp-container {
left: 70%; left: 70%;
} }
#graph-explorer #tree { .graph-container .graph-tree {
position: absolute;
max-height: 600px;
top: 170px;
background-color: #fff;
z-index: 1;
}
.graph-container .lefthanded .graph-tree {
left: 80%;
}
.graph-container .righthanded .graph-tree {
left: 0%;
}
.graph-container #controls-container {
position: fixed;
z-index: 999;
backdrop-filter: blur(4px);
background: rgba(255, 255, 255, 0.75);
overflow: auto;
left: 0;
right: 0;
top: 60px;
}
.graph-container #controls-container #toolbar {
display: flex;
flex-direction: column;
}
.graph-container #controls-container #toolbar ul {
display: flex;
flex-direction: row;
margin: 0;
}
.graph-container #controls-container #toolbar ul li {
max-width: 200px;
}
.graph-container #graph-view {
display: block;
height: 500px;
position: relative;
width: 500px;
}
.graph-container #tree {
position: absolute; position: absolute;
z-index: 1; z-index: 1;
} }
...@@ -178,12 +183,6 @@ ...@@ -178,12 +183,6 @@
z-index: 999; z-index: 999;
} }
.logoSmall {
line-height: 15px;
height: 10px;
padding: 10px 10px;
}
#logo-designed { #logo-designed {
border: 15px; border: 15px;
} }
...@@ -693,13 +692,6 @@ li .leaf:hover a.settings { ...@@ -693,13 +692,6 @@ li .leaf:hover a.settings {
font-weight: bold; font-weight: bold;
text-decoration: underline; text-decoration: underline;
} }
.table tr td .column-tag {
align-items: center;
}
.table tr td .column-tag .doc-chooser {
cursor: pointer;
padding: 10px;
}
.table tr td .ngrams-selector { .table tr td .ngrams-selector {
display: flex; display: flex;
} }
...@@ -710,10 +702,18 @@ li .leaf:hover a.settings { ...@@ -710,10 +702,18 @@ li .leaf:hover a.settings {
text-decoration: line-through; text-decoration: line-through;
} }
.action-search {
margin: 10px;
}
.context-menu { .context-menu {
position: fixed; position: fixed;
} }
.search-bar {
margin: 10px;
}
.range { .range {
width: 400px; width: 400px;
/* some space for the right knob */ /* some space for the right knob */
......
{"version":3,"sourceRoot":"","sources":["../../src/sass/_menu.sass","../../src/sass/_context_menu.sass","../../src/sass/_graph.sass","../../src/sass/_login.sass","../../src/sass/_tree.sass","../../src/sass/_code_editor.sass","../../src/sass/_styles.sass","../../src/sass/_range_slider.sass"],"names":[],"mappings":"AAAA;AAEA;EACI;EACA;EACA;EACA;;;AAEJ;EACI;EACA;;;AAEJ;EACI;EACA;EACA;EACA;;;AAEJ;EACE;;;AAEF;AACI;EACA;;;AAEJ;AACI;EACA;;;AAGJ;AACA;EACI;;;AAEJ;EACI;EACA;EACA;EACA;;;AAEJ;EACE;EACA;;;AAEF;EACE;;;AC7CF;EACE;EACA;EACA;EACA;EACA;;;AAEF;EACE;;;AAEF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;;AAEF;EACE;EACA;EACA;;;AAEF;EACE;;;ACjBA;EACE;EACA;;AAEA;EACE;EACA;EACA;;AACA;EACE;EACA;;AAEN;EACE;EACA;EACA;EACA;EACA;;AACA;EACE;;AAEJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEF;EAtCA;EACA;EAEA;EAqCE;EACA;;AACF;EACE;;AACF;EACE;;AAEF;EACE;;AAEF;EAlDA;EACA;EAEA;EAiDE;EACA;EACA;EACA;;AAEA;EACE;EACA;;AAEF;EACE;EACA;;AAGA;EACE;EACA;;AACN;EACE;;AACF;EACE;;AAEF;EACE;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;;;ACrFJ;EACE;;;AAEF;EACE;EACA;EACA;;;AAEF;EACE;;AACA;EACE;EACA;;;AAEJ;EACE;;;AAEF;EACE;;;AAEF;EACE;;;AAEF;EACE;;;AAGF;EACE;;AAEE;EACE;EACA;;AACA;EACE;;;AAIJ;EACE;EACA;EACA;EACA;;;AAKJ;EACE;EACA;EACA;;;AAGJ;EACE;EACA;EACA;EACA;EACA;;AACA;EACE;EACA;;AACF;EACE;EACA;;AACA;EACE;EACA;EACA;;AACA;EACE;;AACF;EACE;EACA;EACA;EACA;;AACA;EACE;;AACN;EACE;EACA;EACA;EACA;;;AAGN;EACE;EACA;EACA;EACA;EACA;;AAGE;EACE;;;AAEN;EACE;EACA;EACA;EACA;EACA;;AAGE;EACE;;;AAEN;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;;;AAEJ;EACE;EACA;;;AAGF;EACE;EACA;EACA;EACA;;AACA;EACE;EACA;;;AAGF;EACE;;;AAEJ;EACI;EACA;;;AAEJ;EACI;EACA;;;AAGF;EACE;;;AAEJ;EACE;;;AAEF;EACE;EACA;;;AAEF;EACE;EACA;EACA;;;AAEF;EACE;EACA;;;AAEF;EACE;;;AC1KF;EACE;;;AAGA;EACE;EACA;;AACA;EACE;;AACF;EACE;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;;;AAER;EACE;;AAEE;EACE;;AACA;EACE;EACA;EACA;EACA;;AACF;EACE;EACA;EACA;EACA;EACA;;AACF;EACE;;AACF;EACE;EACA;EACA;EAEA;EACA;EACA;;AAEA;EACE;;AACF;EACE;;AAGN;EACE;;AACF;EACE;;AACA;EACE;EACA;;AAEE;EACE;EACA;;AACF;EACE;EACA;;AAIR;EACE;;AACF;EACE;;AACA;EACE;EACA;;AAEE;EACE;EACA;;AACF;EACE;EACA;;AACF;EACE;EACA;;AAEV;EACE;;AACF;EACE;;AAEE;EACE;;AACF;EACE;;AACN;EACE;;AAEE;EACE;EACA;;;AAGR;EACE;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EAEE;EACA;EACA;EACA;EACA;;AAEF;EACE;EACA;EACA;;AAEF;EACE;;;AAIF;EACE;;AAEA;EACE;;;AC/HR;EACE;;AAEA;EACE;;AACA;EACE;;AACJ;EACE;EACA;;;AAGF;EACE;EACA;EACA;;AACF;EACE;EACA;;AACA;EACE;EACA;EACA;EACA;;AACA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AACA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EArDR;EACA;EACA;EACA;EACA;EACA;EACA;EAlBA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AA2DM;EACE;EACA;EACA;EACA;EACA;EA7DR;EACA;EACA;EACA;EACA;EACA;EACA;EAlBA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAmEE;EACE;EACA;EACA;EACA;EACA;EACA;;AACF;EACE;EACA;EACA;;AACA;EACE;EACA;;AACF;EACE;EACA;;AACF;EACE;EACA;;AAGE;EACE;;AAEF;EACE;;;ACtGV;EACE;;AACF;EACE;EACA;EACA;EACA;EACA;EACA;;AACA;EACE;;AAGE;EACE;EACA;;AAEF;EACE;EACA;;;AAEV;EACE;;AACA;EACE;EACA;EACA;;;AAKE;EACE;EACA;;AACF;EACE;;AACA;EACE;EACA;;AACJ;EACE;;AACA;EACE;;AACJ;EACE;;;AAER;EACE;;;AChDF;EACE;AACA;EACA;;AAEA;EACE;;AAEA;EACE;EACA;EACA;EACA;EACA;;AAEF;EACE;EACA;EACA;EACA;;AAEF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EAEA;EAEA;EAEA;;AAEA;EACE;EAEA;EACA;EACA","file":"sass.css"} {"version":3,"sourceRoot":"","sources":["../../src/sass/_menu.sass","../../src/sass/_context_menu.sass","../../src/sass/_graph.sass","../../src/sass/_login.sass","../../src/sass/_tree.sass","../../src/sass/_code_editor.sass","../../src/sass/_styles.sass","../../src/sass/_range_slider.sass"],"names":[],"mappings":"AAAA;AAEA;AACA;AACA;AACA;AACA;AAEA;EACI;EACA;;;AAEJ;EACI;EACA;EACA;EACA;;;AAEJ;EACE;;;AAEF;AACI;EACA;;;AAEJ;AACI;EACA;;;AAGJ;AACA;EACI;;;AAEJ;EACI;EACA;EACA;EACA;;;AAEJ;EACE;EACA;;;AAEF;EACE;;;AC7CF;EACE;EACA;EACA;EACA;EACA;;;AAEF;EACE;;;AAEF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;;AAEF;EACE;EACA;EACA;;;AAEF;EACE;;;AClBF;EACE;;;AAEF;EACE;AAmCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAxCA;EAZA;EACA;EAEA;EAWE;EACA;EACA;EACA;;AAEA;EACE;EACA;;AAEF;EACE;EACA;;AAGA;EACE;EACA;;AACN;EACE;;AACF;EACE;;AAEF;EApCA;EACA;EAEA;EAmCE;EACA;;AACF;EACE;;AACF;EACE;;AAWF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;;AAEA;EACE;EACA;EACA;;AACA;EACE;;AAER;EACE;EAEA;EACA;EACA;;AAEF;EACE;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;;;AC7FJ;EACE;;;AAOF;EACE;;AACA;EACE;EACA;;;AAEJ;EACE;;;AAEF;EACE;;;AAEF;EACE;;;AAEF;EACE;;;AAGF;EACE;;AAEE;EACE;EACA;;AACA;EACE;;;AAIJ;EACE;EACA;EACA;EACA;;;AAKJ;EACE;EACA;EACA;;;AAGJ;EACE;EACA;EACA;EACA;EACA;;AACA;EACE;EACA;;AACF;EACE;EACA;;AACA;EACE;EACA;EACA;;AACA;EACE;;AACF;EACE;EACA;EACA;EACA;;AACA;EACE;;AACN;EACE;EACA;EACA;EACA;;;AAGN;EACE;EACA;EACA;EACA;EACA;;AAGE;EACE;;;AAEN;EACE;EACA;EACA;EACA;EACA;;AAGE;EACE;;;AAEN;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;;;AAEJ;EACE;EACA;;;AAGF;EACE;EACA;EACA;EACA;;AACA;EACE;EACA;;;AAGF;EACE;;;AAEJ;EACI;EACA;;;AAEJ;EACI;EACA;;;AAGF;EACE;;;AAEJ;EACE;;;AAEF;EACE;EACA;;;AAEF;EACE;EACA;EACA;;;AAEF;EACE;EACA;;;AAEF;EACE;;;AC1KF;EACE;;;AAGA;EACE;EACA;;AACA;EACE;;AACF;EACE;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;;;AAER;EACE;;AAEE;EACE;;AACA;EACE;EACA;EACA;EACA;;AACF;EACE;EACA;EACA;EACA;EACA;;AACF;EACE;;AACF;EACE;EACA;EACA;EAEA;EACA;EACA;;AAEA;EACE;;AACF;EACE;;AAGN;EACE;;AACF;EACE;;AACA;EACE;EACA;;AAEE;EACE;EACA;;AACF;EACE;EACA;;AAIR;EACE;;AACF;EACE;;AACA;EACE;EACA;;AAEE;EACE;EACA;;AACF;EACE;EACA;;AACF;EACE;EACA;;AAEV;EACE;;AACF;EACE;;AAEE;EACE;;AACF;EACE;;AACN;EACE;;AAEE;EACE;EACA;;;AAGR;EACE;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EAEE;EACA;EACA;EACA;EACA;;AAEF;EACE;EACA;EACA;;AAEF;EACE;;;AAIF;EACE;;AAEA;EACE;;;AC/HR;EACE;;AAEA;EACE;;AACA;EACE;;AACJ;EACE;EACA;;;AAGF;EACE;EACA;EACA;;AACF;EACE;EACA;;AACA;EACE;EACA;EACA;EACA;;AACA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AACA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EArDR;EACA;EACA;EACA;EACA;EACA;EACA;EAlBA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AA2DM;EACE;EACA;EACA;EACA;EACA;EA7DR;EACA;EACA;EACA;EACA;EACA;EACA;EAlBA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAmEE;EACE;EACA;EACA;EACA;EACA;EACA;;AACF;EACE;EACA;EACA;;AACA;EACE;EACA;;AACF;EACE;EACA;;AACF;EACE;EACA;;AAGE;EACE;;AAEF;EACE;;;ACtGV;EACE;;AACF;EACE;EACA;EACA;EACA;EACA;EACA;;AACA;EACE;;AAGE;EACE;EACA;;AAEF;EACE;EACA;;;AAEV;EACE;;AACA;EACE;EACA;EACA;;;AAKE;EACE;EACA;;AACF;EACE;;AACA;EACE;;AACJ;EACE;;;AAER;EACE;;;AAEF;EACE;;;AAEF;EACE;;;ACjDF;EACE;AACA;EACA;;AAEA;EACE;;AAEA;EACE;EACA;EACA;EACA;EACA;;AAEF;EACE;EACA;EACA;EACA;;AAEF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EAEA;EAEA;EAEA;;AAEA;EACE;EAEA;EACA;EACA","file":"sass.css"}
\ No newline at end of file \ No newline at end of file
...@@ -3,16 +3,15 @@ ...@@ -3,16 +3,15 @@
<head> <head>
<meta charset="utf-8"/> <meta charset="utf-8"/>
<title>CNRS GarganText</title> <title>CNRS GarganText</title>
<link rel="stylesheet" href="dist/icons/forkawesome.css"> <link rel="stylesheet" href="icons/forkawesome.css">
<link href="dist/styles/login.min.css" rel="stylesheet"> <link href="styles/bootstrap.min.css" rel="stylesheet">
<link href="dist/styles/bootstrap.min.css" rel="stylesheet"> <link rel="stylesheet" type="text/css" href="styles/highlightjs-solarized-light.css"/>
<link rel="stylesheet" type="text/css" href="dist/styles/highlightjs-solarized-light.css"/> <link href="styles/sass.css" rel="stylesheet" type="text/css" />
<link href="dist/styles/sass.css" rel="stylesheet" type="text/css" />
<style> * {margin: 0; padding: 0; list-style: none;} </style> <style> * {margin: 0; padding: 0; list-style: none;} </style>
</head> </head>
<body> <body>
<div id="app" class ="container-fluid"></div> <div id="app" class ="container-fluid"></div>
<div id="portal"></div> <div id="portal"></div>
<script src="app.js"></script> <script src="bundle.js"></script>
</body> </body>
</html> </html>
{ {
"name": "Gargantext", "name": "Gargantext",
"version": "0.0.2.3", "version": "0.0.2.5",
"scripts": { "scripts": {
"rebase-set": "spago package-set-upgrade && spago psc-package-insdhall", "rebase-set": "spago package-set-upgrade && spago psc-package-insdhall",
"rebuild-set": "spago psc-package-insdhall", "rebuild-set": "spago psc-package-insdhall",
......
...@@ -64,9 +64,9 @@ appCpt = R.hooksComponentWithModule thisModule "app" cpt where ...@@ -64,9 +64,9 @@ appCpt = R.hooksComponentWithModule thisModule "app" cpt where
let forested = forestLayout { appReload let forested = forestLayout { appReload
, asyncTasksRef , asyncTasksRef
, backend , backend
, currentRoute: fst route
, frontends , frontends
, handed , handed
, route: fst route
, sessions: fst sessions , sessions: fst sessions
, showLogin: snd showLogin , showLogin: snd showLogin
, treeReloadRef , treeReloadRef
...@@ -74,9 +74,9 @@ appCpt = R.hooksComponentWithModule thisModule "app" cpt where ...@@ -74,9 +74,9 @@ appCpt = R.hooksComponentWithModule thisModule "app" cpt where
let forestedTB = forestLayoutWithTopBar { appReload let forestedTB = forestLayoutWithTopBar { appReload
, asyncTasksRef , asyncTasksRef
, backend , backend
, currentRoute: fst route
, frontends , frontends
, handed , handed
, route: fst route
, sessions: fst sessions , sessions: fst sessions
, showLogin: snd showLogin , showLogin: snd showLogin
, treeReloadRef , treeReloadRef
...@@ -89,7 +89,6 @@ appCpt = R.hooksComponentWithModule thisModule "app" cpt where ...@@ -89,7 +89,6 @@ appCpt = R.hooksComponentWithModule thisModule "app" cpt where
, visible: showLogin , visible: showLogin
} }
] ]
let mCurrentRoute = fst route
let withSession sid f = maybe' defaultView (ff f) (Sessions.lookup sid (fst sessions)) let withSession sid f = maybe' defaultView (ff f) (Sessions.lookup sid (fst sessions))
let sessionUpdate s = snd sessions $ Sessions.Update s let sessionUpdate s = snd sessions $ Sessions.Update s
...@@ -139,9 +138,9 @@ appCpt = R.hooksComponentWithModule thisModule "app" cpt where ...@@ -139,9 +138,9 @@ appCpt = R.hooksComponentWithModule thisModule "app" cpt where
appReload appReload
, asyncTasksRef , asyncTasksRef
, backend , backend
, currentRoute: fst route
, frontends , frontends
, handed , handed
, route: fst route
, sessions: fst sessions , sessions: fst sessions
, showLogin: snd showLogin , showLogin: snd showLogin
, treeReloadRef , treeReloadRef
...@@ -162,10 +161,10 @@ appCpt = R.hooksComponentWithModule thisModule "app" cpt where ...@@ -162,10 +161,10 @@ appCpt = R.hooksComponentWithModule thisModule "app" cpt where
simpleLayout { handed } [ simpleLayout { handed } [
explorerLayout { asyncTasksRef explorerLayout { asyncTasksRef
, backend , backend
, currentRoute: fst route
, frontends , frontends
, graphId , graphId
, handed: fst handed , handed: fst handed
, mCurrentRoute
, session , session
, sessions: (fst sessions) , sessions: (fst sessions)
, showLogin , showLogin
...@@ -190,9 +189,9 @@ appCpt = R.hooksComponentWithModule thisModule "app" cpt where ...@@ -190,9 +189,9 @@ appCpt = R.hooksComponentWithModule thisModule "app" cpt where
appReload appReload
, asyncTasksRef , asyncTasksRef
, backend , backend
, currentRoute: fst route
, frontends , frontends
, handed , handed
, route: fst route
, sessions: fst sessions , sessions: fst sessions
, showLogin: snd showLogin , showLogin: snd showLogin
, treeReloadRef , treeReloadRef
......
...@@ -82,27 +82,27 @@ carousselCpt = R.hooksComponentWithModule thisModule "caroussel" cpt ...@@ -82,27 +82,27 @@ carousselCpt = R.hooksComponentWithModule thisModule "caroussel" cpt
void $ launchAff $ putCategories session nodeId $ CategoryQuery {nodeIds: [r._id], category: c} void $ launchAff $ putCategories session nodeId $ CategoryQuery {nodeIds: [r._id], category: c}
icon :: Category -> Boolean -> String icon :: Category -> Boolean -> String
icon cat b = btn b $ "glyphicon glyphicon-" <> (color $ size b $ icon' cat b) icon cat b = btn b $ "fa fa-" <> (color $ size b $ icon' cat b)
where where
icon' :: Category -> Boolean -> String icon' :: Category -> Boolean -> String
icon' Trash false = "remove" icon' Trash false = "times"
icon' Trash true = "remove-sign" icon' Trash true = "times-circle"
icon' UnRead true = "question-sign" icon' UnRead false = "question"
icon' UnRead false = "question-sign" icon' UnRead true = "question-circle"
icon' Checked true = "ok-sign" icon' Checked false = "check"
icon' Checked false = "ok" icon' Checked true = "check-circle"
icon' Topic false = "star-o"
icon' Topic true = "star" icon' Topic true = "star"
icon' Topic false = "star-empty"
icon' Favorite false = "heart-o"
icon' Favorite true = "heart" icon' Favorite true = "heart"
icon' Favorite false = "heart-empty"
size :: Boolean -> String -> String size :: Boolean -> String -> String
size true s = s <> " btn-lg" size true s = s <> " btn-lg"
size false s = s <> " btn-xs" size false s = s <> " btn-sm"
color :: String -> String color :: String -> String
color x = x <> " text-primary" color x = x <> " text-primary"
......
...@@ -147,11 +147,11 @@ codeEditorCpt = R.hooksComponentWithModule thisModule "codeEditor" cpt ...@@ -147,11 +147,11 @@ codeEditorCpt = R.hooksComponentWithModule thisModule "codeEditor" cpt
codeHidden :: ViewType -> String codeHidden :: ViewType -> String
codeHidden Code = "" codeHidden Code = ""
codeHidden Both = "" codeHidden Both = ""
codeHidden _ = " hidden" codeHidden _ = " d-none"
dividerHidden :: ViewType -> String dividerHidden :: ViewType -> String
dividerHidden Both = "" dividerHidden Both = ""
dividerHidden _ = " hidden" dividerHidden _ = " d-none"
langClass :: CodeType -> String langClass :: CodeType -> String
langClass Haskell = " language-haskell" langClass Haskell = " language-haskell"
...@@ -162,7 +162,7 @@ codeEditorCpt = R.hooksComponentWithModule thisModule "codeEditor" cpt ...@@ -162,7 +162,7 @@ codeEditorCpt = R.hooksComponentWithModule thisModule "codeEditor" cpt
previewHidden :: ViewType -> String previewHidden :: ViewType -> String
previewHidden Preview = "" previewHidden Preview = ""
previewHidden Both = "" previewHidden Both = ""
previewHidden _ = " hidden" previewHidden _ = " d-none"
onEditChange :: forall e. Record Controls -> (CodeType -> Code -> Effect Unit) -> e -> Effect Unit onEditChange :: forall e. Record Controls -> (CodeType -> Code -> Effect Unit) -> e -> Effect Unit
onEditChange controls@{codeElRef, codeOverlayElRef, codeType: (codeType /\ _), codeS} onChange e = do onEditChange controls@{codeElRef, codeOverlayElRef, codeType: (codeType /\ _), codeS} onChange e = do
...@@ -289,18 +289,19 @@ viewTypeSelectorCpt :: R.Component ViewTypeSelectorProps ...@@ -289,18 +289,19 @@ viewTypeSelectorCpt :: R.Component ViewTypeSelectorProps
viewTypeSelectorCpt = R.hooksComponentWithModule thisModule "viewTypeSelector" cpt viewTypeSelectorCpt = R.hooksComponentWithModule thisModule "viewTypeSelector" cpt
where where
cpt {state} _ = cpt {state} _ =
pure $ H.div { className: "btn-group" } [ pure $ H.div { className: "btn-group"
, role: "group" } [
viewTypeButton Code state viewTypeButton Code state
, viewTypeButton Both state , viewTypeButton Both state
, viewTypeButton Preview state , viewTypeButton Preview state
] ]
viewTypeButton viewType (state /\ setState) = viewTypeButton viewType (state /\ setState) =
H.label { H.button { className: "btn btn-secondary" <> active
className: "btn btn-default" <> active
, on: { click: onClick } , on: { click: onClick }
, type: "button"
} [ } [
H.i { className: "glyphicon " <> (icon viewType) } [] H.i { className: "fa " <> (icon viewType) } []
] ]
where where
active = if viewType == state then " active" else "" active = if viewType == state then " active" else ""
...@@ -308,9 +309,9 @@ viewTypeSelectorCpt = R.hooksComponentWithModule thisModule "viewTypeSelector" c ...@@ -308,9 +309,9 @@ viewTypeSelectorCpt = R.hooksComponentWithModule thisModule "viewTypeSelector" c
onClick _ = do onClick _ = do
setState $ const viewType setState $ const viewType
icon Preview = "glyphicon-eye-open" icon Preview = "fa-eye"
icon Both = "glyphicon-transfer" icon Both = "fa-columns"
icon Code = "glyphicon-pencil" icon Code = "fa-pencil"
type Controls = type Controls =
( (
......
...@@ -154,17 +154,17 @@ searchBar (query /\ setQuery) = R.createElement el {} [] ...@@ -154,17 +154,17 @@ searchBar (query /\ setQuery) = R.createElement el {} []
cpt {} _children = do cpt {} _children = do
queryText <- R.useState' query queryText <- R.useState' query
pure $ H.div {className: "row"} pure $ H.div {className: "col-md-12 row"}
[ H.div {className: "col col-md-3"} [] [ H.div {className: "col-md-3"} []
, H.div {className: "col col-md-1"} [if query /= "" then clearButton else H.div {} []] , H.div {className: "col-md-1"} [if query /= "" then clearButton else H.div {} []]
, H.div {className: "col col-md-3 form-group"} , H.div {className: "col-md-3 form-group"}
[ H.input { type: "text" [ H.input { type: "text"
, className: "form-control" , className: "form-control"
, on: {change: onSearchChange queryText, keyUp: onSearchKeyup queryText} , on: {change: onSearchChange queryText, keyUp: onSearchKeyup queryText}
, placeholder: query , placeholder: query
, defaultValue: query} , defaultValue: query}
] ]
, H.div {className: "col col-md-1"} [searchButton queryText] , H.div {className: "col-md-1"} [searchButton queryText]
] ]
onSearchChange :: forall e. R.State Query -> e -> Effect Unit onSearchChange :: forall e. R.State Query -> e -> Effect Unit
...@@ -180,14 +180,14 @@ searchBar (query /\ setQuery) = R.createElement el {} [] ...@@ -180,14 +180,14 @@ searchBar (query /\ setQuery) = R.createElement el {} []
searchButton (queryText /\ _) = searchButton (queryText /\ _) =
H.button { type: "submit" H.button { type: "submit"
, className: "btn btn-default" , className: "btn btn-secondary"
, on: {click: \e -> setQuery $ const queryText}} , on: {click: \e -> setQuery $ const queryText}}
[ H.span {className: "glyphicon glyphicon-search"} [] ] [ H.span {className: "fa fa-search"} [] ]
clearButton = clearButton =
H.button { className: "btn btn-danger" H.button { className: "btn btn-danger"
, on: {click: \e -> setQuery $ const ""}} , on: {click: \e -> setQuery $ const ""}}
[ H.span {className: "glyphicon glyphicon-remove"} [] ] [ H.span {className: "fa fa-times"} [] ]
mock :: Boolean mock :: Boolean
mock = false mock = false
...@@ -372,8 +372,8 @@ pagePaintRawCpt = R.hooksComponentWithModule thisModule "pagePaintRawCpt" cpt wh ...@@ -372,8 +372,8 @@ pagePaintRawCpt = R.hooksComponentWithModule thisModule "pagePaintRawCpt" cpt wh
} }
where where
sid = sessionId session sid = sessionId session
gi Favorite = "glyphicon glyphicon-star" gi Favorite = "fa fa-star"
gi _ = "glyphicon glyphicon-star-empty" gi _ = "fa fa-star-o"
trashClassName Trash _ = "trash" trashClassName Trash _ = "trash"
trashClassName _ true = "active" trashClassName _ true = "active"
trashClassName _ false = "" trashClassName _ false = ""
...@@ -388,9 +388,9 @@ pagePaintRawCpt = R.hooksComponentWithModule thisModule "pagePaintRawCpt" cpt wh ...@@ -388,9 +388,9 @@ pagePaintRawCpt = R.hooksComponentWithModule thisModule "pagePaintRawCpt" cpt wh
row dv@(DocumentsView r) = row dv@(DocumentsView r) =
{ row: { row:
T.makeRow [ -- H.div {} [ H.a { className, style, on: {click: click Favorite} } [] ] T.makeRow [ -- H.div {} [ H.a { className, style, on: {click: click Favorite} } [] ]
H.div { className: "column-tag flex" } [ docChooser { listId, mCorpusId, nodeId: r._id, selected, sidePanelTriggers, tableReload: reload } [] H.div { className: "" } [ docChooser { listId, mCorpusId, nodeId: r._id, selected, sidePanelTriggers, tableReload: reload } []
] ]
, H.div { className: "column-tag flex" } [ caroussel { category: cat, nodeId, row: dv, session, setLocalCategories } [] ] , H.div { className: "" } [ caroussel { category: cat, nodeId, row: dv, session, setLocalCategories } [] ]
--, H.input { type: "checkbox", defaultValue: checked, on: {click: click Trash} } --, H.input { type: "checkbox", defaultValue: checked, on: {click: click Trash} }
-- TODO show date: Year-Month-Day only -- TODO show date: Year-Month-Day only
, H.div { className: tClassName } [ R2.showText r.date ] , H.div { className: tClassName } [ R2.showText r.date ]
...@@ -435,7 +435,7 @@ docChooserCpt = R.hooksComponentWithModule thisModule "docChooser" cpt ...@@ -435,7 +435,7 @@ docChooserCpt = R.hooksComponentWithModule thisModule "docChooser" cpt
let eyeClass = if selected then "fa-eye" else "fa-eye-slash" let eyeClass = if selected then "fa-eye" else "fa-eye-slash"
pure $ H.div { className: "doc-chooser" } [ pure $ H.div { className: "btn" } [
H.span { className: "fa " <> eyeClass H.span { className: "fa " <> eyeClass
, on: { click: onClick } } [] , on: { click: onClick } } []
] ]
......
...@@ -27,9 +27,9 @@ type Props = ( ...@@ -27,9 +27,9 @@ type Props = (
appReload :: ReloadS appReload :: ReloadS
, asyncTasksRef :: R.Ref (Maybe GAT.Reductor) , asyncTasksRef :: R.Ref (Maybe GAT.Reductor)
, backend :: R.State (Maybe Backend) , backend :: R.State (Maybe Backend)
, currentRoute :: AppRoute
, frontends :: Frontends , frontends :: Frontends
, handed :: Handed , handed :: Handed
, route :: AppRoute
, sessions :: Sessions , sessions :: Sessions
, showLogin :: R.Setter Boolean , showLogin :: R.Setter Boolean
, treeReloadRef :: R.Ref (Maybe ReloadS) , treeReloadRef :: R.Ref (Maybe ReloadS)
...@@ -37,15 +37,16 @@ type Props = ( ...@@ -37,15 +37,16 @@ type Props = (
forest :: R2.Component Props forest :: R2.Component Props
forest = R.createElement forestCpt forest = R.createElement forestCpt
where
forestCpt :: R.Component Props
forestCpt = R.hooksComponentWithModule thisModule "forest" cpt
forestCpt :: R.Component Props
forestCpt = R.hooksComponentWithModule thisModule "forest" cpt where
cpt { appReload cpt { appReload
, asyncTasksRef , asyncTasksRef
, backend , backend
, currentRoute
, frontends , frontends
, handed , handed
, route
, sessions , sessions
, showLogin , showLogin
, treeReloadRef } _ = do , treeReloadRef } _ = do
...@@ -63,7 +64,7 @@ forestCpt = R.hooksComponentWithModule thisModule "forest" cpt where ...@@ -63,7 +64,7 @@ forestCpt = R.hooksComponentWithModule thisModule "forest" cpt where
R2.useCache ( R2.useCache (
frontends frontends
/\ route /\ currentRoute
/\ sessions /\ sessions
/\ fst openNodes /\ fst openNodes
/\ fst appReload /\ fst appReload
...@@ -72,16 +73,16 @@ forestCpt = R.hooksComponentWithModule thisModule "forest" cpt where ...@@ -72,16 +73,16 @@ forestCpt = R.hooksComponentWithModule thisModule "forest" cpt where
/\ handed /\ handed
) )
(cpt' openNodes asyncTasks appReload reload showLogin backend) (cpt' openNodes asyncTasks appReload reload showLogin backend)
cpt' openNodes asyncTasks appReload reload showLogin backend (frontends /\ route /\ sessions /\ _ /\ _ /\ _ /\ _ /\ handed) = do cpt' openNodes asyncTasks appReload reload showLogin backend (frontends /\ currentRoute /\ sessions /\ _ /\ _ /\ _ /\ _ /\ handed) = do
pure $ R2.row $ [plus handed showLogin backend] <> trees pure $ H.div { className: "forest" } $ [plus handed showLogin backend] <> trees
where where
trees = tree <$> unSessions sessions trees = tree <$> unSessions sessions
tree s@(Session {treeId}) = tree s@(Session {treeId}) =
treeView { appReload treeView { appReload
, asyncTasks , asyncTasks
, currentRoute
, frontends , frontends
, handed , handed
, mCurrentRoute: Just route
, openNodes , openNodes
, reload , reload
, root: treeId , root: treeId
...@@ -89,13 +90,13 @@ forestCpt = R.hooksComponentWithModule thisModule "forest" cpt where ...@@ -89,13 +90,13 @@ forestCpt = R.hooksComponentWithModule thisModule "forest" cpt where
} [] } []
plus :: Handed -> R.Setter Boolean -> R.State (Maybe Backend) -> R.Element plus :: Handed -> R.Setter Boolean -> R.State (Maybe Backend) -> R.Element
plus handed showLogin backend = H.div { className: handedClass } [ plus handed showLogin backend = H.div { className: "row" } [
H.button { title: "Add or remove connections to the server(s)." H.button { className: "btn btn-secondary col-5 " <> if handed == RightHanded then "ml-1 mr-auto" else "ml-auto mr-1"
, on: {click} , on: {click}
, className: "btn btn-default" , title: "Add or remove connections to the server(s)."
} }
[ H.div { "type": "" [ H.div { "type": ""
, className: "fa fa-universal-access fa-lg" , className: "fa fa-universal-access" -- fa-lg
} [H.text " Log in/out "] } [H.text " Log in/out "]
, H.div {} [H.text " "] , H.div {} [H.text " "]
--, H.div { "type": "", className: "fa fa-plus-circle fa-lg"} [] --, H.div { "type": "", className: "fa fa-plus-circle fa-lg"} []
...@@ -105,11 +106,6 @@ plus handed showLogin backend = H.div { className: handedClass } [ ...@@ -105,11 +106,6 @@ plus handed showLogin backend = H.div { className: handedClass } [
-- TODO same as the one in the Login Modal (same CSS) -- TODO same as the one in the Login Modal (same CSS)
-- [ H.i { className: "material-icons md-36"} [] ] -- [ H.i { className: "material-icons md-36"} [] ]
where where
handedClass = if handed == RightHanded then
"flex-start" -- TODO we should use lefthanded SASS class here
else
"flex-end"
click _ = (snd backend) (const Nothing) click _ = (snd backend) (const Nothing)
*> showLogin (const true) *> showLogin (const true)
...@@ -119,9 +115,9 @@ type ForestLayoutProps = ( ...@@ -119,9 +115,9 @@ type ForestLayoutProps = (
appReload :: ReloadS appReload :: ReloadS
, asyncTasksRef :: R.Ref (Maybe GAT.Reductor) , asyncTasksRef :: R.Ref (Maybe GAT.Reductor)
, backend :: R.State (Maybe Backend) , backend :: R.State (Maybe Backend)
, currentRoute :: AppRoute
, frontends :: Frontends , frontends :: Frontends
, handed :: R.State Handed , handed :: R.State Handed
, route :: AppRoute
, sessions :: Sessions , sessions :: Sessions
, showLogin :: R.Setter Boolean , showLogin :: R.Setter Boolean
, treeReloadRef :: R.Ref (Maybe ReloadS) , treeReloadRef :: R.Ref (Maybe ReloadS)
...@@ -129,10 +125,10 @@ type ForestLayoutProps = ( ...@@ -129,10 +125,10 @@ type ForestLayoutProps = (
forestLayout :: R2.Component ForestLayoutProps forestLayout :: R2.Component ForestLayoutProps
forestLayout props = R.createElement forestLayoutCpt props forestLayout props = R.createElement forestLayoutCpt props
forestLayoutCpt :: R.Component ForestLayoutProps
forestLayoutCpt = R.hooksComponentWithModule thisModule "forestLayout" cpt
where where
forestLayoutCpt :: R.Component ForestLayoutProps
forestLayoutCpt = R.hooksComponentWithModule thisModule "forestLayout" cpt
cpt props@{ handed } children = do cpt props@{ handed } children = do
pure $ R.fragment [ topBar { handed } [], forestLayoutMain props children ] pure $ R.fragment [ topBar { handed } [], forestLayoutMain props children ]
...@@ -140,10 +136,10 @@ forestLayoutCpt = R.hooksComponentWithModule thisModule "forestLayout" cpt ...@@ -140,10 +136,10 @@ forestLayoutCpt = R.hooksComponentWithModule thisModule "forestLayout" cpt
-- while the remaining ones are put into the main view -- while the remaining ones are put into the main view
forestLayoutWithTopBar :: R2.Component ForestLayoutProps forestLayoutWithTopBar :: R2.Component ForestLayoutProps
forestLayoutWithTopBar props = R.createElement forestLayoutWithTopBarCpt props forestLayoutWithTopBar props = R.createElement forestLayoutWithTopBarCpt props
forestLayoutWithTopBarCpt :: R.Component ForestLayoutProps
forestLayoutWithTopBarCpt = R.hooksComponentWithModule thisModule "forestLayoutWithTopBar" cpt
where where
forestLayoutWithTopBarCpt :: R.Component ForestLayoutProps
forestLayoutWithTopBarCpt = R.hooksComponentWithModule thisModule "forestLayoutWithTopBar" cpt
cpt props@{ handed } children = do cpt props@{ handed } children = do
let { head: topBarChild, tail: mainChildren } = let { head: topBarChild, tail: mainChildren } =
fromMaybe { head: H.div {} [], tail: [] } $ A.uncons children fromMaybe { head: H.div {} [], tail: [] } $ A.uncons children
...@@ -154,10 +150,10 @@ forestLayoutWithTopBarCpt = R.hooksComponentWithModule thisModule "forestLayoutW ...@@ -154,10 +150,10 @@ forestLayoutWithTopBarCpt = R.hooksComponentWithModule thisModule "forestLayoutW
forestLayoutMain :: R2.Component ForestLayoutProps forestLayoutMain :: R2.Component ForestLayoutProps
forestLayoutMain props = R.createElement forestLayoutMainCpt props forestLayoutMain props = R.createElement forestLayoutMainCpt props
forestLayoutMainCpt :: R.Component ForestLayoutProps
forestLayoutMainCpt = R.hooksComponentWithModule thisModule "forestLayoutMain" cpt
where where
forestLayoutMainCpt :: R.Component ForestLayoutProps
forestLayoutMainCpt = R.hooksComponentWithModule thisModule "forestLayoutMain" cpt
cpt props children = do cpt props children = do
pure $ forestLayoutRaw props [ pure $ forestLayoutRaw props [
mainPage {} children mainPage {} children
...@@ -165,16 +161,16 @@ forestLayoutMainCpt = R.hooksComponentWithModule thisModule "forestLayoutMain" c ...@@ -165,16 +161,16 @@ forestLayoutMainCpt = R.hooksComponentWithModule thisModule "forestLayoutMain" c
forestLayoutRaw :: R2.Component ForestLayoutProps forestLayoutRaw :: R2.Component ForestLayoutProps
forestLayoutRaw props = R.createElement forestLayoutRawCpt props forestLayoutRaw props = R.createElement forestLayoutRawCpt props
forestLayoutRawCpt :: R.Component ForestLayoutProps
forestLayoutRawCpt = R.hooksComponentWithModule thisModule "forestLayoutRaw" cpt
where where
forestLayoutRawCpt :: R.Component ForestLayoutProps
forestLayoutRawCpt = R.hooksComponentWithModule thisModule "forestLayoutRaw" cpt
cpt { appReload cpt { appReload
, asyncTasksRef , asyncTasksRef
, backend , backend
, currentRoute
, frontends , frontends
, handed , handed
, route
, sessions , sessions
, showLogin , showLogin
, treeReloadRef } children = do , treeReloadRef } children = do
...@@ -188,9 +184,9 @@ forestLayoutRawCpt = R.hooksComponentWithModule thisModule "forestLayoutRaw" cpt ...@@ -188,9 +184,9 @@ forestLayoutRawCpt = R.hooksComponentWithModule thisModule "forestLayoutRaw" cpt
forest { appReload forest { appReload
, asyncTasksRef , asyncTasksRef
, backend , backend
, currentRoute
, frontends , frontends
, handed: fst handed , handed: fst handed
, route
, sessions , sessions
, showLogin , showLogin
, treeReloadRef } [] , treeReloadRef } []
...@@ -199,10 +195,10 @@ forestLayoutRawCpt = R.hooksComponentWithModule thisModule "forestLayoutRaw" cpt ...@@ -199,10 +195,10 @@ forestLayoutRawCpt = R.hooksComponentWithModule thisModule "forestLayoutRaw" cpt
mainPage :: R2.Component () mainPage :: R2.Component ()
mainPage = R.createElement mainPageCpt mainPage = R.createElement mainPageCpt
mainPageCpt :: R.Component ()
mainPageCpt = R.hooksComponentWithModule thisModule "mainPage" cpt
where where
mainPageCpt :: R.Component ()
mainPageCpt = R.hooksComponentWithModule thisModule "mainPage" cpt
cpt {} children = do cpt {} children = do
pure $ H.div {className: "col-md-10"} [ pure $ H.div {className: "col-md-10"} [
H.div {id: "page-wrapper"} [ H.div {id: "page-wrapper"} [
......
This diff is collapsed.
...@@ -3,17 +3,20 @@ module Gargantext.Components.Forest.Tree.Node.Action.Search where ...@@ -3,17 +3,20 @@ module Gargantext.Components.Forest.Tree.Node.Action.Search where
import Data.Maybe (Maybe) import Data.Maybe (Maybe)
import Effect (Effect) import Effect (Effect)
import Effect.Aff (Aff, launchAff) import Effect.Aff (Aff, launchAff)
import Effect.Class (liftEffect)
import Reactix as R
import Reactix.DOM.HTML as H
import Gargantext.Prelude
import Gargantext.Components.Forest.Tree.Node.Action (Action(..)) import Gargantext.Components.Forest.Tree.Node.Action (Action(..))
import Gargantext.Components.Forest.Tree.Node.Action.Add (NodePopup) import Gargantext.Components.Forest.Tree.Node.Action.Add (NodePopup)
import Gargantext.Components.Forest.Tree.Node.Action.Search.SearchBar (searchBar) import Gargantext.Components.Forest.Tree.Node.Action.Search.SearchBar (searchBar)
import Gargantext.Components.Forest.Tree.Node.Action.Search.SearchField (defaultSearch) import Gargantext.Components.Forest.Tree.Node.Action.Search.SearchField (defaultSearch)
import Gargantext.Components.Lang (allLangs) import Gargantext.Components.Lang (allLangs)
import Gargantext.Prelude (Unit, bind, pure, unit, ($), (<>))
import Gargantext.Sessions (Session) import Gargantext.Sessions (Session)
import Gargantext.Types (ID) import Gargantext.Types (ID)
import Gargantext.Types as GT import Gargantext.Types as GT
import Reactix as R
import Reactix.DOM.HTML as H
-- | Action : Search -- | Action : Search
...@@ -24,7 +27,7 @@ actionSearch :: Session ...@@ -24,7 +27,7 @@ actionSearch :: Session
-> R.Hooks R.Element -> R.Hooks R.Element
actionSearch session id dispatch nodePopup = do actionSearch session id dispatch nodePopup = do
search <- R.useState' $ defaultSearch { node_id = id } search <- R.useState' $ defaultSearch { node_id = id }
pure $ R.fragment [ H.p {"style": {"margin" :"10px"}} pure $ R.fragment [ H.p { className: "action-search" }
[ H.text $ "Search and create a private " [ H.text $ "Search and create a private "
<> "corpus with the search query as corpus name." ] <> "corpus with the search query as corpus name." ]
, searchBar { langs: allLangs , searchBar { langs: allLangs
...@@ -41,6 +44,7 @@ actionSearch session id dispatch nodePopup = do ...@@ -41,6 +44,7 @@ actionSearch session id dispatch nodePopup = do
searchOn dispatch' p task = do searchOn dispatch' p task = do
_ <- launchAff $ dispatch' (DoSearch task) _ <- launchAff $ dispatch' (DoSearch task)
-- close popup -- close popup
_ <- launchAff $ dispatch' ClosePopover
-- TODO -- TODO
--snd p $ const Nothing --snd p $ const Nothing
pure unit pure unit
module Gargantext.Components.Forest.Tree.Node.Action.Search.SearchBar module Gargantext.Components.Forest.Tree.Node.Action.Search.SearchBar
( Props, searchBar, searchBarCpt ( Props
, searchBar
) where ) where
import Data.Tuple.Nested ((/\)) import Data.Tuple.Nested ((/\))
...@@ -25,13 +26,13 @@ type Props = ( langs :: Array Lang ...@@ -25,13 +26,13 @@ type Props = ( langs :: Array Lang
searchBar :: Record Props -> R.Element searchBar :: Record Props -> R.Element
searchBar props = R.createElement searchBarCpt props [] searchBar props = R.createElement searchBarCpt props []
searchBarCpt :: R.Component Props
searchBarCpt = R.hooksComponentWithModule thisModule "searchBar" cpt
where where
searchBarCpt :: R.Component Props
searchBarCpt = R.hooksComponentWithModule thisModule "searchBar" cpt
cpt {langs, onSearch, search: search@(s /\ _), session} _ = do cpt {langs, onSearch, search: search@(s /\ _), session} _ = do
--onSearchChange session s --onSearchChange session s
pure $ H.div {"style": {"margin" :"10px"}} pure $ H.div { className: "search-bar" }
[ searchField { databases:allDatabases [ searchField { databases:allDatabases
, langs , langs
, onSearch , onSearch
......
...@@ -45,12 +45,12 @@ type Props = ...@@ -45,12 +45,12 @@ type Props =
searchField :: Record Props -> R.Element searchField :: Record Props -> R.Element
searchField p = R.createElement searchFieldComponent p [] searchField p = R.createElement searchFieldComponent p []
--searchFieldComponent :: R.Memo Props
--searchFieldComponent = R.memo (R.hooksComponentWithModule thisModule "searchField" cpt) eqProps
searchFieldComponent :: R.Component Props
searchFieldComponent = R.hooksComponentWithModule thisModule "searchField" cpt
where where
--searchFieldComponent :: R.Memo Props
--searchFieldComponent = R.memo (R.hooksComponentWithModule thisModule "searchField" cpt) eqProps
searchFieldComponent :: R.Component Props
searchFieldComponent = R.hooksComponentWithModule thisModule "searchField" cpt
cpt props@{onSearch, search: search@(s /\ _)} _ = do cpt props@{onSearch, search: search@(s /\ _)} _ = do
iframeRef <- R.useRef null iframeRef <- R.useRef null
let params = let params =
...@@ -361,15 +361,15 @@ type SubmitButtonProps = ...@@ -361,15 +361,15 @@ type SubmitButtonProps =
submitButton :: Record SubmitButtonProps -> R.Element submitButton :: Record SubmitButtonProps -> R.Element
submitButton p = R.createElement submitButtonComponent p [] submitButton p = R.createElement submitButtonComponent p []
submitButtonComponent :: R.Component SubmitButtonProps
submitButtonComponent = R.hooksComponentWithModule thisModule "submitButton" cpt
where where
submitButtonComponent :: R.Component SubmitButtonProps
submitButtonComponent = R.hooksComponentWithModule thisModule "submitButton" cpt
cpt {onSearch, search: (mySearch /\ _), session} _ = cpt {onSearch, search: (mySearch /\ _), session} _ =
pure $ pure $
H.button { className: "btn btn-primary" H.button { className: "btn btn-primary"
, "type" : "button" , "type" : "button"
, on : {click: doSearch onSearch session mySearch} , on : { click: doSearch onSearch session mySearch }
, style : { width: "100%" } , style : { width: "100%" }
} [ H.text "Launch Search" ] } [ H.text "Launch Search" ]
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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