mirror of
https://github.com/bellingcat/gesara-entity-viz.git
synced 2026-06-12 05:28:33 +03:00
initial commit
This commit is contained in:
335
src/styles.css
Normal file
335
src/styles.css
Normal file
@@ -0,0 +1,335 @@
|
||||
@import url("https://fonts.googleapis.com/css2?family=Lora&family=Public+Sans:ital@0;1&display=swap");
|
||||
|
||||
/**
|
||||
* VARIABLES:
|
||||
* **********
|
||||
*/
|
||||
:root {
|
||||
--ruby: #e22653;
|
||||
--grey: #999;
|
||||
--dark-grey: #666;
|
||||
--light-grey: #ccc;
|
||||
--cream: #f9f7ed;
|
||||
--transparent-white: #ffffffcc;
|
||||
--transition: all ease-out 300ms;
|
||||
--shadow: 0 1px 5px var(--dark-grey);
|
||||
--hover-opacity: 0.7;
|
||||
--stage-padding: 8px;
|
||||
--panels-width: 350px;
|
||||
--border-radius: 3px;
|
||||
}
|
||||
|
||||
/**
|
||||
* BASE STYLES:
|
||||
* ************
|
||||
*/
|
||||
body {
|
||||
font-family: "Public Sans", sans-serif;
|
||||
background: white;
|
||||
font-size: 0.9em;
|
||||
overflow: hidden;
|
||||
}
|
||||
h1,
|
||||
h2 {
|
||||
font-family: Lora, serif;
|
||||
}
|
||||
h2 {
|
||||
font-size: 1.3em;
|
||||
margin: 0;
|
||||
}
|
||||
h2 > * {
|
||||
vertical-align: text-top;
|
||||
}
|
||||
a {
|
||||
color: black !important;
|
||||
}
|
||||
a:hover {
|
||||
opacity: var(--hover-opacity);
|
||||
}
|
||||
|
||||
/**
|
||||
* LAYOUT:
|
||||
* *******
|
||||
*/
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
#root {
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
position: relative;
|
||||
}
|
||||
#app-root,
|
||||
.sigma-container {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
}
|
||||
.controls {
|
||||
position: absolute;
|
||||
bottom: var(--stage-padding);
|
||||
left: var(--stage-padding);
|
||||
}
|
||||
.graph-title {
|
||||
z-index: 1;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
max-width: calc(100vw - var(--panels-width) - 3 * var(--stage-padding));
|
||||
padding: var(--stage-padding);
|
||||
}
|
||||
.graph-title h1 {
|
||||
font-size: 1.8em;
|
||||
}
|
||||
.graph-title h1,
|
||||
.graph-title h2 {
|
||||
margin: 0;
|
||||
background: var(--transparent-white);
|
||||
}
|
||||
.panels {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
width: 350px;
|
||||
max-height: calc(100vh - 2 * var(--stage-padding));
|
||||
overflow-y: auto;
|
||||
padding: var(--stage-padding);
|
||||
scrollbar-width: thin;
|
||||
}
|
||||
::-webkit-scrollbar {
|
||||
width: 5px;
|
||||
}
|
||||
::-webkit-scrollbar-track {
|
||||
background: transparent;
|
||||
}
|
||||
::-webkit-scrollbar-thumb {
|
||||
background-color: var(--grey);
|
||||
border: transparent;
|
||||
}
|
||||
|
||||
/**
|
||||
* USEFUL CLASSES:
|
||||
* ***************
|
||||
*/
|
||||
div.ico > button {
|
||||
display: block;
|
||||
position: relative;
|
||||
font-size: 1.8em;
|
||||
width: 2em;
|
||||
height: 2em;
|
||||
border-radius: var(--border-radius);
|
||||
box-shadow: var(--shadow);
|
||||
color: black;
|
||||
background: white;
|
||||
border: none;
|
||||
outline: none;
|
||||
margin-top: 0.2em;
|
||||
cursor: pointer;
|
||||
}
|
||||
div.ico > button:hover {
|
||||
color: var(--dark-grey);
|
||||
}
|
||||
div.ico > button > * {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
}
|
||||
|
||||
button.btn {
|
||||
background: white;
|
||||
color: black;
|
||||
border: 1px solid black;
|
||||
outline: none;
|
||||
border-radius: var(--border-radius);
|
||||
padding: 0.3em 0.5em;
|
||||
font-size: 1em;
|
||||
font-family: Lato, sans-serif;
|
||||
cursor: pointer;
|
||||
}
|
||||
button.btn:hover {
|
||||
opacity: var(--hover-opacity);
|
||||
}
|
||||
button.btn > * {
|
||||
vertical-align: baseline;
|
||||
}
|
||||
.buttons {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
ul {
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
}
|
||||
ul > li {
|
||||
margin-top: 0.2em;
|
||||
}
|
||||
.text-muted {
|
||||
color: var(--dark-grey);
|
||||
}
|
||||
.text-small {
|
||||
font-size: 0.7em;
|
||||
vertical-align: baseline;
|
||||
}
|
||||
.mouse-pointer {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
/**
|
||||
* CAPTIONS PANELS:
|
||||
* ****************
|
||||
*/
|
||||
.panel {
|
||||
background: white;
|
||||
padding: 1em;
|
||||
border-radius: var(--border-radius);
|
||||
box-shadow: var(--shadow);
|
||||
}
|
||||
.panel:not(:last-child) {
|
||||
margin-bottom: 0.5em;
|
||||
}
|
||||
.panel h2 button {
|
||||
float: right;
|
||||
background: white;
|
||||
border: 1px solid black;
|
||||
border-radius: var(--border-radius);
|
||||
font-size: 1.2em;
|
||||
height: 1em;
|
||||
width: 1em;
|
||||
text-align: center;
|
||||
padding: 0;
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.panel h2 button:hover {
|
||||
opacity: var(--hover-opacity);
|
||||
}
|
||||
|
||||
.caption-row input[type="checkbox"] {
|
||||
display: none;
|
||||
}
|
||||
.caption-row input[type="checkbox"]:not(:checked) + label {
|
||||
color: var(--dark-grey);
|
||||
}
|
||||
.caption-row input[type="checkbox"]:not(:checked) + label .circle {
|
||||
background-color: white !important;
|
||||
}
|
||||
.caption-row label {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
cursor: pointer;
|
||||
}
|
||||
.caption-row label:hover {
|
||||
opacity: var(--hover-opacity);
|
||||
}
|
||||
.caption-row label .circle {
|
||||
flex-shrink: 0;
|
||||
display: inline-block;
|
||||
width: 1.2em;
|
||||
height: 1.2em;
|
||||
border-radius: 1.2em;
|
||||
vertical-align: middle;
|
||||
box-sizing: border-box;
|
||||
background-color: var(--dark-grey);
|
||||
background-position: center;
|
||||
background-size: cover;
|
||||
background-repeat: no-repeat;
|
||||
margin-right: 0.2em;
|
||||
transition: var(--transition);
|
||||
border: 3px solid var(--dark-grey);
|
||||
}
|
||||
.caption-row label .node-label {
|
||||
flex-grow: 1;
|
||||
}
|
||||
.caption-row label .bar {
|
||||
position: relative;
|
||||
background: var(--light-grey);
|
||||
height: 3px;
|
||||
margin-bottom: 0.2em;
|
||||
}
|
||||
.caption-row label .bar .inside-bar {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
height: 100%;
|
||||
background: var(--dark-grey);
|
||||
transition: var(--transition);
|
||||
}
|
||||
|
||||
/**
|
||||
* SEARCH FIELD:
|
||||
* *************
|
||||
*/
|
||||
.search-wrapper {
|
||||
position: relative;
|
||||
}
|
||||
.search-wrapper > input[type="search"] {
|
||||
width: calc(100%);
|
||||
height: 3em;
|
||||
box-shadow: var(--shadow);
|
||||
border: none;
|
||||
outline: none;
|
||||
border-radius: var(--border-radius);
|
||||
margin-bottom: 0.5em;
|
||||
padding: 1em 1em 1em 3em;
|
||||
font-family: Lato, sans-serif;
|
||||
font-size: 1em;
|
||||
}
|
||||
.search-wrapper > .icon {
|
||||
position: absolute;
|
||||
width: 1em;
|
||||
height: 1em;
|
||||
top: 1em;
|
||||
left: 1em;
|
||||
}
|
||||
|
||||
/**
|
||||
* RESPONSIVENESS:
|
||||
* ***************
|
||||
*/
|
||||
@media (max-width: 767.98px) {
|
||||
#app-root:not(.show-contents) .contents,
|
||||
#app-root.show-contents .controls {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#app-root.show-contents .contents {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
overflow-y: auto;
|
||||
scrollbar-width: thin;
|
||||
background: var(--transparent-white);
|
||||
}
|
||||
#app-root.show-contents .graph-title,
|
||||
#app-root.show-contents .panels {
|
||||
height: auto;
|
||||
max-height: unset;
|
||||
max-width: unset;
|
||||
position: static;
|
||||
overflow-y: visible;
|
||||
width: auto;
|
||||
}
|
||||
#app-root.show-contents .graph-title {
|
||||
background: white;
|
||||
padding-right: calc(3em + 2 * var(--stage-padding));
|
||||
min-height: 3em;
|
||||
}
|
||||
#app-root.show-contents .contents .hide-contents {
|
||||
position: absolute;
|
||||
top: var(--stage-padding);
|
||||
right: var(--stage-padding);
|
||||
}
|
||||
}
|
||||
@media (min-width: 768px) {
|
||||
button.show-contents,
|
||||
button.hide-contents {
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user