Skip to content

Commit

Permalink
refactor: use flex instead of columns
Browse files Browse the repository at this point in the history
  • Loading branch information
krantheman committed Aug 25, 2023
1 parent 1d6c78e commit d5674aa
Showing 1 changed file with 49 additions and 49 deletions.
98 changes: 49 additions & 49 deletions hrms/www/jobs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,63 +19,63 @@
</div>
{% for jo in job_openings %}
<div class="mb-8 card border p-6">
<div class="row">
<div class="col-9">
<h3 class="mt-0 mb-3">{{ jo.job_title }}</h3>
<div class="mb-8">
<div class="flex mb-3 align-items-center secondary-stroke text-secondary">
<svg class="icon icon-md ml-0 mr-1">
<use href="#icon-organization"></use>
</svg>
<p class="mr-3 ">{{ jo.company }}</p>
{%- if jo.department -%}
<svg class="icon icon-md ml-0 mr-1">
<use href="#icon-branch"></use>
</svg>
<p class="mr-3 ">{{ jo.department }}</p>
{% endif %}
{%- if jo.location -%}
<svg class="icon icon-md ml-0 mr-1"
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 16 16">
<g stroke="var(--secondary)" 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>
<p class="mr-3 ">{{ jo.location }}</p>
{% endif %}
</div>
{%- if jo.publish_salary_range -%}
<p>
<span class="font-weight-bold salary">
{{ frappe.format_value(frappe.utils.flt(jo.lower_range) ,
currency=jo.currency) }} - {{ frappe.format_value(frappe.utils.flt(jo.upper_range) ,
currency=jo.currency) }}
</span>
<span class="text-secondary">{{ jo.salary_type.lower() }}</span>
</p>
{% endif %}
</div>
<a class="btn btn-primary" href="{{ jo.route }}">{{ _("View Job →") }}</a>
</div>
<div class="col-3 flex flex-column">
<div class="flex">
<h3 class="mt-0 mb-3 mr-20">{{ jo.job_title }}</h3>
<div class="ml-auto font-weight-bold text-nowrap">
{%- if jo.employment_type -%}
{%- if jo.employment_type == "Full-time" -%}
<span class="ml-auto smol-text py-1 px-3 font-weight-bold full-time-badge">{{ jo.employment_type }}</span>
<span class="smol-text py-2 px-3 full-time-badge">{{ jo.employment_type }}</span>
{%- elif jo.employment_type == "Part-time" -%}
<span class="ml-auto smol-text py-1 px-3 font-weight-bold part-time-badge">{{ jo.employment_type }}</span>
<span class="smol-text py-2 px-4 part-time-badge">{{ jo.employment_type }}</span>
{%- else -%}
<span class="ml-auto smol-text py-1 px-3 font-weight-bold other-badge">{{ jo.employment_type }}</span>
<span class="smol-text py-2 px-4 other-badge">{{ jo.employment_type }}</span>
{% endif %}
{% endif %}
{%- if jo.closes_on -%}
<p class="font-italic text-right text-secondary mt-auto smol-text">
{{ _("Closes on " + frappe.format_date(jo.closes_on, "d MMM, YYYY") ) }}
</p>
</div>
</div>
<div class="mb-8">
<div class="flex mb-3 align-items-center secondary-stroke text-secondary">
<svg class="icon icon-md ml-0 mr-1">
<use href="#icon-organization"></use>
</svg>
<p class="mr-3 ">{{ jo.company }}</p>
{%- if jo.department -%}
<svg class="icon icon-md ml-0 mr-1">
<use href="#icon-branch"></use>
</svg>
<p class="mr-3 ">{{ jo.department }}</p>
{% endif %}
{%- if jo.location -%}
<svg class="icon icon-md ml-0 mr-1"
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 16 16">
<g stroke="var(--secondary)" 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>
<p class="mr-3 ">{{ jo.location }}</p>
{% endif %}
</div>
{%- if jo.publish_salary_range -%}
<p>
<span class="font-weight-bold salary">
{{ frappe.format_value(frappe.utils.flt(jo.lower_range) ,
currency=jo.currency) }} - {{ frappe.format_value(frappe.utils.flt(jo.upper_range) ,
currency=jo.currency) }}
</span>
<span class="text-secondary">{{ jo.salary_type.lower() }}</span>
</p>
{% endif %}
</div>
<div class="flex">
<a class="btn btn-primary" href="{{ jo.route }}">{{ _("View Job →") }}</a>
{%- if jo.closes_on -%}
<p class="ml-auto font-italic text-secondary mt-auto smol-text">
{{ _("Closes on " + frappe.format_date(jo.closes_on, "d MMM, YYYY") ) }}
</p>
{% endif %}
</div>
</div>
{% endfor %}
Expand Down

0 comments on commit d5674aa

Please sign in to comment.