Project

General

Profile

1 57298 argiro.kok
<ng-template #applyResetButtons>
2 60508 argiro.kok
<!--  <div class="uk-margin-small">-->
3
  <button class="uk-float-right uk-button uk-margin-left uk-button-secondary "
4
          [disabled]="!hasChanges(publishedCustomizationOptions, draftCustomizationOptions)"
5
          [title]="(hasChanges(publishedCustomizationOptions, draftCustomizationOptions)?'Save changes':'No changes to save')"
6
          (click)="saveLayout()">
7
    Publish
8
  </button>
9
    <button class="uk-float-right uk-button uk-margin-left uk-button-secondary outlined" [disabled]="!hasChanges(publishedCustomizationOptions, draftCustomizationOptions)"
10 57338 argiro.kok
            (click)="resetLayout()">
11 60830 argiro.kok
12
      <span>Reset all</span>
13 57298 argiro.kok
    </button>
14 60508 argiro.kok
15 56489 k.triantaf
</ng-template>
16 57298 argiro.kok
17 60306 argiro.kok
<div page-content class="admin-pages">
18
  <div header>
19
  </div>
20
  <div inner>
21 60894 argiro.kok
<div class="" >
22 60795 argiro.kok
  <div *ngIf="draftCustomizationOptions" class="uk-card-default uk-card">
23 60894 argiro.kok
    <div class = "uk-card-header" style="z-index: 2"  uk-sticky="offset:100">
24 60508 argiro.kok
      <div class = " uk-margin-small-top uk-margin-small-bottom">
25 60795 argiro.kok
26 60508 argiro.kok
        <ng-container
27
          *ngTemplateOutlet="applyResetButtons ; context: { }"></ng-container>
28
        <div>Customization <span *ngIf="hasChanges(publishedCustomizationOptions, draftCustomizationOptions)">(Unsaved changes)</span></div>
29
      </div>
30
    </div>
31 60830 argiro.kok
    <div class="uk-padding">
32 60894 argiro.kok
    <ul class="uk-tab customTabs admin uk-flex uk-flex-center uk-flex-left@m" uk-tab >
33 60830 argiro.kok
      <li [class.uk-active]="menuSelected === 'identity'"
34
          uk-tooltip="title:<div class='uk-padding-small uk-width-large'><b>Identity colors</b> are used in several places in your community Dashboard and they are the default colors used for the backgrounds and buttons.</div>"
35
      ><a
36 60508 argiro.kok
        (click)="menuSelected = 'identity'" ><span class="title">Identity</span></a></li>
37
      <li [class.uk-active]="menuSelected === 'backgrounds'"><a (click)="menuSelected = 'backgrounds'"><span
38 60894 argiro.kok
        class="title">Backgrounds & buttons
39 60508 argiro.kok
      </span></a></li>
40
41
    </ul>
42 57298 argiro.kok
43 60795 argiro.kok
    <div *ngIf="menuSelected == 'backgrounds'" class=" uk-padding-small ">
44
      <div class="customizationMenuItems uk-margin-small">
45 60508 argiro.kok
        <div class="uk-grid">
46 60894 argiro.kok
          <div class="uk-width-2-3@m uk-width-1-1@s">
47
            <div class="uk-margin-top uk-margin-small-bottom uk-text-bold"> Quick look
48 60795 argiro.kok
              <!--<span class="uk-icon uk-link " (click)="resetBackgrounds()">
49 60508 argiro.kok
              <svg width="16" height="16" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"
50
                   data-svg="refresh"><path fill="none" stroke="#000" stroke-width="1.1"
51
                                            d="M17.08,11.15 C17.09,11.31 17.1,11.47 17.1,11.64 C17.1,15.53 13.94,18.69 10.05,18.69 C6.16,18.68 3,15.53 3,11.63 C3,7.74 6.16,4.58 10.05,4.58 C10.9,4.58 11.71,4.73 12.46,5"></path><polyline
52
                fill="none" stroke="#000" points="9.9 2 12.79 4.89 9.79 7.9"></polyline></svg>
