Skip to content

Commit

Permalink
Merge pull request #11 from UM-LPM/dev
Browse files Browse the repository at this point in the history
Testing pull req
  • Loading branch information
Mir1001 authored Mar 10, 2024
2 parents 0907547 + 703365f commit f4f5156
Show file tree
Hide file tree
Showing 11 changed files with 86 additions and 60 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ V mapi s **script** se nahaja python skripta, ki sprejme tabelo v obliko .csv in

## Serviranje v formatu json
Stran tudi ustvari in servira podatke:
- [Vsa izobraževanja: /courses-data.json](https://pmd.lpm.feri.um.si/courses-data.json)
- [Vsa izobraževanja: /course-data.json](https://pmd.lpm.feri.um.si/course-data.json)
- [Vsa izobraževanja brez šumnikov: /course-data-filtered.json](https://pmd.lpm.feri.um.si/course-data-filtered.json)
- [Ključne besede, tags, značke: /tag-data.json](https://pmd.lpm.feri.um.si/tag-data.json)

## Zasluge
Expand Down
4 changes: 4 additions & 0 deletions _layouts/search.html → _layouts/course-data-filtered.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,15 @@
{% assign posts = site.posts | where_exp:"post", "post.is_generated != true" %}
{% for post in posts %}
{
"id": "{{ post.id }}",
"title": "{{ post.title | escape | replace: "š", "s" | replace: "č", "c" | replace: "ž", "z" | replace: "Š", "S" | replace: "Č", "C" | replace: "Ž", "Z" }}",
"keywords": "{{ post.keywords | join: ', ' | replace: "š", "s" | replace: "č", "c" | replace: "ž", "z" | replace: "Š", "S" | replace: "Č", "C" | replace: "Ž", "Z" }}",
"author": "{% for author in post.author %}{{ author | replace: "š", "s" | replace: "č", "c" | replace: "ž", "z" | replace: "Š", "S" | replace: "Č", "C" | replace: "Ž", "Z" }}{% unless forloop.last %}, {% endunless %}{% endfor %}",
"url": "{{ site.baseurl }}{{ post.url }}",
"description": "{{ post.description | strip_newlines | lstrip | replace: '"', '' | replace: "š", "s" | replace: "č", "c" | replace: "ž", "z" | replace: "Š", "S" | replace: "Č", "C" | replace: "Ž", "Z"}}"
"image": "{{ post.image}}",
"difficulty": "{{ post.difficulty | replace: "š", "s" | replace: "č", "c" | replace: "ž", "z" | replace: "Š", "S" | replace: "Č", "C" | replace: "Ž", "Z" }}",
"type": "{{ post.type | replace: "š", "s" | replace: "č", "c" | replace: "ž", "z" | replace: "Š", "S" | replace: "Č", "C" | replace: "Ž", "Z" }}"
}{% unless forloop.last %},{% endunless %}
{% endfor %}
]
File renamed without changes.
2 changes: 1 addition & 1 deletion _layouts/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ <h1 class="title">{{ site.title }}</h1>
<div class="box-body">
<a class="cover" href="{{ course.url | prepend: site.baseurl }}">
{% if course.id %}
<img src="/assets/img/256/{{course.id}}.jpeg" data-url="/assets/img/256/{{course.id}}.jpeg" width="100%" class="preload">
<img src="/assets/img/256{{course.id}}.jpeg" data-url="/assets/img/256{{course.id}}.jpeg" width="100%" class="preload">
<noscript>
<img src="/assets/img/off.jpg" width="100%">
</noscript>
Expand Down
6 changes: 3 additions & 3 deletions _layouts/post.html
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ <h1 class="post-title">{{ page.title }}</h1>
</div>
</div>
{% if page.image %}
<img style="margin-bottom: 0;" src="{{ site.baseurl }}/assets/img/1024/{{ page.id }}.jpeg" alt="Featured image" class="post-cover">
<img style="margin-bottom: 0;" src="{{ site.baseurl }}/assets/img/1024{{ page.id }}.jpeg" alt="Featured image" class="post-cover">
<!-- <span style="padding-top: 0; font-style: italic;">Vir: {{ page.image }}</span> -->
{% endif %}
<p class="post-description">{{ page.description | newline_to_br | replace: " ", "&nbsp;&nbsp;&nbsp;&nbsp;" }}</p>
Expand Down Expand Up @@ -109,7 +109,7 @@ <h3>Poglej tudi</h3>
<div class="related-article-item">
<h3>{{ post.title }}</h3>
<div class="image-container">
<img src="{{ site.baseurl }}/assets/img/256/{{ post.id }}.jpeg" alt="{{ post.title }} image" class="related-article-image">
<img src="{{ site.baseurl }}/assets/img/256{{ post.id }}.jpeg" alt="{{ post.title }} image" class="related-article-image">
</div>
<p>
{% assign authors = page.author | remove: '[' | remove: ']' | remove: '"' %}
Expand All @@ -135,7 +135,7 @@ <h3>{{ post.title }}</h3>
<div style="text-decoration: none;" class="related-article-item">
<h3>{{ post.title }}</h3>
<div class="image-container">
<img src="{{ site.baseurl }}/assets/img/256/{{ post.id }}.jpeg" alt="{{ post.title }} image" class="related-article-image">
<img src="{{ site.baseurl }}/assets/img/256{{ post.id }}.jpeg" alt="{{ post.title }} image" class="related-article-image">
</div>
<p>
{% assign authors = post.author | remove: '[' | remove: ']' | remove: '"' %}
Expand Down
117 changes: 69 additions & 48 deletions assets/js/scripts.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion assets/js/scripts.min.js.map

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions course-data-filtered.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
layout: course-data-filtered
---
3 changes: 3 additions & 0 deletions course-data.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
layout: course-data
---
3 changes: 0 additions & 3 deletions courses-data.json

This file was deleted.

3 changes: 0 additions & 3 deletions search.json

This file was deleted.

0 comments on commit f4f5156

Please sign in to comment.