-
Notifications
You must be signed in to change notification settings - Fork 118
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add course info cards & calendars for runs #259
Merged
Merged
Changes from 1 commit
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
1be9fe1
Update to Bootstrap 4-beta.2
encukou 3a8134b
Add date information to course description
encukou 26db395
Format dates in session lists
encukou d0d95e7
Add info box to courses with dates
encukou a8015ef
Add calendar pages for courses
encukou 4ff0294
templates: Fold _lessons_list.html into course.html
encukou 1dcc520
Add side card for the self-paced courses
encukou aa37852
Nicer styling for calendars
encukou b7c3db1
Adjust positioning of the course info card
encukou 90f0820
routes: Move generating calendar months out into a new function
encukou d2fdef1
routes: Move generating recent runs out into a new function
encukou 5147d58
Typo in infobox
hroncok File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,45 +28,16 @@ | |
<hr> | ||
</header> | ||
|
||
{% if course.start_date %} | ||
<div class="course-dates card w-lg-25 float-lg-right text-center"> | ||
<div class="card-header"> | ||
{% if course.vars['coach-present'] %} | ||
Kurz s instruktorem | ||
{% else %} | ||
Termín kurzu | ||
{% endif %} | ||
</div> | ||
<div class="card-body"> | ||
<div class="calendar-dates"> | ||
{{ (course.start_date, course.end_date) | format_date_range }} | ||
</div> | ||
</div> | ||
<div class="card-footer small text-left"> | ||
<ul class="list-unstyled" style="margin-bottom:0;"> | ||
<li> | ||
<a href="{{ url_for('course_calendar', course=course) }}">→ Kalendář</a> | ||
</li> | ||
{% if course.base_course %} | ||
<li> | ||
<a href="{{ course_url(course.base_course) }}">→ Ekvivalentní kurz pro samouky</a> | ||
</li> | ||
{% endif %} | ||
</ul> | ||
</div> | ||
</div> | ||
{% endif %} | ||
|
||
<h1>{{ course.title }}</h1> | ||
<div class="row"> | ||
<div class="col-md-8"> | ||
<h1>{{ course.title }}</h1> | ||
|
||
{% if course.subtitle is defined and course.subtitle != None %} | ||
<h2>{{ course.subtitle }}</h2> | ||
{% endif%} | ||
{% if course.subtitle is defined and course.subtitle != None %} | ||
<h2>{{ course.subtitle }}</h2> | ||
{% endif%} | ||
|
||
{{ course.long_description | markdown }} | ||
{{ course.long_description | markdown }} | ||
|
||
<div class="row"> | ||
<div class="sections col-xs-12 col-sm-12 col-md-8 col-lg-8"> | ||
{% for session in plan.values() %} | ||
<div class="section{{ loop.index }}"> | ||
<h4> | ||
|
@@ -85,8 +56,88 @@ <h4> | |
{% endfor %} | ||
</div> | ||
{% endfor %} | ||
|
||
</div> | ||
<div class="col-md-4"> | ||
{% if course.start_date %} | ||
<div class="card course-card text-center"> | ||
<div class="card-header"> | ||
Toto jsou podklady pro kurz s instruktorem | ||
</div> | ||
<div class="card-body"> | ||
<div class="calendar-dates"> | ||
{{ (course.start_date, course.end_date) | format_date_range }} | ||
</div> | ||
</div> | ||
<div class="card-footer small text-left"> | ||
<ul class="list-unstyled" style="margin-bottom:0;"> | ||
<li> | ||
<a href="{{ url_for('course_calendar', course=course) }}">→ Kalendář</a> | ||
</li> | ||
{% if course.base_course %} | ||
<li> | ||
<a href="{{ course_url(course.base_course) }}">→ Ekvivalentní kurz pro samouky</a> | ||
</li> | ||
{% endif %} | ||
</ul> | ||
</div> | ||
</div> | ||
{% else %} | ||
<div class="card course-card"> | ||
<div class="card-header text-center"> | ||
Toto jsou materiály pro samouky | ||
</div> | ||
<div class="card-body"> | ||
<p> | ||
Doufáme, že naše materiály jsou srozumitelné a přínosné. | ||
Pokud ne, ozvěte se prosím: | ||
</p> | ||
<ul> | ||
<li> | ||
na <a href="https://www.facebook.com/groups/pyonieri/">Facebooku</a>, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't like having (what I think of as) content in templates. However, for the lack of better possibilities, let's keep it that way for now. |
||
</li> | ||
<li> | ||
založením <a href="https://github.com/pyvec/naucse.python.cz/issues/new"><i>issue</i> na Githubu</a>, | ||
</li> | ||
<li> | ||
osobně na <a href="https://pyvo.cz/">srazu</a>, nebo | ||
</li> | ||
<li> | ||
<a href="mailto:[email protected]">mailem</a> do | ||
<a href="https://groups.google.com/forum/#!forum/django-cs">diskusní skupiny</a>. | ||
</li> | ||
</ul> | ||
<p> | ||
Případné nejasnosti rádi vysvětlíme, | ||
ale musíme o nich vědět! | ||
</p> | ||
</div> | ||
{% if recent_runs %} | ||
<div class="card-footer recent-runs"> | ||
Na těchto materiálech jshou založeny | ||
i kurzy s instruktorem: | ||
<ul class="list-unstyled"> | ||
{% for run in recent_runs %} | ||
<li> | ||
<a href="{{ url_for('course', course=run) }}"> | ||
{{ run.title }} | ||
{% if run.subtitle %} | ||
– {{ run.subtitle }} | ||
{% endif %} | ||
</a> | ||
<div> | ||
{{ (run.start_date, run.end_date) | format_date_range }} | ||
</div> | ||
</li> | ||
{% endfor %} | ||
</ul> | ||
</div> | ||
{% endif %} | ||
</div> | ||
{% endif %} | ||
</div> | ||
</div> | ||
|
||
</section> | ||
</div> | ||
|
||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd make this a function/method/whatnot as well (see the next comment that I made earlier). It makes the route (its code) too long.