Skip to content

Commit 374f839

Browse files
authored
Small edits to the tool interface (#36) - Tommv
* Update index.css * Update index.css * Interface design Several small edits to the interface design * Update start.js
1 parent 07e56f7 commit 374f839

File tree

5 files changed

+162
-30
lines changed

5 files changed

+162
-30
lines changed

src/index.css

+139-6
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,106 @@
1+
.c {
2+
/*max-width: 90em;*/
3+
padding: 4em;
4+
padding-top:1em;
5+
}
6+
7+
:root {
8+
--font: Tahoma, Arial, Helvetica, sans-serif;
9+
}
10+
11+
p{
12+
margin-left:20px;
13+
margin-right:20px;
14+
}
15+
16+
ol{
17+
margin-left:40px;
18+
}
19+
20+
21+
122
h1 {
23+
font-family:Courier New, Courier, monospace;
24+
color: #000;
225
margin-top: 0px;
26+
font-size: 3em;
327
}
428

529
h4 {
630
color: #fa0;
7-
font-weight: bold;
31+
font-weight: normal;
32+
}
33+
34+
h5 {
35+
color: #000;
36+
font-size: 1em;
837
}
938

1039
.center {
1140
text-align: center;
1241
}
1342

43+
.grassetto {
44+
font-weight: bold;
45+
font-size: 4em;
46+
}
47+
48+
1449
.center-btn {
1550
display: block;
1651
margin: auto;
1752
}
1853

1954
.btn {
55+
font-size: 1.1em;
2056
font-weight: bold;
21-
margin: 0;
22-
border-radius: 10px;
57+
margin: 2px 0px 0px 10px;
58+
border-radius: 15px;
59+
background:#CCC;
60+
color:#FFF;
2361
}
2462

2563
.btn:disabled {
26-
background-color: #ccc;
64+
background-color: #ddd;
65+
border-color: #ddd;
2766
}
2867

2968
.btn:disabled {
3069
opacity: 1;
3170
}
3271

72+
.btn:hover {
73+
opacity: 1;
74+
background-color: #005DA4;
75+
border-color: #005DA4;
76+
}
77+
78+
a:hover {
79+
opacity: 1;
80+
color: #005DA4;
81+
}
82+
3383
.credits {
3484
text-align: right;
3585
font-size: 0.8em;
86+
line-height: 1.2em;
87+
}
88+
89+
iframe {
90+
border: 10px solid #CCC;
91+
border-radius: 20px;
92+
}
93+
94+
.card {
95+
border: 1px solid #333;
96+
border-radius: 8px;
97+
padding:0px 0px 0px 10px;
98+
margin-top:5px;
99+
color: #fa0;
100+
font-family: courier;
101+
height: 65px;
102+
width: 85%;
103+
text-wrap: wrap;
36104
}
37105

38106
.flex-v {
@@ -47,8 +115,12 @@ h4 {
47115

48116
#sigma {
49117
border: 1px solid black;
50-
width: 70%;
51-
height: 75vh;
118+
width: 80%;
119+
height: 70vh;
120+
border-radius: 10px;
121+
padding:10px;
122+
margin:0px;
123+
margin-bottom: 10px;
52124
}
53125

54126
/* The switch - the box around the slider */
@@ -115,3 +187,64 @@ input:checked + .slider:before {
115187
.slider.round:before {
116188
border-radius: 50%;
117189
}
190+
191+
192+
/*********** Baseline, reset styles ***********/
193+
input[type="range"] {
194+
-webkit-appearance: none;
195+
appearance: none;
196+
background: transparent;
197+
cursor: pointer;
198+
width: 25rem;
199+
}
200+
201+
/* Removes default focus */
202+
input[type="range"]:focus {
203+
outline: none;
204+
}
205+
206+
/******** Chrome, Safari, Opera and Edge Chromium styles ********/
207+
/* slider track */
208+
input[type="range"]::-webkit-slider-runnable-track {
209+
background-color: #c4c4c4;
210+
border-radius: 1rem;
211+
height: 0.4rem;
212+
}
213+
214+
/* slider thumb */
215+
input[type="range"]::-webkit-slider-thumb {
216+
-webkit-appearance: none; /* Override default look */
217+
appearance: none;
218+
margin-top: -7.2px; /* Centers thumb on the track */
219+
background-color: #ffaa00;
220+
border-radius: 2rem;
221+
height: 1.3rem;
222+
width: 1.3rem;
223+
}
224+
225+
input[type="range"]:focus::-webkit-slider-thumb {
226+
outline: 3px solid #ffaa00;
227+
outline-offset: 0.125rem;
228+
}
229+
230+
/*********** Firefox styles ***********/
231+
/* slider track */
232+
input[type="range"]::-moz-range-track {
233+
background-color: #c4c4c4;
234+
border-radius: 1rem;
235+
height: 0.4rem;
236+
}
237+
238+
/* slider thumb */
239+
input[type="range"]::-moz-range-thumb {
240+
background-color: #ffaa00;
241+
border: none; /*Removes extra border that FF applies*/
242+
border-radius: 2rem;
243+
height: 1.3rem;
244+
width: 1.3rem;
245+
}
246+
247+
input[type="range"]:focus::-moz-range-thumb{
248+
outline: 3px solid #ffaa00;
249+
outline-offset: 0.125rem;
250+
}

src/pages/filters.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ const Filters = () => {
7070
},
7171
button(
7272
{ class: "btn", onclick: () => navigate("/search") },
73-
"<= 1. Corpus",
73+
" ⬅︎ 1. Corpus",
7474
),
7575
button(
7676
{
@@ -80,7 +80,7 @@ const Filters = () => {
8080
navigate("/viz");
8181
},
8282
},
83-
"3. Graph =>",
83+
"3. Graph ",
8484
),
8585
),
8686
);

src/pages/search.js

+3-6
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,12 @@ const Search = () => {
3434
{ class: "c" },
3535
h1({ class: "center" }, "1. Define your corpus"),
3636
p(
37-
{ style: "font-size: 0.85em" },
3837
"Use the frame below to search the OpenAlex database and carve out your corpus. Make sure your search retrieves only the publications relevant for your research - for large corpuses, only the 10.000 most cited records will be processed",
3938
),
4039
iframe({
4140
id: "openalex-frame",
4241
width: "100%",
43-
height: "450px",
44-
style: "border-radius: 15px",
42+
height: "480px",
4543
allow: "clipboard-write",
4644
src: () =>
4745
url.val
@@ -66,14 +64,13 @@ const Search = () => {
6664
FetchWorksProgressBar,
6765
),
6866
label(
69-
{ for: "url", style: "font-size: 0.9em" },
67+
{ for: "url"},
7068
'Please copy the address provided above in the "API Box" and paste it below:',
7169
),
7270
div(
7371
{ style: "display: flex; justify-content: space-between;" },
7472
input({
7573
class: "card",
76-
style: "width: 80%",
7774
type: "text",
7875
required: true,
7976
pattern: urlRegex.toString().slice(1, -1),
@@ -84,7 +81,7 @@ const Search = () => {
8481
input({
8582
class: "btn primary",
8683
type: "submit",
87-
value: "2. Filters =>",
84+
value: "2. Filters ",
8885
disabled: () => !isValidURL(url.val),
8986
onclick: async () => {
9087
showProgress.val = true;

src/pages/start.js

+8-8
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,18 @@ const Start = () => {
88
pageStyle(``);
99
return main(
1010
{ class: "c" },
11-
h1({ class: "center" }, "BiblioGraph"),
11+
h1({ class: "center grassetto" }, "BiblioGraph (pre-release version)"),
1212
div(
13-
{ style: "width: 45em;margin: auto" },
13+
{ style: "/*width:80em;*/" },
1414
p(
15-
"BiblioGraph allows you turn a corpus of OpenAlex records into a scientometric landscape, composed by:",
15+
"BiblioGraph allows you turn a corpus of OpenAlex records into a scientometric landscape, composed of:",
1616
),
1717
ol(
1818
li(
19-
"A base map consisting in the network of references that appear together in the records of the corpus;",
19+
"A base map consisting in the network of references that appear together in the records of the corpus",
2020
),
2121
li(
22-
"A layer of metadata extracted from the records (authors, sources, subfields...) and positioned according to their co-occurrence with the references of the base map.",
22+
"A layer of metadata extracted from the records (authors, sources, subfields...) positioned according to their co-occurrence with the references of the base map",
2323
),
2424
),
2525
p(
@@ -32,7 +32,7 @@ const Start = () => {
3232
style: "margin: auto;margin-top: 5em",
3333
onclick: () => navigate("/search"),
3434
},
35-
"Start here =>",
35+
"Start here ",
3636
),
3737
Link(
3838
{
@@ -47,9 +47,9 @@ const Start = () => {
4747
br(),
4848
"Nils Bonfils",
4949
br(),
50-
a({ href: "http://www.tommasoventurini.it/wp/" }, "Tommaso Venturini"),
50+
a({ href: "http://www.tommasoventurini.it/wp/", target: "_blank" }, "Tommaso Venturini"),
5151
br(),
52-
a({ href: "https://github.com/nbonfils/bibliograph2" }, "Fork on Github"),
52+
a({ href: "https://github.com/nbonfils/bibliograph2" , target: "_blank" }, "Fork on Github"),
5353
br(),
5454
),
5555
);

src/pages/viz.js

+10-8
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,15 @@ function logslider(position) {
2424
const Viz = () => {
2525
pageStyle(`
2626
.settings {
27-
margin: 0;
27+
margin: 0px;
2828
}
2929
.settings h4 {
30-
margin: 0;
30+
margin: 4px 0px 0px 0px;
31+
color:#000;
32+
font-size:1.2em;
3133
}
3234
.settings > div:first-child {
33-
margin-bottom: .5em;
35+
margin-bottom: 0em;
3436
}
3537
.settings input[type="range"] {
3638
width: 100%;
@@ -174,7 +176,7 @@ const Viz = () => {
174176
div(
175177
{ class: "flex-h", style: "justify-content: space-around" },
176178
h4("Step1"),
177-
h4("<=>"),
179+
h4("⬅︎ ⮕"),
178180
h4("Step2"),
179181
),
180182
label(
@@ -212,24 +214,24 @@ const Viz = () => {
212214
),
213215
),
214216
div(
215-
{ class: "flex-h", style: "justify-content: space-evenly;width: 70%" },
217+
{ class: "flex-h", style: "justify-content: space-evenly;width: 35%" },
216218
button(
217219
{ class: "btn", onclick: () => navigate("/filters") },
218-
"<= 2. Filters",
220+
" ⬅︎ 2. Filters",
219221
),
220222
button(
221223
{
222224
class: "btn primary",
223225
onclick: () => saveGexf(graph.val),
224226
},
225-
"Download .gexf",
227+
".gexf",
226228
),
227229
button(
228230
{
229231
class: "btn primary",
230232
onclick: () => saveAsPNG(sigmaInstance),
231233
},
232-
"Download .png",
234+
".png",
233235
),
234236
),
235237
);

0 commit comments

Comments
 (0)