mirror of
https://github.com/h44z/wg-portal.git
synced 2025-10-04 23:46:18 +00:00
add dark/light image to doc
This commit is contained in:
BIN
docs/assets/images/wgportal_dark.png
Normal file
BIN
docs/assets/images/wgportal_dark.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 130 KiB |
BIN
docs/assets/images/wgportal_light.png
Normal file
BIN
docs/assets/images/wgportal_light.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 129 KiB |
@@ -300,6 +300,59 @@
|
|||||||
background: var(--md-accent-fg-color--transparent);
|
background: var(--md-accent-fg-color--transparent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.before,
|
||||||
|
.after {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.after figcaption {
|
||||||
|
background: #fff;
|
||||||
|
font-weight: bold;
|
||||||
|
border: 1px solid #c0c0c0;
|
||||||
|
color: #000000;
|
||||||
|
opacity: 0.9;
|
||||||
|
padding: 9px;
|
||||||
|
position: absolute;
|
||||||
|
top: 100%;
|
||||||
|
transform: translateY(-100%);
|
||||||
|
line-height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.before figcaption {
|
||||||
|
background: #000;
|
||||||
|
font-weight: bold;
|
||||||
|
border: 1px solid #c0c0c0;
|
||||||
|
color: #ffffff;
|
||||||
|
opacity: 0.9;
|
||||||
|
padding: 9px;
|
||||||
|
position: absolute;
|
||||||
|
top: 100%;
|
||||||
|
transform: translateY(-100%);
|
||||||
|
line-height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.before figcaption {
|
||||||
|
left: 0px;
|
||||||
|
}
|
||||||
|
.after figcaption {
|
||||||
|
right: 0px;
|
||||||
|
}
|
||||||
|
.custom-animated-handle {
|
||||||
|
transition: transform 0.2s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.slider-with-animated-handle:hover .custom-animated-handle {
|
||||||
|
transform: scale(1.2);
|
||||||
|
}
|
||||||
|
.md-typeset img-comparison-slider figure {
|
||||||
|
margin: initial;
|
||||||
|
}
|
||||||
|
|
||||||
|
.first-overlay {
|
||||||
|
color: #000;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<!-- Hero for landing page -->
|
<!-- Hero for landing page -->
|
||||||
@@ -326,11 +379,21 @@
|
|||||||
|
|
||||||
<div class="md-container">
|
<div class="md-container">
|
||||||
<div class="tx-hero__image">
|
<div class="tx-hero__image">
|
||||||
<img
|
<div>
|
||||||
src="{{config.site_url}}/assets/images/screenshot.png"
|
<img-comparison-slider hover="hover">
|
||||||
alt=""
|
<figure slot="first" class="before">
|
||||||
draggable="false"
|
<img src="{{config.site_url}}/assets/images/wgportal_light.png" alt="Light Mode"/>
|
||||||
>
|
<figcaption>Light Mode</figcaption>
|
||||||
|
</figure>
|
||||||
|
<figure slot="second" class="after">
|
||||||
|
<img src="{{config.site_url}}/assets/images/wgportal_dark.png" alt="Dark Mode"/>
|
||||||
|
<figcaption>Dark Mode</figcaption>
|
||||||
|
</figure>
|
||||||
|
<svg slot="handle" class="custom-animated-handle" xmlns="http://www.w3.org/2000/svg" width="100" viewBox="-8 -3 16 6">
|
||||||
|
<path stroke="#fff" d="M -5 -2 L -7 0 L -5 2 M -5 -2 L -5 2 M 5 -2 L 7 0 L 5 2 M 5 -2 L 5 2" stroke-width="1" fill="#fff" vector-effect="non-scaling-stroke"></path>
|
||||||
|
</svg>
|
||||||
|
</img-comparison-slider>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@@ -14,4 +14,12 @@
|
|||||||
<meta property="twitter:image" content="{{ page.meta.image }}" />
|
<meta property="twitter:image" content="{{ page.meta.image }}" />
|
||||||
<meta property="twitter:image:alt" content="{{ page.meta.image_alt }}" />
|
<meta property="twitter:image:alt" content="{{ page.meta.image_alt }}" />
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
<script
|
||||||
|
defer
|
||||||
|
src="https://cdn.jsdelivr.net/npm/img-comparison-slider@8/dist/index.js"
|
||||||
|
></script>
|
||||||
|
<link
|
||||||
|
rel="stylesheet"
|
||||||
|
href="https://cdn.jsdelivr.net/npm/img-comparison-slider@8/dist/styles.css"
|
||||||
|
/>
|
||||||
{% endblock %}
|
{% endblock %}
|
Reference in New Issue
Block a user