Skip to content

Commit f669513

Browse files
committedDec 14, 2018
added a style in index.html
1 parent 6c27aee commit f669513

File tree

7 files changed

+50
-4
lines changed

7 files changed

+50
-4
lines changed
 

‎.env

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ MODE = "dev"
22
DB_NAME = 'replica'
33
DB_USER = 'moringaschoolcom'
44
DB_PASSWORD = 'mids'
5-
DB_HOST = '127.0.0.1'
6-
SECRET_KEY = '1ll$18*&mv-m0k%0167+7)9a%j+@6863q#k9@8v%r2(8mik_=l'
5+
DB_HOST='127.0.0.1'
6+
SECRET_KEY='1ll$18*&mv-m0k%0167+7)9a%j+@6863q#k9@8v%r2(8mik_=l'
77
DEBUG=True
88
ALLOWED_HOSTS='.localhost','.herokuapp.com','.127.0.0.1'
99
DISABLE_COLLECTSTATIC=1

‎.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@ celerybeat-schedule
8484
*.sage.py
8585

8686
# Environments
87-
.env
8887
.venv
8988
env/
9089
venv/

‎Replica/static/js/script.js

+35
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,38 @@ $(document).ready(function(){
1313
});
1414

1515
});
16+
// Wrap every letter in a span
17+
$('.ml11 .letters').each(function(){
18+
$(this).html($(this).text().replace(/([^\x00-\x80]|\w)/g, "<span class='letter'>$&</span>"));
19+
});
20+
21+
anime.timeline({loop: true})
22+
.add({
23+
targets: '.ml11 .line',
24+
scaleY: [0,1],
25+
opacity: [0.5,1],
26+
easing: "easeOutExpo",
27+
duration: 700
28+
})
29+
.add({
30+
targets: '.ml11 .line',
31+
translateX: [0,$(".ml11 .letters").width()],
32+
easing: "easeOutExpo",
33+
duration: 700,
34+
delay: 100
35+
}).add({
36+
targets: '.ml11 .letter',
37+
opacity: [0,1],
38+
easing: "easeOutExpo",
39+
duration: 600,
40+
offset: '-=775',
41+
delay: function(el, i) {
42+
return 34 * (i+1)
43+
}
44+
}).add({
45+
targets: '.ml11',
46+
opacity: 0,
47+
duration: 1000,
48+
easing: "easeOutExpo",
49+
delay: 1000
50+
});

‎Replica/templates/base.html

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
{%load bootstrap4 %}
12
{% load staticfiles %}
23
<!DOCTYPE html>
34
<html>

‎Replica/templates/index.html

+8
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,17 @@
88
alert("Copied the text: " + copyText.value);
99
}
1010
</script>
11+
<script src="https://cdnjs.cloudflare.com/ajax/libs/animejs/2.0.2/anime.min.js"></script>
1112

1213
<div class="container-fluid">
1314
<div class="jumbotron">
15+
<h1 class="ml11">
16+
<span class="text-wrapper">
17+
<span class="line line1"></span>
18+
<span class="letters">welcome to replica</span>
19+
</span>
20+
</h1>
21+
1422
<p style="font-family:sans-serif; font-size: 40px; color: white; justify-content: center;display:flex; position:relative;top:30%;">welcome to replica</p>
1523
<br>
1624
<p style="font-family:sans-serif; font-size: 40px; color: white; justify-content: center;display:flex; position:relative;top:40%;">prepare to be amazed</p>

‎replica/settings.py

+3
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,15 @@
3535

3636
INSTALLED_APPS = [
3737
'Replica',
38+
'bootstrap4',
3839
'django.contrib.admin',
3940
'django.contrib.auth',
4041
'django.contrib.contenttypes',
4142
'django.contrib.sessions',
4243
'django.contrib.messages',
4344
'django.contrib.staticfiles',
45+
46+
4447
]
4548

4649
MIDDLEWARE = [

‎replica/urls.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@
1919

2020
urlpatterns = [
2121
url(r'^admin/', admin.site.urls),
22-
url(r'^',include('Replica.urls')),
22+
url(r'',include('Replica.urls')),
2323

2424
]

0 commit comments

Comments
 (0)
Please sign in to comment.