Skip to content

Commit a58f7ad

Browse files
committed
WIP: Added image slider template
1 parent a54ad50 commit a58f7ad

File tree

5 files changed

+82
-3
lines changed

5 files changed

+82
-3
lines changed

CHANGELOG

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ Version 2.10.0-alpha - 2017-05-
1111
- added configuration for enable/disable XML sitemap (Thorsten)
1212
- added support for category images (Thorsten)
1313
- added support for categories on startpage (Thorsten)
14+
- added image slider template (Thorsten)
1415
- improved REST/JSON API including login (Thorsten)
1516
- improved sticky records (Thorsten)
1617
- updated bundled Symfony ClassLoader to version 2.7.16 (Thorsten)
@@ -24,6 +25,7 @@ Version 2.10.0-alpha - 2017-05-
2425
- updated bundled HighlightJS to version 8.9.1 (Thorsten)
2526
- updated bundled Mermaid to version 6.0.0 (Thorsten)
2627
- updated bundled jQuery Sparklines to version 2.3.2 (Thorsten)
28+
- updated bundled TinyMCE to version 4.6.3 (Thorsten)
2729
- removed Bower, now using NPM only (Thorsten)
2830

2931
Version 2.9.7 - 2017-04-02

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"jquery": "^3.1.0",
1414
"jquery-sparkline": "^2.3.2",
1515
"mermaid": "^6.0.0",
16-
"tinymce": "^4.4.1",
16+
"tinymce": "^4.6.3",
1717
"typeahead.js": "^0.11.1"
1818
},
1919
"devDependencies": {
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<div class="slider-container">
2+
<div class="menu">
3+
<label for="slide-dot-1"></label>
4+
<label for="slide-dot-2"></label>
5+
<label for="slide-dot-3"></label>
6+
</div>
7+
8+
<input id="slide-dot-1" type="radio" name="slides" checked>
9+
<div class="slide">
10+
IMAGE
11+
</div>
12+
13+
<input id="slide-dot-2" type="radio" name="slides">
14+
<div class="slide">
15+
IMAGE
16+
</div>
17+
18+
<input id="slide-dot-3" type="radio" name="slides">
19+
<div class="slide">
20+
IMAGE
21+
</div>
22+
</div>

phpmyfaq/admin/footer.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,10 @@
142142
user_id: '<?php echo $user->userdata->get('user_id') ?>'
143143
},
144144

145+
templates: [
146+
{ title: 'Slider', description: 'phpMyFAQ Image Slider', url: 'assets/templates/image-slider.html' }
147+
],
148+
145149
// File browser
146150
file_browser_callback: function(fieldName, url, type, win){
147151
var fileBrowser = 'image.browser.php';

phpmyfaq/assets/template/default/less/style.less

Lines changed: 53 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,9 @@
5050
//
5151
// Basic layout definition
5252
//
53-
body {
53+
html, body {
5454
font-size: 16px;
55+
height: 100%;
5556
line-height: 27px;
5657
font-family: @font-family;
5758
color: @text;
@@ -674,7 +675,7 @@ hr {
674675
}
675676

676677
.pmf-faq-body {
677-
margin-top:20px;
678+
margin-top: 20px;
678679
@media @large { padding-right: 30px; }
679680
.pmf-private-notes {
680681
background-color: lighten(@pmf-background, 10%);
@@ -884,3 +885,53 @@ aside.pmf-comments {
884885
// Mermaid CSS
885886
//
886887
@import (less)"../../../../../node_modules/mermaid/dist/mermaid.forest.css";
888+
889+
//
890+
// Slider templates
891+
//
892+
.slider-container{
893+
height: 100%;
894+
width: 100%;
895+
position: relative;
896+
overflow: hidden;
897+
text-align: center;
898+
}
899+
900+
.menu {
901+
position: absolute;
902+
left: 0;
903+
z-index: 900;
904+
width: 100%;
905+
bottom: 0;
906+
}
907+
908+
.menu label {
909+
cursor: pointer;
910+
display: inline-block;
911+
width: 16px;
912+
height: 16px;
913+
background: #fff;
914+
border-radius: 50px;
915+
margin: 0 .2em 1em;
916+
&:hover {
917+
background: red;
918+
}
919+
}
920+
921+
.slide {
922+
width: 100%;
923+
height: 100%;
924+
position: absolute;
925+
top: 0;
926+
left: 100%;
927+
z-index: 10;
928+
background-size: cover;
929+
background-position: 50% 50%;
930+
transition: left 0s .75s;
931+
}
932+
933+
[id^="slide"]:checked + .slide {
934+
left: 0;
935+
z-index: 100;
936+
transition: left .65s ease-out;
937+
}

0 commit comments

Comments
 (0)