card.html 4.23 KB
Newer Older
1 2
<template name="flashcards">
    {{> copyCard}}
3
    {{> deleteCardForm}}
4
    {{> cardSettingsModal}}
5 6
    {{> cardModalBeolingusTranslation}}
    {{> cardModalDeepLTranslation}}
7
    <div class="flip-container"
8 9
         id="set-details-region">
        <div>
10
            <div id="cardCarousel" class="carousel slide" data-keyboard="false" data-interval="false">
11
                <div class="carousel-inner">
12 13 14
                    {{#unless isMobilePreviewActive}}
                        {{> flashcardSidebar}}
                    {{/unless}}
15
                    {{#each getCards}}
16
                        <div class="item {{#if isActiveCard true}}active{{/if}}" data-id="{{_id}}">
17
                            <div class="box flashcard">
18
                                <div class="cardHeader {{#if
19 20
                                        isActiveCard
                                        false}}{{getCardSideColorActive}}{{else}}{{getCardSideColorInactive}}{{/if}}-header"
21 22 23
                                     data-cardtype="{{cardType}}">
                                    {{> flashcardHeader this}}
                                </div>
24
                                <div class="cardContent detail{{cardsIndex this._id}} {{#if
25 26 27
                                        isActiveCard
                                        false}}{{getCardSideColorActive}}{{else}}{{getCardSideColorInactive}}{{/if}}">
                                    {{> cardContentCounter this}}
28
                                    {{#if isActiveCard false}}
29
                                        {{> cardContentActive this}}
30 31 32 33
                                    {{else}}
                                        {{> cardContentInactive this}}
                                    {{/if}}
                                </div>
34 35 36 37 38 39 40 41 42 43
                            </div>
                        </div>
                    {{/each}}
                </div>
            </div>
        </div>
    </div>
</template>

<template name="flashcardsEmpty">
44
    <div class="flip-container" id="set-details-region">
45 46 47 48 49 50
        <div>
            <div id="cardCarousel" class="carousel slide" data-interval="false">
                <div class="carousel-inner">
                    <div class="item active">
                        <div class="box flashcard emptyCard">
                            {{#if isActiveRoute 'box'}}
51 52 53
                                {{#if gotLeitnerWorkload}}
                                    <h4>{{_ "bonus.message.learnedEverything"}}</h4>
                                {{/if}}
54 55
                            {{/if}}
                            {{#if isActiveRoute 'memo'}}
56 57 58
                                {{#if gotWozniakWorkload}}
                                    <h4>{{_ "wozniak.empty.text"}}</h4>
                                {{/if}}
59
                            {{/if}}
60
                            {{> learnBackButton}}
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</template>

<template name="flashcardsEnd">
    <div class="{{#if isActiveRoute 'cardsetdetailsid'}}col-md-9{{/if}} flip-container" id="set-details-region">
        <div>
            <div id="cardCarousel" class="carousel slide" data-interval="false">
                <div class="carousel-inner">
                    <div class="item active">
                        <div class="box flashcard emptyCard">
                            {{#if isActiveRoute 'box'}}
                                <h4>{{getNextCardTime}}</h4>
                            {{/if}}
                            {{#if isActiveRoute 'memo'}}
80
                                <h4>{{_ "wozniak.endscreen.text"}}</h4>
81
                            {{/if}}
82
                            {{> learnBackButton}}
83 84 85 86 87 88 89 90
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</template>

91 92 93 94 95 96
<template name="cardSubject">
    {{#if gotLearningUnit}}<a class="cardHeaderLink"
                              href="/cardset/{{getLearningIndex}}/card/{{getLearningUnit}}"
                              target="_blank">{{getSubject}}</a>{{else}}{{#unless this.subject}}
        <span class="subjectPlaceholder">{{getSubject}}</span>{{else}}{{getSubject}}{{/unless}}{{/if}}
</template>