Skip to content

Commit 5d15717

Browse files
committed
Update users generation
CTR Signed-off-by: Oleksandr Porunov <alexandr.porunov@gmail.com>
1 parent c372db7 commit 5d15717

2 files changed

Lines changed: 74 additions & 2 deletions

File tree

_includes/css/main.css

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -418,6 +418,19 @@ footer .footer-below {
418418
outline: 0;
419419
}
420420

421+
a.all-users-link,
422+
a.all-users-link:focus,
423+
a.all-users-link:hover,
424+
a.all-users-link:active,
425+
a.all-users-link.active {
426+
width: auto; !important;
427+
margin: 60px 0 0 0; !important;
428+
white-space: normal; !important;
429+
vertical-align: middle; !important;
430+
text-align: center; !important;
431+
border-width: 0; !important;
432+
}
433+
421434
.scroll-top {
422435
z-index: 1049;
423436
position: fixed;
@@ -593,6 +606,14 @@ footer .footer-below {
593606
padding: 0px 5px;
594607
font-size: 16px;
595608
}
609+
610+
a.all-users-link,
611+
a.all-users-link:focus,
612+
a.all-users-link:hover,
613+
a.all-users-link:active,
614+
a.all-users-link.active {
615+
margin: 0; !important;
616+
}
596617
}
597618

598619

@@ -653,3 +674,24 @@ footer .footer-below {
653674
text-align: left;
654675
}
655676
}
677+
678+
/* 2.4 columns per element to fit 5 elements */
679+
680+
.col-2dot4,
681+
.col-sm-2dot4,
682+
.col-md-2dot4,
683+
.col-lg-2dot4,
684+
.col-xl-2dot4 {
685+
position:relative;
686+
min-height:1px;
687+
padding-left:15px;
688+
padding-right:15px
689+
}
690+
691+
@media (min-width:768px){
692+
.col-sm-2dot4{float:left}
693+
.col-sm-2dot4{width:20%}
694+
.col-sm-pull-2dot4{right:20%}
695+
.col-sm-push-2dot4{left:20%}
696+
.col-sm-offset-2dot4{margin-left:20%}
697+
}

_includes/users.html

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,44 @@ <h2>Users</h2>
1010
</div>
1111
<span class="users-intro">The following users have deployed JanusGraph in production.</span>
1212
<div class="row">
13+
{% assign element_col_class = 'col-sm-3' %}
14+
{% assign mod_remainder = site.posts | size | modulo: 4 %}
15+
{% assign mod_remainder = 4 | minus: mod_remainder %}
16+
{% assign mod_remainder = mod_remainder | modulo: 4 %}
17+
{% assign mod_remainder_tmp = site.posts | size | modulo: 3 %}
18+
{% assign mod_remainder_tmp = 3 | minus: mod_remainder_tmp %}
19+
{% assign mod_remainder_tmp = mod_remainder_tmp | modulo: 3 %}
20+
{% if mod_remainder > mod_remainder_tmp %}
21+
{% assign element_col_class = 'col-sm-4' %}
22+
{% assign mod_remainder = mod_remainder_tmp %}
23+
{% endif %}
24+
{% assign mod_remainder_tmp = site.posts | size | modulo: 5 %}
25+
{% assign mod_remainder_tmp = 5 | minus: mod_remainder_tmp %}
26+
{% assign mod_remainder_tmp = mod_remainder_tmp | modulo: 5 %}
27+
{% if mod_remainder > mod_remainder_tmp %}
28+
{% assign element_col_class = 'col-sm-2dot4' %}
29+
{% assign mod_remainder = mod_remainder_tmp %}
30+
{% endif %}
1331
{% for post in site.posts %}
14-
<div class="col-sm-3 portfolio-item">
32+
<div class="{{ element_col_class }} portfolio-item">
1533
<a href="{{ post.href }}" class="portfolio-link" data-toggle="modal">
1634
<div class="caption"></div>
1735
<img src="img/logos/{{ post.img }}" class="portfolio-img" alt="{{ post.alt }}">
1836
</a>
1937
</div>
2038
{% endfor %}
39+
{% if mod_remainder != 0 %}
40+
<div class="{{ element_col_class }}">
41+
<a href="https://github.com/janusgraph/janusgraph#powered-by-janusgraph" class="btn btn-lg btn-outline all-users-link">
42+
See all users&nbsp; <i class="fas fa-arrow-right"></i>
43+
</a>
44+
</div>
45+
{% endif %}
2146
</div>
47+
{% if mod_remainder == 0 %}
48+
<a href="https://github.com/janusgraph/janusgraph#powered-by-janusgraph" class="btn btn-lg btn-outline all-users-link" style="margin: 0; !important;">
49+
See all users&nbsp; <i class="fas fa-arrow-right"></i>
50+
</a>
51+
{% endif %}
2252
</div>
23-
</section>
53+
</section>

0 commit comments

Comments
 (0)