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 Lesson Container #18 #71

Merged
Merged
Show file tree
Hide file tree
Changes from 4 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
45 changes: 45 additions & 0 deletions src/components/LessonButtonCollab.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<script>
export let active = false
export let namespace = '/platform/classroom/v1'
export let number
</script>

<style>
.lesson {
--lesson-size: 50px;
display: inline-block;
box-sizing: border-box;
width: var(--lesson-size);
height: var(--lesson-size);
margin: auto var(--gap-normal);

background: var(--color-floral-white);
color: var(--color-granite-grey);
border-radius: 50%;
border: 2px solid transparent;

font-family: Comfortaa;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove

font-size: 20px;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use variable: --size-smallest

text-align: center;
line-height: var(--lesson-size);
letter-spacing: 0.15px;
text-decoration: none;
}

.lesson.-active,
.lesson:hover {
background-color: var(--color-fiery-rose);
color: var(--color-floral-white);
}
.lesson.-active {
--lesson-size: 60px;
}
.lesson:not(.-active):hover {
--lesson-size: 50px;
border: 2px solid var(--color-floral-white);
}
</style>

<a class={`lesson ${active && '-active'}`} href={`${namespace}/${number}`}>
{String(number).padStart(3, '0')}
</a>
30 changes: 30 additions & 0 deletions src/containers/LessonsCollab.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<script>
import { onMount } from 'svelte'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please, remove

import TitleCollab from '../components/TitleCollab.svelte'
import LessonButtonCollab from '../components/LessonButtonCollab.svelte'

export let courseUrl = '/platform/classroom/v1'
export let activeLesson = 56
export let lessons = 90

const lessonsCounter = Array.from({ length: lessons }, (_, k) => k)
</script>

<style>
.lessons-collab {
padding: var(--gap-small) 0;
margin: var(--gap-normal) 0;
white-space: nowrap;
overflow-x: scroll;
}
</style>

<TitleCollab content="Aulas" />
<div class="lessons-collab">
{#each lessonsCounter as lesson, lessonNumber}
<LessonButtonCollab
active={activeLesson === lessonNumber}
number={lessonNumber}
namespace={courseUrl} />
{/each}
</div>
3 changes: 3 additions & 0 deletions src/routes/platform/classroom.svelte
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<script>
import PlayerCollab from '../../containers/PlayerCollab.svelte'
import TagCollab from '../../components/TagCollab.svelte'
import LessonsCollab from '../../containers/LessonsCollab.svelte'
</script>

<svelte:head>
Expand All @@ -11,3 +12,5 @@

<TagCollab content="Aula 056" />
<TagCollab content="Vídeo 1" />

<LessonsCollab />
1 change: 1 addition & 0 deletions static/styles/generic/index.css
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
@import 'reset.css';
@import 'scrollbar.css';
17 changes: 17 additions & 0 deletions static/styles/generic/scrollbar.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
*::-webkit-scrollbar-track {
box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
border-radius: 10px;
background-color: transparent;
}

*::-webkit-scrollbar {
width: 8px;
height: 8px;
background-color: transparent;
}

*::-webkit-scrollbar-thumb {
border-radius: 10px;
box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
background-color: var(--color-fiery-rose);
}
1 change: 1 addition & 0 deletions static/styles/settings/color.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
:root {
--color-arsenic: #3a4042;
--color-arsenic-light: rgba(58, 64, 66, 0.5);
--color-granite-grey: #646165;
--color-old-silver: #828282;
--color-eggshell: #eae6da;
--color-eggshell-light: rgba(234, 230, 218, 0.3);
Expand Down