feat: Add post-content styles and improve breadcrumb and link styles
This commit is contained in:
@@ -29,24 +29,18 @@
|
||||
&:not(:last-child) {
|
||||
margin-right: 0.5rem;
|
||||
|
||||
&::after {
|
||||
content: "";
|
||||
display: inline-block;
|
||||
width: 0;
|
||||
height: 0;
|
||||
border-left: 4px solid #6c757d;
|
||||
border-top: 3px solid transparent;
|
||||
border-bottom: 3px solid transparent;
|
||||
margin-left: 0.75rem;
|
||||
opacity: 0.7;
|
||||
// &::after {
|
||||
// content: "/";
|
||||
// display: inline-block;
|
||||
// color: #6c757d;
|
||||
// margin-left: 0.75rem;
|
||||
// opacity: 0.7;
|
||||
// font-weight: 500;
|
||||
|
||||
@media (max-width: 576px) {
|
||||
margin-left: 0.5rem;
|
||||
border-left-width: 3px;
|
||||
border-top-width: 2px;
|
||||
border-bottom-width: 2px;
|
||||
}
|
||||
}
|
||||
// @media (max-width: 576px) {
|
||||
// margin-left: 0.5rem;
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
a {
|
||||
@@ -122,8 +116,8 @@
|
||||
|
||||
.breadcrumb {
|
||||
.breadcrumb-item {
|
||||
&:not(:last-child)::after {
|
||||
border-left-color: #adb5bd;
|
||||
&:not(:last-child):not(:only-child)::after {
|
||||
color: #adb5bd;
|
||||
}
|
||||
|
||||
a {
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
//
|
||||
// Button styles //
|
||||
//
|
||||
a {
|
||||
color: get-color("dark", 0.9);
|
||||
text-decoration: none;
|
||||
@include transition(linear 0.1s);
|
||||
&:hover {
|
||||
color: get-color("dark");
|
||||
text-decoration: none;
|
||||
}
|
||||
}
|
||||
// a {
|
||||
// color: get-color("dark", 0.9);
|
||||
// text-decoration: none;
|
||||
// @include transition(linear 0.1s);
|
||||
// &:hover {
|
||||
// color: get-color("dark");
|
||||
// text-decoration: none;
|
||||
// }
|
||||
// }
|
||||
button {
|
||||
background: transparent;
|
||||
box-shadow: none;
|
||||
|
||||
5
assets/css/scss/elements/_post-content.scss
Normal file
5
assets/css/scss/elements/_post-content.scss
Normal file
@@ -0,0 +1,5 @@
|
||||
.post-content {
|
||||
p {
|
||||
line-height: 2rem;
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,31 @@
|
||||
//
|
||||
// Text Link Styles //
|
||||
//
|
||||
|
||||
a {
|
||||
// color: #007bff;
|
||||
// color: get-color("dark", 0.8);
|
||||
color: #000;
|
||||
text-decoration: none;
|
||||
|
||||
&:hover {
|
||||
color: #0056b3;
|
||||
text-decoration: none;
|
||||
}
|
||||
}
|
||||
|
||||
.post-content {
|
||||
a {
|
||||
// color: #007bff;
|
||||
color: get-color("dark", 0.8);
|
||||
text-decoration: underline;
|
||||
&:hover {
|
||||
color: #0056b3;
|
||||
text-decoration: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
*[class*='text-link-'] {
|
||||
color: get-color("dark", 0.9);
|
||||
&:hover, &:focus {
|
||||
|
||||
@@ -40,6 +40,7 @@
|
||||
@import "elements/testimonial";
|
||||
@import "elements/text-link";
|
||||
@import "elements/timeline";
|
||||
@import "elements/post-content";
|
||||
|
||||
//
|
||||
// Import Components //
|
||||
|
||||
10808
assets/css/theme.css
10808
assets/css/theme.css
File diff suppressed because it is too large
Load Diff
@@ -14,8 +14,6 @@
|
||||
{{ range . }}
|
||||
<li><a href="/categories/{{ . | urlize }}">{{ . }}</a></li>
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
<li><a href="/categories/non-classe">Non classé</a></li>
|
||||
{{ end }}
|
||||
<li><a href="#">{{ .Date.Format "Jan 2, 2006" }}</a></li>
|
||||
</ul>
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
<!-- Home/Accueil with SEO -->
|
||||
<li class="breadcrumb-item" itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
|
||||
<a href="{{ "/" | relLangURL }}" itemprop="item" title="{{ i18n "home" | default "Accueil" }}">
|
||||
<i class="fas fa-home" aria-hidden="true"></i>
|
||||
<span itemprop="name">{{ i18n "home" | default "Accueil" }}</span>
|
||||
</a>
|
||||
<meta itemprop="position" content="1" />
|
||||
|
||||
@@ -54,14 +54,20 @@ function generateContent() {
|
||||
// Decode HTML entities in the content and clean up HTML tags
|
||||
let contentHtml = he.decode(post.content.rendered);
|
||||
|
||||
// Convert absolute URLs in a href to relative URLs
|
||||
// Convert absolute URLs in a href to relative URLs (only for wp.mistergeek.net)
|
||||
contentHtml = contentHtml.replace(/<a\s+[^>]*href="([^"]+)"[^>]*>/g, (match, href) => {
|
||||
// Check if the href is an absolute URL (starts with http:// or https://)
|
||||
// Check if the href is an absolute URL containing wp.mistergeek.net
|
||||
if (href.startsWith('http://') || href.startsWith('https://')) {
|
||||
// Extract the path part of the URL
|
||||
const url = new URL(href);
|
||||
// Return the modified a tag with relative URL
|
||||
return match.replace(href, url.pathname);
|
||||
try {
|
||||
const url = new URL(href);
|
||||
if (url.hostname === 'wp.mistergeek.net' || url.hostname === 'www.wp.mistergeek.net') {
|
||||
// Only convert wp.mistergeek.net URLs to relative paths
|
||||
return match.replace(href, url.pathname);
|
||||
}
|
||||
} catch (error) {
|
||||
// If URL parsing fails, return the original href
|
||||
console.warn('Failed to parse URL:', href, error);
|
||||
}
|
||||
}
|
||||
return match;
|
||||
});
|
||||
@@ -105,14 +111,20 @@ ${contentHtml.trim()}`;
|
||||
// Decode HTML entities in the content and clean up HTML tags
|
||||
let contentHtml = he.decode(page.content.rendered);
|
||||
|
||||
// Convert absolute URLs in a href to relative URLs
|
||||
// Convert absolute URLs in a href to relative URLs (only for wp.mistergeek.net)
|
||||
contentHtml = contentHtml.replace(/<a\s+[^>]*href="([^"]+)"[^>]*>/g, (match, href) => {
|
||||
// Check if the href is an absolute URL (starts with http:// or https://)
|
||||
// Check if the href is an absolute URL containing wp.mistergeek.net
|
||||
if (href.startsWith('http://') || href.startsWith('https://')) {
|
||||
// Extract the path part of the URL
|
||||
const url = new URL(href);
|
||||
// Return the modified a tag with relative URL
|
||||
return match.replace(href, url.pathname);
|
||||
try {
|
||||
const url = new URL(href);
|
||||
if (url.hostname === 'wp.mistergeek.net' || url.hostname === 'www.wp.mistergeek.net') {
|
||||
// Only convert wp.mistergeek.net URLs to relative paths
|
||||
return match.replace(href, url.pathname);
|
||||
}
|
||||
} catch (error) {
|
||||
// If URL parsing fails, return the original href
|
||||
console.warn('Failed to parse URL:', href, error);
|
||||
}
|
||||
}
|
||||
return match;
|
||||
});
|
||||
|
||||
@@ -1884,17 +1884,6 @@ i {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
a {
|
||||
color: rgba(18, 21, 24, 0.9);
|
||||
text-decoration: none;
|
||||
-webkit-transition: linear 0.1s;
|
||||
transition: linear 0.1s;
|
||||
}
|
||||
a:hover {
|
||||
color: rgb(18, 21, 24);
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
button {
|
||||
background: transparent;
|
||||
box-shadow: none;
|
||||
@@ -5383,6 +5372,24 @@ button.mfp-close:hover {
|
||||
border-color: rgba(255, 255, 255, 0.2);
|
||||
}
|
||||
|
||||
a {
|
||||
color: #000;
|
||||
text-decoration: none;
|
||||
}
|
||||
a:hover {
|
||||
color: #0056b3;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.post-content a {
|
||||
color: rgba(18, 21, 24, 0.8);
|
||||
text-decoration: underline;
|
||||
}
|
||||
.post-content a:hover {
|
||||
color: #0056b3;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
*[class*=text-link-] {
|
||||
color: rgba(18, 21, 24, 0.9);
|
||||
}
|
||||
@@ -5861,6 +5868,10 @@ button.mfp-close:hover {
|
||||
background: white;
|
||||
}
|
||||
|
||||
.post-content p {
|
||||
line-height: 2rem;
|
||||
}
|
||||
|
||||
.blog-card-wrapper {
|
||||
position: relative;
|
||||
background-position: center center;
|
||||
@@ -7098,25 +7109,6 @@ button.mfp-close:hover {
|
||||
.breadcrumb-wrapper .breadcrumb .breadcrumb-item:not(:last-child) {
|
||||
margin-right: 0.5rem;
|
||||
}
|
||||
.breadcrumb-wrapper .breadcrumb .breadcrumb-item:not(:last-child)::after {
|
||||
content: "";
|
||||
display: inline-block;
|
||||
width: 0;
|
||||
height: 0;
|
||||
border-left: 4px solid #6c757d;
|
||||
border-top: 3px solid transparent;
|
||||
border-bottom: 3px solid transparent;
|
||||
margin-left: 0.75rem;
|
||||
opacity: 0.7;
|
||||
}
|
||||
@media (max-width: 576px) {
|
||||
.breadcrumb-wrapper .breadcrumb .breadcrumb-item:not(:last-child)::after {
|
||||
margin-left: 0.5rem;
|
||||
border-left-width: 3px;
|
||||
border-top-width: 2px;
|
||||
border-bottom-width: 2px;
|
||||
}
|
||||
}
|
||||
.breadcrumb-wrapper .breadcrumb .breadcrumb-item a {
|
||||
color: #495057;
|
||||
text-decoration: none;
|
||||
@@ -7179,8 +7171,8 @@ button.mfp-close:hover {
|
||||
background: linear-gradient(135deg, #343a40 0%, #495057 100%);
|
||||
border-bottom-color: #6c757d;
|
||||
}
|
||||
.breadcrumb-wrapper .breadcrumb .breadcrumb-item:not(:last-child)::after {
|
||||
border-left-color: #adb5bd;
|
||||
.breadcrumb-wrapper .breadcrumb .breadcrumb-item:not(:last-child):not(:only-child)::after {
|
||||
color: #adb5bd;
|
||||
}
|
||||
.breadcrumb-wrapper .breadcrumb .breadcrumb-item a {
|
||||
color: #dee2e6;
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user