Skip to content

Commit

Permalink
Merge pull request #644 from Fortran-FOSS-Programmers/remove-empty-ju…
Browse files Browse the repository at this point in the history
…mbotron

Small cleanup of frontpage template
  • Loading branch information
ZedThree committed Apr 3, 2024
2 parents cde9348 + 2abfe4a commit bbba0b4
Show file tree
Hide file tree
Showing 7 changed files with 82 additions and 88 deletions.
6 changes: 5 additions & 1 deletion ford/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,11 @@
<footer>
<div class="container">
<div class="row justify-content-between">
<div class="col"><p>{{ project }} was developed by {{ author }}<br>&copy; {{ year }} {{ license }}
<div class="col">
<p>
{{ project }}
{% if author %} was developed by {{ author }}<br>{% endif %}
&copy; {{ year }} {{ license }}
{% if revision %}<br /><small>{{ revision }}</small>{% endif %}</p>
</div>
<div class="col">
Expand Down
6 changes: 3 additions & 3 deletions ford/templates/block_page.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ <h1>{{ blockdat.name }}
{{ blockdat.doc }}
<br>

{% if blockdat.common|length > 0 %}
{% if blockdat.common %}
<section>
<h2>Common Blocks</h2>
{% for com in blockdat.common %}
Expand All @@ -37,15 +37,15 @@ <h2>Common Blocks</h2>
</script>
{% endif %}

{% if blockdat.variables|length > 0 %}
{% if blockdat.variables %}
<section>
<h2>Variables</h2>
{{ macros.variable_list(blockdat.variables) }}
</section>
<br>
{% endif %}

