Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New design (and structure) #95

Merged
merged 51 commits into from
Jan 25, 2023
Merged
Show file tree
Hide file tree
Changes from 40 commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
8812144
First draft
manuelmeister Oct 18, 2022
c044bc5
Checkin static assets
manuelmeister Oct 18, 2022
2a44826
Split up _new and rename to _global
manuelmeister Nov 7, 2022
56be455
Update design to use cut off edges instead of rounded ones
manuelmeister Nov 22, 2022
aa08c0e
Merge remote-tracking branch 'upstream/master' into feature/improve-ui
manuelmeister Nov 22, 2022
2eb8586
Update design to use cut off edges instead of rounded ones on tabs
manuelmeister Nov 23, 2022
a9b7108
Add improved search back in
manuelmeister Nov 29, 2022
2160fe7
Make home buttons dynamic
manuelmeister Nov 29, 2022
e0a8eb5
Update compiled css
manuelmeister Nov 29, 2022
1e44dd8
Migrate from Collection to Loop
manuelmeister Nov 29, 2022
b4351b9
Migrate from RawArray to DataStructure
manuelmeister Nov 29, 2022
357f730
Remove api section
manuelmeister Nov 29, 2022
ba92fa0
Extract shortcut override
manuelmeister Nov 29, 2022
2964f44
Fix home page buttons
manuelmeister Nov 30, 2022
018173a
Remove unnecessary styling
manuelmeister Nov 30, 2022
4edfa1a
Improve code highlighting
manuelmeister Nov 30, 2022
2e469c0
Remove dependency fully from materialize-docs
manuelmeister Nov 30, 2022
496c706
Fix collection styling
manuelmeister Nov 30, 2022
fad1b2d
Fix accessibility of tabs
manuelmeister Nov 30, 2022
a8eb3ab
Fix tab styling on mobile
manuelmeister Nov 30, 2022
c1c8c3c
Fix font styling
manuelmeister Nov 30, 2022
ae439ba
Remove unnecessary `if` keys
manuelmeister Nov 30, 2022
341d29f
Extract prismjs plugin
manuelmeister Nov 30, 2022
f10c170
Add license for copied code
manuelmeister Nov 30, 2022
8fe4e4c
Fix collection to items migration
manuelmeister Dec 9, 2022
8311c2f
Change design to adhere more to the CI
manuelmeister Dec 9, 2022
9b22463
Fix visual text decoration bug
manuelmeister Dec 9, 2022
77eec48
Add ability to dismiss sidebar overlay with esc
manuelmeister Dec 9, 2022
8d2a591
Remove jQuery
manuelmeister Dec 9, 2022
d1a19be
Change help message of the iframe page
manuelmeister Dec 9, 2022
22c001a
Move prism fusion & afx implementation
manuelmeister Dec 9, 2022
4d7a7a6
Remove outdated search form script
manuelmeister Dec 9, 2022
5e7edbe
Improve pagespeed
manuelmeister Dec 9, 2022
af32893
Split js to improve rendering on mobile due to safari bug
manuelmeister Dec 9, 2022
ebd805c
Minor fixes
manuelmeister Dec 12, 2022
128a85a
Simplify vitepress sidebar styling
manuelmeister Dec 14, 2022
1ec7df9
Change hover style of local navigation to color instead of text-decor…
manuelmeister Dec 14, 2022
6b77815
Cleanup unused variables and templates
manuelmeister Dec 15, 2022
b519efc
Fix full width layouts, collections & authors
manuelmeister Dec 21, 2022
cc76554
Fix todo notice
manuelmeister Dec 21, 2022
3fedf4d
Change design of section titleLinks
manuelmeister Dec 22, 2022
bcb2b3a
Remove unnecessary context
manuelmeister Dec 22, 2022
0b826b9
Rename HTML to CodePreview to use alongside code examples
manuelmeister Dec 22, 2022
f2aeacf
Remove childNodes possibility of iframe node
manuelmeister Dec 22, 2022
cc51458
Move menu item specific properties to mixin
manuelmeister Dec 22, 2022
3e1de43
Fix LocalNavigation after last try to remove the context
manuelmeister Jan 9, 2023
ad1c236
Improve active state rendering of IntersectionObserver
manuelmeister Jan 9, 2023
c3e0be3
Merge remote-tracking branch 'upstream/task/neos-81-upgrade' into fea…
manuelmeister Jan 18, 2023
f4ef1f7
Merge branch 'master' into feature/improve-ui
markusguenther Jan 20, 2023
e7d98b0
Fix mobile navbar overflow
manuelmeister Jan 22, 2023
98e4f9d
Improve tutorial card hover
manuelmeister Jan 24, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
<?php

namespace Neos\DocsNeosIo\FlowQuery\Operations;

use Neos\ContentRepository\Domain\Model\NodeInterface;
use Neos\Eel\FlowQuery\FlowQuery;
use Neos\Eel\FlowQuery\Operations\AbstractOperation;
use Neos\Eel\FlowQuery\FlowQueryException;

