Skip to content
This repository has been archived by the owner on Jan 7, 2018. It is now read-only.

Commit

Permalink
These are most of the JS functions separated out into individual scri…
Browse files Browse the repository at this point in the history
…pts. They are also being ported over to the NodeJS master as well.
  • Loading branch information
visuale committed Jun 16, 2015
1 parent 1523ab9 commit 6222de7
Show file tree
Hide file tree
Showing 14 changed files with 758 additions and 616 deletions.
2 changes: 2 additions & 0 deletions addons.html
Original file line number Diff line number Diff line change
Expand Up @@ -996,6 +996,8 @@ <h3>Contact</h3>
<script type="text/javascript" src="js/parallax.min.js" ></script>
<!-- Touchswipe -->
<script type="text/javascript" src="js/jquery.touchSwipe.min.js"></script>
<!-- Page Specific JS -->
<script type="text/javascript" src="js/forge.addons.jquery.js" ></script>



Expand Down
3 changes: 3 additions & 0 deletions community.html
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,9 @@ <h3>Contact</h3>
<script type="text/javascript" src="js/parallax.min.js" ></script>
<!-- Touchswipe -->
<script type="text/javascript" src="js/jquery.touchSwipe.min.js"></script>
<!-- Page Specific JS -->
<script type="text/javascript" src="js/forge.community.jquery.js" ></script>



</body>
Expand Down
35 changes: 35 additions & 0 deletions css/forge.css
Original file line number Diff line number Diff line change
Expand Up @@ -978,6 +978,7 @@ div.environment-os-section-flex {
/* Vertical alignment */
align-items:center;
-webkit-align-items:center;
flex-wrap:wrap;

}

Expand Down Expand Up @@ -1073,6 +1074,35 @@ div.environment-os-section-flex div.col.right-col div ul {
*/


/*============== DOWNLOAD INSTRUCTIONS SECTION ==============*/
.download-instructions-section {
background: #eeedf2;
padding:1em 0 2em 0;
}

.download-instructions-section h2.download-title {
margin-bottom:20px;
color: #838383;
text-align: center;
}

.download-instructions-section h2.section-heading {
margin-top:20px;
font-size:1.4em;
}

.download-instructions-section ul {
list-style-position: outside;
margin:0;
padding:0;
}

.download-instructions-section ul li {
font-size:.8em;
padding:.5em 0;
}


/*============== FOOTER SECTION (BLUE SECTION W/LINKS) ==============*/


Expand Down Expand Up @@ -2484,6 +2514,11 @@ GRADIENT BACKGROUNDS
padding-top:.5em;
}

.download-instructions-section .row {
width:80%;
margin:0 auto;
}


}

