Changed L&F For the editor to use AVUSD logo and colors; Added a 1:2 and 2:1 split column widget (would like to make this all one configurable widget though).

This commit is contained in:
2021-01-16 10:09:20 -08:00
parent d16c76afb4
commit db2a612e2a
15 changed files with 4146 additions and 8 deletions

15
app.js
View File

@@ -13,6 +13,8 @@ let apos = require('apostrophe')({
modules: {
'two-column-widgets': {extend: 'apostrophe-widgets'},
'two-column-1-2-widgets': {},
'two-column-2-1-widgets': {},
// Apostrophe module configuration
@@ -39,6 +41,15 @@ let apos = require('apostrophe')({
'apostrophe-db': {
uri: process.env.MONGO_URL
},
'apostrophe-rich-text-permalinks': {
join: {
withType: ["apostrophe-page", "apostrophe-file"]
}
},
//Note: Rich Text Widgets configuration is being done in the /lib/modules/apostrophe-rich-text-widgets/index.js
//
// 'apostrophe-rich-text-widgets': {
// sanitizeHtml: {
// allowedAttributes: {
@@ -50,7 +61,9 @@ let apos = require('apostrophe')({
// }
// }
// }
// Was having some issues with overlaying menus.
// Was having some issues with the menus hovering over the text the user was editing. Is less functional but better looking.
//'apostrophe-tiptap-rich-text-widgets': {}
}
});

3930
dev/images/Logo Stylized.svg Normal file

File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 398 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 202 KiB

View File

@@ -51,6 +51,49 @@ ul.bulletLevel2 {
list-style-position: inside;
}
.apos-login-logo {
margin-bottom: 0;
}
.apos-login-logo svg {
width: 200px;
height: 200px;
}
.apos-login.apos-ui {
background-color: #d29a6b;
}
.apos-ui .apos-field {
margin-bottom: 1rem;
}
.apos-ui .apos-field-input {
padding: 0.5rem;
}
.apos-ui .apos-login-submit {
margin-top: 3rem;
}
.apos-ui .apos-button--major {
background-color: saddlebrown;
}
.apos-ui .apos-button--global {
background-color: #4F3A28;
}
.apos-ui .apos-field-input:focus {
box-shadow: 0 0 15px 0 #4F3A28;
}
.apos-login-wrapper, .apos-login-content, .apos-ui .apos-admin-bar {
background-color: #4F3A28;
}
@media only screen and (min-width: 1450px) {
.apos-ui .apos-admin-bar-logo, .apos-ui .apos-admin-bar-logo svg {
max-height: 40px;
max-width: 40px;
margin-right: 30px;
}
}
@media only screen and (max-width: 1100px) {
html {
font-size: 14px !important;

View File

@@ -1 +1 @@
{"version":3,"sourceRoot":"","sources":["main.sass"],"names":[],"mappings":"AACA;EACC;EACA;EACA;;;AAED;EACC;EACA;EACA;EACA;;;AAED;EACC;;;AAED;EACC;EACA;;;AAED;EACC;EACA;;;AAED;EACC;;;AAED;EACC;;;AAGD;EACC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAED;EACC;EACA;EACA;;;AAMD;EACC;IACC;;;AAEF;EACC;IACC;;;AAEF;EACC;IACC;;;AAEF;EACC;IACC","file":"main.css"}
{"version":3,"sourceRoot":"","sources":["main.sass"],"names":[],"mappings":"AACA;EACC;EACA;EACA;;;AAED;EACC;EACA;EACA;EACA;;;AAED;EACC;;;AAED;EACC;EACA;;;AAED;EACC;EACA;;;AAED;EACC;;;AAED;EACC;;;AAGD;EACC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAED;EACC;EACA;EACA;;;AAOD;EACC;;;AACD;EACC;EACA;;;AACD;EACC,kBAPU;;;AASV;EACC;;AACD;EACC;;AACD;EACC;;AACD;EACC;;AACD;EACC,kBAnBQ;;AAoBT;EACC;;;AACF;EACC,kBAvBS;;;AAwBV;EACC;IACC;IACA;IACA;;;AAKF;EACC;IACC;;;AAEF;EACC;IACC;;;AAEF;EACC;IACC;;;AAEF;EACC;IACC","file":"main.css"}

View File

@@ -45,6 +45,38 @@ ul.bulletLevel2
list-style-position: inside
//
// Redefine some of the Apostrophe administrative UI.
//
$bg-dark: #4F3A28
$bg-light: #d29a6b
.apos-login-logo
margin-bottom: 0
.apos-login-logo svg
width: 200px
height: 200px
.apos-login.apos-ui
background-color: $bg-light
.apos-ui
.apos-field
margin-bottom: 1rem
.apos-field-input
padding: 0.5rem
.apos-login-submit
margin-top: 3rem
.apos-button--major
background-color: saddlebrown
.apos-button--global
background-color: $bg-dark
.apos-field-input:focus
box-shadow: 0 0 15px 0 $bg-dark
.apos-login-wrapper, .apos-login-content, .apos-ui .apos-admin-bar
background-color: $bg-dark
@media only screen and (min-width: 1450px)
.apos-ui .apos-admin-bar-logo, .apos-ui .apos-admin-bar-logo svg
max-height: 40px
max-width: 40px
margin-right: 30px
//
// Everything scales off of the HTML tag font sizes since the whole site uses REM units.
//

View File

@@ -14,10 +14,6 @@ module.exports = {
{
name: 'aves',
label: 'Elementary School Page'
},
{
name: 'basic',
label: 'basic'
}
// Add more page types here, but make sure you create a corresponding

View File

@@ -18,7 +18,8 @@
]
},
'apostrophe-files': {},
'two-column': {}
'two-column': {},
'two-column-1-2': {}
}
}) }}
</div>

