Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0aefa11

Browse files
author
Svetlana Linuxenko
committed
Better page preloading
1 parent 3cf72aa commit 0aefa11

File tree

2 files changed

+28
-1
lines changed

2 files changed

+28
-1
lines changed

css/home.css

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
.page-loading > * {
2+
display: none;
3+
}
4+
5+
body > .progress {
6+
display: none;
7+
}
8+
9+
.page-loading > .progress {
10+
display: block;
11+
margin: 0;
12+
}
13+
114
div.header > nav {
215
background: #262A36;
316
box-shadow: inset 0 -10px 10px 0 rgba(0,0,0,0.05);
@@ -635,3 +648,8 @@ li.li-logo > a.brand-logo {
635648
font-size: 4rem;
636649
height: 5rem;
637650
}
651+
652+
653+
img {
654+
width: auto;
655+
}

index.html

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,18 @@
2020
<meta name="theme-color" content="#262A36">
2121
<link href="//cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" >
2222
<link rel="stylesheet" media="screen,projection" href="//cdnjs.cloudflare.com/ajax/libs/materialize/0.99.0/css/materialize.min.css" >
23+
<style>
24+
img {
25+
width: 0px;
26+
}
27+
</style>
2328
<link rel="stylesheet" media="screen,projection" href="/css/home.css" >
2429
<title>Svetlana Linuxenko</title>
2530
</head>
26-
<body>
31+
<body class="page-loading">
32+
<div class="progress grey">
33+
<div class="indeterminate blue"></div>
34+
</div>
2735
<div class="header">
2836
<nav role="navigation">
2937
<div class="nav-wrapper container grey-text text-lighten-5">
@@ -179,6 +187,7 @@ <h5 class="white-text">Links</h5>
179187
onOpen: function(el) { el.addClass('side-opened'); },
180188
onClose: function(el) { el.removeClass('side-opened'); }
181189
});
190+
$('body').removeClass('page-loading');
182191
});
183192
</script>
184193
</body>

0 commit comments

Comments
 (0)