-
Notifications
You must be signed in to change notification settings - Fork 0
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
Feature/design basics #29
Merged
Merged
Changes from 5 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
d7f8fb5
better design
danielaKay 76e241c
nicer search bar
danielaKay 263c15d
typo in search bar
danielaKay 79f6696
small design fixes
danielaKay 0fbfa16
fix test
davidhoelzel 9f175f0
css clean-up
danielaKay 4fd6b3b
Merge branch 'feature/design-basics' of github.com:qossmic/twig-doc-b…
danielaKay File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,74 +1,79 @@ | ||
<div class="twig-doc-component"> | ||
<div class="twig-doc-component-description"> | ||
<h3>{{ component.title }} ({{ component.projectPath ?? (component.name ~ '.html.twig') }})</h3> | ||
<div class="twig-doc-component-configuration"> | ||
<div> | ||
<h4>Description</h4> | ||
<p>{{ component.description }}</p> | ||
</div> | ||
<div> | ||
<h4>Parameters</h4> | ||
<ul> | ||
{% for key, type in component.parameters %} | ||
<li> | ||
<b>{{ key }}:</b> | ||
{% include '@TwigDoc/component/_parameter.html.twig' with {parameter: type} %} | ||
</li> | ||
{% endfor %} | ||
</ul> | ||
</div> | ||
<div> | ||
<h4>Category</h4> | ||
<p> | ||
<a href="{{ path('twig_doc_home', {'filterQuery': component.mainCategory.name, 'filterType': 'category'}) }}">{{ component.mainCategory.name }}</a> | ||
</p> | ||
</div> | ||
<div> | ||
<h4>Sub-Category</h4> | ||
{% if component.category.parent %} | ||
<p> | ||
<a href="{{ path('twig_doc_home', {'filterQuery': component.category.name, 'filterType': 'sub_category' }) }}"> | ||
{{ component.category.name }} | ||
</a> | ||
</p> | ||
{% else %} | ||
<p>NONE</p> | ||
{% endif %} | ||
</div> | ||
<div> | ||
<h4>Tags</h4> | ||
{% for tag in component.tags %} | ||
<p> | ||
<a href="{{ path('twig_doc_home', {'filterQuery': tag, 'filterType': 'tag'}) }}">{{ tag }}</a> | ||
</p> | ||
{% endfor %} | ||
</div> | ||
</div> | ||
<div class="twig-doc-component-examples"> | ||
<h4>Previews</h4> | ||
<div class="twig-doc-variation"> | ||
{% for name, variation in component.variations %} | ||
<h5{% if loop.first %} class="active"{% endif %} data-variation="{{ name }}">{{ name }}</h5> | ||
{% endfor %} | ||
{% for name, variation in component.variations %} | ||
<div class="twig-doc-variation-body{% if loop.first %} active{% endif %}" data-variation="{{ name }}"> | ||
<div class="twig-doc-viewport-width-display">Viewport size: <span class="twig-doc-viewport-width-value"></span>px</div> | ||
<div class="twig-doc-viewport-container"> | ||
{% include '@TwigDoc/component/_viewport.html.twig' with {component: component, componentData: variation ?? []} %} | ||
</div> | ||
<div class="twig-doc-variation-description"> | ||
<ul> | ||
{% for name, value in variation %} | ||
<li> | ||
<b>{{ name }}:</b> | ||
{% include '@TwigDoc/component/_parameter.html.twig' with {parameter: value} %} | ||
</li> | ||
{% endfor %} | ||
</ul> | ||
</div> | ||
</div> | ||
{% endfor %} | ||
</div> | ||
</div> | ||
</div> | ||
<div class="twig-doc-component-description"> | ||
<h3>{{ component.title }} | ||
({{ component.projectPath ?? (component.name ~ '.html.twig') }})</h3> | ||
<div class="twig-doc-component-configuration"> | ||
<div> | ||
<h4>Description</h4> | ||
<p>{{ component.description }}</p> | ||
</div> | ||
<div> | ||
<h4>Parameters</h4> | ||
<ul> | ||
{% for key, type in component.parameters %} | ||
<li> | ||
<b>{{ key }}:</b> | ||
{% include '@TwigDoc/component/_parameter.html.twig' with {parameter: type} %} | ||
</li> | ||
{% endfor %} | ||
</ul> | ||
</div> | ||
<div> | ||
<h4>Category</h4> | ||
<p> | ||
<a href="{{ path('twig_doc_home', {'filterQuery': component.mainCategory.name, 'filterType': 'category'}) }}">{{ component.mainCategory.name }}</a> | ||
</p> | ||
</div> | ||
<div> | ||
<h4>Sub-Category</h4> | ||
{% if component.category.parent %} | ||
<p> | ||
<a href="{{ path('twig_doc_home', {'filterQuery': component.category.name, 'filterType': 'sub_category' }) }}"> | ||
{{ component.category.name }} | ||
</a> | ||
</p> | ||
{% else %} | ||
<p>NONE</p> | ||
{% endif %} | ||
</div> | ||
<div> | ||
<h4>Tags</h4> | ||
{% for tag in component.tags %} | ||
<p> | ||
<a href="{{ path('twig_doc_home', {'filterQuery': tag, 'filterType': 'tag'}) }}">{{ tag }}</a> | ||
</p> | ||
{% endfor %} | ||
</div> | ||
</div> | ||
<div class="twig-doc-component-examples"> | ||
<h4>Previews</h4> | ||
<div class="twig-doc-variations"> | ||
{% for name, variation in component.variations %} | ||
<div class="twig-doc-variation"> | ||
<h5 class="active" data-variation="{{ name }}">{{ component.title }}-Variation: | ||
{{ name }}</h5> | ||
{# {% endfor %} | ||
{% for name, variation in component.variations %} #} | ||
<div class="twig-doc-variation-body active" data-variation="{{ name }}"> | ||
<div class="twig-doc-viewport-width-display">Viewport size: | ||
<span class="twig-doc-viewport-width-value"></span>px</div> | ||
<div class="twig-doc-viewport-container"> | ||
{% include '@TwigDoc/component/_viewport.html.twig' with {component: component, componentData: variation ?? []} %} | ||
</div> | ||
<div class="twig-doc-variation-description"> | ||
<ul> | ||
{% for name, value in variation %} | ||
<li> | ||
<b>{{ name }}:</b> | ||
{% include '@TwigDoc/component/_parameter.html.twig' with {parameter: value} %} | ||
</li> | ||
{% endfor %} | ||
</ul> | ||
</div> | ||
</div> | ||
</div> | ||
{% endfor %} | ||
</div> | ||
</div> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,18 @@ | ||
<form action="{{ path('twig_doc_home') }}" method="get" name="twig_doc_search_form"> | ||
<label for="twig_doc_search_form_filterQuery">Search</label> | ||
<input name="filterQuery" id="twig_doc_search_form_filterQuery" value="{{ filterQuery }}" autocomplete="off"/> | ||
<label for="twig_doc_search_form_filterType">What</label> | ||
<select name="filterType" id="twig_doc_search_form_filterType"> | ||
<option {{ filterType ? null : 'selected' }} value="">Everything</option> | ||
<option {{ filterType == 'category' ? 'selected' : null }} value="category">Category</option> | ||
<option {{ filterType == 'name' ? 'selected=selected' : null }} value="name">Component Name</option> | ||
<option {{ filterType == 'tags' ? 'selected' : null }} value="tags">Tags</option> | ||
<option {{ filterType == 'sub_category' ? 'selected' : null }} value="sub_category">Sub-Category</option> | ||
</select> | ||
<button type="submit" class="btn btn-primary">Search</button> | ||
{% if filterQuery %} | ||
<a href="{{ path('twig_doc_home') }}">Show all</a> | ||
{% endif %} | ||
</form> | ||
<div class="twig-doc-search-container"> | ||
<form action="{{ path('twig_doc_home') }}" method="get" name="twig_doc_search_form"> | ||
<label for="twig_doc_search_form_filterQuery">Search</label> | ||
<input name="filterQuery" id="twig_doc_search_form_filterQuery" value="{{ filterQuery }}" autocomplete="off"/> | ||
<label for="twig_doc_search_form_filterType">What</label> | ||
<select name="filterType" id="twig_doc_search_form_filterType"> | ||
<option {{ filterType ? null : 'selected' }} value="">Everything</option> | ||
<option {{ filterType == 'category' ? 'selected' : null }} value="category">Category</option> | ||
<option {{ filterType == 'name' ? 'selected=selected' : null }} value="name">Component Name</option> | ||
<option {{ filterType == 'tags' ? 'selected' : null }} value="tags">Tags</option> | ||
<option {{ filterType == 'sub_category' ? 'selected' : null }} value="sub_category">Sub-Category</option> | ||
</select> | ||
<button type="submit" class="btn btn-primary">Search</button> | ||
{% if filterQuery %} | ||
<a href="{{ path('twig_doc_home') }}">Show all</a> | ||
{% endif %} | ||
</form> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -1,5 +1,10 @@ | ||||||
body { | ||||||
padding: 0; | ||||||
margin: 0; | ||||||
} | ||||||
|
||||||
#twig-doc-container { | ||||||
margin-top: 60px; | ||||||
margin-top: 27px; | ||||||
} | ||||||
#twig-doc-container .breakpoints { | ||||||
position: fixed; | ||||||
|
@@ -26,7 +31,7 @@ | |||||
flex-grow: 1; | ||||||
} | ||||||
|
||||||
.twig-doc-navigation { | ||||||
#twig-doc-container .navigation { | ||||||
position: fixed; | ||||||
left: 0; | ||||||
top: 0; | ||||||
|
@@ -37,28 +42,28 @@ | |||||
z-index: 100; | ||||||
} | ||||||
|
||||||
.twig-doc-navigation ul { | ||||||
#twig-doc-container .navigation ul { | ||||||
display: flex; | ||||||
position: relative; | ||||||
flex-direction: row; | ||||||
{# margin-bottom: 25px; #} | ||||||
} | ||||||
|
||||||
.twig-doc-navigation ul ul { | ||||||
#twig-doc-container .navigation ul ul { | ||||||
display: none; | ||||||
position: absolute; | ||||||
} | ||||||
|
||||||
.twig-doc-navigation li { | ||||||
#twig-doc-container .navigation li { | ||||||
list-style: none; | ||||||
} | ||||||
|
||||||
.twig-doc-navigation li a { | ||||||
#twig-doc-container .navigation li a { | ||||||
padding: 5px 15px; | ||||||
} | ||||||
|
||||||
|
||||||
.twig-doc-navigation li:hover ul { | ||||||
#twig-doc-container .navigation li:hover ul { | ||||||
display: flex; | ||||||
} | ||||||
|
||||||
|
@@ -70,11 +75,13 @@ | |||||
border-radius: 20px; | ||||||
} | ||||||
#twig-doc-container .twig-doc-component-description { | ||||||
padding: 20px; | ||||||
//padding: 20px; | ||||||
} | ||||||
|
||||||
#twig-doc-container .twig-doc-component-description h3 { | ||||||
text-transform: none; | ||||||
padding: 0 20px; | ||||||
margin: 0; | ||||||
} | ||||||
#twig-doc-container .twig-doc-component-description p, | ||||||
#twig-doc-container .twig-doc-variation-description p { | ||||||
|
@@ -83,16 +90,24 @@ | |||||
} | ||||||
#twig-doc-container .twig-doc-component-description h4 { | ||||||
margin-top: 15px; | ||||||
margin-bottom: 0px; | ||||||
} | ||||||
|
||||||
#twig-doc-container .twig-doc-component-description h4:first-child { | ||||||
margin-top: 0; | ||||||
} | ||||||
|
||||||
#twig-doc-container .twig-doc-component-description ul { | ||||||
padding-top: 0; | ||||||
margin-top: 0; | ||||||
margin-left: 0; | ||||||
padding-left: 15px; | ||||||
} | ||||||
|
||||||
#twig-doc-container .twig-doc-component-configuration { | ||||||
display: flex; | ||||||
flex-direction: row; | ||||||
padding-top: 20px; | ||||||
padding: 20px 20px 0 20px; | ||||||
gap: 50px; | ||||||
} | ||||||
#twig-doc-container .twig-doc-component-configuration div { | ||||||
|
@@ -113,12 +128,13 @@ | |||||
margin-bottom: 20px; | ||||||
} | ||||||
|
||||||
#twig-doc-container .twig-doc-variation .twig-doc-variation-description { | ||||||
#twig-doc-container .twig-doc-variation .twig-doc-variation-description, | ||||||
#twig-doc-container .twig-doc-variation .twig-doc-viewport-width-display { | ||||||
padding-left: 20px; | ||||||
} | ||||||
|
||||||
.twig-doc-body { | ||||||
padding: 15px; | ||||||
//padding: 15px; | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These do not comment out code in css
Suggested change
|
||||||
} | ||||||
|
||||||
.twig-doc-variation h5 { | ||||||
|
@@ -127,12 +143,6 @@ | |||||
display: inline-block; | ||||||
} | ||||||
|
||||||
.twig-doc-variation h5:hover, .twig-doc-variation h5.active { | ||||||
background-color: #000000; | ||||||
color: #ffffff; | ||||||
cursor: pointer; | ||||||
} | ||||||
|
||||||
.twig-doc-variation-body { | ||||||
display: none; | ||||||
} | ||||||
|
@@ -146,7 +156,6 @@ | |||||
flex-direction: column; | ||||||
flex-grow: 1; | ||||||
border: none; | ||||||
padding: 10px; | ||||||
position: relative; | ||||||
overflow-x: scroll; | ||||||
} | ||||||
|
@@ -155,18 +164,63 @@ | |||||
display: flex; | ||||||
flex-direction: column; | ||||||
flex-grow: 1; | ||||||
min-width: 240px; | ||||||
margin: 0 auto; | ||||||
/* min-width: 240px; */ | ||||||
width: 100%; | ||||||
margin: 0; | ||||||
white-space: nowrap; | ||||||
text-align: center; | ||||||
position: relative; | ||||||
resize: horizontal; | ||||||
overflow-x: auto; | ||||||
outline: 1px solid #000000; | ||||||
} | ||||||
|
||||||
.twig-doc-iframe { | ||||||
width: 100%; | ||||||
flex-grow: 1; | ||||||
border: 0; | ||||||
background: white; | ||||||
margin: 10px 0; | ||||||
} | ||||||
|
||||||
.twig-doc-navigation { | ||||||
position: fixed; | ||||||
left: 0; | ||||||
top: 0; | ||||||
width: 100%; | ||||||
background: white; | ||||||
text-align: center; | ||||||
border-bottom: 1px darkgray solid; | ||||||
z-index: 100; | ||||||
} | ||||||
|
||||||
.twig-doc-navigation ul { | ||||||
display: flex; | ||||||
position: relative; | ||||||
flex-direction: row; | ||||||
} | ||||||
|
||||||
.twig-doc-navigation ul ul { | ||||||
display: none; | ||||||
position: absolute; | ||||||
border: 1px darkgray solid; | ||||||
border-top: none; | ||||||
background: white; | ||||||
|
||||||
} | ||||||
|
||||||
.twig-doc-navigation li { | ||||||
list-style: none; | ||||||
} | ||||||
|
||||||
.twig-doc-navigation li a { | ||||||
display: inline-block; | ||||||
padding: 5px 15px; | ||||||
} | ||||||
|
||||||
|
||||||
.twig-doc-navigation li:hover ul { | ||||||
display: flex; | ||||||
} | ||||||
.twig-doc-search-container { | ||||||
padding: 20px 0 20px 15px; | ||||||
} |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These do not comment out code in css