mirror of
https://github.com/rustdesk/doc.rustdesk.com.git
synced 2026-02-16 10:30:58 +00:00
new theme
This commit is contained in:
85
static/css/custom-enhancements.css
Normal file
85
static/css/custom-enhancements.css
Normal file
@@ -0,0 +1,85 @@
|
||||
/* RustDesk Documentation Enhancements */
|
||||
|
||||
/* Better link styling */
|
||||
.prose a {
|
||||
color: #0071ff;
|
||||
text-decoration: none;
|
||||
border-bottom: 1px solid transparent;
|
||||
transition: border-bottom-color 0.2s ease;
|
||||
}
|
||||
|
||||
.prose a:hover {
|
||||
border-bottom-color: #0071ff;
|
||||
}
|
||||
|
||||
/* Enhanced code blocks */
|
||||
.prose pre {
|
||||
background: #f8fafc;
|
||||
border: 1px solid #e2e8f0;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
.dark .prose pre {
|
||||
background: #1e293b;
|
||||
border-color: #334155;
|
||||
}
|
||||
|
||||
/* Better spacing for feature lists */
|
||||
.prose ul li {
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
/* Enhanced GitHub repository section */
|
||||
.prose h3 + ul {
|
||||
margin-top: 1rem;
|
||||
border-left: 4px solid #0071ff;
|
||||
padding-left: 1rem;
|
||||
background: linear-gradient(90deg, rgba(0, 113, 255, 0.05) 0%, transparent 100%);
|
||||
border-radius: 0 8px 8px 0;
|
||||
}
|
||||
|
||||
/* Better button styling for cards */
|
||||
.hextra-cards a {
|
||||
transition: transform 0.2s ease, box-shadow 0.2s ease;
|
||||
}
|
||||
|
||||
.hextra-cards a:hover {
|
||||
transform: translateY(-2px);
|
||||
box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
/* Improved notice blocks */
|
||||
.prose .notices {
|
||||
border-radius: 8px;
|
||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
/* Better mobile responsiveness */
|
||||
@media (max-width: 768px) {
|
||||
.hextra-cards {
|
||||
grid-template-columns: 1fr !important;
|
||||
}
|
||||
}
|
||||
|
||||
/* Enhanced search box styling */
|
||||
.search-input {
|
||||
border-radius: 8px;
|
||||
border: 1px solid #e2e8f0;
|
||||
transition: border-color 0.2s ease, box-shadow 0.2s ease;
|
||||
}
|
||||
|
||||
.search-input:focus {
|
||||
border-color: #0071ff;
|
||||
box-shadow: 0 0 0 3px rgba(0, 113, 255, 0.1);
|
||||
}
|
||||
|
||||
/* Better footer styling */
|
||||
.hextra-custom-footer {
|
||||
border-top: 1px solid #e2e8f0;
|
||||
background: linear-gradient(180deg, transparent 0%, rgba(248, 250, 252, 0.5) 100%);
|
||||
}
|
||||
|
||||
.dark .hextra-custom-footer {
|
||||
border-top-color: #334155;
|
||||
background: linear-gradient(180deg, transparent 0%, rgba(30, 41, 59, 0.5) 100%);
|
||||
}
|
||||
1
static/favicon.svg
Normal file
1
static/favicon.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" width="26" height="26" style="isolation:isolate" viewBox="66.993 897.484 26 26"><defs><linearGradient xlink:href="#a" id="b" x1=".148" x2=".845" y1=".851" y2=".154" gradientTransform="matrix(26.00048 0 0 25.99935 66.993 897.485)" gradientUnits="userSpaceOnUse"/></defs><linearGradient id="a" x1=".148" x2=".845" y1=".851" y2=".154" gradientTransform="matrix(26.301 0 0 26.331 90.674 911.757)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#004ba6" style="stop-color:#0071ff;stop-opacity:1"/><stop offset="1" stop-color="#00bfe1" style="stop-color:#00bfe1;stop-opacity:1"/></linearGradient><path fill="url(#a)" d="m89.318 903.552-2.135 2.122c-.376.337-.558.879-.347 1.337 1.422 2.976.882 6.524-1.452 8.856-2.335 2.331-5.887 2.87-8.866 1.449-.439-.197-.954-.03-1.292.312l-2.17 2.167a1.154 1.154 0 0 0 .208 1.81 13.005 13.005 0 0 0 15.91-1.912 12.97 12.97 0 0 0 1.956-15.887 1.154 1.154 0 0 0-1.812-.254zm-18.467-2.305a12.969 12.969 0 0 0-2.02 15.885 1.154 1.154 0 0 0 1.812.254l2.124-2.11c.385-.336.572-.884.359-1.348-1.423-2.976-.884-6.524 1.451-8.856 2.334-2.332 5.887-2.871 8.866-1.45.434.194.942.033 1.281-.3l2.182-2.18a1.152 1.152 0 0 0-.208-1.81 13.009 13.009 0 0 0-15.893 1.973z" style="fill:url(#b);stroke-width:.987988"/></svg>
|
||||
|
After Width: | Height: | Size: 1.3 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 875 B |
1
static/images/logo.svg
Normal file
1
static/images/logo.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" width="26" height="26" style="isolation:isolate" viewBox="66.993 897.484 26 26"><defs><linearGradient xlink:href="#a" id="b" x1=".148" x2=".845" y1=".851" y2=".154" gradientTransform="matrix(26.00048 0 0 25.99935 66.993 897.485)" gradientUnits="userSpaceOnUse"/></defs><linearGradient id="a" x1=".148" x2=".845" y1=".851" y2=".154" gradientTransform="matrix(26.301 0 0 26.331 90.674 911.757)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#004ba6" style="stop-color:#0071ff;stop-opacity:1"/><stop offset="1" stop-color="#00bfe1" style="stop-color:#00bfe1;stop-opacity:1"/></linearGradient><path fill="url(#a)" d="m89.318 903.552-2.135 2.122c-.376.337-.558.879-.347 1.337 1.422 2.976.882 6.524-1.452 8.856-2.335 2.331-5.887 2.87-8.866 1.449-.439-.197-.954-.03-1.292.312l-2.17 2.167a1.154 1.154 0 0 0 .208 1.81 13.005 13.005 0 0 0 15.91-1.912 12.97 12.97 0 0 0 1.956-15.887 1.154 1.154 0 0 0-1.812-.254zm-18.467-2.305a12.969 12.969 0 0 0-2.02 15.885 1.154 1.154 0 0 0 1.812.254l2.124-2.11c.385-.336.572-.884.359-1.348-1.423-2.976-.884-6.524 1.451-8.856 2.334-2.332 5.887-2.871 8.866-1.45.434.194.942.033 1.281-.3l2.182-2.18a1.152 1.152 0 0 0-.208-1.81 13.009 13.009 0 0 0-15.893 1.973z" style="fill:url(#b);stroke-width:.987988"/></svg>
|
||||
|
After Width: | Height: | Size: 1.3 KiB |
151
static/js/image-zoom.js
Normal file
151
static/js/image-zoom.js
Normal file
@@ -0,0 +1,151 @@
|
||||
// Image zoom functionality
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
// Create modal overlay
|
||||
const modal = document.createElement('div');
|
||||
modal.id = 'image-zoom-modal';
|
||||
modal.style.cssText = `
|
||||
display: none;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: rgba(0, 0, 0, 0.9);
|
||||
z-index: 9999;
|
||||
cursor: pointer;
|
||||
transition: opacity 0.3s ease;
|
||||
`;
|
||||
|
||||
// Create close button
|
||||
const closeBtn = document.createElement('div');
|
||||
closeBtn.innerHTML = '×';
|
||||
closeBtn.style.cssText = `
|
||||
position: absolute;
|
||||
top: 20px;
|
||||
right: 30px;
|
||||
color: white;
|
||||
font-size: 40px;
|
||||
font-weight: bold;
|
||||
cursor: pointer;
|
||||
z-index: 10001;
|
||||
user-select: none;
|
||||
transition: color 0.3s ease;
|
||||
`;
|
||||
closeBtn.onmouseover = () => closeBtn.style.color = '#ccc';
|
||||
closeBtn.onmouseout = () => closeBtn.style.color = 'white';
|
||||
|
||||
// Create image container
|
||||
const imgContainer = document.createElement('div');
|
||||
imgContainer.style.cssText = `
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
padding: 20px;
|
||||
box-sizing: border-box;
|
||||
`;
|
||||
|
||||
// Create zoomed image
|
||||
const zoomedImg = document.createElement('img');
|
||||
zoomedImg.style.cssText = `
|
||||
max-width: 90%;
|
||||
max-height: 90%;
|
||||
object-fit: contain;
|
||||
border-radius: 8px;
|
||||
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
|
||||
transition: transform 0.3s ease;
|
||||
`;
|
||||
|
||||
imgContainer.appendChild(zoomedImg);
|
||||
modal.appendChild(closeBtn);
|
||||
modal.appendChild(imgContainer);
|
||||
document.body.appendChild(modal);
|
||||
|
||||
// Function to show modal
|
||||
function showModal(imgSrc, imgAlt) {
|
||||
zoomedImg.src = imgSrc;
|
||||
zoomedImg.alt = imgAlt || '';
|
||||
modal.style.display = 'block';
|
||||
document.body.style.overflow = 'hidden';
|
||||
|
||||
// Fade in
|
||||
setTimeout(() => {
|
||||
modal.style.opacity = '1';
|
||||
}, 10);
|
||||
}
|
||||
|
||||
// Function to hide modal
|
||||
function hideModal() {
|
||||
modal.style.opacity = '0';
|
||||
setTimeout(() => {
|
||||
modal.style.display = 'none';
|
||||
document.body.style.overflow = '';
|
||||
}, 300);
|
||||
}
|
||||
|
||||
// Close modal when clicking outside image or close button
|
||||
modal.addEventListener('click', function(e) {
|
||||
if (e.target === modal || e.target === imgContainer) {
|
||||
hideModal();
|
||||
}
|
||||
});
|
||||
|
||||
closeBtn.addEventListener('click', hideModal);
|
||||
|
||||
// Close modal with Escape key
|
||||
document.addEventListener('keydown', function(e) {
|
||||
if (e.key === 'Escape' && modal.style.display === 'block') {
|
||||
hideModal();
|
||||
}
|
||||
});
|
||||
|
||||
// Add click handlers to all images in content
|
||||
function addImageZoom() {
|
||||
const contentImages = document.querySelectorAll('.hextra-content img, article img, .content img, main img');
|
||||
|
||||
contentImages.forEach(img => {
|
||||
// Skip if already has zoom functionality
|
||||
if (img.classList.contains('zoom-enabled')) return;
|
||||
|
||||
// Add zoom class and cursor style
|
||||
img.classList.add('zoom-enabled');
|
||||
img.style.cursor = 'zoom-in';
|
||||
img.style.transition = 'transform 0.2s ease, box-shadow 0.2s ease';
|
||||
|
||||
// Add hover effect
|
||||
img.addEventListener('mouseenter', function() {
|
||||
this.style.transform = 'scale(1.02)';
|
||||
this.style.boxShadow = '0 4px 12px rgba(0, 0, 0, 0.15)';
|
||||
});
|
||||
|
||||
img.addEventListener('mouseleave', function() {
|
||||
this.style.transform = 'scale(1)';
|
||||
this.style.boxShadow = 'none';
|
||||
});
|
||||
|
||||
// Add click handler for zoom
|
||||
img.addEventListener('click', function(e) {
|
||||
e.preventDefault();
|
||||
showModal(this.src, this.alt);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
// Initialize zoom for existing images
|
||||
addImageZoom();
|
||||
|
||||
// Re-initialize for dynamically loaded content
|
||||
const observer = new MutationObserver(function(mutations) {
|
||||
mutations.forEach(function(mutation) {
|
||||
if (mutation.addedNodes.length > 0) {
|
||||
addImageZoom();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
observer.observe(document.body, {
|
||||
childList: true,
|
||||
subtree: true
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user