Jobs_Aggregator/jobs_dashboard/templates/index.html

58 lines
3.0 KiB
HTML
Raw Permalink Normal View History

2024-08-10 07:39:16 +00:00
<!DOCTYPE html>
<html lang="en">
{% load static %}
<head>
<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=Barlow:wght@300;400;500;600;700&display=swap" rel="stylesheet">
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Jobs Aggregator Scraper</title>
<link rel="stylesheet" href="{% static 'styles.css' %}" />
<script src="{% static 'support.js' %}"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
</head>
<body>
<div class="wrapper_main view">
<div class="view_wrapper">
<div class="loader"></div>
<h1>Jobs Scraped</h1>
<button onclick="window.location.href='./search';" class="go_back">Go Back</button>
<form action="" method="post" class="view_form search">
{% csrf_token %}
<label for="my_input"><input type="text" name="my_input" placeholder="Title"></label>
<label for="junior_check"><input type="checkbox" name="junior_check" id="junior_check"><span class="radio_span">Junior</span></label>
<label for="salary_check"><input type="checkbox" name="salary_check" id="salary_check"><span class="radio_span">Salary</span></label>
<button type="submit" class="filter">Filter</button>
</form>
{% if jobs_total|length > 0 %}
<div class="table_wrapper">
<table id="job_table" lang="cs">
<tr lang="en" >
<th onclick="sortTable(0)">Title</th>
<th onclick="sortTable(1)">Salary</th>
<th onclick="sortTable(2)">Company</th>
<th onclick="sortTable(3)">Published</th>
<th>URL</th>
</tr>
{% for job in jobs_total %}
{% if input_text.lower in job.title.lower and junior_check in job.title.lower and salary_check in job.salary %}
<tr>
<td>{{ job.title }}</td>
<td>{{ job.salary }}</td>
<td>{{ job.company }}</td>
<td>{{ job.published_date }}</td>
<td><a href="{{ job.link }}" target="_blank">URL</a></td>
</tr>
{% endif %}
{% endfor %}
</table>
</div>
{% else %}
<h2>No jobs found. Try it again.</h2>
{% endif %}
</div>
</div>
</body>
</html>