/**
* Copyright (c) 2018 Marvin Kuhn
*/
class FilterByReferencesOperation extends AbstractOperation
{
/**
* {@inheritdoc}
*
* @var string
*/
static protected $shortName = 'filterByReferences';

/**
* {@inheritdoc}
*
* @param FlowQuery $flowQuery the FlowQuery object
* @param array $arguments the arguments for this operation
* @return void
* @throws FlowQueryException
*/
public function evaluate(FlowQuery $flowQuery, array $arguments)
{
if (!is_string($arguments[0])) {
throw new FlowQueryException('The first parameter of '.self::$shortName.' should be an string.');
}
if (!is_array($arguments[1])) {
throw new FlowQueryException('The second parameter of '.self::$shortName.' should be an array.');
}

$context = \array_filter($flowQuery->getContext(), $this->getReferenceFilter($arguments[0], $arguments[1]));
$flowQuery->setContext($context);
}

/**
* this method returns a closure which intersect references on a given property
*
* @param string $propertyName
* @param array $references
* @return \Closure
*/
public function getReferenceFilter(string $propertyName, array $references)
{
return function (NodeInterface $node) use ($propertyName, $references) {
$nodeReferences = $node->getProperty($propertyName);

if ($nodeReferences === null) {
return false;
}
return count(array_intersect($nodeReferences, $references)) > 0;
};
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@

Carbon:
IncludeAssets:
GoogleFonts: Material+Icons|Work+Sans:300,200,200italic,300italic,400,400italic
Packages:
aa_Theme:
Path:
Expand All @@ -16,6 +15,5 @@ Carbon:
Head:
- app.css
Body:
- https://code.jquery.com/jquery-3.2.1.min.js
- materialize.js
- prism.js
- app.js[data-manual]
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
label: 'YAML'
fusion:
label: 'Fusion'
afx:
label: 'AFX'
fluid:
label: 'Fluid'
php:
Expand Down Expand Up @@ -62,6 +64,8 @@
label: 'Markdown'
xml:
label: 'XML'
docker:
label: 'Docker'
code:
type: string
defaultValue: 'Enter code here...'
Expand Down
23 changes: 23 additions & 0 deletions DistributionPackages/Neos.DocsNeosIo/NodeTypes/Content/HTML.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
'Neos.DocsNeosIo:Content.HTML':
manuelmeister marked this conversation as resolved.
Show resolved Hide resolved
superTypes:
'Neos.Neos:Content': true
'Neos.DocsNeosIo:Mixin.InspectorGeneral': true
ui:
label: HTML
icon: icon-code
position: 250
inlineEditable: true
properties:
code:
type: string
defaultValue: 'Enter code here...'
ui:
label: 'Edit code'
reloadIfChanged: true
inspector:
group: 'general'
editor: 'Neos.Neos/Inspector/Editors/CodeEditor'
editorOptions:
buttonLabel: 'Edit code'
search:
fulltextExtractor: '${Indexing.extractInto("code", value)}'
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
'Neos.DocsNeosIo:Content.Notice':
superTypes:
'Neos.Neos:Content': true
'Neos.Neos:ContentCollection': true
'Neos.DocsNeosIo:Mixin.Notice': true
ui:
label: Notice
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,17 @@
constraints:
nodeTypes:
'Neos.DocsNeosIo:Constraint.Content.Restricted': false

properties:
titleLink:
type: string
ui:
label: Headline Link
reloadIfChanged: true
inspector:
group: general
position: 100
editor: Neos.Neos/Inspector/Editors/LinkEditor
options:
template:
childNodes:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
properties:
title:
type: string
reloadIfChanged: true
ui:
label: 'Tab Title'
reloadIfChanged: true
inspector:
group: 'general'
group: 'general'
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,10 @@
reloadPageIfChanged: true
inspector:
group: visibility
mainMenuTitle:
type: string
ui:
label: 'Menu title'
reloadPageIfChanged: true
inspector:
group: document
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
label: Tutorial
help:
message: 'Task-oriented step-by-step description of a solution, can be opinionated'
icon: icon-book-open
icon: icon-graduation-cap
position: 500
constraints:
nodeTypes:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
'Neos.DocsNeosIo:Document.CookbookTag':
superTypes:
'Neos.DocsNeosIo:Document.AbstractPage': true
ui:
label: 'Tutorial Tag'
help:
message: 'Task-oriented step-by-step description of a solution, can be opinionated'
icon: icon-book-open
position: 500
childNodes:
main: ~
constraints:
nodeTypes:
'Neos.Neos:Document': false
'Neos.DocsNeosIo:Document.Cookbook': true
properties:
includedTag:
type: reference
ui:
label: 'IncludedTag'
reloadIfChanged: true
inspector:
group: 'document'
editorOptions:
nodeTypes: ['Neos.DocsNeosIo:Document.Tag']
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@
label: 'Tutorials Overview'
help:
message: 'Task-oriented step-by-step description of a solution, can be opinionated'
icon: icon-book-open
icon: icon-book
position: 500
childNodes:
main: ~
constraints:
nodeTypes:
'Neos.Neos:Document': false
'Neos.DocsNeosIo:Document.Cookbook': true
'Neos.DocsNeosIo:Document.CookbookTag': true
'Neos.Neos:Shortcut': true
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,18 @@
label: 'Alternative navigation root'
reloadIfChanged: true
inspector:
group: 'document'
group: 'document'
getStartedLink:
type: reference
ui:
label: 'Get started link'
reloadIfChanged: true
inspector:
group: 'document'
installLink:
type: reference
ui:
label: 'Install link'
reloadIfChanged: true
inspector:
group: 'document'
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
'Neos.DocsNeosIo:Document.IframePage':
superTypes:
'Neos.Neos:Document': true
childNodes:
main:
type: 'Neos.Neos:ContentCollection'
constraints:
nodeTypes:
'*': false
manuelmeister marked this conversation as resolved.
Show resolved Hide resolved
ui:
label: 'IFrame Page'
help:
message: 'Embed an iframe as a page'
icon: icon-file-o
position: 100
properties:
url:
type: string
defaultValue: ''
ui:
label: 'URL'
reloadIfChanged: true
inspector:
group: document
position: 'after status'
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
icon: 'fas fa-link'
'fas fa-external-link-alt':
label: 'External Link'
icon: 'fas fa-external-link-alt'
icon: 'fas fa-external-link-square-alt'
'fas fa-book':
label: 'Documentation'
icon: 'fas fa-book'
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
'Neos.Neos:Shortcut':
properties:
status:
manuelmeister marked this conversation as resolved.
Show resolved Hide resolved
type: string
defaultValue: ''
ui:
label: 'Menu status flag'
reloadPageIfChanged: true
inspector:
group: 'document'
editor: 'Neos.Neos/Inspector/Editors/SelectBoxEditor'
editorOptions:
allowEmpty: true
placeholder: 'None'
values:
'new':
label: 'New'
'updated':
label: 'Updated'
hideFromMainMenu:
type: boolean
ui:
label: i18n
reloadPageIfChanged: true
inspector:
group: visibility
mainMenuTitle:
type: string
ui:
label: 'Menu title'
manuelmeister marked this conversation as resolved.
Show resolved Hide resolved
reloadPageIfChanged: true
inspector:
group: document
Original file line number Diff line number Diff line change
Expand Up @@ -2,36 +2,13 @@ prototype(Neos.DocsNeosIo:Component.Authors) < prototype(Neos.Neos:ContentCompon
authors = false

renderer = afx`
<div class="authors authors-multiple" @if.hasMultiple={props.authors && Array.length(props.authors) > 1}>
<strong><i>Written by</i></strong>
<h4>
<Neos.Fusion:Collection collection={props.authors} itemName="author" iterationName="iteration" @children="itemRenderer">
{iteration.isFirst ? '' : ', '}
<span itemprop="author" itemscope="" itemtype="https://schema.org/Person"><span itemprop="name">{author.label}</span></span>
</Neos.Fusion:Collection>
</h4>
<div class="row">
<Neos.Fusion:Collection collection={props.authors} itemName="author" iterationName="iteration" @children="itemRenderer">
<div class="col s6 m3 profile-image-col">
<div class="image-container">
<img src={author.gravatar} class="profile-image" />
</div>
</div>
</Neos.Fusion:Collection>
</div>
</div>
<div class="authors authors-single" @if.hasOne={props.authors && Array.length(props.authors) == 1}>
<div class="row hide-on-small-only">
<div class="col s12 m3 center-on-small-only profile-image-col">
<div class="image-container">
<img src={Array.first(props.authors).gravatar} class="profile-image round" />
</div>
</div>
<div class="col s12 m9">
<strong><i>Written by</i></strong>
<h4><span itemprop="author" itemscope="" itemtype="https://schema.org/Person"><span itemprop="name">{Array.first(props.authors).label}</span></span></h4>
</div>
</div>
</div>
<p @if={props.authors} class={["authors", Array.length(props.authors) == 1 ? "authors-single" : "authors-multiple"]}>
<i>Written by</i> <span>
<Neos.Fusion:Loop items={props.authors} itemName="author" iterationName="iteration" @children="itemRenderer">
{iteration.index == 0 ? '' : iteration.isLast ? ' & ' :', '}
<strong itemprop="author" itemscope="" itemtype="https://schema.org/Person"><span itemprop="name">{author.label}</span></strong>
</Neos.Fusion:Loop>
</span>
</p>
`
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
prototype(Neos.DocsNeosIo:Component.Badge) < prototype(Neos.Fusion:Component) {

itemStatus = null

renderer = afx`
<span class={'badge new status-' + props.itemStatus}>{props.itemStatus}</span>
`
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
span.badge {
font-size: 0.8em;
display: inline-block;
padding: 0 4px;
font-weight: 400;
clip-path: polygon(4px 0, 0 4px, 0 100%, calc(100% - 4px) 100%, 100% calc(100% - 4px), 100% 0);
}

span.badge.new {
color: #26224c;
background-color: #eceafa;
}

.sidebar-link-item .badge {
margin-left: auto;
}
Loading