feat: Color Theme page logic
This commit is contained in:
		| @@ -46,7 +46,7 @@ block content | ||||
|                     span= t('nav.users') | ||||
|                 li | ||||
|                   a(href='/admin/theme') | ||||
|                     i.nc-icon-outline.design_paint-37 | ||||
|                     i.nc-icon-outline.ui-1_drop | ||||
|                     span= t('nav.theme') | ||||
|                 li | ||||
|                   a(href='/admin/settings') | ||||
|   | ||||
| @@ -4,25 +4,29 @@ block adminContent | ||||
|   .hero | ||||
|     h1.title#title= t('nav.theme') | ||||
|     h2.subtitle= t('admin:theme.subtitle') | ||||
|     i.pageicon.nc-icon-outline.design_paint-37 | ||||
|   .form-sections | ||||
|     section | ||||
|       label.label= t('admin:theme.primarycolor') | ||||
|       color-picker(current-color=appconfig.theme.primary) | ||||
|       span.desc Used for top navigation bar, headers, links, etc. | ||||
|     section | ||||
|       label.label= t('admin:theme.altcolor') | ||||
|       color-picker(current-color=appconfig.theme.alt) | ||||
|       span.desc Used for the sidebar (in a darker tone) | ||||
|     section | ||||
|       label.label= t('admin:theme.footercolor') | ||||
|       color-picker(current-color=appconfig.theme.footer) | ||||
|       span.desc Used for the foter (in a lighter tone) | ||||
|     section | ||||
|       label.label= t('admin:theme.codeblock') | ||||
|       toggle(:current-value=appconfig.theme.code.dark.toString(), desc='Use Dark Theme') | ||||
|       toggle(:current-value=appconfig.theme.code.colorize.toString(), desc='Colorize code syntax') | ||||
|     section | ||||
|       button.button.is-green(@click='saveUser') | ||||
|         i.nc-icon-outline.ui-1_check | ||||
|         span= t('admin:profile.savechanges') | ||||
|     i.pageicon.nc-icon-outline.ui-1_drop | ||||
|   admin-theme(inline-template, themedata=JSON.stringify(appconfig.theme)) | ||||
|     .form-sections | ||||
|       section | ||||
|         label.label= t('admin:theme.primarycolor') | ||||
|         color-picker(v-model='primary') | ||||
|         span.desc= t('admin:theme.primarycolordesc') | ||||
|       section | ||||
|         label.label= t('admin:theme.altcolor') | ||||
|         color-picker(v-model='alt') | ||||
|         span.desc= t('admin:theme.altcolordesc') | ||||
|       section | ||||
|         label.label= t('admin:theme.footercolor') | ||||
|         color-picker(v-model='footer') | ||||
|         span.desc= t('admin:theme.footercolordesc') | ||||
|       section | ||||
|         label.label= t('admin:theme.codeblock.title') | ||||
|         toggle(v-model='codedark', desc=t('admin:theme.codeblock.dark')) | ||||
|         toggle(v-model='codecolorize', desc=t('admin:theme.codeblock.colorize')) | ||||
|       section | ||||
|         button.button.is-grey(@click='resetTheme') | ||||
|           i.nc-icon-outline.design_paint-37 | ||||
|           span= t('admin:theme.reset') | ||||
|         button.button.is-green(@click='saveTheme') | ||||
|           i.nc-icon-outline.ui-1_check | ||||
|           span= t('admin:theme.savechanges') | ||||
|   | ||||
		Reference in New Issue
	
	Block a user