Expand Down
34 changes: 22 additions & 12 deletions css/forge_documentation.css
Original file line number Diff line number Diff line change
Expand Up @@ -100,19 +100,25 @@ input[type="checkbox"].search-checkbox:checked + label span {
.row.documentation-boxes {
padding:1em 0;
}

.row.documentation-flex-boxes {
align-items: center;
justify-content: center;

display: -webkit-box; /* OLD - iOS 6-, Safari 3.1-6 */
display: -moz-box; /* OLD - Firefox 19- (buggy but mostly works) */
display: -moz-box; /* OLD - Firefox 19- (buggy but mostly works) *Update - hurts any recent FF version */
display: -ms-flexbox; /* TWEENER - IE 10 */
display: -webkit-flex; /* NEW - Chrome */
display: flex;
display:flex;

justify-content:flex-start;
flex-flow: row wrap;
-webkit-flex-flow:row wrap;


flex-direction:row;
-webkit-flex-direction:row;
align-items: flex-start;
-webkit-align-items:flex-start;
-webkit-align-content:flex-start;
text-align: center;
}

.row.documentation-flex-boxes p {
Expand All @@ -126,15 +132,19 @@ input[type="checkbox"].search-checkbox:checked + label span {
}

.documentation-flex-boxes div.documentation-item {
flex: 1 1 28.3333%;
-webkit-box-flex: 1 1 28.3333%;
-moz-box-flex: 1 1 28.3333%;
-webkit-flex:1 1 28.3333%;
margin:10px 8px;
-ms-flex:1;
margin:10px 1%;
flex:0 0 31.333%;
-moz-box-flex: 0 0 31.333%;
-webkit-box-flex:0 0 31.333%;
-webkit-flex: 0 0 31%;

}

.row.documentation-flex-boxes p {
display:block;
font-size:12px;
}


.documentation-flex-boxes div.doc-div,
.documentation-boxes div.doc-div {
Expand Down Expand Up @@ -234,7 +244,7 @@ input[type="checkbox"].search-checkbox:checked + label span {

.documentation-flex-boxes div.doc-div p,
.documentation-boxes div.doc-div p {
font-size:10px;
font-size:12px;
line-height:1.2em;
height:auto;
}
Expand Down
39 changes: 6 additions & 33 deletions documentation.html
Original file line number Diff line number Diff line change
Expand Up @@ -255,40 +255,7 @@ <h2>Installation Guide</h2>
<!-- / End Item -->


<!-- Item -->
<div class="documentation-item">
<div class="doc-div">
<div class="info-row">
<div class="medal beginner"> </div>
<h2>Installation Guide</h2>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed sed elementumtDonec eget elementum justo. Aliquam in turpis magna. Vivamus scelerisque
</p>
</div>
<div class="row info-links">

<!-- Group Type -->
<div class="col-xs-4 contrib">
<div class="contrib-icons core-icon">&nbsp;</div>Core
</div>
<!-- / End Group Type -->

<!-- Usage Icon -->
<div class="col-xs-4 mid-col">
<span class="usage-icons notebook">&nbsp;</span>
</div>
<!-- /End Usage Icon -->

<!-- Author Image -->
<div class="col-xs-4 author-img">
<img src="images/place-img-300x300.jpg" alt="Author Image"/>

</div>
<!-- / End Author Image -->
</div><!-- / .info-links -->
</div><!-- / .documentation -->
</div><!-- / col-sm-4 col-xs-12 -->
<!-- / End Item -->


<!-- Item -->
Expand Down Expand Up @@ -336,6 +303,9 @@ <h2>Installation Guide</h2>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed sed elementumtDonec eget elementum justo. Aliquam in turpis magna. Vivamus scelerisque
</p>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed sed elementumtDonec eget elementum justo. Aliquam in turpis magna. Vivamus scelerisque
</p>
</div>
<div class="row info-links">

Expand Down Expand Up @@ -555,6 +525,9 @@ <h3>Contact</h3>
<!-- Touchswipe -->
<script type="text/javascript" src="js/jquery.touchSwipe.min.js"></script>

<!-- Page Specific JS -->
<script type="text/javascript" src="js/forge.documentation.jquery.js" ></script>



</body>
Expand Down
3 changes: 3 additions & 0 deletions documentation_page.html
Original file line number Diff line number Diff line change
Expand Up @@ -534,6 +534,7 @@ <h3>Contact</h3>
<script type="text/javascript" src="js/jquery.2.1.3.min.js" ></script>
<script type="text/javascript" src="js/bootstrap.min.js" ></script>
<script type="text/javascript" src="js/forge.jquery.js" ></script>

<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
<script type="text/javascript" src="js/ie10-viewport-bug-workaround.js" ></script>
<!-- Parallax -->
Expand All @@ -542,6 +543,8 @@ <h3>Contact</h3>
<!-- Touchswipe -->
<script type="text/javascript" src="js/jquery.touchSwipe.min.js"></script>

<!-- Page Specific JS -->
<script type="text/javascript" src="js/forge.docpage.jquery.js" ></script>


</body>
Expand Down
55 changes: 35 additions & 20 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -453,33 +453,48 @@ <h2>Windows <a class="download-arrow hidden-xs" href="#"> </a></h2>
</div>
</div>
<!-- / End Right Col -->
</div>
</div><!-- / page section -->
<!-- / NEW -->
<div class="os-instructions">

<ul>
<li>Use Homebrew to install Forge natively for use on the command-line, via <code>brew install jboss-forge</code></li>
<li>Or use <code>curl http://forge.jboss.org/sh | sh</code></li>
<li>Or grab the <a target="_self" href="https://repository.jboss.org/nexus/service/local/artifact/maven/redirect?r=releases&amp;g=org.jboss.forge&amp;a=forge-distribution&amp;v=LATEST&amp;e=zip&amp;c=offline">ZIP</a> to install Forge natively on OSX</li>
</ul>
</div>

<div class="os-instructions">

<!-- DOWNLOAD INSTRUCTION SECTION -->
<div class="page-section white download-instructions-section">
<div class="container">
<div class="row">
<div class="col-xs-12">
<h2 class="download-title">Download Instructions</h2>
</div><!-- / .col-xs-12 -->
</div><!-- / .row -->
<div class="row">
<div class="col-sm-4 col-xs-12">
<h2 class="section-heading">OSX</h2>
<ul class="download-steps">
<li>Use Homebrew to install Forge natively for use on the command-line, via <code>brew install jboss-forge</code></li>
<li>Or use <code>curl http://forge.jboss.org/sh | sh</code></li>
<li>Or grab the <a target="_self" href="https://repository.jboss.org/nexus/service/local/artifact/maven/redirect?r=releases&amp;g=org.jboss.forge&amp;a=forge-distribution&amp;v=LATEST&amp;e=zip&amp;c=offline">ZIP</a> to install Forge natively on OSX</li>
</ul>

<ul>
<li>Use <code>curl http://forge.jboss.org/sh | sh</code></li>
<li>Or grab the <a target="_self" href="https://repository.jboss.org/nexus/service/local/artifact/maven/redirect?r=releases&amp;g=org.jboss.forge&amp;a=forge-distribution&amp;v=LATEST&amp;e=zip&amp;c=offline">ZIP</a> to install Forge natively on Linux</li>
</ul>
</div>
</div>

<div class="os-instructions">
<div class="col-sm-4 col-xs-12">
<h2 class="section-heading">Linux</h2>
<ul class="download-steps">
<li>Use <code>curl http://forge.jboss.org/sh | sh</code></li>
<li>Or grab the <a target="_self" href="https://repository.jboss.org/nexus/service/local/artifact/maven/redirect?r=releases&amp;g=org.jboss.forge&amp;a=forge-distribution&amp;v=LATEST&amp;e=zip&amp;c=offline">ZIP</a> to install Forge natively on Linux</li>
</ul>
</div>

<div class="col-sm-4 col-xs-12">
<h2 class="section-heading">Windows</h2>
<ul class="download-steps">
<li>Grab the <a target="_self" href="https://repository.jboss.org/nexus/service/local/artifact/maven/redirect?r=releases&amp;g=org.jboss.forge&amp;a=forge-distribution&amp;v=LATEST&amp;e=zip&amp;c=offline">ZIP</a> to install Forge natively on Windows</li>
</ul>
</div>
</div><!-- / .row -->
</div>
</div><!-- / .page-section -->
<!-- / END DOWNLOAD INSTRUCTION SECTION -->

<ul>
<li>Grab the <a target="_self" href="https://repository.jboss.org/nexus/service/local/artifact/maven/redirect?r=releases&amp;g=org.jboss.forge&amp;a=forge-distribution&amp;v=LATEST&amp;e=zip&amp;c=offline">ZIP</a> to install Forge natively on Windows</li>
</ul>
</div>


<!-- NEW (BACKUP CODE) -->
Expand Down
57 changes: 57 additions & 0 deletions js/forge.addons.jquery.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
// Init Rating Star display script
initAddons();

function initAddons() {
if($('.star-row').length) {
uniformAddonSizes();
addStars();
}

}



// Function to set a standard size for all the addon box descriptions (and by extension all the addon divs) based on largest description.
function uniformAddonSizes() {

var pHeightArr = new Array(); // For all the <p> tags in the rows.

// Gather heights of all <p> elements
$('.click-modal').each(function(i,e) {
pHeightArr.push($(this).children('p').height());
});
// Determine the largest height
var allHeight = Math.max.apply(Math,pHeightArr);

// Set the height to all <p> tags
$('.click-modal').each(function(i,e) {
$(this).children('p').css({'height':allHeight+'px'});
});
}

// Function to determine how many stars an addon has been rated.
// The function takes the data-rating value and changes that many stars for each row instance from grey to gold by adding the 'gold' class.
function addStars() {
$('.star-row').each(function(i,e) {
// First, insert 5 star glyphicons, with their default settings
var basicStar = '<span class="glyphicon glyphicon-star"> </span>';

var rating = $(this).attr('data-rating');

// Insert 5 star glyphicon span tags
for(i=0;i<5;i++) {
if(i==0) { $(this).html(basicStar);
} else
if(i>0) { $(this).children('span:last-child').after(basicStar); }
}

// This takes the data-rating value and loops through the inserted star icons to change the given number to gold.
if(rating > 0) {
var starCount = parseInt(rating) + 1;
for(i=0;i<starCount;i++) {
$(this).children('span:nth-child('+i+')').addClass('gold');
}
}

});
}
Loading

0 comments on commit 6222de7

Please sign in to comment.