mirror of
https://github.com/FreshRSS/FreshRSS.git
synced 2026-03-03 14:07:04 -05:00
Merge pull request #708 from FreshRSS/theme-selector
Theme selection redesign
This commit is contained in:
@@ -21,17 +21,31 @@
|
||||
<div class="form-group">
|
||||
<label class="group-name" for="theme"><?php echo _t('theme'); ?></label>
|
||||
<div class="group-controls">
|
||||
<select name="theme" id="theme" required=""><?php
|
||||
$found = false;
|
||||
foreach ($this->themes as $theme) {
|
||||
?><option value="<?php echo $theme['id']; ?>"<?php if (FreshRSS_Context::$conf->theme === $theme['id']) { echo ' selected="selected"'; $found = true; } ?>><?php
|
||||
echo $theme['name'] . ' — ' . _t('by') . ' ' . $theme['author'];
|
||||
?></option><?php
|
||||
}
|
||||
if (!$found) {
|
||||
?><option selected="selected"></option><?php
|
||||
}
|
||||
?></select>
|
||||
<ul class="slides">
|
||||
<?php $slides = count($this->themes); $i = 1; ?>
|
||||
<?php foreach($this->themes as $theme) { ?>
|
||||
<input type="radio" name="theme" id="img-<?php echo $i ?>" <?php if (FreshRSS_Context::$conf->theme === $theme['id']) {echo "checked";}?> value="<?php echo $theme['id'] ?>"/>
|
||||
<li class="slide-container">
|
||||
<div class="slide">
|
||||
<img src="<?php echo Minz_Url::display('/themes/' . $theme['id'] . '/thumbs/original.png')?>"/>
|
||||
</div>
|
||||
<div class="nav">
|
||||
<?php if ($i !== 1) {?>
|
||||
<label for="img-<?php echo $i - 1 ?>" class="prev">‹</label>
|
||||
<?php } ?>
|
||||
<?php if ($i !== $slides) {?>
|
||||
<label for="img-<?php echo $i + 1 ?>" class="next">›</label>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<div class="properties">
|
||||
<div><?php echo sprintf('%s - %s %s', $theme['name'], _t('by'), $theme['author']) ?></div>
|
||||
<div><?php echo $theme['description'] ?></div>
|
||||
<div class="page-number"><?php echo sprintf('%d/%d', $i, $slides) ?></div>
|
||||
</div>
|
||||
</li>
|
||||
<?php $i++ ?>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
BIN
p/themes/Dark/thumbs/original.png
Normal file
BIN
p/themes/Dark/thumbs/original.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 121 KiB |
BIN
p/themes/Flat/thumbs/original.png
Normal file
BIN
p/themes/Flat/thumbs/original.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 130 KiB |
BIN
p/themes/Origine/thumbs/original.png
Normal file
BIN
p/themes/Origine/thumbs/original.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 133 KiB |
BIN
p/themes/Pafat/thumbs/original.png
Normal file
BIN
p/themes/Pafat/thumbs/original.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 126 KiB |
BIN
p/themes/Screwdriver/thumbs/original.png
Normal file
BIN
p/themes/Screwdriver/thumbs/original.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 130 KiB |
@@ -683,6 +683,95 @@ br + br + br {
|
||||
left: 0;
|
||||
}
|
||||
|
||||
/*=== SLIDESHOW */
|
||||
/*==============*/
|
||||
.slides {
|
||||
padding: 0;
|
||||
height: 320px;
|
||||
display: block;
|
||||
position: relative;
|
||||
min-width: 260px;
|
||||
max-width: 640px;
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
.slides * {
|
||||
user-select: none;
|
||||
-ms-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-khtml-user-select: none;
|
||||
-webkit-user-select: none;
|
||||
-webkit-touch-callout: none;
|
||||
}
|
||||
.slides input {
|
||||
display: none;
|
||||
}
|
||||
.slide-container {
|
||||
display: block;
|
||||
}
|
||||
.slide {
|
||||
top: 0;
|
||||
opacity: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: block;
|
||||
position: absolute;
|
||||
transform: scale(0);
|
||||
transition: all .7s ease-in-out;
|
||||
}
|
||||
.slide img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.nav label {
|
||||
width: 10%;
|
||||
height: 100%;
|
||||
display: none;
|
||||
position: absolute;
|
||||
opacity: 0;
|
||||
z-index: 9;
|
||||
cursor: pointer;
|
||||
transition: opacity .2s;
|
||||
color: #FFF;
|
||||
font-size: 1000%;
|
||||
text-align: center;
|
||||
line-height: 225%;
|
||||
font-family: "Varela Round", sans-serif;
|
||||
background-color: rgba(255, 255, 255, .3);
|
||||
text-shadow: 0px 0px 15px rgb(119, 119, 119);
|
||||
padding: 0;
|
||||
}
|
||||
.properties {
|
||||
bottom: -35px;
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
display: none;
|
||||
}
|
||||
.properties .page-number {
|
||||
right: 0;
|
||||
top: 0;
|
||||
position: absolute;
|
||||
}
|
||||
.slide:hover + .nav label {
|
||||
opacity: 0.5;
|
||||
}
|
||||
.nav label:hover {
|
||||
opacity: 1;
|
||||
}
|
||||
.nav .next {
|
||||
right: 0;
|
||||
}
|
||||
input:checked + .slide-container .slide {
|
||||
opacity: 1;
|
||||
transform: scale(1);
|
||||
transition: opacity 1s ease-in-out;
|
||||
}
|
||||
input:checked + .slide-container .nav label {
|
||||
display: block;
|
||||
}
|
||||
input:checked + .slide-container .properties {
|
||||
display: block;
|
||||
}
|
||||
|
||||
/*=== DIVERS */
|
||||
/*===========*/
|
||||
.category .title:not([data-unread="0"]):after {
|
||||
|
||||
Reference in New Issue
Block a user