Skip to content
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 trailing slash to files resources for proper operation on HTML fi… #129

Merged
merged 1 commit into from
Sep 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions scraper/src/kolibri2zim/scraper.py
Original file line number Diff line number Diff line change
Expand Up @@ -549,7 +549,7 @@ def add_video_node(self, node_id):
)
with self.creator_lock:
self.creator.add_item_for(
path=f"files/{node['slug']}",
path=f"files/{node['slug']}/",
title=node["title"],
content=html,
mimetype="text/html",
Expand Down Expand Up @@ -670,7 +670,7 @@ def add_audio_node(self, node_id):
)
with self.creator_lock:
self.creator.add_item_for(
path=f"files/{node['slug']}",
path=f"files/{node['slug']}/",
title=node["title"],
content=html,
mimetype="text/html",
Expand Down Expand Up @@ -749,7 +749,7 @@ def add_exercise_node(self, node_id):
)
with self.creator_lock:
self.creator.add_item_for(
path=f"files/{node['slug']}",
path=f"files/{node['slug']}/",
title=node["title"],
content=html,
mimetype="text/html",
Expand Down Expand Up @@ -829,7 +829,7 @@ def get_is_epub(file):
**node,
)
with self.creator_lock:
path = f"files/{node['slug']}"
path = f"files/{node['slug']}/"
if is_alt:
path += "_alt"
self.creator.add_item_for(
Expand Down Expand Up @@ -872,7 +872,7 @@ def add_html5_node(self, node_id):
path=(
f"files/{node['slug']}/{ark_member}"
if ark_member != "index.html"
else f"files/{node['slug']}"
else f"files/{node['slug']}/"
),
content=zip_ark.open(ark_member).read(),
is_front=(ark_member == "index.html"),
Expand All @@ -898,7 +898,7 @@ def add_html5_node(self, node_id):
path=(
f"files/{node['slug']}/{ark_member}"
if ark_member != "index.html"
else f"files/{node['slug']}"
else f"files/{node['slug']}/"
),
target_path=f"html5_files/{content_hash}",
is_front=ark_member == "index.html",
Expand Down
10 changes: 5 additions & 5 deletions zimui/src/components/TopicCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ defineProps({
</div>

<div v-else class="card">
<a class="text-decoration-none text-reset" :href="`./files/${data.slug}`">
<a class="text-decoration-none text-reset" :href="`./files/${data.slug}/`">
<img
v-if="data.thumbnail"
class="card-img-top"
Expand Down Expand Up @@ -107,13 +107,13 @@ defineProps({
transform: translateY(-50%);
}

.card-body{
.card-body {
padding: 15px 15px 30px 15px;
}

.card-img-top {
border-radius: 1rem 1rem 0 0;
width: 100%;
width: 100%;
}

.badge {
Expand All @@ -128,7 +128,7 @@ defineProps({

.badge-wrapper {
position: absolute;
bottom: 15px;
bottom: 15px;
left: 10px;
}

Expand Down Expand Up @@ -164,7 +164,7 @@ defineProps({
-webkit-box-orient: vertical;
}

.text-decoration-none{
.text-decoration-none {
display: flex;
flex-direction: column;
height: 100%;
Expand Down
Loading