mirror of
https://github.com/hazemKrimi/personal-website.git
synced 2026-05-01 18:00:26 +00:00
Finish table of contents and pagination
This commit is contained in:
+10
-8
@@ -16,12 +16,12 @@
|
||||
/* Colors */
|
||||
--black: #131314;
|
||||
--white: white;
|
||||
--crimson: #BD1839;
|
||||
--light-gray: #E7E7E7;
|
||||
--crimson: #bd1839;
|
||||
--light-gray: #e7e7e7;
|
||||
|
||||
/* Background colors */
|
||||
--dark-background: #1D1B1B;
|
||||
--light-background: #FBFBFB;
|
||||
--dark-background: #1d1b1b;
|
||||
--light-background: #fbfbfb;
|
||||
|
||||
/* Radiuses */
|
||||
--card-radius: 1.875rem;
|
||||
@@ -59,7 +59,10 @@ body {
|
||||
#links .mail,
|
||||
#nav-toggler svg path,
|
||||
.arrow,
|
||||
.eye {
|
||||
.eye,
|
||||
.calendar,
|
||||
.clock,
|
||||
.share {
|
||||
stroke: var(--text);
|
||||
}
|
||||
|
||||
@@ -81,7 +84,6 @@ picture,
|
||||
video,
|
||||
canvas,
|
||||
svg {
|
||||
display: block;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
@@ -109,10 +111,10 @@ a {
|
||||
.vertical-separator {
|
||||
border-left: 1px solid var(--text);
|
||||
height: 24px;
|
||||
opacity: .25;
|
||||
opacity: 0.25;
|
||||
}
|
||||
|
||||
hr {
|
||||
color: var(--text);
|
||||
opacity: .25;
|
||||
opacity: 0.25;
|
||||
}
|
||||
|
||||
@@ -36,11 +36,7 @@
|
||||
.card .demo {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.card .read-more svg,
|
||||
.card .demo svg {
|
||||
margin-left: 0.25rem;
|
||||
column-gap: 0.25rem;
|
||||
}
|
||||
|
||||
.card .demo {
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
.pagination {
|
||||
display: flex;
|
||||
justify-content: end;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.pagination {
|
||||
display: flex;
|
||||
column-gap: 1rem;
|
||||
}
|
||||
|
||||
.pagination .pagination ul,
|
||||
.pagination li {
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.pagination a {
|
||||
border-radius: 0.5625rem;
|
||||
background-color: #8b8b8b;
|
||||
color: var(--white);
|
||||
padding: 0.25rem 0.75rem;
|
||||
display: inline-flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.pagination a.first,
|
||||
.pagination a.last {
|
||||
background-color: #606060;
|
||||
}
|
||||
|
||||
.pagination a.active {
|
||||
background-color: #232323;
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 768px) {
|
||||
.pagination {
|
||||
justify-content: center;
|
||||
}
|
||||
}
|
||||
@@ -1,3 +1,27 @@
|
||||
#TableOfContents ul {
|
||||
list-style-type: none;
|
||||
}
|
||||
:root {
|
||||
--toc-light-background: #f2f2f2;
|
||||
--toc-dark-background: #131212;
|
||||
}
|
||||
|
||||
#table-of-contents {
|
||||
margin-top: 3rem;
|
||||
height: 30rem;
|
||||
max-height: 20rem;
|
||||
padding: 1.2rem 1.6rem;
|
||||
border-radius: 1.875rem;
|
||||
background-color: var(--toc-background);
|
||||
}
|
||||
|
||||
#table-of-contents h3 {
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
#table-of-contents nav ul {
|
||||
list-style-type: none;
|
||||
padding-inline-start: 2rem;
|
||||
margin-bottom: 0rem;
|
||||
}
|
||||
|
||||
#table-of-contents nav > ul:first-of-type {
|
||||
padding: 0rem;
|
||||
}
|
||||
|
||||
+52
-21
@@ -1,39 +1,70 @@
|
||||
main #container {
|
||||
display: grid;
|
||||
grid-template-columns: auto 15rem;
|
||||
column-gap: 2rem;
|
||||
}
|
||||
|
||||
main #metadata {
|
||||
margin-bottom: 2rem;
|
||||
margin-bottom: 2rem;
|
||||
}
|
||||
|
||||
main #metadata h1 {
|
||||
margin-bottom: 1rem;
|
||||
font-size: 3rem;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
main #metadata div {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
min-width: 100%;
|
||||
display: flex;
|
||||
column-gap: 2rem;
|
||||
}
|
||||
|
||||
main #metadata div span {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
column-gap: 0.25rem;
|
||||
}
|
||||
|
||||
main #metadata div #share {
|
||||
display: none;
|
||||
}
|
||||
|
||||
main #metadata #share {
|
||||
cursor: pointer;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
main #content {
|
||||
display: flex;
|
||||
column-gap: 2rem;
|
||||
main h2,
|
||||
main h3,
|
||||
main h4 {
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
main h2, main h3, main h4 {
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
main p, main ul, main ol {
|
||||
margin-bottom: 2rem;
|
||||
main p,
|
||||
main ul,
|
||||
main ol,
|
||||
main img,
|
||||
main figure {
|
||||
margin-bottom: 2rem;
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 1024px) {
|
||||
main #content {
|
||||
display: block;
|
||||
}
|
||||
main #metadata h1 {
|
||||
font-size: 2.5rem;
|
||||
}
|
||||
|
||||
main #content #TableOfContents {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
main #container {
|
||||
display: block;
|
||||
}
|
||||
|
||||
main #container #table-of-contents {
|
||||
display: none;
|
||||
}
|
||||
|
||||
main #metadata div {
|
||||
column-gap: 1rem;
|
||||
}
|
||||
|
||||
main #metadata div #share {
|
||||
display: inline-flex;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none">
|
||||
<path class="calendar" d="M19 4H5C3.89543 4 3 4.89543 3 6V20C3 21.1046 3.89543 22 5 22H19C20.1046 22 21 21.1046 21 20V6C21 4.89543 20.1046 4 19 4Z" stroke="#CFCFCF" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path class="calendar" d="M16 2V6" stroke="#CFCFCF" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path class="calendar" d="M8 2V6" stroke="#CFCFCF" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path class="calendar" d="M3 10H21" stroke="#CFCFCF" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 695 B |
@@ -0,0 +1,4 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none">
|
||||
<path class="clock" d="M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z" stroke="#CFCFCF" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path class="clock" d="M12 6V12L16 14" stroke="#CFCFCF" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 449 B |
@@ -0,0 +1,7 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none">
|
||||
<path class='share' d="M18 8C19.6569 8 21 6.65685 21 5C21 3.34315 19.6569 2 18 2C16.3431 2 15 3.34315 15 5C15 6.65685 16.3431 8 18 8Z" stroke="#CFCFCF" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path class='share' d="M6 15C7.65685 15 9 13.6569 9 12C9 10.3431 7.65685 9 6 9C4.34315 9 3 10.3431 3 12C3 13.6569 4.34315 15 6 15Z" stroke="#CFCFCF" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path class='share' d="M18 22C19.6569 22 21 20.6569 21 19C21 17.3431 19.6569 16 18 16C16.3431 16 15 17.3431 15 19C15 20.6569 16.3431 22 18 22Z" stroke="#CFCFCF" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path class='share' d="M8.59003 13.51L15.42 17.49" stroke="#CFCFCF" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path class='share' d="M15.41 6.51001L8.59003 10.49" stroke="#CFCFCF" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.0 KiB |
@@ -67,6 +67,12 @@ function loadTheme() {
|
||||
? 'var(--card-light-background)'
|
||||
: 'var(--card-dark-background)'
|
||||
);
|
||||
root.style.setProperty(
|
||||
'--toc-background',
|
||||
theme === 'light'
|
||||
? 'var(--toc-light-background)'
|
||||
: 'var(--toc-dark-background)'
|
||||
);
|
||||
root.style.setProperty(
|
||||
'--about-card-background',
|
||||
theme === 'light'
|
||||
|
||||
Reference in New Issue
Block a user