Skip to content

Commit

Permalink
change logos based on color mode
Browse files Browse the repository at this point in the history
  • Loading branch information
petrapa6 committed Nov 21, 2024
1 parent 091bc40 commit 84e3a8b
Show file tree
Hide file tree
Showing 11 changed files with 58 additions and 7 deletions.
5 changes: 3 additions & 2 deletions docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,13 @@ const config: Config = {

themeConfig: {
// Replace with your project's social card
image: 'img/mrs_logo.png',
image: 'img/mrs_f4f_small_light.png',
navbar: {
title: 'CTU MRS Docs',
logo: {
alt: 'CTU MRS Logo',
src: 'img/mrs_logo.png',
src: 'img/mrs_f4f_small_light.png',
srcDark: 'img/mrs_f4f_small_dark.png', // Dark mode logo
},
items: [
{
Expand Down
17 changes: 17 additions & 0 deletions src/components/ImageByColorMode/ImageByColorMode.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import React from 'react';
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
import { useColorMode } from '@docusaurus/theme-common';

const ImageByColorMode = ({lightModeImage, darkModeImage}) => {
const { colorMode } = useColorMode();

return (
<img
src={colorMode === 'dark' ? darkModeImage : lightModeImage}
alt={colorMode === 'dark' ? darkModeImage : lightModeImage}
style={{ width: '100%', height: 'auto' }}
/>
);
};

export default ImageByColorMode;
18 changes: 18 additions & 0 deletions src/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,21 @@
html[data-theme='dark'] button {
color: #ffffff;
}

/* Main page theme */
.text_image_side_by_side
{
display:flex;
align-items:justify;
}
.text_image_side_by_side img
{
width:60%;
float:right;
}
.text_image_side_by_side p
{
width:135%;
text-align:justify;
float: left;
}
Binary file added src/pages/img/x500_real.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 20 additions & 5 deletions src/pages/index.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,24 @@
![](./logos.png)
import ImageByColorMode from '../components/ImageByColorMode/ImageByColorMode.js';

<ImageByColorMode
lightModeImage="./img/mrs_f4f_large_light.png"
darkModeImage="./img/mrs_f4f_large_dark.png"
/>

# MRS UAV System Documentation

The MRS UAV System is an **open-source software framework** developed by the Multi-Robot Systems Group at Czech Technical University, designed to **support advanced R&D in autonomous UAV systems**, from speed racing and decentralized swarming to GNSS-denied coordination of multi-UAV formations.

Please continue to <Button label="🔗 Documentation" link="/docs/introduction" /> to read more about the system usability and licensing and check out our latest updates in our <Button label="🔗 Blog" link="/blog" />.
<div class="text_image_side_by_side">

<p>
The MRS UAV System is an **open-source software framework** developed by the Multi-Robot Systems Group at Czech Technical University, designed to assist researchers in **advanced R&D in autonomous UAV systems**, from speed racing and decentralized swarming to GNSS-denied coordination of multi-UAV formations.
</p>

![UAV image](img/x500_real.jpg)

</div>

<Button label="📖 Documentation" link="/docs/introduction" /> will give you **context** and show you the **features** of our system.

And don't forget to check out our <Button label="✏️ blog" link="/blog" /> to read about our latest updates.

**Note**: Older versions of the documentation are preserved, however, the versions are not maintained anymore.
**Note on versioning:** Older versions of the documentation are preserved, but not maintained anymore.
Binary file removed src/pages/logos.png
Binary file not shown.
Binary file added static/img/mrs_f4f_large_dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/mrs_f4f_large_light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/mrs_f4f_small_dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/mrs_f4f_small_light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed static/img/mrs_logo.png
Binary file not shown.

0 comments on commit 84e3a8b

Please sign in to comment.