Skip to content

Commit

Permalink
update style of children tutorials
Browse files Browse the repository at this point in the history
  • Loading branch information
ankitskvmdam committed Jan 21, 2024
1 parent fa4b050 commit edeee60
Show file tree
Hide file tree
Showing 57 changed files with 178 additions and 74 deletions.
File renamed without changes.
File renamed without changes.
21 changes: 14 additions & 7 deletions demo/src/tutorials/tutorials.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
{
"Alive": {
"title": "Alive"
"z": {
"title": "Alive Tutorial",
"children": [
"b",
"z"
]
},
"Apple": {
"title": "Apple"
"b": {
"title": "Apple Tutorial"
},
"Environment": {
"title": "Environment"
"a": {
"title": "Environment Tutorial",
"children": [
"za"
]
},
"Other": {
"za": {
"title": "Other"
}
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion output/v4/AgentArray.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions output/v4/Alive.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions output/v4/Alive.js.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions output/v4/Apple.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions output/v4/Apple.js.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions output/v4/Database.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion output/v4/Energy.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions output/v4/Energy.js.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion output/v4/Environment.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions output/v4/Environment.js.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions output/v4/HideConstructor.js.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions output/v4/Modules.js.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions output/v4/NamespaceWithAlias.js.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions output/v4/Statement.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion output/v4/StatementIterator.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion output/v4/Test.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions output/v4/Tree.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions output/v4/Tree.js.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions output/v4/World.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions output/v4/World.js.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions output/v4/agentscript.js.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions output/v4/api.js.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion output/v4/global.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions output/v4/index.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion output/v4/module-SqlJs.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion output/v4/module-bookshelf.Book.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion output/v4/module-bookshelf.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion output/v4/module-color_mixer-Colour.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion output/v4/module-color_mixer.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion output/v4/obj.map.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion output/v4/pieOptions.html

Large diffs are not rendered by default.

18 changes: 18 additions & 0 deletions output/v4/styles/clean-jsdoc-theme-base.css
Original file line number Diff line number Diff line change
Expand Up @@ -973,3 +973,21 @@ pre {
visibility: hidden;
}
}

.child-tutorial-container {
display: flex;
flex-direction: row;
flex-wrap: wrap;
}

.child-tutorial {
border: 1px solid;
padding: 10px 16px;
border-radius: 10px;
margin: 5px;
display: block;
}

.child-tutorial:hover {
text-decoration: none;
}
9 changes: 9 additions & 0 deletions output/v4/styles/clean-jsdoc-theme-dark.css
Original file line number Diff line number Diff line change
Expand Up @@ -405,3 +405,12 @@ blockquote {
background: #555;
outline: 0.06125rem solid #555;
}

.child-tutorial {
border-color: #555;
color: #f3f3f3;
}

.child-tutorial:hover {
background: #222;
}
9 changes: 9 additions & 0 deletions output/v4/styles/clean-jsdoc-theme-light.css
Original file line number Diff line number Diff line change
Expand Up @@ -386,3 +386,12 @@ body.light {
background: #aaa;
outline: 0.06125rem solid #aaa;
}

.light .child-tutorial {
border-color: #aaa;
color: #222;
}

.light .child-tutorial:hover {
background: #ccc;
}
2 changes: 1 addition & 1 deletion output/v4/styles/clean-jsdoc-theme.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion output/v4/tutorial-AgentArray_.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions output/v4/tutorial-Alive_.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions output/v4/tutorial-Apple_.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions output/v4/tutorial-Environment_.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion output/v4/tutorial-Other.html

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions output/v4/tutorial-a.html

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions output/v4/tutorial-b.html

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions output/v4/tutorial-z.html

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions output/v4/tutorial-za.html

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions output/v4/tutorial-zza.html

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions publish.js
Original file line number Diff line number Diff line change
Expand Up @@ -732,6 +732,7 @@ exports.publish = async function (taffyData, opts, tutorials) {
};
});
}

if (doclet.see) {
doclet.see.forEach(function (seeItem, i) {
doclet.see[i] = hashToLink(doclet, seeItem);
Expand Down
18 changes: 18 additions & 0 deletions static/styles/clean-jsdoc-theme-base.css
Original file line number Diff line number Diff line change
Expand Up @@ -973,3 +973,21 @@ pre {
visibility: hidden;
}
}

.child-tutorial-container {
display: flex;
flex-direction: row;
flex-wrap: wrap;
}

.child-tutorial {
border: 1px solid;
padding: 10px 16px;
border-radius: 10px;
margin: 5px;
display: block;
}

.child-tutorial:hover {
text-decoration: none;
}
9 changes: 9 additions & 0 deletions static/styles/clean-jsdoc-theme-dark.css
Original file line number Diff line number Diff line change
Expand Up @@ -405,3 +405,12 @@ blockquote {
background: #555;
outline: 0.06125rem solid #555;
}

.child-tutorial {
border-color: #555;
color: #f3f3f3;
}

.child-tutorial:hover {
background: #222;
}
9 changes: 9 additions & 0 deletions static/styles/clean-jsdoc-theme-light.css
Original file line number Diff line number Diff line change
Expand Up @@ -386,3 +386,12 @@ body.light {
background: #aaa;
outline: 0.06125rem solid #aaa;
}

.light .child-tutorial {
border-color: #aaa;
color: #222;
}

.light .child-tutorial:hover {
background: #ccc;
}
2 changes: 1 addition & 1 deletion static/styles/clean-jsdoc-theme.min.css

Large diffs are not rendered by default.

25 changes: 17 additions & 8 deletions tmpl/tutorial.tmpl
Original file line number Diff line number Diff line change
@@ -1,14 +1,7 @@
<section>

<header>
<?js if (children.length > 0) { ?>
<ul><?js
var self = this;
children.forEach(function(t) { ?>
<li><?js= self.tutoriallink(t.name) ?></li>
<?js }); ?></ul>
<?js } ?>


<h2><?js= header ?></h2>
</header>

Expand All @@ -21,3 +14,19 @@

<?js= this.partial('include-target-script-and-styles.tmpl', filename) ?>


<?js if (children.length > 0) { ?>
<br><br>

<div class="child-tutorial-container">
<?js
var self = this;
children.forEach(function(t) {
let link = self.tutoriallink(t.name).replaceAll(/<a href=/g, "").replaceAll(/>.*/g,"")
?>
<a href=<?js= link ?> class="child-tutorial">
<?js= t.name ?>
</a>
<?js }); ?>
</div>
<?js } ?>

0 comments on commit edeee60

Please sign in to comment.