53 60795 argiro.kok
            </span>-->
54 60508 argiro.kok
            </div>
55 60795 argiro.kok
            <quick-look-backgrounds [darkBackgroundColor]="draftCustomizationOptions.backgrounds.dark.color "
56
                                    [lightBackgroundColor]="draftCustomizationOptions.backgrounds.light.color "
57
                                    [primaryColor]="draftCustomizationOptions.identity.mainColor"
58
                                    [secondaryColor]="draftCustomizationOptions.identity.secondaryColor"
59
                                    [buttonsOnDark]="draftCustomizationOptions.buttons.darkBackground"
60
                                    [buttonsOnLight]="draftCustomizationOptions.buttons.lightBackground"
61
            ></quick-look-backgrounds>
62 57298 argiro.kok
63 60795 argiro.kok
          </div>
64 60894 argiro.kok
          <div class="uk-width-1-3@m uk-width-1-1@s">
65 60508 argiro.kok
66 60830 argiro.kok
            <div class="uk-margin-top uk-margin-small-bottom uk-text-bold" >Backgrounds & Buttons
67
              <a *ngIf="(hasChanges(publishedCustomizationOptions.backgrounds, draftCustomizationOptions.backgrounds)
68
              || hasChanges(publishedCustomizationOptions.buttons, draftCustomizationOptions.buttons) )
69
              && draftCustomizationOptions.backgroundsAndButtonsIsCustom"
70 60894 argiro.kok
                 (click)="resetBackgroundsAndButtonsToPublished();" class="uk-margin-small-left"
71 60830 argiro.kok
                 uk-tooltip="title:<div class='uk-padding-small uk-width-large'>Reset to previously saved options</div>"
72 60894 argiro.kok
                 >  <icon name="reset"></icon></a>
73 60508 argiro.kok
            </div>
74
75 60894 argiro.kok
            <div class="uk-margin-top">
76 60830 argiro.kok
              <span>Custom style </span>
77
              <span >
78
              <mat-slide-toggle class="uk-margin-large-left"
79
                                [checked]="draftCustomizationOptions.backgroundsAndButtonsIsCustom"
80
                                (change)="draftCustomizationOptions.backgroundsAndButtonsIsCustom=!draftCustomizationOptions.backgroundsAndButtonsIsCustom;
81
                                draftCustomizationOptions.backgroundsAndButtonsIsCustom?'':this.resetBackgroundsAndButtonsToDefault();  "
82
                                [attr.uk-tooltip]="'title:<div class=\'uk-padding-small uk-width-large\'>' +
83
                    (draftCustomizationOptions.backgroundsAndButtonsIsCustom?'Change to default values produced based on the identity colors':'Customize options for background and buttons')+'</div>'"
84
              >
85
              </mat-slide-toggle>
86
              </span>
87 60508 argiro.kok
            </div>
88 60830 argiro.kok
            <div *ngIf="!draftCustomizationOptions.backgroundsAndButtonsIsCustom" class="uk-margin-top uk-text-small"
89
                 style="font-style: italic">
90 60894 argiro.kok
              Backgrounds and buttons are set in the default values.
91 60830 argiro.kok
            </div>
92 60508 argiro.kok
93 60894 argiro.kok
            <div *ngIf="draftCustomizationOptions.backgroundsAndButtonsIsCustom" class=" uk-margin-large-top">
94
              <div class="uk-margin-small-bottom uk-text-uppercase">Background Colors</div>
95 60795 argiro.kok
              <color [color]="draftCustomizationOptions.backgrounds.dark.color"
96 60894 argiro.kok
                     label="Dark"
97 60795 argiro.kok
                     (colorChange)=
98
                       " draftCustomizationOptions.backgrounds.dark.color = $event;"></color>
99 60806 argiro.kok
                      <span *ngIf="!isForLightBackground(draftCustomizationOptions.backgrounds.dark.color)">The selected color may has lower contrast.</span>
100 60795 argiro.kok
              <color [color]="draftCustomizationOptions.backgrounds.light.color"
