mirror of
https://github.com/faisalman/ua-parser-js.git
synced 2025-09-27 16:08:47 +03:00
update animation
This commit is contained in:
parent
0583464041
commit
37b6338322
@ -17,9 +17,6 @@ color: rgba(255, 255, 255, 0.3);
|
|||||||
.hidden.menu {
|
.hidden.menu {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
.masthead.segment {
|
|
||||||
min-height: 300px;
|
|
||||||
}
|
|
||||||
.masthead a h1 {
|
.masthead a h1 {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
@ -42,11 +39,11 @@ color: rgba(255, 255, 255, 0.3);
|
|||||||
}
|
}
|
||||||
.masthead h3 {
|
.masthead h3 {
|
||||||
background-color: black;
|
background-color: black;
|
||||||
padding: 5em 0;
|
padding: 42.5vh 0;
|
||||||
font-size: 5rem;
|
font-size: 5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.masthead .divider {
|
.masthead .ui.horizontal.divider {
|
||||||
padding: 3em;
|
padding: 3em;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
@ -87,7 +84,6 @@ color: rgba(255, 255, 255, 0.3);
|
|||||||
.ui.vertical.stripe .horizontal.divider {
|
.ui.vertical.stripe .horizontal.divider {
|
||||||
margin: 3em 0em;
|
margin: 3em 0em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.quote.stripe.segment {
|
.quote.stripe.segment {
|
||||||
padding: 0em;
|
padding: 0em;
|
||||||
}
|
}
|
||||||
@ -109,20 +105,23 @@ color: rgba(255, 255, 255, 0.3);
|
|||||||
}
|
}
|
||||||
|
|
||||||
@media only screen and (max-width: 700px) {
|
@media only screen and (max-width: 700px) {
|
||||||
.ui.fixed.menu {
|
.ui.fixed.menu {
|
||||||
display: none !important;
|
display: none !important;
|
||||||
}
|
}
|
||||||
.secondary.pointing.menu .item,
|
.secondary.pointing.menu .item,
|
||||||
.secondary.pointing.menu .menu {
|
.secondary.pointing.menu .menu {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
.secondary.pointing.menu .toc.item {
|
.secondary.pointing.menu .toc.item {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
#demo-result > .row > .column,
|
#demo-result > .row > .column,
|
||||||
#showcase .ui.stackable.grid > .row > .column {
|
#showcase .ui.stackable.grid > .row > .column {
|
||||||
width: 33.3% !important;
|
width: 33.3% !important;
|
||||||
}
|
}
|
||||||
|
.masthead h3 {
|
||||||
|
font-size: 2em;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.what-provides {
|
.what-provides {
|
||||||
|
12
index.html
12
index.html
@ -36,14 +36,14 @@
|
|||||||
<div class="pusher">
|
<div class="pusher">
|
||||||
<div class="ui inverted instagram vertical masthead center aligned segment">
|
<div class="ui inverted instagram vertical masthead center aligned segment">
|
||||||
<h3>
|
<h3>
|
||||||
What is my <a href="#ua-txt-info"><span class="ui massive white label">{ device.type }</span></a> ?
|
What is my <a href="#ua-txt-info"><span class="ui black huge label">User-Agent</span></a>
|
||||||
</h3>
|
</h3>
|
||||||
<div class="ui horizontal inverted divider">
|
<div class="ui horizontal inverted divider">
|
||||||
Introducing
|
Introducing
|
||||||
</div>
|
</div>
|
||||||
<div class="ui text container">
|
<div class="ui text container">
|
||||||
<a href="https://uaparser.dev"><h1>UAParser.js</h1></a>
|
<a href="https://uaparser.dev"><h1>UAParser.js</h1></a>
|
||||||
<h2>Abstract Away The Hassle of User-Agent Detection</h2>
|
<h2>Abstracts Away The Hassle of User-Agent Detection</h2>
|
||||||
<div class="ui massive buttons">
|
<div class="ui massive buttons">
|
||||||
<a href="#try" class="ui violet button"><i class="magic icon"></i>Try Demo</a>
|
<a href="#try" class="ui violet button"><i class="magic icon"></i>Try Demo</a>
|
||||||
<a href="https://docs.uaparser.dev" class="ui green button"><i class="book icon"></i>Read Docs</a>
|
<a href="https://docs.uaparser.dev" class="ui green button"><i class="book icon"></i>Read Docs</a>
|
||||||
@ -54,7 +54,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div id="try" class="ui text container">
|
<!--div id="try" class="ui text container">
|
||||||
<div class="ui horizontal divider">
|
<div class="ui horizontal divider">
|
||||||
FEATURED : OUR SPONSORS
|
FEATURED : OUR SPONSORS
|
||||||
</div>
|
</div>
|
||||||
@ -67,7 +67,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div-->
|
||||||
|
|
||||||
|
|
||||||
<div class="ui text container">
|
<div class="ui text container">
|
||||||
@ -83,13 +83,13 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="ui basic segment center aligned">
|
<div class="ui basic segment center aligned">
|
||||||
<p class="what-provides" id="ua-txt-info">
|
<p class="what-provides" id="ua-txt-info">
|
||||||
What your browser provides = 😱😵💫❓
|
What your browser provides = 😱😵💫❌
|
||||||
</p>
|
</p>
|
||||||
<div class="ui horizontal divider">
|
<div class="ui horizontal divider">
|
||||||
VS
|
VS
|
||||||
</div>
|
</div>
|
||||||
<p class="what-provides">
|
<p class="what-provides">
|
||||||
What {UAParser.js} provides = 🙂👍🎉
|
What {UAParser.js} provides = 🙂💰✅
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<pre><code id="ua-result" class="language-json"></code></pre>
|
<pre><code id="ua-result" class="language-json"></code></pre>
|
||||||
|
11
js/script.js
11
js/script.js
@ -6,12 +6,13 @@ $(document)
|
|||||||
$('.masthead h3 .label').transition('fly down', function () {
|
$('.masthead h3 .label').transition('fly down', function () {
|
||||||
$(this).text(labels[counter++]).transition('fade up', 100, function (){
|
$(this).text(labels[counter++]).transition('fade up', 100, function (){
|
||||||
if(counter>=labels.length)counter=0;
|
if(counter>=labels.length)counter=0;
|
||||||
$(this).transition('jiggle');
|
$(this).transition('tada');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
};
|
||||||
|
$('.masthead h3').transition({animation: 'slide up', interval: 9000});
|
||||||
rotateLabel();
|
rotateLabel();
|
||||||
setInterval(rotateLabel, 3000);
|
setInterval(rotateLabel, 1000);
|
||||||
|
|
||||||
var updateDemo = function (result) {
|
var updateDemo = function (result) {
|
||||||
if(!result) return;
|
if(!result) return;
|
||||||
@ -107,8 +108,8 @@ $(document)
|
|||||||
qs = new URLSearchParams(window.location.search).get('ua');
|
qs = new URLSearchParams(window.location.search).get('ua');
|
||||||
}
|
}
|
||||||
if (qs) {
|
if (qs) {
|
||||||
$('#ua-txt-info').text('What the browser provides = 😱😵💫❓');
|
$('#ua-txt-info').text('What the browser provides = 😱😵💫❌');
|
||||||
$('#ua-txt').get(0).scrollIntoView();
|
$('#demo-result').get(0).scrollIntoView();
|
||||||
updateDemo(UAParser(qs));
|
updateDemo(UAParser(qs));
|
||||||
} else {
|
} else {
|
||||||
UAParser().withClientHints().then(function(result) {
|
UAParser().withClientHints().then(function(result) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user