mirror of
https://github.com/getgrav/grav.git
synced 2025-02-20 19:56:53 +01:00
add local theme
This commit is contained in:
parent
a5faef5ded
commit
21a4c39c81
2
user/.gitignore
vendored
2
user/.gitignore
vendored
|
|
@ -7,7 +7,7 @@ plugins/*
|
|||
!plugins/.*
|
||||
themes/*
|
||||
!themes/.*
|
||||
!themes/local/*
|
||||
!themes/local
|
||||
|
||||
config/security.yaml
|
||||
|
||||
|
|
|
|||
371
user/themes/local/blueprints.yaml
Normal file
371
user/themes/local/blueprints.yaml
Normal file
|
|
@ -0,0 +1,371 @@
|
|||
name: 'Local'
|
||||
version: '1.0.0'
|
||||
description: 'Local Theme Configuration'
|
||||
icon: crosshairs
|
||||
author:
|
||||
name: 'Crabston'
|
||||
email: contact@crabston.dev
|
||||
url: 'https://crabston.dev'
|
||||
keywords: grav, theme, etc
|
||||
license: MIT
|
||||
|
||||
dependencies:
|
||||
- { name: grav, version: '>=1.6.0' }
|
||||
- minimal
|
||||
- quark-open-publishing
|
||||
- quark
|
||||
|
||||
form:
|
||||
validation: loose
|
||||
fields:
|
||||
tabs:
|
||||
type: tabs
|
||||
active: 1
|
||||
fields:
|
||||
general_info:
|
||||
type: tab
|
||||
title: 'Open Publishing Options'
|
||||
fields:
|
||||
chromelessoptions:
|
||||
type: section
|
||||
title: 'Chromeless Site (i.e. Embedded)'
|
||||
underline: true
|
||||
chromeless.enabled:
|
||||
type: toggle
|
||||
label: 'Hide Site Menu, Sidebar and Footer'
|
||||
highlight: 1
|
||||
default: 0
|
||||
options:
|
||||
'0': No
|
||||
'1': Yes
|
||||
validate:
|
||||
type: bool
|
||||
h5psetup:
|
||||
type: section
|
||||
title: 'H5P Setup'
|
||||
underline: true
|
||||
h5pembedrootpath:
|
||||
type: text
|
||||
size: long
|
||||
label: 'H5P Embed Source URL'
|
||||
default: 'https://h5p.org/h5p/embed/'
|
||||
help: 'Enter the embed source URL path up to, but not including, the H5P Content ID.'
|
||||
description: 'H5P embed source URL path up to, but not including, the Content ID. For example, ''https://h5p.org/h5p/embed/'' or ''https://[organization].h5p.com/content/''.'
|
||||
validate:
|
||||
type: URL
|
||||
displaycclicense:
|
||||
type: section
|
||||
title: 'Creative Commons License'
|
||||
underline: true
|
||||
fields:
|
||||
cc_license.enabled:
|
||||
type: toggle
|
||||
label: 'Display CC License'
|
||||
highlight: 1
|
||||
default: 0
|
||||
options:
|
||||
'0': No
|
||||
'1': Yes
|
||||
validate:
|
||||
type: bool
|
||||
cc_license.type:
|
||||
type: select
|
||||
label: 'CC License Type'
|
||||
default: ccby
|
||||
size: long
|
||||
description: 'Looking for more info about Creative Commons (CC) Licenses?<br> Visit the <a href="https://creativecommons.org/" target="_blank">creativecommons.org</a> site.'
|
||||
options:
|
||||
ccby: 'CC Attribution'
|
||||
ccbysa: 'CC Attribution Share Alike'
|
||||
ccbynd: 'CC Attribution No Derivatives'
|
||||
ccbync: 'CC Attribution Non-Commercial'
|
||||
ccbyncsa: 'CC Attribution Non-Commercial Share Alike'
|
||||
ccbyncnd: 'CC Attribution Non-Commercial No Derivatives'
|
||||
cc_license.icon:
|
||||
type: toggle
|
||||
label: 'Display Only CC License Icon'
|
||||
highlight: 1
|
||||
default: 0
|
||||
options:
|
||||
'0': No
|
||||
'1': Yes
|
||||
validate:
|
||||
type: bool
|
||||
cc_license.text:
|
||||
type: text
|
||||
size: long
|
||||
description: 'For example, ''except where otherwise noted.'''
|
||||
label: 'Additional CC License Text'
|
||||
validate:
|
||||
type: text
|
||||
menuoptions:
|
||||
type: section
|
||||
title: Menu
|
||||
underline: true
|
||||
dropdown.enabled:
|
||||
type: toggle
|
||||
label: 'Display Dropdowns in Menu'
|
||||
highlight: 1
|
||||
default: 1
|
||||
options:
|
||||
'0': Disabled
|
||||
'1': Enabled
|
||||
validate:
|
||||
type: bool
|
||||
theme_info:
|
||||
type: tab
|
||||
title: 'Quark Options'
|
||||
fields:
|
||||
production-mode:
|
||||
type: toggle
|
||||
label: 'Production mode'
|
||||
help: 'When enabled, Quark will render with minified CSS'
|
||||
highlight: 1
|
||||
default: 1
|
||||
options:
|
||||
'0': PLUGIN_ADMIN.DISABLED
|
||||
'1': PLUGIN_ADMIN.ENABLED
|
||||
validate:
|
||||
type: bool
|
||||
grid-size:
|
||||
type: select
|
||||
label: 'Grid size'
|
||||
help: 'The maximum width of the theme'
|
||||
size: small
|
||||
options:
|
||||
"": 'None (full width)'
|
||||
grid-xl: 'Extra Large'
|
||||
grid-lg: Large
|
||||
grid-md: Medium
|
||||
header_section:
|
||||
type: section
|
||||
title: 'Header Defaults'
|
||||
underline: true
|
||||
custom_logo:
|
||||
type: file
|
||||
label: 'Custom Logo'
|
||||
size: large
|
||||
destination: 'theme://images/logo'
|
||||
multiple: false
|
||||
markdown: true
|
||||
description: 'Will be used instead of default logo `theme://images/grav-logo.svg`'
|
||||
accept:
|
||||
- 'image/*'
|
||||
custom_logo_mobile:
|
||||
type: file
|
||||
label: 'Mobile Custom Logo'
|
||||
size: large
|
||||
destination: 'theme://images/logo'
|
||||
multiple: false
|
||||
accept:
|
||||
- 'image/*'
|
||||
header-fixed:
|
||||
type: toggle
|
||||
label: 'Fixed header'
|
||||
help: 'When enabled, the header will be fixed at the top of the browser'
|
||||
highlight: 1
|
||||
default: 1
|
||||
options:
|
||||
'0': PLUGIN_ADMIN.DISABLED
|
||||
'1': PLUGIN_ADMIN.ENABLED
|
||||
validate:
|
||||
type: bool
|
||||
header-animated:
|
||||
type: toggle
|
||||
label: Animated
|
||||
help: 'When enabled, the header will animate to a smaller header when scrolling'
|
||||
highlight: 1
|
||||
default: 1
|
||||
options:
|
||||
'0': PLUGIN_ADMIN.DISABLED
|
||||
'1': PLUGIN_ADMIN.ENABLED
|
||||
validate:
|
||||
type: bool
|
||||
header-dark:
|
||||
type: toggle
|
||||
label: 'Dark Style'
|
||||
help: 'When enabled, a dark-friendly style will be used'
|
||||
highlight: 0
|
||||
default: 0
|
||||
options:
|
||||
'0': PLUGIN_ADMIN.DISABLED
|
||||
'1': PLUGIN_ADMIN.ENABLED
|
||||
validate:
|
||||
type: bool
|
||||
header-transparent:
|
||||
type: toggle
|
||||
label: Transparent
|
||||
help: 'When enabled, a transparent style will be used'
|
||||
highlight: 0
|
||||
default: 1
|
||||
options:
|
||||
'0': PLUGIN_ADMIN.DISABLED
|
||||
'1': PLUGIN_ADMIN.ENABLED
|
||||
validate:
|
||||
type: bool
|
||||
footer_section:
|
||||
type: section
|
||||
title: 'Footer Defaults'
|
||||
underline: true
|
||||
sticky-footer:
|
||||
type: toggle
|
||||
label: 'Sticky footer'
|
||||
help: 'When enabled, the footer will be sticky at the bottom of the browser'
|
||||
highlight: 1
|
||||
default: 1
|
||||
options:
|
||||
'0': PLUGIN_ADMIN.DISABLED
|
||||
'1': PLUGIN_ADMIN.ENABLED
|
||||
validate:
|
||||
type: bool
|
||||
blog_section:
|
||||
type: section
|
||||
title: 'Blog Defaults'
|
||||
underline: true
|
||||
blog-page:
|
||||
type: text
|
||||
label: 'Blog Page'
|
||||
help: 'The route to the blog page when working with blog sidebar'
|
||||
size: medium
|
||||
default: /blog
|
||||
blog_page_hero_classes:
|
||||
type: text
|
||||
label: 'Hero Classes'
|
||||
markdown: true
|
||||
description: 'There are several Hero class options that can be listed here (space separated):<br />`text-light`, `text-dark`, `title-h1h2`, `parallax`, `overlay-dark-gradient`, `overlay-light-gradient`, `overlay-dark`, `overlay-light`, `hero-fullscreen`, `hero-large`, `hero-medium`, `hero-small`, `hero-tiny`<br />Please consult the [Quark documentation](https://github.com/getgrav/grav-theme-quark#hero-options) for more details.'
|
||||
spectre_section:
|
||||
type: section
|
||||
title: 'Spectre.css Options'
|
||||
underline: true
|
||||
spectre.exp:
|
||||
type: toggle
|
||||
label: 'Experimentals CSS'
|
||||
help: 'When enabled, the `spectre-exp.css` file will be included'
|
||||
highlight: 0
|
||||
default: 0
|
||||
options:
|
||||
'0': PLUGIN_ADMIN.DISABLED
|
||||
'1': PLUGIN_ADMIN.ENABLED
|
||||
validate:
|
||||
type: bool
|
||||
spectre.icons:
|
||||
type: toggle
|
||||
label: 'Icons CSS'
|
||||
help: 'When enabled, the `spectre-icons.css` file will be included'
|
||||
highlight: 0
|
||||
default: 0
|
||||
options:
|
||||
'0': PLUGIN_ADMIN.DISABLED
|
||||
'1': PLUGIN_ADMIN.ENABLED
|
||||
validate:
|
||||
type: bool
|
||||
custommenu_options:
|
||||
type: tab
|
||||
title: 'Custom Menu Items'
|
||||
fields:
|
||||
displaycustommenus.enabled:
|
||||
type: toggle
|
||||
label: 'Display Custom Menu Items'
|
||||
help: 'Determines if any defined custom menu entries are displayed in the menubar.'
|
||||
default: 0
|
||||
highlight: 1
|
||||
options:
|
||||
'0': No
|
||||
'1': Yes
|
||||
validate:
|
||||
type: bool
|
||||
menu:
|
||||
name: menu
|
||||
type: list
|
||||
label: 'Custom Menu Items'
|
||||
fields:
|
||||
.text:
|
||||
type: text
|
||||
label: Text
|
||||
description: 'Text label for menu item.'
|
||||
.icon:
|
||||
type: text
|
||||
label: Icon
|
||||
description: 'Font Awesome icon for menu item.'
|
||||
.url:
|
||||
type: text
|
||||
label: URL
|
||||
description: 'URL for menu item.'
|
||||
.target:
|
||||
type: select
|
||||
label: Target
|
||||
default: _self
|
||||
size: medium
|
||||
options:
|
||||
_blank: 'Open in a new window'
|
||||
_parent: 'Open in the parent frame'
|
||||
_top: 'Open in the full body of the window'
|
||||
_self: 'Open in the same frame as clicked'
|
||||
gitsynclink_options:
|
||||
type: tab
|
||||
title: 'Git Sync Link'
|
||||
fields:
|
||||
gitsyncsetup:
|
||||
type: section
|
||||
title: Setup
|
||||
underline: true
|
||||
display_of_git_sync_repo_link:
|
||||
type: select
|
||||
size: medium
|
||||
classes: fancy
|
||||
label: 'Location of Git Sync Link'
|
||||
default: menu
|
||||
options:
|
||||
menu: Menu
|
||||
page: 'Page (visible when ''Chromeless'')'
|
||||
footer: Footer
|
||||
none: None
|
||||
type_of_git_sync_repo_link:
|
||||
type: select
|
||||
size: medium
|
||||
label: 'Type of Git Sync Link'
|
||||
default: view
|
||||
options:
|
||||
view: 'View Git Repository'
|
||||
edit: 'View/Edit Page in Git Repository'
|
||||
gitsyncoptions:
|
||||
type: section
|
||||
title: Appearance
|
||||
underline: true
|
||||
custom_git_sync_repo_link_icon:
|
||||
type: input.text
|
||||
size: small
|
||||
label: 'Custom Font Awesome Icon'
|
||||
description: 'Short name, e.g. ''code-fork''.'
|
||||
validate:
|
||||
type: text
|
||||
custom_git_sync_repo_link_text:
|
||||
type: input.text
|
||||
size: long
|
||||
label: 'Custom Link Text'
|
||||
description: 'Link text, e.g. ''View Page in GitHub'' or ''View Page as Markdown''.'
|
||||
validate:
|
||||
type: text
|
||||
git_sync_edit_note_text:
|
||||
type: input.text
|
||||
size: medium
|
||||
label: 'Text before Page Link'
|
||||
description: 'The text before Git Sync Link located on a Page, e.g. ''Have a suggestion or correction?'' or ''Want to reuse this open content?''.'
|
||||
custom_git_sync_repo_presentation_link_text:
|
||||
type: input.text
|
||||
size: long
|
||||
label: 'Custom Presentation Link Text'
|
||||
description: 'Link text for embedded Presentations, e.g. ''View Slides in GitHub'' or ''View Slides as Markdown''.'
|
||||
validate:
|
||||
type: text
|
||||
gitsyncadvanced:
|
||||
type: section
|
||||
title: Advanced
|
||||
underline: true
|
||||
git_sync_repo_link:
|
||||
type: input.url
|
||||
label: 'Custom Git Repository Tree URL'
|
||||
help: 'Enter the URL that leads to the pages folder of your Git Repository.'
|
||||
description: 'URL path to pages folder for ''View/Edit Page in Git Repository'' option, but with ''/pages'' and everything following it removed. For example, ''https://github.com/paulhibbitts/demo-grav-course-hub/tree/master''.'
|
||||
validate:
|
||||
type: URL
|
||||
17
user/themes/local/css/custom.css
Normal file
17
user/themes/local/css/custom.css
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
/*
|
||||
===============================================================================================================================
|
||||
Put your custom CSS in this file.
|
||||
===============================================================================================================================
|
||||
*/
|
||||
|
||||
/* Load of Font Awesome for use by Presentation Plugin */
|
||||
@import url('//maxcdn.bootstrapcdn.com/font-awesome/4.6.1/css/font-awesome.min.css');
|
||||
|
||||
/* CSS to style Presentation Plugin slides */
|
||||
.reveal .slides {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.reveal h1, .reveal h2, .reveal h3, .reveal h4, .reveal h5, .reveal h6 {
|
||||
text-transform: unset !important;
|
||||
}
|
||||
BIN
user/themes/local/images/favicon.png
Normal file
BIN
user/themes/local/images/favicon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 13 KiB |
9
user/themes/local/local.php
Normal file
9
user/themes/local/local.php
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
<?php
|
||||
namespace Grav\Theme;
|
||||
|
||||
use Grav\Common\Theme;
|
||||
|
||||
class Local extends Minimal
|
||||
{
|
||||
// Access plugin events in this class
|
||||
}
|
||||
10
user/themes/local/local.yaml
Normal file
10
user/themes/local/local.yaml
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
streams:
|
||||
schemes:
|
||||
theme:
|
||||
type: ReadOnlyStream
|
||||
prefixes:
|
||||
'':
|
||||
- user/themes/local
|
||||
- user/themes/minimal
|
||||
- user/themes/quark-open-publishing
|
||||
- user/themes/quark
|
||||
Loading…
Reference in New Issue
Block a user