-
Notifications
You must be signed in to change notification settings - Fork 168
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #270 from hannu/improve-section-ui
Re-style section headings
- Loading branch information
Showing
3 changed files
with
111 additions
and
130 deletions.
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
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
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,71 +1,64 @@ | ||
<section class="sg section" | ||
ng-class="getClass(section)"> | ||
<header class="header"> | ||
<h1 ng-show="getLevel(section) === 'main'" class="sg section-header" ng-bind-template="{{ section.reference }} {{ section.header }}"></h1> | ||
<h2 ng-show="getLevel(section) === 'sub'" class="sg section-header" ng-bind-template="{{ section.reference }} {{ section.header }}"></h2> | ||
<h3 ng-show="getLevel(section) === 'sub-sub'" ng-show="" class="sg section-header" ng-bind-template="{{ section.reference }} {{ section.header }}" ></h3> | ||
<h4 ng-show="getLevel(section) === 'sub-sub-sub'" ng-show="" class="sg section-header" ng-bind-template="{{ section.reference }} {{ section.header }}"></h4> | ||
ng-class="getActive(section)"> | ||
<header class="sg section-header"> | ||
<a ng-href="{{section.reference}}"><i class="fa fa-link"></i></a> | ||
<h1 class="sg"><span class="reference-number">{{ section.reference }}</span> {{ section.header }}</h1> | ||
</header> | ||
<div class="body"> | ||
<div class="sg section-partial" ng-if="section.modifiers.length || section.description"> | ||
<p class="sg section-description" ng-bind-html="section.description | unsafe"></p> | ||
|
||
<ul ng-if="section.modifiers.length" class="sg modifier-list"> | ||
<li class="item" ng-repeat="mod in section.modifiers"> | ||
<strong ng-bind-html="mod.name | unsafe"></strong> - <span ng-bind-html="mod.description | unsafe"></span> | ||
</li> | ||
</ul> | ||
|
||
<div ng-if="section.modifiers.length" | ||
class="sg modifier" | ||
ng-repeat="mod in section.modifiers"> | ||
<div class="sg section-partial"> | ||
<div class="sg label"> | ||
<a ng-href="{{section.reference}}-{{mod.id}}/fullscreen" target="_blank"> | ||
<span class="sg name" ng-bind-html="mod.name | unsafe"></span><i class="fa fa-arrows-alt"></i> | ||
</a> | ||
</div> | ||
<div | ||
ng-bind-html="mod.wrappedMarkup | setModifierClass: mod.className | setVariables: variables | unsafe "> | ||
</div> | ||
</div> | ||
</div> | ||
<div ng-repeat-start="mod in section.modifiers"></div> | ||
<div class="sg section-partial"> | ||
<div class="sg label"> | ||
<a ng-href="{{section.reference}}-{{mod.id}}/fullscreen" target="_blank"> | ||
<span class="sg name" ng-bind-html="mod.name | unsafe"></span><i class="fa fa-arrows-alt"></i> | ||
</a> | ||
</div> | ||
<div | ||
class="sg section-partial" | ||
ng-class="getCommonClass()" | ||
ng-if="!section.modifiers.length && section.markup"> | ||
<div class="sg label"> | ||
<a ng-href="{{section.reference}}/fullscreen" target="_blank"> | ||
<i class="fa fa-arrows-alt"></i> | ||
</a> | ||
</div> | ||
<div | ||
ng-bind-html="section.wrappedMarkup | setVariables: variables | unsafe" dynamic-compile> | ||
</div> | ||
ng-bind-html="mod.wrappedMarkup | setModifierClass: mod.className | setVariables: variables | unsafe "> | ||
</div> | ||
</div> | ||
<div ng-repeat-end></div> | ||
<div | ||
class="sg section-partial" | ||
ng-class="getCommonClass()" | ||
ng-if="!section.modifiers.length && section.markup"> | ||
<div class="sg label"> | ||
<a ng-href="{{section.reference}}/fullscreen" target="_blank"> | ||
<i class="fa fa-arrows-alt"></i> | ||
</a> | ||
</div> | ||
<div | ||
ng-bind-html="section.wrappedMarkup | setVariables: variables | unsafe" dynamic-compile> | ||
</div> | ||
</div> | ||
|
||
<div class="sg section-partial code-listing" ng-if="section.css"> | ||
<div ng-if="section.showCSS" class="sg label"> | ||
<a ng-click="section.showCSS = false" target="_blank"> | ||
<i class="fa fa-close"></i> | ||
</a> | ||
</div> | ||
<pre class="sg" ng-if="section.showCSS"><!-- | ||
--><code hljs source="section.css" class="html"></code><!-- | ||
--></pre> | ||
<a class="sg show-section" ng-hide="section.showCSS" ng-click="section.showCSS = true">Show CSS</a> | ||
<div class="sg section-partial code-listing" ng-if="section.css"> | ||
<div ng-if="section.showCSS" class="sg label"> | ||
<a ng-click="section.showCSS = false" target="_blank"> | ||
<i class="fa fa-close"></i> | ||
</a> | ||
</div> | ||
<pre class="sg" ng-if="section.showCSS"><!-- | ||
--><code hljs source="section.css" class="html"></code><!-- | ||
--></pre> | ||
<a class="sg show-section" ng-hide="section.showCSS" ng-click="section.showCSS = true">Show CSS</a> | ||
</div> | ||
|
||
<div class="sg section-partial code-listing" ng-if="section.markup"> | ||
<div ng-if="section.showMarkup" class="sg label"> | ||
<a ng-click="section.showMarkup = false" target="_blank"> | ||
<i class="fa fa-close"></i> | ||
</a> | ||
</div> | ||
<pre class="sg" ng-if="section.showMarkup"><!-- | ||
--><code hljs source="section.markup" class="css"></code><!-- | ||
--></pre> | ||
<a class="sg show-section" ng-hide="section.showMarkup" ng-click="section.showMarkup = true">Show markup</a> | ||
<div class="sg section-partial code-listing" ng-if="section.markup"> | ||
<div ng-if="section.showMarkup" class="sg label"> | ||
<a ng-click="section.showMarkup = false" target="_blank"> | ||
<i class="fa fa-close"></i> | ||
</a> | ||
</div> | ||
<pre class="sg" ng-if="section.showMarkup"><!-- | ||
--><code hljs source="section.markup" class="css"></code><!-- | ||
--></pre> | ||
<a class="sg show-section" ng-hide="section.showMarkup" ng-click="section.showMarkup = true">Show markup</a> | ||
</div> | ||
</section> |