Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add dropdown for donation #845

Open
wants to merge 1 commit into
base: gh-pages
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
77 changes: 49 additions & 28 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,42 +17,58 @@
<meta name="twitter:description" content="FOSSASIA Open Tech Organization - Developing Open Source, Open Hardware and Open Knowledge Tools with Asia's Premier Open Technology Community">
<meta name="twitter:creator" content="@fossasia">
<meta name="twitter:image" content="https://fossasia.org/img/fossasia.png">
<link rel=icon href="fossasia.ico">

<link href="css/bootstrap.min.css" rel="stylesheet" type="text/css" media="all"/>
<link href="css/flexslider.css" rel="stylesheet" type="text/css" media="all"/>
<link href="css/elegant-icons.min.css" rel="stylesheet" type="text/css" media="all"/>
<link href="css/font-awesome.min.css" rel="stylesheet" type="text/css" media="all"/>
<link href="css/pe-icon-7-stroke.min.css" rel="stylesheet" type="text/css" media="all"/>
<link href="css/lightbox.min.css" rel="stylesheet" type="text/css" media="all"/>
<link href="css/theme-lava.css" rel="stylesheet" type="text/css" media="all"/>
<link href="css/custom.css" rel="stylesheet" type="text/css" media="all"/>
<link href="css/custom-blog.css" rel="stylesheet" type="text/css" media="all"/>
<link href="css/bootstrap-theme.min.css" rel="stylesheet" type="text/css" media="all"/>
<link href='https://fonts.googleapis.com/css?family=Open+Sans:400,600,300' rel='stylesheet' type='text/css'>
<link rel=icon href="fossasia.ico">

<link href="css/bootstrap.min.css" rel="stylesheet" type="text/css" media="all"/>
<link href="css/flexslider.css" rel="stylesheet" type="text/css" media="all"/>
<link href="css/elegant-icons.min.css" rel="stylesheet" type="text/css" media="all"/>
<link href="css/font-awesome.min.css" rel="stylesheet" type="text/css" media="all"/>
<link href="css/pe-icon-7-stroke.min.css" rel="stylesheet" type="text/css" media="all"/>
<link href="css/lightbox.min.css" rel="stylesheet" type="text/css" media="all"/>
<link href="css/theme-lava.css" rel="stylesheet" type="text/css" media="all"/>
<link href="css/custom.css" rel="stylesheet" type="text/css" media="all"/>
<link href="css/custom-blog.css" rel="stylesheet" type="text/css" media="all"/>
<link href="css/bootstrap-theme.min.css" rel="stylesheet" type="text/css" media="all"/>
<link href='https://fonts.googleapis.com/css?family=Open+Sans:400,600,300' rel='stylesheet' type='text/css'>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-17146009-5', 'auto');
ga('send', 'pageview');
</script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-17146009-5', 'auto');
ga('send', 'pageview');
</script>
</head>

<body class="no-loader">
<body>
<div class="modal fade" style="width: 100%;" id="myModal" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog modal-xl">
<div class="modal-content">
<div class="modal-header">
<strong class="modal-title" id="exampleModalLabel">We ask you, humbly, to help.</>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<p>
Lorem ipsum dolor sit, amet consectetur adipisicing elit. Hic sint perferendis nam, error iusto id porro tempore quia numquam nesciunt, commodi vero non vitae facilis, velit nulla quisquam sequi optio.
</p>
<a class="btn btn-sm btn-dark" rel="noopener noreferrer" target="_blank" href="http://fossasia.org/donate/" role="button">Donate</a>
</div>
</div>
</div>
</div>

<div class="loader">
<!-- <div class="loader">
<div class="strip-holder">
<div class="strip-1"></div>
<div class="strip-2"></div>
<div class="strip-3"></div>
</div>
</div>

</div> -->
<a id="top"></a>
<div class="nav-container">

<div class="nav-container">
<nav class="overlay-nav">
<div class="container">
<div class="row">
Expand Down Expand Up @@ -1651,7 +1667,8 @@ <h1>Friends and Partners</h1>
</a>
</footer>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js" ></script>
</body>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js" ></script>
<script src="js/feednami.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/skrollr.min.js"></script>
Expand All @@ -1665,5 +1682,9 @@ <h1>Friends and Partners</h1>
<script src="js/scripts.js"></script>
<script src="js/tweets.js"></script>
<script src="js/blog.js"></script>
</body>
<script>
$(document).ready(function() {
$('#myModal').modal('show');
})
</script>
</html>
82 changes: 35 additions & 47 deletions js/blog.js
Original file line number Diff line number Diff line change
@@ -1,51 +1,39 @@
$(document).ready(function() {

var url = 'https://blog.fossasia.org/feed/?format=xml';
feeds(url);
});
$(document).ready(function () {
var url = "https://blog.fossasia.org/feed/?format=xml";
feeds(url);
});

