Skip to content

Commit

Permalink
other manual template fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mvorisek committed Jan 26, 2023
1 parent 61ef20e commit 4bb4c3d
Show file tree
Hide file tree
Showing 27 changed files with 67 additions and 68 deletions.
2 changes: 1 addition & 1 deletion demos/layout/templates/layout1.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<!-- Standard Meta-->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Site Properties-->
<title>Rainas homepage</title>
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.2.10/semantic.css">
Expand Down
26 changes: 13 additions & 13 deletions demos/layout/templates/layout1.pug
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ doctype html
html
head
// Standard Meta
meta(charset='utf-8')
meta(name='viewport', content='width=device-width, initial-scale=1.0, maximum-scale=1.0')
meta(charset="utf-8")
meta(name="viewport" content="width=device-width, initial-scale=1")
// Site Properties
title Rainas homepage
link(rel='stylesheet', type='text/css', href='https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.2.10/semantic.css')
script(src='https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js')
script(src='https://cdnjs.cloudflare.com/ajax/libs/jquery-serialize-object/2.5.0/jquery.serialize-object.min.js')
script(src='https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.2.10/semantic.min.js')
link(rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.2.10/semantic.css")
script(src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js")
script(src="https://cdnjs.cloudflare.com/ajax/libs/jquery-serialize-object/2.5.0/jquery.serialize-object.min.js")
script(src="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.2.10/semantic.min.js")
style.
@media (min-height: 320px) {
.ui.footer.form-page { /* Increased specificity for SO snippet priority */
Expand All @@ -23,14 +23,14 @@ html
}
body
.ui.inverted.fixed.horizontal.menu
a.header.item(href='#')
a.header.item(href="#")
| UI Test Layout 2
.ui.simple.dropdown.item
| Basic Examples
i.dropdown.icon
.menu
a.item(href='layout.php') Layout test
a.item(href='index.php') Back to other tests
a.item(href="layout.php") Layout test
a.item(href="index.php") Back to other tests

.ui.main.basic.segment
h3 Nominal Acitivity Report
Expand Down Expand Up @@ -62,20 +62,20 @@ html
.field
.ui.left.icon.input
i.calendar.icon
input(type='text', name='email', placeholder='From')
input(type="text" name="email" placeholder="From")
.field
.ui.left.icon.input
i.calendar.icon
input(type='text', name='email', placeholder='To')
input(type="text" name="email" placeholder="To")

.field
.ui.checkbox
input(type='checkbox', name='suppress0')
input(type="checkbox" name="suppress0")
label Suppress 0s

.field
.ui.checkbox
input(type='checkbox', name='suppress0')
input(type="checkbox" name="suppress0")
label Show Descriptions

.ui.teal.submit.button
Expand Down
2 changes: 1 addition & 1 deletion demos/layout/templates/layout2.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<!-- Standard Meta-->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Site Properties-->
<title>Agile UI - Button Test</title>
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.2.10/semantic.css">
Expand Down
24 changes: 12 additions & 12 deletions demos/layout/templates/layout2.pug
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ doctype html
html
head
// Standard Meta
meta(charset='utf-8')
meta(name='viewport', content='width=device-width, initial-scale=1.0, maximum-scale=1.0')
meta(charset="utf-8")
meta(name="viewport" content="width=device-width, initial-scale=1")
// Site Properties
title Agile UI - Button Test
link(rel='stylesheet', type='text/css', href='https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.2.10/semantic.css')
script(src='https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js')
script(src='https://cdnjs.cloudflare.com/ajax/libs/jquery-serialize-object/2.5.0/jquery.serialize-object.min.js')
script(src='https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.2.10/semantic.min.js')
link(rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.2.10/semantic.css")
script(src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js")
script(src="https://cdnjs.cloudflare.com/ajax/libs/jquery-serialize-object/2.5.0/jquery.serialize-object.min.js")
script(src="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.2.10/semantic.min.js")
style.
@media (min-height: 320px) {
.ui.footer.form-page { /* Increased specificity for SO snippet priority */
Expand All @@ -24,17 +24,17 @@ html
| {$Head}
body
.ui.inverted.fixed.horizontal.menu
a.header.item(href='#')
a.header.item(href="#")
| UI Test Layout 2
.ui.simple.dropdown.item
| Basic Examples
i.dropdown.icon
.menu
a.item(href='layout.php') User-defined Layouts
a.item(href='button.php') Button Styling
a.item(href='button2.php') Interactive Buttons
a.item(href='input.php') Form Controls
a.item(href='form.php') Form
a.item(href="layout.php") User-defined Layouts
a.item(href="button.php") Button Styling
a.item(href="button2.php") Interactive Buttons
a.item(href="input.php") Form Controls
a.item(href="form.php") Form

.ui.main.basic.segment
h3 Button Test
Expand Down
1 change: 0 additions & 1 deletion src/Behat/Context.php
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,6 @@ protected function assertNoDuplicateId(): void
EOF);

// TODO hack to pass CI testing, fix these issues and remove the error diffs below asap
$invalidIds = array_diff($invalidIds, ['']); // id="" is hardcoded in templates
$duplicateIds = array_diff($duplicateIds, ['atk', '_icon', 'atk_icon']); // generated when component is not correctly added to app/layout component tree - should throw, as such name/ID is dangerous to be used

if (count($invalidIds) > 0) {
Expand Down
2 changes: 1 addition & 1 deletion src/HtmlTemplate.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public function getTagTree(string $tag): TagTree
if (!isset($this->tagTrees[$tag])) {
throw (new Exception('Tag not found in template'))
->addMoreInfo('tag', $tag)
->addMoreInfo('template_tags', array_keys($this->tagTrees));
->addMoreInfo('template_tags', array_diff(array_keys($this->tagTrees), [self::TOP_TAG]));
}

return $this->tagTrees[$tag];
Expand Down
2 changes: 1 addition & 1 deletion template/accordion-section.pug
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
div(class="title", {$attributes})
i(class="{$icon} icon")
| {title}Title{/}
div(class="content ui basic segment", data-path="{$path}")
div(class="content ui basic segment" data-path="{$path}")
div(id="{$itemId}")
| {$Content}
= "\n"
6 changes: 3 additions & 3 deletions template/grid.pug
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
| {Container}
div(id="{$_id}" class="ui vertical segment")
div(class="ui atk-overflow-auto")
|{$Table}
|{$Content}
|{$Paginator}
| {$Table}
| {$Content}
| {$Paginator}
| {/Container}
</{_element}div{/}>
= "\n"
2 changes: 1 addition & 1 deletion template/inline-edit.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

<div class="{$_class} {$class}" {$attributes}>
<div {$attributes}>
<div class="inline field">
<atk-inline-edit v-bind="initData"></atk-inline-edit>
</div>
Expand Down
2 changes: 1 addition & 1 deletion template/inline-edit.pug
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
div(class="{$_class} {$class}", {$attributes})
div({$attributes})
.inline.field
atk-inline-edit(v-bind="initData")
= "\n"
2 changes: 1 addition & 1 deletion template/item-search.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@

<div class="{$_class} {$class}" {$attributes}>
<div {$attributes}>
<atk-item-search v-bind="initData"></atk-item-search>
</div>
2 changes: 1 addition & 1 deletion template/item-search.pug
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
div(class="{$_class} {$class}", {$attributes})
div({$attributes})
atk-item-search(v-bind="initData")
= "\n"
12 changes: 6 additions & 6 deletions template/js-search.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@

<div class="{_ui}ui{/} {$class} {_class}ui left icon action transparent input{/}" {$attributes}>
<i class="atk-filter-icon {$FilterIcon} icon"></i>
<input type="text" placeholder="{$Placeholder}" style="border: none;" class="atk-grid-search">
<button class="atk-search-button {$Button}" style="{buttonStyle}padding: 2px 0px; border: 0px; box-shadow: none; height: 24px;{/}">
<i class="atk-search-icon {$BtnSearchIcon} link icon" style="margin: auto;"></i>
<i class="atk-remove-icon {$BtnRemoveIcon} link icon" style="margin: auto;"></i>
</button>
<i class="atk-filter-icon {$FilterIcon} icon"></i>
<input type="text" placeholder="{$Placeholder}" style="border: none;" class="atk-grid-search">
<button class="atk-search-button {$Button}" style="{buttonStyle}padding: 2px 0px; border: 0px; box-shadow: none; height: 24px;{/}">
<i class="atk-search-icon {$BtnSearchIcon} link icon" style="margin: auto;"></i>
<i class="atk-remove-icon {$BtnRemoveIcon} link icon" style="margin: auto;"></i>
</button>
</div>
16 changes: 8 additions & 8 deletions template/js-search.pug
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
|<div class="{_ui}ui{/} {$class} {_class}ui left icon action transparent input{/}" {$attributes}>
| <i class="atk-filter-icon {$FilterIcon} icon"></i>
| <input type="text" placeholder="{$Placeholder}" style="border: none;" class="atk-grid-search">
| <button class="atk-search-button {$Button}" style="{buttonStyle}padding: 2px 0px; border: 0px; box-shadow: none; height: 24px;{/}">
| <i class="atk-search-icon {$BtnSearchIcon} link icon" style="margin: auto;"></i>
| <i class="atk-remove-icon {$BtnRemoveIcon} link icon" style="margin: auto;"></i>
| </button>
|</div>
| <div class="{_ui}ui{/} {$class} {_class}ui left icon action transparent input{/}" {$attributes}>
| <i class="atk-filter-icon {$FilterIcon} icon"></i>
| <input type="text" placeholder="{$Placeholder}" style="border: none;" class="atk-grid-search">
| <button class="atk-search-button {$Button}" style="{buttonStyle}padding: 2px 0px; border: 0px; box-shadow: none; height: 24px;{/}">
| <i class="atk-search-icon {$BtnSearchIcon} link icon" style="margin: auto;"></i>
| <i class="atk-remove-icon {$BtnRemoveIcon} link icon" style="margin: auto;"></i>
| </button>
| </div>
= "\n"
2 changes: 1 addition & 1 deletion template/layout/admin.pug
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
div(id="{$_id}" class="atk-layout")
.ui.left.vertical.menu.inverted.labeled.sidebar.atk-sidenav(class="{CssVisibility}visible{/}")
div(class="ui left vertical menu inverted labeled sidebar atk-sidenav {CssVisibility}visible{/}")
| {$LeftMenu}
main.atk-mainContainer.atk-admin-layout
| {$TopMenu}
Expand Down
2 changes: 1 addition & 1 deletion template/layout/maestro-sidenav.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

<div class="{_ui}{/} {$class} {$_class}" {$attributes}>
<div {$attributes}>
<div class="ui padded grid">
<div class="row atk-maestro-menu-title">
<div class="two wide column atk-submenu-toggle">
Expand Down
2 changes: 1 addition & 1 deletion template/layout/maestro-sidenav.pug
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
div(class="{_ui}{/} {$class} {$_class}", {$attributes})
div({$attributes})
.ui.padded.grid
.row.atk-maestro-menu-title
.two.wide.column.atk-submenu-toggle
Expand Down
2 changes: 1 addition & 1 deletion template/lister.pug
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@
| {/empty}
| {/rows}
|
|</div>
| </div>
= "\n"
2 changes: 1 addition & 1 deletion template/modal.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<div class="{$contentCss}">{$Content}</div>
{ActionContainer}
<div class="actions">
<div>{$actions}</div>
<div>{$actions}</div>
</div>
{/ActionContainer}
</{_element}div{/}>
10 changes: 5 additions & 5 deletions template/modal.pug
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
div(class="{$headerCss}") {$title}
div(class="{$contentCss}") {$Content}
|
|{ActionContainer}
|<div class="actions">
| <div>{$actions}</div>
|</div>
|{/ActionContainer}
| {ActionContainer}
| <div class="actions">
| <div>{$actions}</div>
| </div>
| {/ActionContainer}
|
</{_element}div{/}>
= "\n"
2 changes: 1 addition & 1 deletion template/pagelength.pug
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.ui.horizontal.list
.item {$Label}
.item
|<{_element}div{/} class="{_ui}ui selection compact dropdown{/} {$class} {_class}{/}" {$attributes}>{$Content}</{_element}div{/}>
| <{_element}div{/} class="{_ui}ui selection compact dropdown{/} {$class} {_class}{/}" {$attributes}>{$Content}</{_element}div{/}>
= "\n"
2 changes: 1 addition & 1 deletion template/paginator.pug
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
| {rows}

| {Item}
a.item(class="{$active}" href="{$link}" data-page="{$page}") {$page}
a(class="item {$active}" href="{$link}" data-page="{$page}") {$page}
|
| {/}

Expand Down
2 changes: 1 addition & 1 deletion template/panel/content.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@

<div class="{$_class} {$class}" {$attributes}>
<div {$attributes}>
<div class="ui basic segment">{$Content}</div>
</div>
2 changes: 1 addition & 1 deletion template/panel/content.pug
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
div(class="{$_class} {$class}", {$attributes})
div({$attributes})
.ui.basic.segment
| {$Content}
= "\n"
2 changes: 1 addition & 1 deletion template/panel/right.pug
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.atk-right-panel(class="{$_class} {$class}", {$attributes})
div(class="atk-right-panel {$_class} {$class}", {$attributes})
.ui.right.aligned.basic.segment
i.atk-panel-warning(class="{$WarningIcon} icon")
a.atk-panel-close(href="javascript:void(0)")
Expand Down
2 changes: 1 addition & 1 deletion template/tabs.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@

<div id="{$_id}">
<div {$attributes}>{$Menu}</div> {$Tabs}</div>
<div {$attributes}>{$Menu}</div>{$Tabs}</div>
2 changes: 1 addition & 1 deletion template/tabs.pug
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
div(id="{$_id}")
<div {$attributes}>{$Menu}</div>
| {$Tabs}
| {$Tabs}
= "\n"

0 comments on commit 4bb4c3d

Please sign in to comment.