Skip to content

Commit

Permalink
Changes made
Browse files Browse the repository at this point in the history
  • Loading branch information
Varsha010101 committed Jun 4, 2024
2 parents 03e1294 + a5b4171 commit acd90c3
Show file tree
Hide file tree
Showing 6 changed files with 161 additions and 25 deletions.
Binary file modified newsaggregator/core/__pycache__/urls.cpython-312.pyc
Binary file not shown.
Binary file modified newsaggregator/core/__pycache__/views.cpython-312.pyc
Binary file not shown.
101 changes: 101 additions & 0 deletions newsaggregator/static/assets/css/preloader.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
/* Preloader CSS */
#preloader {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: #ffffff;
display: flex;
justify-content: center;
align-items: center;
z-index: 9999;
}

#preloader .container {
background-color: #0095f6;
height: 200px;
width: 200px;
display: flex;
justify-content: center;
align-items: center;
box-shadow: inset 0 0 0 0.25rem #b4b1b1;
flex-direction: column;
animation: spin 5s ease-in-out infinite;
border-radius: 50%;
}

#preloader .cup {
background-color: #b6d5ea;
height: 30%;
width: 30%;
border-radius: 50% 50% 0 0 / 100% 100% 0 0;
overflow: hidden;
}

#preloader .top {
transform: rotate(180deg);
}

#preloader .sand {
background-color: #e9a410;
height: 150%;
width: 150%;
transform-origin: 0% 0%;
animation: sandFall 5s linear infinite -2.5s;
}

#preloader .bottom {
animation-delay: 0s;
}

@keyframes spin {
0% {
transform: rotate(0deg);
}

25%,
50% {
transform: rotate(180deg);
}

75% {
transform: rotate(360deg);
}

100% {
transform: rotate(360deg);
}
}

@keyframes sandFall {
0%, 100% {
border-radius: 5%;
transform: translate(35%, 20%) rotate(45deg);
}
15% {
border-radius: 40%;
transform: translate(0%, 35%) rotate(-65deg) scale(1.5, 1.5);
}
25% {
border-radius: 20%;
transform: translate(-15%, 35%) rotate(-90deg) scale(1.2, 1.2);
}
50% {
border-radius: 5%;
transform: translate(0%, 0%) rotate(-90deg) scale(1.1);
opacity: 1;
}
50.01%, 64.99% {
opacity: 0;
}
65% {
border-radius: 35%;
transform: translate(20%, 50%) rotate(30deg);
opacity: 1;
}
75% {
border-radius: 10%;
transform: translate(35%, 40%) rotate(45deg);
}
}
10 changes: 10 additions & 0 deletions newsaggregator/static/assets/js/preloader.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
window.addEventListener('load', function() {
const preloader = document.getElementById('preloader');
const mainContent = document.querySelector('.outer-align');

// Add a delay before hiding the preloader
setTimeout(() => {
preloader.style.display = 'none';
mainContent.style.display = 'flex';
}, 2000); // Adjust the delay time (in milliseconds) as needed
});
10 changes: 8 additions & 2 deletions newsaggregator/templates/components/news.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,9 @@
</div>
<div class="">
<div class="btns" role="group">
<a href="https://www.instagram.com/share?url={{ record.url }}" target="_blank"
class="social-icon fa fa-instagram" aria-label="Share on Instagram"></a>
<!-- <a href="https://www.instagram.com/share?url={{ record.url }}" target="_blank"
class="social-icon fa fa-instagram" aria-label="Share on Instagram"></a> -->
<a class="btn btn-secondary social-icon fa fa-instagram" aria-label="Share on Instagram" onclick="shareOnInstagram('{{ record.url }}')"></a>
<a href="https://api.whatsapp.com/send?text=Check%20out%20this%20link:%20{{ record.url }}"
target="_blank" class="social-icon fa fa-whatsapp"
aria-label="Share on WhatsApp"></a>
Expand Down Expand Up @@ -343,6 +344,11 @@ <h5 class="modal-title" id="reportModalLabel">Report Content</h5>
button.classList.add('btn-danger');
}
}

