Skip to content

Commit

Permalink
feat: use grid view with two cards per row
Browse files Browse the repository at this point in the history
(cherry picked from commit b361995)
  • Loading branch information
krantheman authored and mergify[bot] committed Dec 12, 2023
1 parent a1f15b9 commit deb0322
Show file tree
Hide file tree
Showing 2 changed files with 99 additions and 75 deletions.
5 changes: 5 additions & 0 deletions hrms/www/jobs/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ h3.jobs-page {
font-size: 1.7rem;
}

h4.jobs-page {
font-size: 1.35rem;
}


.text-18 {
font-size: 18px;
}
Expand Down
169 changes: 94 additions & 75 deletions hrms/www/jobs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -100,89 +100,108 @@ <h3 class="mt-0 mb-10 jobs-page">{{ _("Job Openings") }}</h3>
{{ _("Showing " + job_openings|length|string + (" result" if
job_openings|length == 1 else " results") ) }}
</p>
{% for jo in job_openings %}
<div name="card" id="{{ jo.route }}" class="mb-8 card border" role="button">
<div class="p-6">
<div class="flex mb-5">
<div>
<h4 class="mt-0 mb-1 mr-20">{{ jo.job_title }}</h4>
<div class="row">
{% for jo in job_openings %}
<div name="card" id="{{ jo.route }}" class="mb-8 col-6" role="button">
<div class="card border">
<div class="p-6">
<div class="flex mb-5">
<div class="col-9 px-0">
<h4 class="mt-0 mb-1 jobs-page text-truncate">
{{ jo.job_title }}
</h4>
<div class="text-14">
<span class="font-weight-bold">{{ jo.company }}</span>
<span class="text-secondary"
>{{ " · " }} {{ jo.posted_on }}</span
>
</div>
</div>
<div class="col-3 px-0 flex">
<div class="ml-auto font-weight-bold text-nowrap text-12">
{%- if jo.employment_type -%} {%- if jo.employment_type ==
"Full-time" -%}
<div class="py-1 px-2 full-time-badge">
• {{ jo.employment_type }}
</div>
{%- elif jo.employment_type == "Part-time" -%}
<div class="py-1 px-2 part-time-badge">
• {{ jo.employment_type }}
</div>
{%- else -%}
<div class="py-1 px-2 other-badge">
• {{ jo.employment_type }}
</div>
{% endif %} {% endif %}
</div>
</div>
</div>
<div class="text-14">
<span class="font-weight-bold">{{ jo.company }}</span>
<span class="text-secondary">{{ " · " }} {{ jo.posted_on }}</span>
{%- if jo.location -%}
<div class="mt-3 flex align-items-center">
<svg
class="icon ml-0 mr-1"
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 16 16"
>
<g stroke="var(--gray-700)" stroke-miterlimit="10">
<path
d="M11.467 3.458c1.958 1.957 1.958 5.088.027 7.02L7.97 14l-3.523-3.523a4.945 4.945 0 010-6.993l.026-.026a4.922 4.922 0 016.993 0zm0 0c-.026-.026-.026-.026 0 0z"
></path>
<path
d="M7.971 8.259a1.305 1.305 0 100-2.61 1.305 1.305 0 000 2.61z"
></path>
</g>
</svg>
{{ jo.location }}
</div>
{% endif %} {%- if jo.department -%}
<div class="mt-3 flex align-items-center">
<svg
class="icon ml-0 mr-1"
style="--icon-stroke: var(--gray-700)"
>
<use href="#icon-branch"></use>
</svg>
{{ jo.department }}
</div>
{% endif %} {%- if jo.publish_salary_range -%}
<div class="mt-3 flex align-items-center">
<svg
class="icon ml-0 mr-1"
style="--icon-stroke: var(--gray-700)"
>
<use href="#icon-income"></use>
</svg>
{{ " " }} {%- if jo.lower_range -%}{{
frappe.format_value(frappe.utils.flt(jo.lower_range) ,
currency=jo.currency) }}{% endif %} {%- if jo.lower_range and
jo.upper_range -%}{{ " - " }}{% endif %} {%- if jo.upper_range
-%}{{ frappe.format_value(frappe.utils.flt(jo.upper_range) ,
currency=jo.currency) }}{% endif %} / {{ jo.salary_per.lower()
}}
</div>
{% endif %}
</div>
</div>
<div class="ml-auto font-weight-bold text-nowrap text-12">
{%- if jo.employment_type -%} {%- if jo.employment_type ==
"Full-time" -%}
<div class="py-1 px-2 full-time-badge">
• {{ jo.employment_type }}
<div class="px-4 py-2 job-card-footer">
<div class="row text-12 text-secondary">
<p class="col-6 text-center border-right mb-0">
{{ _("Applications received: ") }}
<b>{{ jo.no_of_applications }}</b>
</p>
<p class="col-6 text-center mb-0">
{%- if jo.closes_on -%}{{ _("Closes on: ") }}<b
>{{ frappe.format_date(jo.closes_on, "d MMM, YYYY") }}</b
>
{% endif %}
</p>
</div>
{%- elif jo.employment_type == "Part-time" -%}
<div class="py-1 px-2 part-time-badge">
• {{ jo.employment_type }}
</div>
{%- else -%}
<div class="py-1 px-2 other-badge">• {{ jo.employment_type }}</div>
{% endif %} {% endif %}
</div>
</div>
<div class="text-14">
{%- if jo.location -%}
<div class="mt-3 flex align-items-center">
<svg
class="icon ml-0 mr-1"
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 16 16"
>
<g stroke="var(--gray-700)" stroke-miterlimit="10">
<path
d="M11.467 3.458c1.958 1.957 1.958 5.088.027 7.02L7.97 14l-3.523-3.523a4.945 4.945 0 010-6.993l.026-.026a4.922 4.922 0 016.993 0zm0 0c-.026-.026-.026-.026 0 0z"
></path>
<path
d="M7.971 8.259a1.305 1.305 0 100-2.61 1.305 1.305 0 000 2.61z"
></path>
</g>
</svg>
{{ jo.location }}
</div>
{% endif %} {%- if jo.department -%}
<div class="mt-3 flex align-items-center">
<svg class="icon ml-0 mr-1" style="--icon-stroke: var(--gray-700)">
<use href="#icon-branch"></use>
</svg>
{{ jo.department }}
</div>
{% endif %} {%- if jo.publish_salary_range -%}
<div class="mt-3 flex align-items-center">
<svg class="icon ml-0 mr-1" style="--icon-stroke: var(--gray-700)">
<use href="#icon-income"></use>
</svg>
{{ " " }} {%- if jo.lower_range -%}{{
frappe.format_value(frappe.utils.flt(jo.lower_range) ,
currency=jo.currency) }}{% endif %} {%- if jo.lower_range and
jo.upper_range -%}{{ " - " }}{% endif %} {%- if jo.upper_range -%}{{
frappe.format_value(frappe.utils.flt(jo.upper_range) ,
currency=jo.currency) }}{% endif %} / {{ jo.salary_per.lower() }}
</div>
{% endif %}
</div>
</div>
<div class="px-4 py-2 job-card-footer">
<div class="row text-12 text-secondary">
<p class="col-6 text-center border-right mb-0">
{{ _("Applications received: ") }}
<b>{{ jo.no_of_applications }}</b>
</p>
<p class="col-6 text-center mb-0">
{%- if jo.closes_on -%}{{ _("Closes on: ") }}<b
>{{ frappe.format_date(jo.closes_on, "d MMM, YYYY") }}</b
>
{% endif %}
</p>
</div>
</div>
{% endfor %}
</div>
{% endfor %}
</div>
</div>
{% endblock page_content %}

0 comments on commit deb0322

Please sign in to comment.