Skip to content

Commit

Permalink
moved more inline styling (#146)
Browse files Browse the repository at this point in the history
  • Loading branch information
torgeirl committed Jan 11, 2024
1 parent 6108cd3 commit 3eec798
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
{% block header %}{% endblock header %}

{% block content %}
<div class="container" style="padding-top: 40px;">
<div class="container trix-preview-padding">
{% include "trix_student/include/assignment.django.html" with disable_howsolved_box=True disable_tags=True %}
</div>
{% endblock content %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,13 +87,13 @@ <h2 id="heading">
<p>
{% trans "Example heading level 1" %}:
</p>
<pre style="white-space: pre-line;">
<pre class="trix-prelined">
# Heading 1
</pre>
<p>
{% trans "Example heading level 3" %}:
</p>
<pre style="white-space: pre-line;">
<pre class="trix-prelined">
### Heading 3
</pre>
</div>
Expand All @@ -118,7 +118,7 @@ <h3 id="styling-text-bold">
<p>
{% trans "Example" %}:
</p>
<pre style="white-space: pre-line;">
<pre class="trix-prelined">
**Bold text**
</pre>
<h3 id="styling-text-italic">
Expand All @@ -132,7 +132,7 @@ <h3 id="styling-text-italic">
<p>
{% trans "Example" %}:
</p>
<pre style="white-space: pre-line;">
<pre class="trix-prelined">
_Italic text_
</pre>
</div>
Expand All @@ -151,7 +151,7 @@ <h2 id="link">
<p>
{% trans "Example" %}:
</p>
<pre style="white-space: pre-line;">
<pre class="trix-prelined">
[My link text](https://www.devilry.test)
</pre>
</div>
Expand All @@ -169,7 +169,7 @@ <h2 id="code">
<p>
{% trans "Example" %}:
</p>
<pre style="white-space: pre-line;">
<pre class="trix-prelined">
`ls -l`
</pre>
<p>
Expand All @@ -180,7 +180,7 @@ <h2 id="code">
<p>
{% trans "Example" %}:
</p>
<pre style="white-space: pre-line;">
<pre class="trix-prelined">
```
ls -l
cd /some/folder
Expand Down Expand Up @@ -301,7 +301,7 @@ <h2 id="lists">
<p>
{% trans "Example" %}:
</p>
<pre style="white-space: pre-line;">
<pre class="trix-prelined">
- List item 1
- List item 2
- List item 3
Expand All @@ -314,7 +314,7 @@ <h2 id="lists">
<p>
{% trans "Example" %}:
</p>
<pre style="white-space: pre-line;">
<pre class="trix-prelined">
1. List item 1
2. List item 2
3. List item 3
Expand All @@ -333,7 +333,7 @@ <h2 id="nested-lists">
<p>
{% trans "Example" %}:
</p>
<pre style="white-space: pre-line;">
<pre class="trix-prelined">
1. List item 1
&nbsp;&nbsp;&nbsp;&nbsp;* Nested item 1
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* Nested item 2
Expand Down
4 changes: 2 additions & 2 deletions trix/trix_admin/templates/trix_admin/roleselect.django.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

{% block title %}{% trans "Select course" %}{% endblock title %}
{% block body %}
<div class="container trix-roleselect-container" style="margin-top: 20px;">
<div class="container trix-roleselect-container trix-roleselect-first">
<a href="{% url 'trix_student_dashboard' %}">
<span class="fa fa-arrow-left"></span>
{% trans "Back to the frontpage" %}
Expand All @@ -16,7 +16,7 @@
{{ block.super }}
</div>

<div class="container trix-roleselect-container" style="margin-top: 40px;">
<div class="container trix-roleselect-container trix-roleselect-second">
<h2>{% trans "Documentation" %}</h2>
<a href="{{ TRIX_ADMIN_DOCUMENTATION_URL }}">{{ TRIX_ADMIN_DOCUMENTATION_LABEL }}</a>

Expand Down
16 changes: 16 additions & 0 deletions trix/trix_student/static/trix_student/dist/css/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -10692,6 +10692,13 @@ a {
width: 65%;
margin-top: 40px;
}
.trix-roleselect-first {
margin-top: 20px;
}

.trix-roleselect-second {
margin-top: 40px;
}
@media (max-width: 992px) {
.trix-roleselect .cradmin-legacy-focusedpage-wrapper {
width: 100%;
Expand Down Expand Up @@ -10999,6 +11006,12 @@ a {
padding-bottom: 20px;
}
/**
* Markdown help
**/
pre.trix-prelined {
white-space: pre-line;
}
/**
* Styles for printing
**/
@media print {
Expand Down Expand Up @@ -11419,6 +11432,9 @@ a {
visibility: hidden;
margin-bottom: 15px;
}
.trix-preview-padding {
padding-top: 40px;
}
.tab {
overflow: hidden;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@
}
}

.trix-preview-padding {
padding-top: 40px;
}

.tab {
overflow: hidden;
Expand All @@ -86,4 +89,4 @@
.tabcontent {
display: none;
margin-top: 3px;
}
}
15 changes: 15 additions & 0 deletions trix/trix_student/static/trix_student/src/less/trix.less
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,14 @@ a {
margin-top: 40px;
}

.trix-roleselect-first {
margin-top: 20px;
}

.trix-roleselect-second {
margin-top: 40px;
}

@media(max-width: 992px) {
.trix-roleselect .cradmin-legacy-focusedpage-wrapper {
width: 100%;
Expand Down Expand Up @@ -405,3 +413,10 @@ a {
padding-bottom: 20px;
}
}

/**
* Markdown help
**/
pre.trix-prelined {
white-space: pre-line;
}

0 comments on commit 3eec798

Please sign in to comment.