101 60894 argiro.kok
                     label="Light"
102 60795 argiro.kok
                     (colorChange)=
103
                       " draftCustomizationOptions.backgrounds.light.color = $event;"></color>
104 60806 argiro.kok
              <span *ngIf="isForLightBackground(draftCustomizationOptions.backgrounds.light.color)">The selected color may has lower contrast.</span>
105 60830 argiro.kok
              <color [color]="draftCustomizationOptions.backgrounds.form.color"
106 60894 argiro.kok
                     label="Form"
107 60830 argiro.kok
                     (colorChange)=
108
                       " draftCustomizationOptions.backgrounds.form.color = $event;"></color>
109
              <span *ngIf="isForLightBackground(draftCustomizationOptions.backgrounds.form.color)">The selected color
110
                may has lower contrast.</span>
111 60894 argiro.kok
              <div class="uk-margin-large-top uk-text-uppercase">Buttons </div>
112 60830 argiro.kok
              <ul   class="uk-tab" uk-switcher>
113 60894 argiro.kok
                <li><a href="#">On dark background</a></li>
114
                <li><a href="#">On light background</a></li>
115 60830 argiro.kok
              </ul>
116
              <ul class="uk-switcher uk-margin">
117
                <li>
118
                  <customize-buttons
119
                    [buttons]="draftCustomizationOptions.buttons.darkBackground"
120
                  ></customize-buttons>
121
                </li>
122
                <li>
123
                  <customize-buttons
124
                    [buttons]="draftCustomizationOptions.buttons.lightBackground"
125
                  ></customize-buttons>
126
                </li>
127
              </ul>
128 56490 k.triantaf
            </div>
129 60795 argiro.kok
          </div>
130 57298 argiro.kok
131
132 60795 argiro.kok
        </div>
133 57298 argiro.kok
      </div>
134 60795 argiro.kok
    </div>
135 57298 argiro.kok
136
137 60795 argiro.kok
    <div *ngIf="menuSelected == 'identity'" class=" uk-padding-small ">
138
      <div class=" customizationMenuItems uk-margin-small">
139 60894 argiro.kok
140 60508 argiro.kok
        <div class="uk-grid">
141 60795 argiro.kok
          <div class="uk-width-2-3@m uk-width-1-1@s">
142 60894 argiro.kok
            <div class="uk-margin-top uk-margin-small-bottom uk-text-bold">Quick look
143 60795 argiro.kok
            </div>
144
            <div style="border-radius: 6px;" class="uk-alert uk-padding-small">
145
              <quick-look [primaryColor]="draftCustomizationOptions.identity.mainColor"
146
                          [secondaryColor]="draftCustomizationOptions.identity.secondaryColor" preview="identity"></quick-look>
147
            </div>
148
          </div>
149
          <div class="uk-width-1-3@m uk-width-1-1@s">
150 57298 argiro.kok
151 60894 argiro.kok
            <div class="uk-margin-top uk-margin-small-bottom uk-text-bold" > Identity
152 60830 argiro.kok
              <a *ngIf="hasChanges(publishedCustomizationOptions.identity, draftCustomizationOptions.identity) &&
153 60894 argiro.kok
              draftCustomizationOptions.identityIsCustom" class="uk-margin-small-left"
154 60830 argiro.kok
                 uk-tooltip="title:<div class='uk-padding-small uk-width-large'>Reset to previously saved options</div>"
155 60894 argiro.kok
               (click)="resetIdentityToPublished();">  <icon name="reset"></icon></a></div>
156 60508 argiro.kok
157 60894 argiro.kok
            <div class="uk-margin-top">
158
              <div class="">
159 60830 argiro.kok
                <span>Custom style</span>
160
                <mat-slide-toggle class="uk-margin-large-left"
161
                                  [checked]="draftCustomizationOptions.identityIsCustom"
162
                                  (change)="draftCustomizationOptions.identityIsCustom =
163
                                  !draftCustomizationOptions.identityIsCustom;
