style: used variables
This commit is contained in:
parent
27126889bd
commit
c63e8de2dd
6 changed files with 28 additions and 63 deletions
|
|
@ -1,6 +1,6 @@
|
|||
{% if frappe.session.user != "Guest" and
|
||||
(condition is not defined or (condition is defined and condition )) %}
|
||||
<span class="button is-secondary reply">
|
||||
<span class="btn btn-md btn-default ellipsis float-right reply">
|
||||
{{ _(cta_title) }}
|
||||
<!-- <svg class="icon icon-sm ml-1"><use href="#icon-add" style="stroke: var(--gray-700)"></use></svg> -->
|
||||
</span>
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@
|
|||
</div>
|
||||
|
||||
<a class="dark-links cancel-comment hide"> {{ _("Cancel") }} </a>
|
||||
<div class="button is-default submit-discussion pull-right mb-1">
|
||||
<div class="btn btn-md btn-default ellipsis submit-discussion pull-right mb-1">
|
||||
{{ _("Post") }}
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -8,13 +8,13 @@
|
|||
{% include "frappe/templates/discussions/topic_modal.html" %}
|
||||
|
||||
<div class="discussions-header">
|
||||
<span class="course-home-headings">{{ _(title) }}</span>
|
||||
<span class="discussion-heading">{{ _(title) }}</span>
|
||||
{% if topics and not single_thread %}
|
||||
{% include "frappe/templates/discussions/button.html" %}
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div class="common-card-style thread-card {% if topics | length and not single_thread %} discussions-card {% endif %}
|
||||
<div class="card-style thread-card {% if topics | length and not single_thread %} discussions-card {% endif %}
|
||||
{% if not topics | length %} empty-state {% endif %}">
|
||||
{% if topics and not single_thread %}
|
||||
|
||||
|
|
@ -40,12 +40,12 @@
|
|||
{% else %}
|
||||
<div class="no-discussions">
|
||||
<img class="icon icon-xl" src="/assets/frappe/icons/timeless/message.svg">
|
||||
<div class="course-home-headings mt-4 mb-0" style="color: inherit;"> {{ empty_state_title }} </div>
|
||||
<div class="discussion-heading mt-4 mb-0" style="color: inherit;"> {{ empty_state_title }} </div>
|
||||
<div class="small mb-6"> {{ empty_state_subtitle }} </div>
|
||||
{% if frappe.session.user == "Guest" %}
|
||||
<div class="button is-secondary mt-3" id="login-from-discussion"> {{ _("Login") }} </div>
|
||||
<div class="btn btn-default btn-md ellipsis mt-3" id="login-from-discussion"> {{ _("Login") }} </div>
|
||||
{% elif condition is defined and not condition %}
|
||||
<div class="button is-secondary mt-3" id="login-from-discussion" data-redirect="{{ redirect_to }}">
|
||||
<div class="btn btn-default btn-md ellipsis mt-3" id="login-from-discussion" data-redirect="{{ redirect_to }}">
|
||||
{{ button_name }}
|
||||
</div>
|
||||
{% else %}
|
||||
|
|
|
|||
|
|
@ -9,13 +9,13 @@
|
|||
{% if topic %} id="t{{ topic.name }}" data-topic="{{ topic.name }}" {% endif %}>
|
||||
|
||||
{% if not single_thread %}
|
||||
<div class="button is-default back">
|
||||
<div class="btn btn-md btn-default ellipsis back">
|
||||
{{ _("Back") }}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if topic and topic.title %}
|
||||
<div class="course-home-headings p-0">{{ topic.title }}</div>
|
||||
<div class="discussion-heading p-0">{{ topic.title }}</div>
|
||||
{% endif %}
|
||||
|
||||
{% for reply in replies %}
|
||||
|
|
@ -30,9 +30,9 @@
|
|||
<div class="d-flex flex-column align-items-center small">
|
||||
{{ _("Want to join the discussion?") }}
|
||||
{% if frappe.session.user == "Guest" %}
|
||||
<div class="button is-secondary mt-3 mb-3" id="login-from-discussion">{{ _("Login") }}</div>
|
||||
<div class="btn btn-default btn-md ellipsis mt-3 mb-3" id="login-from-discussion">{{ _("Login") }}</div>
|
||||
{% elif not condition %}
|
||||
<div class="button is-secondary mt-3 mb-3" id="login-from-discussion" data-redirect="{{ redirect_to }}">{{ button_name }}
|
||||
<div class="btn btn-default btn-md ellipsis mt-3 mb-3" id="login-from-discussion" data-redirect="{{ redirect_to }}">{{ button_name }}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
<div class="discussion-topic-title">{{ topic.title }}</div>
|
||||
<div class="sidebar-info">
|
||||
{% set creator = frappe.get_doc("User", topic.owner) %}
|
||||
<span class="course-instructor ml-0">
|
||||
<span class="reply-author ml-0">
|
||||
{{ creator.full_name }}
|
||||
</span>
|
||||
<span class="small d-flex">
|
||||
|
|
|
|||
|
|
@ -1,3 +1,7 @@
|
|||
:root {
|
||||
--discussions-card-shadow: 0 0px 4px 2px #19273405
|
||||
}
|
||||
|
||||
.thread-card {
|
||||
flex-direction: column;
|
||||
padding: 1rem;
|
||||
|
|
@ -103,7 +107,7 @@
|
|||
}
|
||||
|
||||
.discussion-topic-title {
|
||||
color: var(--text-color);
|
||||
color: var(--gray-900);
|
||||
}
|
||||
|
||||
.discussion-on-page .topic-title {
|
||||
|
|
@ -137,62 +141,23 @@
|
|||
align-items: center;
|
||||
}
|
||||
|
||||
.course-home-headings {
|
||||
.discussion-heading {
|
||||
font-weight: 600;
|
||||
font-size: 22px;
|
||||
line-height: 146%;
|
||||
letter-spacing: -0.0175em;
|
||||
color: #192734;
|
||||
color: var(--gray-900);
|
||||
margin-bottom: 1rem;
|
||||
padding: 0 1rem;
|
||||
}
|
||||
|
||||
.common-card-style {
|
||||
.card-style {
|
||||
display: flex;
|
||||
background: #FFFFFF;
|
||||
background: white;
|
||||
border-radius: 8px;
|
||||
position: relative;
|
||||
border: 1px solid #EEF0F2;
|
||||
box-shadow: 0 0px 4px 2px #19273405;
|
||||
}
|
||||
|
||||
.button {
|
||||
box-shadow: var(--btn-shadow);
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: fit-content;
|
||||
padding: 8px 12px 8px;
|
||||
font-size: 12px;
|
||||
line-height: 135%;
|
||||
letter-spacing: -0.011em;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.is-primary {
|
||||
background: var(--primary-color);
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
.is-primary:hover {
|
||||
text-decoration: none;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
.is-secondary {
|
||||
background: #FFFFFF;
|
||||
}
|
||||
|
||||
.is-secondary:hover {
|
||||
text-decoration: none;
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
.is-default {
|
||||
background: #F4F5F6;
|
||||
color: #1F272E;
|
||||
border: 1px solid var(--gray-200);
|
||||
box-shadow: var(--discussions-card-shadow);
|
||||
}
|
||||
|
||||
.discussions-card {
|
||||
|
|
@ -232,26 +197,26 @@
|
|||
}
|
||||
}
|
||||
|
||||
.course-instructor {
|
||||
.reply-author {
|
||||
margin: 0px 8px;
|
||||
font-size: 12px;
|
||||
line-height: 135%;
|
||||
color: var(--text-color);
|
||||
color: var(--gray-900);
|
||||
}
|
||||
|
||||
.card-divider {
|
||||
border: 1px solid var(--gray-200);
|
||||
border-top: 1px solid var(--gray-200);
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.card-divider-dark {
|
||||
border: 1px solid var(--gray-300);
|
||||
border-top: 1px solid var(--gray-300);
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.empty-state {
|
||||
background: var(--gray-200);
|
||||
border: 1px dashed #C8CFD5;
|
||||
border: 1px dashed var(--gray-400);
|
||||
box-sizing: border-box;
|
||||
border-radius: 8px;
|
||||
padding: 2.5rem;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue