Skip to content

Commit

Permalink
Merge pull request #50 from anurag6569201/main
Browse files Browse the repository at this point in the history
updated landing page with cool ui
  • Loading branch information
SiddharthBahuguna authored May 19, 2024
2 parents 2113873 + 7c689fe commit 148fca9
Show file tree
Hide file tree
Showing 12 changed files with 166 additions and 150 deletions.
Binary file modified newsaggregator/core/__pycache__/views.cpython-312.pyc
Binary file not shown.
5 changes: 5 additions & 0 deletions newsaggregator/core/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ def news_list(request):
"object_list": headlines,}
return render(request, "core/index.html", context)

@login_required(login_url='userauths:sign-in')
def index(request):
Headline.objects.all().delete()
session = requests.Session()
Expand Down Expand Up @@ -93,12 +94,14 @@ def index(request):
}
return render(request, "core/index.html", context)

@login_required(login_url='userauths:sign-in')
def about(request):
context={

}
return render(request, "core/about.html", context)

@login_required(login_url='userauths:sign-in')
def contact(request):
today_date = datetime.now().strftime('%Y-%m-%d')
if request.method == "POST":
Expand Down Expand Up @@ -129,12 +132,14 @@ def contact(request):
}
return render(request,"core/contact.html",context)

@login_required(login_url='userauths:sign-in')
def advertise(request):
context={

}
return render(request, "core/advertise.html", context)