function shareOnInstagram(url) {
copyToClipboard(url);
window.location.href = "instagram://";
}
});
</script>

65 changes: 42 additions & 23 deletions newsaggregator/templates/partials/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,30 @@
<html lang="en">

<head>

<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Onion News</title>

<!--- favicon-->
<link rel="shortcut icon" href="{% static './assets/images/news.png' %}" type="image/x-icon">

<!-- bootstrap css -->
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" crossorigin="anonymous">

<!--- custom css link-->
<link rel="stylesheet" href="{% static './assets/css/contact.css' %}">
<link rel="stylesheet" href="{% static './assets/css/style.css' %}">
<link rel="stylesheet" href="{% static './assets/css/index.css' %}">
<link rel="stylesheet" href="{% static 'assets/css/userauth.css' %}">

<link rel="stylesheet" href="{% static 'assets/css/preloader.css' %}">

<!-- font awesome css -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">

<!--- google font link-->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@200;300;400;500;600;700;800;900&display=swap"
rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@200;300;400;500;600;700;800;900&display=swap" rel="stylesheet">

<!-- toaster css -->
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/css/toastr.min.css">
Expand All @@ -36,7 +35,19 @@

<body class="light-theme">

<div class="outer-align" style="display: flex;flex-direction: column;justify-content: space-between;min-height: 100vh;">
<!-- Preloader -->
<div id="preloader">
<div class="container">
<div class="cup top">
<div class="sand"></div>
</div>
<div class="cup">
<div class="sand bottom"></div>
</div>
</div>
</div>

<div class="outer-align" style="display: none; flex-direction: column; justify-content: space-between; min-height: 100vh;">
<header>
<div class="navbar-section">
{% include 'components/navbar.html' %}
Expand All @@ -46,15 +57,20 @@
{% endblock category %}

{% block index %}

<!-- for authentication page -->
{% block authentication %}
{% endblock authentication %}

{% endblock index %}
</header>
<div class="chat">
<script src="https://cdn.botpress.cloud/webchat/v1/inject.js"></script>
<script src="https://mediafiles.botpress.cloud/6ce5b4e8-0a4b-4b34-9569-6d06fc3c8a1b/webchat/config.js" defer></script>
</div>
{% include 'components/footer.html' %}
</div>

<script>
// Apply the saved theme class as soon as the body is available
const savedTheme = localStorage.getItem('theme') || 'light-theme';
Expand Down Expand Up @@ -92,23 +108,26 @@
});
}
</script>
<script src="{% static 'assets/js/preloader.js' %}"></script>
</body>

<!--- ionicon link-->
<script type="module" src="https://unpkg.com/[email protected]/dist/ionicons/ionicons.esm.js"></script>
<script nomodule src="https://unpkg.com/[email protected]/dist/ionicons/ionicons.js"></script>

<!--- custom js link-->
<script src="{% static 'assets/js/userauth.js' %}"></script>
<script src="{% static 'assets/js/script.js' %}"></script>
<!--- ionicon link-->
<script type="module" src="https://unpkg.com/[email protected]/dist/ionicons/ionicons.esm.js"></script>
<script nomodule src="https://unpkg.com/[email protected]/dist/ionicons/ionicons.js"></script>

<!--- custom js link-->
<script src="{% static 'assets/js/userauth.js' %}"></script>
<script src="{% static 'assets/js/script.js' %}"></script>

<!-- Bootstrap JS -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/2.11.6/umd/popper.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.0/js/bootstrap.min.js"></script>

<!-- Bootstrap JS -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/2.11.6/umd/popper.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.0/js/bootstrap.min.js"></script>
<!-- toaster js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/js/toastr.min.js"></script>

<!-- toaster js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/js/toastr.min.js"></script>

</html>
</html>

0 comments on commit acd90c3

Please sign in to comment.