-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
119 lines (101 loc) · 4.81 KB
/
Copy pathindex.html
File metadata and controls
119 lines (101 loc) · 4.81 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
<html>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"> </script>
<link rel="stylesheet" href="https://yui.yahooapis.com/pure/0.6.0/grids-responsive-min.css">
<!--<![endif]-->
<link rel="stylesheet" href="https://netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css">
<link rel="stylesheet" href="https://yui.yahooapis.com/pure/0.6.0/pure-min.css">
<body>
<div class="body">
<nav class="navbar navbar-dark bg-dark">
<!-- Navbar content -->
</nav>
<div class="container">
<p class="quote"><i> one motivational word can
transforms a man to a super hero . </i><br><b> - Keshava </b></p>
</div>
<script>
var quoteOptions = [{
quote: "“You have the right to work,but for the works's sake only.ypu have no right to the fruits of work”",
name: "Bhagavat-Gita"
}, {
quote: "“you are what you Believe in..you become that which you believe you can be”",
name: "Bhagavat-Gita"
}, {
quote: "“Be yourself; everyone else is already taken.”",
name: "Oscar Wilde"
}, {
quote: "“Man is made by his belief.as he believes,so he is”",
name: "Bhagavat-Gita"
}, {
quote: "“Be who you are and say what you feel, because those who mind don't matter, and those who matter don't mind.”",
name: " Bernard M. Baruch"
}, {
quote: "“Now I am become Death,the destroyer of worlds”",
name: "Bhagavat-Gita"
}, {
quote: "“A room without books is like a body without a soul.”",
name: "Marcus Tullius Cicero"
}, {
quote: "“So many books, so little time.”",
name: "Frank Zappa"
}, {
quote: "“one who sees inaction in action,and action in action,is intelligent among men”",
name: "Bhagavat-Gita"
}, {
quote: "“Arise,slay thy enemies,enjoy a prosperous kingdom”",
name: "Bhagavat-Gita"
}, {
quote: "“freedom is not given,it is taken”",
name: "Subash Chandra Bose"
}, {
}, {
quote: "“The spirit is beyond destruction.no one can bring an end to sprit which is everlasting”",
name: "Bhagavat-Gita"
}, {
}, {
quote: "“O son of kunthi,either you will be killed on the battlefeild and attain the heavenly planets,or you will conquer and enjoy the earthly kingdom.Therefore,get up with dtermination and fight”",
name: "Bhagavat-Gita 2.37 "
}, {
}, {
quote: "“There are three gates leading to the hell of self-destruction for the soul-lust,anger,and greed.therefore one should abandon all three”",
name: "Bhagavat-Gita"
}, {
}, ];
function initialize_generate() {
var sweetspot = Math.floor((Math.random() * quoteOptions.length));
for (var i = 0; i <= quoteOptions.length; i++) {
if (i === sweetspot) {
var quoteHtml = generate_html(quoteOptions[i]);
$(".quote").empty().append(quoteHtml);
//console.log("test");
var tweet_code = generate_tweet(quoteOptions[i]);
console.log(tweet_code);
$("#tweet_sect").empty().append(tweet_code); //only include tweet link when button pressed, doesn't make sense for anyone to tweet my placeholder quote that only makes sense within the scope of this app.
}
}
}
function generate_html(quoteObj) {
var quoteHtml = "<i> " + quoteObj["quote"] + " </i> <br> <b> - " + quoteObj["name"] + " </b>";
return quoteHtml
}
function generate_tweet(quoteObj) {
var tweetHtml = '<a href="https://twitter.com/intent/tweet?button_hashtag=Quotes&text=' + quoteObj["quote"] + '%20-%20' + quoteObj["name"] + '"' + 'class="twitter-hashtag-button">Tweet </a> <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\');';
return tweetHtml
}
</script>
<div class="button_cont">
<button onclick="initialize_generate()" class="btn btn-dark">
Get a random quote
</button>
<section id="tweet_sect">
</section>
<p class="p1">Follow us </p>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<a href="https://web.whatsapp.com/" class="fa fa-whatsapp">7569789595</a>
</ul>
<ul>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<a href="https://www.instagram.com/sridattha_06/" class="fa fa-instagram">Instagram</a>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BmbxuPwQa2lc/FVzBcNJ7UAyJxM6wuqIj61tLrc4wSX0szH/Ev+nYRRuWlolflfl" crossorigin="anonymous">
</div>
</div>