{% if blockdat.types|length > 0 %}
{% if blockdat.types %}
<section>
<h2>Derived Types</h2>
{% for type in blockdat.types %}
Expand Down
118 changes: 54 additions & 64 deletions ford/templates/index.html
Original file line number Diff line number Diff line change
@@ -1,77 +1,68 @@
{% macro project_link_button(address, name) %}
{# Optional button in jumbtron for project link #}
{%- if address -%}
<a class="btn btn-lg btn-primary" href="{{ address }}" role="button">{{ name }}</a>
{%- endif -%}
{% endmacro %}

{% macro dev_link_button(address, icon) %}
{# Optional button in sidebar for developer link #}
{%- if address -%}
<a class="btn btn-lg btn-primary" href="{{ address }}"><i class="fa {{ icon }} fa-lg"></i></a>
{%- endif -%}
{% endmacro %}

{% extends "base.html" %}
{% block body %}
<!-- Main component for a primary marketing message or call to action -->
<div class="p-5 mb-4 bg-light border rounded-3" id="jumbotron">
{{ summary }}
{% if project_github or project_bitbucket or project_gitlab or project_sourceforge or project_website %}
<p> Find us on&hellip;</p>
<p>
{% if project_github %}
<a class="btn btn-lg btn-primary" href="{{ project_github }}" role="button">GitHub</a>
{% endif %}
{% if project_gitlab %}
<a class="btn btn-lg btn-primary" href="{{ project_gitlab }}" role="button">The Web</a>
{% endif %}
{% if project_bitbucket %}
<a class="btn btn-lg btn-primary" href="{{ project_bitbucket }}" role="button">Bitbucket</a>
{% endif %}
{% if project_sourceforge %}
<a class="btn btn-lg btn-primary" href="{{ project_sourceforge }}" role="button">Sourceforge</a>
{% endif %}
{% if project_website %}
<a class="btn btn-lg btn-primary" href="{{ project_website }}" role="button">The Web</a>
{% endif %}
{% endif %}
{% if project_download %}
<a class="btn btn-lg btn-danger" style="float:right" href="{{ project_download }}" role="button">Download the Source</a>
{% endif %}
</p>
</div>
<!-- Main component for a primary marketing message or call to action -->
{% set project_links = project_github or project_bitbucket or project_gitlab or project_sourceforge or project_website %}
{% if summary or project_links or project_download %}
<div class="p-5 mb-4 bg-light border rounded-3" id="jumbotron">
{{ summary }}
{% if project_links %}
<p> Find us on&hellip;</p>
<p>
{{ project_link_button(project_github, "GitHub") }}
{{ project_link_button(project_gitlab, "Gitlab") }}
{{ project_link_button(project_bitbucket, "Bitbucket") }}
{{ project_link_button(project_sourceforge, "Sourceforge") }}
{{ project_link_button(project_website, "The Web") }}
{% endif %}
{% if project_download %}
<a class="btn btn-lg btn-danger" style="float:right" href="{{ project_download }}" role="button">Download the Source</a>
{% endif %}
</p>
</div>
{% endif %}

<div class="row" id='text'>
{% set col = "col-md-8" if author else "col-md-12"%}
{% set col = "col-md-8" if author else "col-md-12"%}
<div class={{ col }}>
<h1>{{ project }}</h1>
{{ proj_docs }}
</div>
{% if author %}
{% if author %}
<div class="col-md-4">
<div class="card card-body bg-light">
<div class="card card-body bg-light">
{% if author_pic %}
<img src="{{ author_pic }}" alt="Developer picture" class="card-img-top">
{% endif %}
<img src="{{ author_pic }}" alt="Developer picture" class="card-img-top">
{% endif %}
<h2 class="card-title">Developer Info</h2>
<h4 class="card-text">{{ author }}</h4>
<p class="card-text">{{ author_description }}</p>
{% if github or bitbucket or facebook or twitter or google_plus or linkedin or email or website %}
{% if github or bitbucket or facebook or twitter or google_plus or linkedin or email or website %}
<div class="text-center"><div class="btn-group" role="group">
{% if email %}
<a class="btn btn-lg btn-primary" href="mailto:{{ email }}"><i class="fa fa-envelope fa-lg"></i></a>
{% endif %}
{% if website %}
<a class="btn btn-lg btn-primary" href="{{ website }}"><i class="fa fa-globe fa-lg"></i></a>
{% endif %}
{% if github %}
<a class="btn btn-lg btn-primary" href="{{ github }}"><i class="fa fa-github fa-lg"></i></a>
{% endif %}
{% if gitlab %}
<a class="btn btn-lg btn-primary" href="{{ gitlab }}"><i class="fa fa-gitlab fa-lg"></i></a>
{% endif %}
{% if bitbucket %}
<a class="btn btn-lg btn-primary" href="{{ bitbucket }}"><i class="fa fa-bitbucket fa-lg"></i></a>
{% endif %}
{% if facebook %}
<a class="btn btn-lg btn-primary" href="{{ facebook }}"><i class="fa fa-facebook fa-lg"></i></a>
{% endif %}
{% if google_plus %}
<a class="btn btn-lg btn-primary" href="{{ google_plus }}"><i class="fa fa-google-plus fa-lg"></i></a>
{% endif %}
{% if linkedin %}
<a class="btn btn-lg btn-primary" href="{{ linkedin }}"><i class="fa fa-linkedin fa-lg"></i></a>
{% endif %}
{% if twitter %}
<a class="btn btn-lg btn-primary" href="{{ twitter }}"><i class="fa fa-twitter fa-lg"></i></a>
{% endif %}
{{ dev_link_button(website, "fa-globe") }}
{{ dev_link_button(github, "fa-github") }}
{{ dev_link_button(gitlab, "fa-gitlab") }}
{{ dev_link_button(bitbucket, "fa-bitbucket") }}
{{ dev_link_button(facebook, "fa-facebook") }}
{{ dev_link_button(google_plus, "fa-google-plus") }}
{{ dev_link_button(linkedin, "fa-linkedin") }}
{{ dev_link_button(twitter, "fa-twitter") }}
</div></div>
{% endif %}
</div>
Expand All @@ -80,9 +71,9 @@ <h4 class="card-text">{{ author }}</h4>
</div>
{% set count=0 %}
{% if incl_src %}{% set count = count + 1 %}{% endif %}
{% if project.modules|length > 0 %}{% set count = count + 1 %}{% endif %}
{% if project.procedures|length > 0 %}{% set count = count + 1 %}{% endif %}
{% if project.types|length > 0 %}{% set count = count + 1 %}{% endif %}
{% if project.modules %}{% set count = count + 1 %}{% endif %}
{% if project.procedures %}{% set count = count + 1 %}{% endif %}
{% if project.types %}{% set count = count + 1 %}{% endif %}
{% set max_length = max_frontpage_items|int %}
{% if count and max_length %}
{% set width = (12/count)|int %}
Expand All @@ -105,7 +96,7 @@ <h3>Source Files</h3>
</div>
</div>
{% endif %}
{% if project.modules|length > 0 %}
{% if project.modules %}
<div class="col-xs-6 col-sm-{{ width }}">
<div>
<h3>Modules</h3>
Expand All @@ -122,7 +113,7 @@ <h3>Modules</h3>
</div>
</div>
{% endif %}
{% if project.procedures|length > 0 %}
{% if project.procedures %}
<div class="col-xs-6 col-sm-{{ width }}">
<div>
<h3>Procedures</h3>
Expand All @@ -139,7 +130,7 @@ <h3>Procedures</h3>
</div>
</div>
{% endif %}
{% if project.types|length > 0 %}
{% if project.types %}
<div class="col-xs-6 col-sm-{{ width }}">
<div>
<h3>Derived Types</h3>
Expand All @@ -159,4 +150,3 @@ <h3>Derived Types</h3>
</div>
{% endif %}
{% endblock body %}

4 changes: 2 additions & 2 deletions ford/templates/nongenint_page.html
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ <h2>{% if interface.abstract %}abstract {% endif %}interface <br>
{{ macros.use_list(interface) }}

<h3>Arguments</h3>
{% if procedure.args|length > 0 %}
{% if procedure.args %}
{{ macros.variable_list(procedure.args, intent=True) }}
{% else %}
<em>None</em>
Expand All @@ -74,7 +74,7 @@ <h3>Arguments</h3>
{% if var.kind %}{% set args = args + 1 %}{% endif %}
{% if var.strlen %}{% set args = args + 1 %}{% endif %}
{% if var.proto %}{% set args = args + 1 %}{% endif %}
<h3>Return Value <span class="anchor" id="{{ var.anchor }}"></span><small>{{ var.vartype }}{% if args > 0 -%}({% if var.kind -%}kind={{ var.kind }}{%- endif %}{% if args > 1 -%},{%- endif %}{% if var.strlen -%}len={{ var.strlen }}{%- endif %}{% if var.proto -%}{% if not var.proto[0].permission or var.proto[0].visible -%}{{ var.proto[0] }}{% else %}{{ var.proto[0].name }}{%- endif %}{{ var.proto[1] }}{%- endif %}){%- endif %}{% if var.attribs|length > 0 -%},{%- endif %}
<h3>Return Value <span class="anchor" id="{{ var.anchor }}"></span><small>{{ var.vartype }}{% if args > 0 -%}({% if var.kind -%}kind={{ var.kind }}{%- endif %}{% if args > 1 -%},{%- endif %}{% if var.strlen -%}len={{ var.strlen }}{%- endif %}{% if var.proto -%}{% if not var.proto[0].permission or var.proto[0].visible -%}{{ var.proto[0] }}{% else %}{{ var.proto[0].name }}{%- endif %}{{ var.proto[1] }}{%- endif %}){%- endif %}{% if var.attribs -%},{%- endif %}
{% for attrib in var.attribs -%}{{ attrib }}{% if not loop.last or var.dimension -%}, {%- endif %}{%- endfor %}{{ var.dimension }}</small></h3>
{{ var.doc }}
{% endif %}
Expand Down
18 changes: 9 additions & 9 deletions ford/templates/proc_page.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ <h3>Type Bound</h3>
{% endif %}

<h3>Arguments</h3>
{% if procedure.args|length > 0 %}
{% if procedure.args %}
{{ macros.variable_list(procedure.args, intent=True) }}
{% else %}
<em>None</em>
Expand Down Expand Up @@ -72,7 +72,7 @@ <h3 class="card-title">Called by</h3>
{% endif %}
<br>

{% if procedure.common|length > 0 %}
{% if procedure.common %}
<section>
<h2>Common Blocks</h2>
{% for com in procedure.common %}
Expand All @@ -87,15 +87,15 @@ <h2>Common Blocks</h2>
</script>
{% endif %}

{% if procedure.variables|length > 0 %}
{% if procedure.variables %}
<section>
<h2>Variables</h2>
{{ macros.variable_list(procedure.variables, permission=True) }}
</section>
<br>
{% endif %}

{% if procedure.enums|length > 0 %}
{% if procedure.enums %}
<section>
<h2>Enumerations</h2>
{% for enum in procedure.enums %}
Expand All @@ -105,7 +105,7 @@ <h2>Enumerations</h2>
<br>
{% endif %}

{% if procedure.interfaces|length > 0 %}
{% if procedure.interfaces %}
<section>
<h2>Interfaces</h2>
{% for intr in procedure.interfaces %}
Expand All @@ -115,7 +115,7 @@ <h2>Interfaces</h2>
<br>
{% endif %}

{% if procedure.absinterfaces|length > 0 %}
{% if procedure.absinterfaces %}
<section>
<h2>Abstract Interfaces</h2>
{% for intr in procedure.absinterfaces %}
Expand All @@ -125,7 +125,7 @@ <h2>Abstract Interfaces</h2>
<br>
{% endif %}

{% if procedure.types|length > 0 %}
{% if procedure.types %}
<section>
<h2>Derived Types</h2>
{% for type in procedure.types %}
Expand All @@ -135,7 +135,7 @@ <h2>Derived Types</h2>
<br>
{% endif %}

{% if procedure.functions|length > 0 %}
{% if procedure.functions %}
<section>
<h2>Functions</h2>
{% for proc in procedure.functions %}
Expand All @@ -146,7 +146,7 @@ <h2>Functions</h2>
{% endif %}


{% if procedure.subroutines|length > 0 %}
{% if procedure.subroutines %}
<section>
<h2>Subroutines</h2>
{% for proc in procedure.subroutines %}
Expand Down
16 changes: 8 additions & 8 deletions ford/templates/prog_page.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ <h3 class="card-title">Calls</h3>
{% endif %}
{% if program.doc or program.callsgraph %}<br>{% endif %}

{% if program.common|length > 0 %}
{% if program.common %}
<section>
<h2>Common Blocks</h2>
{% for com in program.common %}
Expand All @@ -48,15 +48,15 @@ <h2>Common Blocks</h2>
</script>
{% endif %}

{% if program.variables|length > 0 %}
{% if program.variables %}
<section>
<h2>Variables</h2>
{{ macros.variable_list(program.variables) }}
</section>
<br>
{% endif %}

{% if program.enums|length > 0 %}
{% if program.enums %}
<section>
<h2>Enumerations</h2>
{% for enum in program.enums %}
Expand All @@ -66,7 +66,7 @@ <h2>Enumerations</h2>
<br>
{% endif %}

{% if program.interfaces|length > 0 %}
{% if program.interfaces %}
<section>
<h2>Interfaces</h2>
{% for intr in program.interfaces %}
Expand All @@ -76,7 +76,7 @@ <h2>Interfaces</h2>
<br>
{% endif %}

{% if program.absinterfaces|length > 0 %}
{% if program.absinterfaces %}
<section>
<h2>Abstract Interfaces</h2>
{% for intr in program.absinterfaces %}
Expand All @@ -86,7 +86,7 @@ <h2>Abstract Interfaces</h2>
<br>
{% endif %}

{% if program.types|length > 0 %}
{% if program.types %}
<section>
<h2>Derived Types</h2>
{% for type in program.types %}
Expand All @@ -96,7 +96,7 @@ <h2>Derived Types</h2>
<br>
{% endif %}

{% if program.functions|length > 0 %}
{% if program.functions %}
<section>
<h2>Functions</h2>
{% for proc in program.functions %}
Expand All @@ -107,7 +107,7 @@ <h2>Functions</h2>
{% endif %}


{% if program.subroutines|length > 0 %}
{% if program.subroutines %}
<section>
<h2>Subroutines</h2>
{% for proc in program.subroutines %}
Expand Down
2 changes: 1 addition & 1 deletion ford/templates/type_page.html
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ <h3 class="card-title">Inherited by</h3>
{% endif %}
<br>

{% if dtype.variables|length > 0 %}
{% if dtype.variables %}
<section>
<h2>Components</h2>
{{ macros.variable_list(dtype.variables, permission=True) }}
Expand Down

0 comments on commit bbba0b4

Please sign in to comment.