Compare commits

...

4 commits

Author SHA1 Message Date
b96b186875
improved share button
All checks were successful
Build and Deploy / build (push) Successful in 1m7s
Build and Deploy / deploy (push) Successful in 5s
2025-06-18 09:27:57 +02:00
bd292d5424
improve link styling and buttons 2025-06-18 09:21:17 +02:00
9341950c26
enable articles menu 2025-06-18 09:08:08 +02:00
36f34de94f
link to servala company on linkedin 2025-06-13 12:01:25 +02:00
3 changed files with 49 additions and 10 deletions

View file

@ -12529,4 +12529,9 @@ a.btn:focus {
background-color: #f8f9fa;
padding: 20px;
border-radius: 8px;
}
.article-content a {
font-weight: bold;
text-decoration: underline;
}

View file

@ -55,7 +55,7 @@
<ul class="navbar__menu menu mr-lg-27">
<li class="menu__item"><a class="menu__item-link" href="{% url 'services:homepage' %}">Home</a></li>
<li class="menu__item"><a class="menu__item-link" href="{% url 'services:service_list' %}">Services</a></li>
<!-- <li class="menu__item"><a class="menu__item-link" href="{% url 'services:article_list' %}">Articles</a></li> -->
<li class="menu__item"><a class="menu__item-link" href="{% url 'services:article_list' %}">Articles</a></li>
<li class="menu__item"><a class="menu__item-link" href="{% url 'services:provider_list' %}">Cloud Providers</a></li>
<li class="menu__item"><a class="menu__item-link" href="{% url 'services:partner_list' %}">Consulting Partners</a></li>
<li class="menu__item"><a class="menu__item-link" href="{% url 'services:about' %}">About</a></li>
@ -139,7 +139,7 @@
<p>Unlock the Power of Cloud Native Applications</p>
</div>
<div class="d-flex align-items-center space-x-20">
<a href="https://www.linkedin.com/company/5395280/">
<a href="https://www.linkedin.com/company/servala/">
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path
d="M20.5831 0.631348C21.2609 0.631348 21.9109 0.900593 22.3902 1.37985C22.8694 1.85911 23.1387 2.50913 23.1387 3.1869V21.0758C23.1387 21.7536 22.8694 22.4036 22.3902 22.8828C21.9109 23.3621 21.2609 23.6313 20.5831 23.6313H2.69423C2.01645 23.6313 1.36644 23.3621 0.887177 22.8828C0.407917 22.4036 0.138672 21.7536 0.138672 21.0758V3.1869C0.138672 2.50913 0.407917 1.85911 0.887177 1.37985C1.36644 0.900593 2.01645 0.631348 2.69423 0.631348H20.5831ZM19.9442 20.4369V13.6647C19.9442 12.5599 19.5054 11.5004 18.7242 10.7192C17.943 9.93799 16.8834 9.49912 15.7787 9.49912C14.6926 9.49912 13.4276 10.1636 12.8142 11.1602V9.7419H9.24923V20.4369H12.8142V14.1375C12.8142 13.1536 13.6065 12.3486 14.5903 12.3486C15.0648 12.3486 15.5198 12.537 15.8553 12.8725C16.1908 13.208 16.3792 13.663 16.3792 14.1375V20.4369H19.9442ZM5.09645 7.73579C5.66578 7.73579 6.21179 7.50963 6.61437 7.10705C7.01695 6.70447 7.24312 6.15846 7.24312 5.58913C7.24312 4.40079 6.28478 3.42968 5.09645 3.42968C4.52373 3.42968 3.97447 3.65719 3.56949 4.06217C3.16452 4.46714 2.93701 5.01641 2.93701 5.58913C2.93701 6.77746 3.90812 7.73579 5.09645 7.73579ZM6.87256 20.4369V9.7419H3.33312V20.4369H6.87256Z"

View file

@ -40,9 +40,7 @@
<div class="row">
<div class="col-12 col-lg-8 mx-auto">
<article class="article-content">
<div class="prose">
{{ article.content|safe }}
</div>
{{ article.content|safe }}
</article>
<!-- Related Links -->
@ -139,10 +137,7 @@
Back to Articles
</a>
<div class="d-flex gap-2">
<button class="btn btn-outline-secondary btn-sm" onclick="window.print()">
<i class="bi bi-printer"></i> Print
</button>
<button class="btn btn-outline-secondary btn-sm" onclick="navigator.share ? navigator.share({title: '{{ article.title }}', url: window.location.href}) : navigator.clipboard.writeText(window.location.href)">
<button class="btn btn-outline btn-sm" onclick="shareArticle()" id="shareBtn">
<i class="bi bi-share"></i> Share
</button>
</div>
@ -175,4 +170,43 @@
</div>
</div>
</section>
{% endblock %}
<script>
async function shareArticle() {
const shareBtn = document.getElementById('shareBtn');
const originalText = shareBtn.innerHTML;
try {
if (navigator.share) {
// Use native share API if available
await navigator.share({
title: '{{ article.title|escapejs }}',
text: '{{ article.excerpt|escapejs }}',
url: window.location.href
});
} else {
// Fallback: copy to clipboard
await navigator.clipboard.writeText(window.location.href);
// Show feedback
shareBtn.innerHTML = '<i class="bi bi-check"></i> Copied!';
shareBtn.classList.add('btn-success');
shareBtn.classList.remove('btn-outline');
// Reset after 2 seconds
setTimeout(() => {
shareBtn.innerHTML = originalText;
shareBtn.classList.remove('btn-success');
shareBtn.classList.add('btn-outline');
}, 2000);
}
} catch (error) {
console.error('Error sharing:', error);
shareBtn.innerHTML = '<i class="bi bi-x"></i> Error';
setTimeout(() => {
shareBtn.innerHTML = originalText;
}, 2000);
}
}
</script>
{% endblock %}