164
                                  draftCustomizationOptions.identityIsCustom?'':this.resetIdentityToDefault();"
165
                                  [attr.uk-tooltip]="'title:<div class=\'uk-padding-small uk-width-large\'>' +
166
                  (draftCustomizationOptions.identityIsCustom?'Change to default identity values':'Customize identity colors')+'</div>'"
167
                                  >
168
                </mat-slide-toggle>
169 57338 argiro.kok
              </div>
170 60830 argiro.kok
              <div *ngIf="!draftCustomizationOptions.identityIsCustom" class="uk-margin-top uk-text-small"
171
                   style="font-style: italic">
172 60894 argiro.kok
                Identity is set in the default values.
173 60830 argiro.kok
              </div>
174 57298 argiro.kok
            </div>
175 60894 argiro.kok
            <div *ngIf="draftCustomizationOptions.identityIsCustom" class=" uk-margin-large-top">
176
              <div class=" uk-margin-small-bottom uk-text-uppercase uk-margin-small-left">Colors</div>
177 60795 argiro.kok
              <color [color]="draftCustomizationOptions.identity.mainColor" (colorChange)=
178 60830 argiro.kok
                " draftCustomizationOptions.identity.mainColor= $event; updateBackgroundsAndButtonsBasedOnIdentity()"
179 60894 argiro.kok
                     label="Primary"></color>
180 60795 argiro.kok
              <color [color]="draftCustomizationOptions.identity.secondaryColor" (colorChange)=
181 60894 argiro.kok
                " draftCustomizationOptions.identity.secondaryColor= $event; updateBackgroundsAndButtonsBasedOnIdentity()" label="Secondary"></color>
182 60508 argiro.kok
            </div>
183 60830 argiro.kok
184 60508 argiro.kok
          </div>
185 60795 argiro.kok
186 57298 argiro.kok
      </div>
187
188
189 60795 argiro.kok
      </div>
190 57298 argiro.kok
    </div>
191 60795 argiro.kok
192 60830 argiro.kok
    <div class=" uk-padding-small ">
193
      <div class="uk-margin-top uk-margin-small-bottom uk-text-bold">Preview</div>
194 60894 argiro.kok
      <div
195
           class="uk-margin-medium-top uk-position-relative uk-width-1-1 uk-flex uk-flex-center">
196
        <div *ngIf="hasChanges(draftCustomizationOptions, appliedCustomizationOptions)"
197
             class="  uk-width-1-1  refresh-indicator"  >
198
          <div class="uk-position-relative uk-height-1-1">
199
            <div class="uk-position-center uk-text-center clickable"
200
                 (click)="applyLayout()">
201
              <div>
202
                <icon name="refresh"></icon>
203
              </div>
204
              <span>Style has been changed. Click to refresh the view.</span>
205
            </div>
206
          </div>
207
        </div>
208
        <iframe *ngIf="previewUrl" [src]="previewUrl" class="uk-width-1-1 "
209
        ></iframe>
210
211 57995 argiro.kok
      </div>
212 60894 argiro.kok
213 60830 argiro.kok
    </div>
214
    </div>
215 55946 k.triantaf
  </div>
216 57298 argiro.kok
217 55946 k.triantaf
</div>
218 60306 argiro.kok
  </div>
219
</div>
220 60894 argiro.kok
<!--
221 57995 argiro.kok
<modal-alert #backAlert (alertOutput)="resetToAppliedOptions()">
222
  <div class="uk-text-bold uk-h5">If you leave that Page without applying or publishing, changes will be lost.</div>
223 57338 argiro.kok
  <div> Are you sure that you want to proceed?</div>
224
</modal-alert>
225
226 57995 argiro.kok
<modal-alert #exitAlert (alertOutput)="exitCustomization()">
227 57338 argiro.kok
  <div class="uk-text-bold uk-h5">If you leave that Page without applying or publishing, changes will be lost.</div>
228
  <div> Are you sure that you want to proceed?</div>
229
</modal-alert>
230 60894 argiro.kok
-->