@login_required(login_url='userauths:sign-in')
def privacy(request):
context={

Expand Down
Binary file modified newsaggregator/db.sqlite3
Binary file not shown.
Binary file modified newsaggregator/newsaggregator/__pycache__/settings.cpython-312.pyc
Binary file not shown.
11 changes: 5 additions & 6 deletions newsaggregator/static/assets/css/userauth.css
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ body {
}

.container {
height: 100vh;
display: flex;
flex-direction: column;
}
Expand All @@ -42,9 +41,6 @@ body {

.main-content {
margin: 32px auto;
display: flex;
align-items: center;
justify-content: center;
max-width: 935px;
flex-grow: 1;
}
Expand Down Expand Up @@ -131,7 +127,7 @@ body {

.box {
border: 1px solid var(--box-border-color);
background-color: var(--box-bg);
background-color: var(--background-primary);
border-radius: 3px;
}

Expand All @@ -142,6 +138,9 @@ body {

.form-content .logo {
text-align: center;
display: flex;
align-items: center;
justify-content: center;
height: 51px;
width: 175px;
margin: 22px auto 12px;
Expand Down Expand Up @@ -229,7 +228,7 @@ body {
display: inline;
}

.btn-group {
.btn-groupss {
padding: 8px 40px;
}

Expand Down
1 change: 1 addition & 0 deletions newsaggregator/static/assets/images/sign-in-animate.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions newsaggregator/static/assets/images/sign-up-animate.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion newsaggregator/templates/components/navbar.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@
<a href="{% url 'core:contact' %}" class="nav-link">Contact</a>
</li>

<li>{% if not request.user %}
<li>
{% if not request.user.is_authenticated %}
<a href="{% url 'userauths:sign-up' %}" class="nav-link">Sign-in/Sign-up</a>
{% else %}
<a href="{% url 'userauths:sign-out' %}" class="nav-link">Sign-out</a>
Expand Down
7 changes: 7 additions & 0 deletions newsaggregator/templates/partials/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
<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' %}">

<!-- font awesome css -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
Expand All @@ -42,6 +43,11 @@
{% block category %}
{% endblock category %}
{% block index %}

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

{% endblock index %}
</header>
{% include 'components/footer.html' %}
Expand All @@ -53,6 +59,7 @@
<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 -->
Expand Down
26 changes: 20 additions & 6 deletions newsaggregator/templates/partials/base_auth.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,36 @@
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Intern</title>
<!-- favicon -->
<link rel="shortcut icon" href="./images/favicon.png" type="image/png">
<title>Onion News</title>

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

<!-- google cdns -->
<link rel="preconnect" href="https://fonts.gstatic.com">

<!-- apps stylesheets -->
<link rel="stylesheet" href="{% static 'assets/css/userauth.css' %}">

</head>
<body>
{% block content %}
{% block authentication %}

{% endblock content %}
{% endblock authentication %}
<body class="light-theme">

<header>
<div class="navbar-section">
{% include 'components/navbar.html' %}
{% load social_share %}
</div>
{% block category %}
{% endblock category %}
{% block index %}
{% endblock index %}
</header>
{% include 'components/footer.html' %}

</body>
<!-- apps js -->
<script src="{% static 'assets/js/userauth.js' %}"></script>
</body>
Expand Down
106 changes: 50 additions & 56 deletions newsaggregator/templates/userauths/sign-in.html
Original file line number Diff line number Diff line change
@@ -1,69 +1,63 @@
{% extends 'partials/base_auth.html' %}
{% extends 'partials/base.html' %}
{% load static %}

{% block content %}
{% block authentication %}
<div class="container">
<div class="main-container">
<div class="main-content">
<div class="form-container">
<div class="form-content box">
<div class="logo">
<img src="../../static/assets/images/news.png" width="80px" alt="News logo" class="logo-light">
</div>

<form method="POST">
{% csrf_token %}
<div class="signin-form" id="signin-form">
<div class="form-group">
<div class="animate-input">
<span>
Enter email
</span>
<input class="login-signup-input" type="text" name="email" maxlength="100" required="" id="login_username">
</div>
<div class="row">
<div class="col-md-6">
<img src="../../static/assets/images/sign-in-animate.svg" style="width: max-content;">
</div>
<div class="col-md-6" style="display: flex;align-items: center;justify-content: center;">
<div class="form-container">
<div class="form-content box">
<div class="logo">
<img src="../../static/assets/images/news.png" width="80px" alt="News logo" class="logo-light">
<img src="../../static/assets/images/news.png" width="80px" alt="News logo" class="logo-dark">
</div>
<div class="form-group">
<div class="animate-input">
<span>
Enter Password
</span>
<input class="login-signup-input" type="password" name="password" autocomplete="current-password" required="" id="login_password">
<button>Show</button>

<form method="POST">
{% csrf_token %}
<div class="signin-form" id="signin-form">
<div class="form-group">
<div class="animate-input">
<span>
Enter email
</span>
<input class="login-signup-input" type="text" name="email" maxlength="100" required="" id="login_username">
</div>
</div>
<div class="form-group">
<div class="animate-input">
<span>
Enter Password
</span>
<input class="login-signup-input" type="password" name="password" autocomplete="current-password" required="" id="login_password">
<button>Show</button>
</div>
</div>
<div class="btn-groupss">
<button class="btn-login" id="signin-btn" type="submit">
Sign In
</button>
</div>
</div>
</div>
<div class="btn-group">
<button class="btn-login" id="signin-btn" type="submit">
Sign In
</button>
</div>
</form>


</div>
</form>


</div>
<div class="box goto">
<p>
Don't have an account?
<a href="{% url 'userauths:sign-up' %}">Sign up</a>
</p>
<div class="box goto">
<p>
<span style="color: var(--foreground-tertiary);">Don't have an account?</span>
<a href="{% url 'userauths:sign-up' %}">Sign up</a>
</p>
</div>

</div>
</div>

</div>
</div>
</div>
<div class="footer">
<div class="links">
<a href="#">About</a>
<a href="#">Blog</a>
<a href="#">Help</a>
<a href="#">Privacy</a>
<a href="#">Terms</a>
<a href="#">Locations</a>

</div>
<div class="copyright">
© 2024 News from Earth
</div>
</div>
</div>
{% endblock content %}
{% endblock authentication %}
Loading

0 comments on commit 148fca9

Please sign in to comment.