View File

@@ -0,0 +1,16 @@
module.exports = {
extend: 'apostrophe-widgets',
label: 'Two Column (1:2)',
addFields: [
{
name: 'areaLeft',
type: 'area',
label: "Left Area",
},
{
name: "areaRight",
type: "area",
label: "Right Area"
}
]
};

View File

@@ -0,0 +1,40 @@
<div class="container">
<div class="row">
<div class="col-lg-4">
{{ apos.area(data.widget, "areaLeft", {
widgets: {
'apostrophe-images': {size: 'one-half'},
'apostrophe-rich-text': {
toolbar: ['Styles', 'Bold', 'Italic', 'Link', 'Unlink', 'Anchor', 'Table', 'BulletedList', 'Blockquote', 'Strike', 'Subscript', 'Superscript', 'Split'],
styles: [
{name: 'Paragraph', element: 'p'},
{name: 'Heading 2', element: 'h2'},
{name: 'Heading 3', element: 'h3'},
{name: 'Heading 4', element: 'h4'},
{name: 'Heading 5', element: 'h5'}
]
},
'apostrophe-files': {}
}
}) }}
</div>
<div class="col-lg-8">
{{ apos.area(data.widget, "areaRight", {
widgets: {
'apostrophe-images': {size: 'full'},
'apostrophe-rich-text': {
toolbar: ['Styles', 'Bold', 'Italic', 'Link', 'Unlink', 'Anchor', 'Table', 'BulletedList', 'Blockquote', 'Strike', 'Subscript', 'Superscript', 'Split'],
styles: [
{name: 'Paragraph', element: 'p'},
{name: 'Heading 2', element: 'h2'},
{name: 'Heading 3', element: 'h3'},
{name: 'Heading 4', element: 'h4'},
{name: 'Heading 5', element: 'h5'}
]
},
'apostrophe-files': {}
}
}) }}
</div>
</div>
</div>

View File

@@ -0,0 +1,16 @@
module.exports = {
extend: 'apostrophe-widgets',
label: 'Two Column (2:1)',
addFields: [
{
name: 'areaLeft',
type: 'area',
label: "Left Area",
},
{
name: "areaRight",
type: "area",
label: "Right Area"
}
]
};

View File

@@ -0,0 +1,40 @@
<div class="container">
<div class="row">
<div class="col-lg-8">
{{ apos.area(data.widget, "areaLeft", {
widgets: {
'apostrophe-images': {size: 'one-half'},
'apostrophe-rich-text': {
toolbar: ['Styles', 'Bold', 'Italic', 'Link', 'Unlink', 'Anchor', 'Table', 'BulletedList', 'Blockquote', 'Strike', 'Subscript', 'Superscript', 'Split'],
styles: [
{name: 'Paragraph', element: 'p'},
{name: 'Heading 2', element: 'h2'},
{name: 'Heading 3', element: 'h3'},
{name: 'Heading 4', element: 'h4'},
{name: 'Heading 5', element: 'h5'}
]
},
'apostrophe-files': {}
}
}) }}
</div>
<div class="col-lg-4">
{{ apos.area(data.widget, "areaRight", {
widgets: {
'apostrophe-images': {size: 'full'},
'apostrophe-rich-text': {
toolbar: ['Styles', 'Bold', 'Italic', 'Link', 'Unlink', 'Anchor', 'Table', 'BulletedList', 'Blockquote', 'Strike', 'Subscript', 'Superscript', 'Split'],
styles: [
{name: 'Paragraph', element: 'p'},
{name: 'Heading 2', element: 'h2'},
{name: 'Heading 3', element: 'h3'},
{name: 'Heading 4', element: 'h4'},
{name: 'Heading 5', element: 'h5'}
]
},
'apostrophe-files': {}
}
}) }}
</div>
</div>
</div>

View File

@@ -1,6 +1,6 @@
module.exports = {
extend: 'apostrophe-widgets',
label: 'Two Column',
label: 'Two Column (1:1)',
addFields: [
{
name: 'areaLeft',

8
package-lock.json generated
View File

@@ -1100,6 +1100,14 @@
"stoppable": "^1.1.0"
}
},
"apostrophe-rich-text-permalinks": {
"version": "2.0.5",
"resolved": "https://registry.npmjs.org/apostrophe-rich-text-permalinks/-/apostrophe-rich-text-permalinks-2.0.5.tgz",
"integrity": "sha512-BVHAW9EC36rBrc1+AXDyw7xOyFhqqT+gokjT828lgVp17xJHoQU/ABKjpFrTH3ywoPyx+p2xYVWZjl5j57Ubjw==",
"requires": {
"lodash": "^4.17.10"
}
},
"apostrophe-tiptap-rich-text-widgets": {
"version": "0.3.8",
"resolved": "https://registry.npmjs.org/apostrophe-tiptap-rich-text-widgets/-/apostrophe-tiptap-rich-text-widgets-0.3.8.tgz",

View File

@@ -17,6 +17,7 @@
"dependencies": {
"apostrophe": "^2.111.4",
"apostrophe-monitor": "^2.1.0",
"apostrophe-rich-text-permalinks": "^2.0.5",
"apostrophe-tiptap-rich-text-widgets": "^0.3.8",
"prosemirror-tables": "^0.9.1"
},