function feeds(url) {
var blog = $("#result");
var html = [];
feednami.load(url, function (result) {
if (result.error) {
console.log(result.error);
} else {
var entries = result.feed.entries;
html = [];
for (var x = 0; x < 10; x++) {
var count = 0;
var text = entries[x];

function feeds(url){
var blog = $("#result");
var html = [];
feednami.load(url,function(result){
if(result.error) {
console.log(result.error);
var title = text.title;
if (x === 0) {
html.push("<div class='item active'><h1>" + title + "</h1>");
} else {

var entries = result.feed.entries;
html=[];
for( var x=0 ; x< 10; x++){

var count =0;
var text = entries[x];

var title = text.title;
if(x===0){
html.push("<div class='item active'><h1>"+title+"</h1>");
}
else{
html.push("<div class='item' ><h1 class='blogtitle'>"+title+"</h1>");
}
var author = text.author ;
html.push("<h1>By - "+(author)+"</h1>");

var link = text.guid ;
var date = new Date(text.date);
summary = text.summary
html.push("<hr><p class ='summary'>"+summary + "<p>");
html.push("<span class='date'> Posted On - "+(date)+"</span></div>");



}
blog.html(html.join(""));




}

});

html.push(
"<div class='item' ><h1 class='blogtitle'>" + title + "</h1>"
);
}
var author = text.author;
html.push("<h1>By - " + author + "</h1>");

var link = text.guid;
var date = new Date(text.date);
summary = text.summary;
html.push("<hr><p class ='summary'>" + summary + "<p>");
html.push("<span class='date'> Posted On - " + date + "</span></div>");
}
blog.html(html.join(""));
}
});
}
68 changes: 32 additions & 36 deletions js/navbar.js
Original file line number Diff line number Diff line change
@@ -1,46 +1,42 @@
/**
* Created by championswimmer on 27/08/16.
*/
$(function() {
$('.nav.navbar-nav > li a').removeClass('active');
var linkUrl=window.location.href.split("/");
if(findMatch(linkUrl, "tracks.html")){
$("#trackslink").addClass('active');
}
else if(findMatch(linkUrl, "rooms.html")){
$("#roomslink").addClass('active');
}
else if(findMatch(linkUrl, "schedule.html")){
$("#schedulelink").addClass('active');
}
else if(findMatch(linkUrl, "speakers.html")){
$("#speakerslink").addClass('active');
}
else if(findMatch(linkUrl, "sessions.html")){
$("#sessionslink").addClass('active');
}
else {
$("#homelink").addClass('active');
}
$(function () {
$(".nav.navbar-nav > li a").removeClass("active");
var linkUrl = window.location.href.split("/");
if (findMatch(linkUrl, "tracks.html")) {
$("#trackslink").addClass("active");
} else if (findMatch(linkUrl, "rooms.html")) {
$("#roomslink").addClass("active");
} else if (findMatch(linkUrl, "schedule.html")) {
$("#schedulelink").addClass("active");
} else if (findMatch(linkUrl, "speakers.html")) {
$("#speakerslink").addClass("active");
} else if (findMatch(linkUrl, "sessions.html")) {
$("#sessionslink").addClass("active");
} else {
$("#homelink").addClass("active");
}
});

//The function below checks whether any of the entries of the array match against the
//given pattern or not.

function findMatch(arr, pattern){
// len stores the no. of elements checked so far and flag tells whether we found any
// pattern or not.
var len = 0, flag = 0;
arr.forEach(function(val){
len += 1;
if(val.indexOf(pattern) !== -1){
flag = 1;
}
});

// the check below makes sure that the function doesn't return any value before all
// of the entries of the array are checked against the pattern.
if(len === arr.length){
return flag;
function findMatch(arr, pattern) {
// len stores the no. of elements checked so far and flag tells whether we found any
// pattern or not.
var len = 0,
flag = 0;
arr.forEach(function (val) {
len += 1;
if (val.indexOf(pattern) !== -1) {
flag = 1;
}
});

// the check below makes sure that the function doesn't return any value before all
// of the entries of the array are checked against the pattern.
if (len === arr.length) {
return flag;
}
}
Loading