Skip to content

Commit

Permalink
Merge pull request #1239 from pateljannat/issues-64
Browse files Browse the repository at this point in the history
fix: made course list responsive for bigger screen sizes
  • Loading branch information
pateljannat authored Jan 9, 2025
2 parents bb6e979 + ecc12d7 commit 4869bba
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 6 deletions.
2 changes: 1 addition & 1 deletion frontend/src/pages/Batches.vue
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ onMounted(() => {
const batches = createResource({
doctype: 'LMS Batch',
url: 'lms.lms.utils.get_batches',
cache: ['batches', user.data?.email],
cache: ['batches', user.data?.email || ''],
auto: true,
})
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/pages/Courses.vue
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
<template #default="{ tab }">
<div
v-if="tab.courses && tab.courses.value.length"
class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-5 my-5 mx-5"
class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 2xl:grid-cols-4 3xl:grid-cols-5 gap-7 my-5 mx-5"
>
<router-link
v-for="course in tab.courses.value"
Expand Down
7 changes: 6 additions & 1 deletion frontend/src/pages/Lesson.vue
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,8 @@ updateDocumentTitle(pageMeta)
font-weight: 500;
}
.embed-tool__caption {
.embed-tool__caption,
.cdx-simple-image__caption {
display: none;
}
Expand Down Expand Up @@ -585,4 +586,8 @@ iframe {
border-top: 3px solid theme('colors.gray.700');
border-bottom: 3px solid theme('colors.gray.700');
}
.tc-table {
border-left: 1px solid #e8e8eb;
}
</style>
4 changes: 4 additions & 0 deletions frontend/src/pages/LessonForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -619,4 +619,8 @@ iframe {
border-top: 3px solid theme('colors.gray.700');
border-bottom: 3px solid theme('colors.gray.700');
}
.tc-table {
border-left: 1px solid #e8e8eb;
}
</style>
6 changes: 4 additions & 2 deletions frontend/src/stores/settings.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import { defineStore } from 'pinia'
import { ref } from 'vue'
import { createResource } from 'frappe-ui'
import { sessionStore } from './session'

export const useSettings = defineStore('settings', () => {
const { isLoggedIn } = sessionStore()
const isSettingsOpen = ref(false)
const activeTab = ref(null)
const learningPaths = createResource({
Expand All @@ -13,13 +15,13 @@ export const useSettings = defineStore('settings', () => {
field: 'enable_learning_paths',
}
},
auto: true,
auto: isLoggedIn ? true : false,
cache: ['learningPaths'],
})

const onboardingDetails = createResource({
url: 'lms.lms.utils.is_onboarding_complete',
auto: true,
auto: isLoggedIn ? true : false,
cache: ['onboardingDetails'],
})

Expand Down
6 changes: 5 additions & 1 deletion frontend/src/utils/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,10 @@ export function getEditorTools() {
upload: Upload,
markdown: Markdown,
image: SimpleImage,
table: Table,
table: {
class: Table,
inlineToolbar: true,
},
paragraph: {
class: Paragraph,
inlineToolbar: true,
Expand All @@ -179,6 +182,7 @@ export function getEditorTools() {
},
list: {
class: NestedList,
inlineToolbar: true,
config: {
defaultStyle: 'ordered',
},
Expand Down
4 changes: 4 additions & 0 deletions frontend/tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ module.exports = {
strokeWidth: {
1.5: '1.5',
},
screens: {
'2xl': '1536px',
'3xl': '1920px',
},
},
},
plugins: [],
Expand Down
1 change: 1 addition & 0 deletions lms/lms/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1244,6 +1244,7 @@ def get_batch_card_details(batchname):
"end_time",
"timezone",
"published",
"category",
],
as_dict=True,
)
Expand Down

0 comments on commit 4869bba

Please sign in to comment.