mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-08-27 22:34:51 +00:00
website: glossary feature (#2529)
* web: quick fixes in glossary.md * website: update header tags * website: add glossary feature * website: add & style the tooltips & glossary terms * website: add overlay for glossary definition * website: add list styling & update links --------- Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com>
This commit is contained in:
co-authored by
Evgeny Poberezkin
parent
92cf945e10
commit
bbd4e6c8ba
+232
-6
@@ -428,13 +428,13 @@ header nav {
|
||||
transform: translateY(40px);
|
||||
}
|
||||
|
||||
.card:not(.no-hover):hover > div:nth-child(1) {
|
||||
.card:not(.no-hover):hover > div:nth-child(1),
|
||||
.card.hovered > div:nth-child(1) {
|
||||
height: 200px;
|
||||
padding: 12px 10px;
|
||||
}
|
||||
.card:not(.no-hover):hover > div:nth-child(2) {
|
||||
.card:not(.no-hover):hover > div:nth-child(2),
|
||||
.card.hovered > div:nth-child(2) {
|
||||
height: 270px;
|
||||
padding: 8px 24px;
|
||||
}
|
||||
.card.card-active > div:nth-child(2) {
|
||||
height: 480px;
|
||||
@@ -443,13 +443,16 @@ header nav {
|
||||
.card:not(.no-hover):hover > div:nth-child(2) > *:nth-child(2),
|
||||
.card:not(.no-hover):hover > div:nth-child(2) > *:nth-child(3),
|
||||
.card.card-active > div:nth-child(2) > *:nth-child(2),
|
||||
.card.card-active > div:nth-child(2) > *:nth-child(3) {
|
||||
.card.card-active > div:nth-child(2) > *:nth-child(3),
|
||||
.card:not(.no-hover).hovered > div:nth-child(2) > *:nth-child(2),
|
||||
.card:not(.no-hover).hovered > div:nth-child(2) > *:nth-child(3) {
|
||||
opacity: 1;
|
||||
max-height: 480px;
|
||||
transform: translateY(0px);
|
||||
}
|
||||
|
||||
.card:not(.no-hover):hover > div:nth-child(2) > *:nth-child(3){
|
||||
.card:not(.no-hover):hover > div:nth-child(2) > *:nth-child(3),
|
||||
.card:not(.no-hover).hovered > div:nth-child(2) > *:nth-child(3) {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
@@ -710,4 +713,227 @@ p a{
|
||||
.contact-tab.active svg,
|
||||
.contact-tab:hover svg{
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
|
||||
/* Glossary */
|
||||
.glossary-term{
|
||||
display: inline-block;
|
||||
text-decoration: underline;
|
||||
text-decoration-style: dashed;
|
||||
text-underline-offset: 3px;
|
||||
position: relative;
|
||||
z-index: 10000;
|
||||
}
|
||||
|
||||
.glossary-term::before{
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: -5px;
|
||||
bottom: -5px;
|
||||
left: 0;
|
||||
right: 0;
|
||||
opacity: 0;
|
||||
z-index: 9;
|
||||
}
|
||||
|
||||
.glossary-tooltip {
|
||||
visibility: hidden;
|
||||
opacity: 0;
|
||||
position: fixed;
|
||||
width: 320px;
|
||||
max-width: 100%;
|
||||
z-index: 10001;
|
||||
transition: opacity .5s;
|
||||
padding-left: 5px;
|
||||
padding-right: 5px;
|
||||
}
|
||||
|
||||
.glossary-tooltip .tooltip-content{
|
||||
background-color: #fff;
|
||||
color: #000;
|
||||
text-align: left;
|
||||
padding: .8rem 1.2rem;
|
||||
border-radius: 7px;
|
||||
font-size: 14px;
|
||||
line-height: 1.3rem;
|
||||
box-shadow: 0 5px 10px rgba(0,0,0,.08);
|
||||
}
|
||||
|
||||
.dark .glossary-tooltip .tooltip-content{
|
||||
background-color: #000;
|
||||
color: #fff;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.tooltip-title{
|
||||
margin-bottom: 0.5rem;
|
||||
color: #0197FF;
|
||||
font-weight: 600;
|
||||
font-size: 1.1rem;
|
||||
}
|
||||
|
||||
.dark .tooltip-title{
|
||||
color: #70F0F9;
|
||||
}
|
||||
|
||||
.glossary-tooltip .read-more-btn{
|
||||
color: #0053D0;
|
||||
display: block;
|
||||
text-decoration: underline;
|
||||
margin-top: .8rem;
|
||||
text-underline-offset: 2px;
|
||||
}
|
||||
|
||||
.dark .glossary-tooltip .read-more-btn{
|
||||
color: #70F0F9;
|
||||
}
|
||||
|
||||
.glossary-overlay{
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
background-color: transparent;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 0.75rem;
|
||||
z-index: 10005;
|
||||
}
|
||||
|
||||
@media screen and (min-width: 768px) {
|
||||
.glossary-overlay{
|
||||
padding: 2.5rem;
|
||||
}
|
||||
}
|
||||
|
||||
.glossary-overlay::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color:#F3F6F7;
|
||||
opacity: 0.9;
|
||||
}
|
||||
|
||||
.dark .glossary-overlay::before {
|
||||
content: '';
|
||||
background-color: #0C0B13;
|
||||
}
|
||||
|
||||
.glossary-overlay .overlay-card{
|
||||
width: 100%;
|
||||
background-color: white;
|
||||
opacity: 1;
|
||||
height: 100%;
|
||||
z-index: 10006;
|
||||
border-radius: 0.375rem;
|
||||
box-shadow: 0px 3px 12px rgba(0, 0, 0, 0.2);
|
||||
padding: 2.5rem 1.5rem;
|
||||
overflow: auto;
|
||||
--tw-scale-x: 1;
|
||||
--tw-scale-y: 1;
|
||||
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
|
||||
}
|
||||
|
||||
.dark .glossary-overlay .overlay-card{
|
||||
background-color: #17203D;
|
||||
}
|
||||
|
||||
@media (min-width: 640px) {
|
||||
.glossary-overlay .overlay-card{
|
||||
padding: 3.5rem;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 768px) {
|
||||
.glossary-overlay .overlay-card{
|
||||
width: fit-content;
|
||||
max-width: 558px;
|
||||
height: fit-content;
|
||||
max-height: 660px;
|
||||
}
|
||||
}
|
||||
|
||||
.glossary-overlay .overlay-card .overlay-title{
|
||||
font-size: 1.875rem;
|
||||
line-height: 2.25rem;
|
||||
font-weight: 700;
|
||||
margin-bottom: 1rem;
|
||||
margin-bottom: 1.5rem;
|
||||
--tw-text-opacity: 1;
|
||||
color: rgb(1 151 255 / var(--tw-text-opacity));
|
||||
}
|
||||
|
||||
.glossary-overlay .overlay-card .overlay-content{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 1.5rem;
|
||||
font-size: 1rem;
|
||||
line-height: 1.5rem;
|
||||
color: #3F484B;
|
||||
}
|
||||
|
||||
.dark .glossary-overlay .overlay-card .overlay-content{
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.close-overlay-btn{
|
||||
fill: #3F484B;
|
||||
position: fixed;
|
||||
right: 1.25rem;
|
||||
top: 1.25rem;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.dark .close-overlay-btn{
|
||||
fill: #fff;
|
||||
}
|
||||
|
||||
.glossary-overlay ul {
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
.glossary-overlay ul,
|
||||
.glossary-overlay ol {
|
||||
list-style-position: inside;
|
||||
overflow: auto;
|
||||
margin: 1rem 0;
|
||||
/* padding-left: 1rem; */
|
||||
}
|
||||
|
||||
.glossary-overlay ul li,
|
||||
.glossary-overlay ol li {
|
||||
margin-right: 0;
|
||||
margin-left: 0;
|
||||
-webkit-margin-start: 1.1rem;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.dark .glossary-overlay ul li,
|
||||
.dark .glossary-overlay ol li {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.glossary-overlay ul li::marker,
|
||||
.glossary-overlay ol li::marker {
|
||||
color: black;
|
||||
}
|
||||
|
||||
.dark .glossary-overlay ul li::marker,
|
||||
.dark .glossary-overlay ol li::marker {
|
||||
color: white;
|
||||
}
|
||||
|
||||
.glossary-overlay ul li a,
|
||||
.glossary-overlay ol li a {
|
||||
line-height: 30px;
|
||||
}
|
||||
|
||||
.glossary-overlay ul li {
|
||||
list-style: disc;
|
||||
}
|
||||
|
||||
.glossary-overlay ol li {
|
||||
list-style: decimal;
|
||||
}
|
||||
Reference in New Issue
Block a user