Skip to content

Commit 7fcbb08

Browse files
committed
- Improving demos: removing twitter + better centering
1 parent 2e8b655 commit 7fcbb08

File tree

2 files changed

+16
-15
lines changed

2 files changed

+16
-15
lines changed

examples/backgrounds.html

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,11 @@
4444
* --------------------------------------- */
4545
#section0{
4646
background-image: url(imgs/bg1.jpg);
47-
padding: 30% 0 0 0;
47+
}
48+
#section0 h1{
49+
top: 50%;
50+
transform: translateY(-50%);
51+
position: relative;
4852
}
4953
#section2{
5054
background-image: url(imgs/bg3.jpg);
@@ -59,7 +63,7 @@
5963
}
6064

6165

62-
/*Adding background for the slides
66+
/*Adding background for the slides
6367
* --------------------------------------- */
6468
#slide1{
6569
background-image: url(imgs/bg2.jpg);
@@ -94,7 +98,6 @@
9498
$(document).ready(function() {
9599
$('#fullpage').fullpage({
96100
verticalCentered: false
97-
98101
});
99102
});
100103
</script>
@@ -132,15 +135,11 @@
132135
<option id="methods">Methods</option>
133136
</select>
134137

135-
<a href="https://twitter.com/share" class="twitter-share-button" data-url="http://alvarotrigo.com/fullPage/" data-text="Great plugin to create fullscreen scrolling websites: http://alvarotrigo.com/fullPage/">Tweet</a>
136-
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
137-
138-
139138
<div id="fullpage">
140139
<div class="section " id="section0"><h1>fullPage.js</h1></div>
141140
<div class="section" id="section1">
142-
<div class="slide" id="slide1"><h1>Slide Backgrounds</h1></div>
143-
<div class="slide" id="slide2"><h1>Totally customizable</h1></div>
141+
<div class="slide" id="slide1"><h1>Slide Backgrounds</h1></div>
142+
<div class="slide" id="slide2"><h1>Totally customizable</h1></div>
144143
</div>
145144
<div class="section" id="section2"><h1>Lovely images <br />for a lovely page</h1></div>
146145
<div class="section" id="section3"><h1>One Image = One thousand words</h1></div>

examples/backgroundsFixed.html

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,11 @@
4747
background-image: url(imgs/bg1.jpg);
4848
padding: 30% 0 0 0;
4949
}
50+
#section0 h1{
51+
top: 50%;
52+
transform: translateY(-50%);
53+
position: relative;
54+
}
5055
#section2{
5156
background-image: url(imgs/bg3.jpg);
5257
padding: 6% 0 0 0;
@@ -60,7 +65,7 @@
6065
}
6166

6267

63-
/*Adding background for the slides
68+
/*Adding background for the slides
6469
* --------------------------------------- */
6570
#slide1{
6671
background-image: url(imgs/bg2.jpg);
@@ -137,15 +142,12 @@
137142
<option id="methods">Methods</option>
138143
</select>
139144

140-
<a href="https://twitter.com/share" class="twitter-share-button" data-url="http://alvarotrigo.com/fullPage/" data-text="Great plugin to create fullscreen scrolling websites: http://alvarotrigo.com/fullPage/">Tweet</a>
141-
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
142-
143145

144146
<div id="fullpage">
145147
<div class="section " id="section0"><h1>fullPage.js</h1></div>
146148
<div class="section" id="section1">
147-
<div class="slide" id="slide1"><h1>Slide Backgrounds</h1></div>
148-
<div class="slide" id="slide2"><h1>Totally customizable</h1></div>
149+
<div class="slide" id="slide1"><h1>Slide Backgrounds</h1></div>
150+
<div class="slide" id="slide2"><h1>Totally customizable</h1></div>
149151
</div>
150152
<div class="section" id="section2"><h1>Lovely images <br />for a lovely page</h1></div>
151153
<div class="section" id="section3"><h1>One Image = One thousand words</h1></div>

0 commit comments

Comments
 (0)