Skip to content

Commit

Permalink
Merge pull request #548 from Fortran-FOSS-Programmers/upgrade-css
Browse files Browse the repository at this point in the history
Upgrade to bootstrap 5.3
  • Loading branch information
ZedThree authored Aug 14, 2023
2 parents 13a8078 + 31959b4 commit 904e16b
Show file tree
Hide file tree
Showing 21 changed files with 629 additions and 9,053 deletions.
6,013 changes: 0 additions & 6,013 deletions ford/css/bootstrap.css

This file was deleted.

10 changes: 0 additions & 10 deletions ford/css/bootstrap.min.css

This file was deleted.

416 changes: 208 additions & 208 deletions ford/css/local.css

Large diffs are not rendered by default.

2,320 changes: 0 additions & 2,320 deletions ford/js/bootstrap.js

This file was deleted.

7 changes: 0 additions & 7 deletions ford/js/bootstrap.min.js

This file was deleted.

6 changes: 5 additions & 1 deletion ford/pagetree.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,12 @@ def __init__(
def path(self):
return self.location / self.filename.with_suffix(".html")

@property
def url(self):
return self.base_url / "page" / self.path

def __str__(self):
return f"<a href='{self.base_url / 'page' / self.path}'>{self.title}</a>"
return f"<a href='{self.url}'>{self.title}</a>"

def __iter__(self):
retlist = [self]
Expand Down
260 changes: 99 additions & 161 deletions ford/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@

<title>{% block title %} {{ project }} {% endblock title %}</title>

<link href="{{ project_url }}/css/bootstrap.min.css" rel="stylesheet">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
<link href="{{ project_url }}/css/pygments.css" rel="stylesheet">
<link href="{{ project_url }}/css/font-awesome.min.css" rel="stylesheet">
<link href="{{ project_url }}/css/local.css" rel="stylesheet">
Expand All @@ -25,162 +26,104 @@
<link href="{{ project_url }}/css/user.css" rel="stylesheet">
{% endif %}

<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->

<script src="{{ project_url }}/js/jquery-2.1.3.min.js"></script>
<script src="{{ project_url }}/js/svg-pan-zoom.min.js"></script>

<script src="https://code.jquery.com/jquery-3.7.0.slim.min.js" integrity="sha256-tG5mcZUtJsZvyKAxYLVXrmjKBVLd6VpVccqz/r4ypFE=" crossorigin="anonymous"></script>
{# <script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.slim.min.js" #}
{# integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script> #}
</head>

<body>

<!-- Fixed navbar -->
<nav class="navbar navbar-inverse navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<div class="container-fluid mb-sm-4 mb-xl-2">
<nav class="navbar navbar-expand-lg navbar-dark bg-dark fixed-top">
<div class="container">
<a class="navbar-brand" href="{{ project_url }}/index.html">{{ project }} {% if version %}<small>{{ version }}</small>{% endif %}</a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
{% if pages %}
<li>{{ pages }}</li>
{% endif %}
<li class="dropdown hidden-xs visible-sm visible-md hidden-lg">
<a href="#" class="dropdown-toggle"
data-toggle="dropdown" role="button"
aria-haspopup="true"
aria-expanded="false">
Contents <span class="caret"></span>
</a>
<ul class="dropdown-menu">
{% if incl_src %}
{% if (project.files|length + project.extra_files|length) is more_than_one %}
<li><a href="{{ project_url }}/lists/files.html">Source Files</a></li>
{% else %}
<li><a href="{{project.files[0].get_url()}}">Source File</a></li>
{% endif %}
{% endif %}
{% if project.modules %}
<li><a href="{{ project_url }}/lists/modules.html">Modules</a></li>
{% endif %}
{% if project.blockdata|length is more_than_one %}
<li><a href="{{ project_url }}/lists/blockdata.html">Block Data</a></li>
{% elif project.blockdata|length == 1 %}
<li><a href="{{ project.blockdata[0].get_url() }}">Block Data</a></li>
{% endif %}
{% if project.procedures %}
<li><a href="{{ project_url }}/lists/procedures.html">Procedures</a></li>
{% endif %}
{% if project.absinterfaces %}
<li><a href="{{ project_url }}/lists/absint.html">Abstract Interfaces</a></li>
{% endif %}
{% if project.types %}
<li><a href="{{ project_url }}/lists/types.html">Derived Types</a></li>
{% endif %}
{% if project.namelists %}
<li><a href="{{ project_url }}/lists/namelists.html">Namelists</a></li>
{% endif %}
{% if project.programs|length is more_than_one %}
<li><a href="{{ project_url }}/lists/programs.html">Programs</a></li>
{% elif project.programs|length == 1 %}
<li><a href="{{ project.programs[0].get_url() }}">Program</a></li>
{% endif %}
{% if privacy_policy_url %}
<li><a href="{{ privacy_policy_url }}">Privacy Policy</a></li>
{% endif %}
{% if terms_of_service_url %}
<li><a href="{{ terms_of_service_url }}">Terms Of Service</a></li>
<button type="button" class="navbar-toggler" data-bs-toggle="collapse" data-bs-target="#navbar"
aria-expanded="false" aria-controls="navbar" aria-label="Toggle navigation">
<span class="navbar-toggler-icon">
</button>

<div id="navbar" class="navbar-collapse collapse">
<ul class="navbar-nav">
{% if pages %}
<li class="nav-item"><a class="nav-link" href="{{ pages.url }}">{{ pages.title }}</a></li>
{% endif %}
{% if incl_src %}
{% if project.files|length + project.extra_files|length is more_than_one %}
<li class="nav-item">
<a class="nav-link" href="{{ project_url }}/lists/files.html">Source Files</a>
</li>
{% else %}
<li class="nav-item">
<a class="nav-link" href="{{project.files[0].get_url()}}">Source File</a>
</li>
{% endif %}
</ul>
</li>
{% if incl_src %}
{% if project.files|length + project.extra_files|length is more_than_one %}
<li class="visible-xs hidden-sm visible-lg">
<a href="{{ project_url }}/lists/files.html">Source Files</a>
{% endif %}
{% if project.modules %}
<li class="nav-item">
<a class="nav-link" href="{{ project_url }}/lists/modules.html">Modules</a>
</li>
{% endif %}
{% if project.blockdata|length is more_than_one %}
<li class="nav-item">
<a class="nav-link" href="{{ project_url }}/lists/blockdata.html">Block Data</a>
</li>
{% else %}
<li class="visible-xs hidden-sm visible-lg">
<a href="{{project.files[0].get_url()}}">Source File</a>
{% elif project.blockdata|length == 1 %}
<li class="nav-item">
<a class="nav-link" href="{{ project.blockdata[0].get_url() }}">Block Data</a>
</li>
{% endif %}
{% if project.procedures %}
<li class="nav-item">
<a class="nav-link" href="{{ project_url }}/lists/procedures.html">Procedures</a>
</li>
{% endif %}
{% if project.absinterfaces %}
<li class="nav-item">
<a class="nav-link" href="{{ project_url }}/lists/absint.html">Abstract Interfaces</a>
</li>
{% endif %}
{% if project.types %}
<li class="nav-item">
<a class="nav-link" href="{{ project_url }}/lists/types.html">Derived Types</a>
</li>
{% endif %}
{% if project.namelists %}
<li class="nav-item">
<a class="nav-link" href="{{ project_url }}/lists/namelists.html">Namelists</a>
</li>
{% endif %}
{% if project.programs|length is more_than_one %}
<li class="nav-item">
<a class="nav-link" href="{{ project_url }}/lists/programs.html">Programs</a>
</li>
{% elif project.programs|length == 1 %}
<li class="nav-item">
<a class="nav-link" href="{{ project.programs[0].get_url() }}">Program</a>
</li>
{% endif %}
{% if privacy_policy_url %}
<li class="nav-item">
<a class="nav-link" href="{{ privacy_policy_url }}">Privacy Policy</a>
</li>
{% endif %}
{% if terms_of_service_url %}
<li class="nav-item">
<a class="nav-link" href="{{ terms_of_service_url }}">Terms Of Service</a>
</li>
{% endif %}
</ul>
{% if search %}
<form action="{{ project_url }}/search.html" class="navbar-form navbar-right" role="search">
<div class="form-group">
<input type="text" class="form-control" placeholder="Search" name="q" id="tipue_search_input" autocomplete="off" required>
</div>
</form>
{% endif %}
{% if project.modules %}
<li class="visible-xs hidden-sm visible-lg">
<a href="{{ project_url }}/lists/modules.html">Modules</a>
</li>
{% endif %}
{% if project.blockdata|length is more_than_one %}
<li class="visible-xs hidden-sm visible-lg">
<a href="{{ project_url }}/lists/blockdata.html">Block Data</a>
</li>
{% elif project.blockdata|length == 1 %}
<li class="visible-xs hidden-sm visible-lg">
<a href="{{ project.blockdata[0].get_url() }}">Block Data</a>
</li>
{% endif %}
{% if project.procedures %}
<li class="visible-xs hidden-sm visible-lg">
<a href="{{ project_url }}/lists/procedures.html">Procedures</a>
</li>
{% endif %}
{% if project.absinterfaces %}
<li class="visible-xs hidden-sm visible-lg">
<a href="{{ project_url }}/lists/absint.html">Abstract Interfaces</a>
</li>
{% endif %}
{% if project.types %}
<li class="visible-xs hidden-sm visible-lg">
<a href="{{ project_url }}/lists/types.html">Derived Types</a>
</li>
{% endif %}
{% if project.namelists %}
<li class="visible-xs hidden-sm visible-lg">
<a href="{{ project_url }}/lists/namelists.html">Namelists</a>
</li>
{% endif %}
{% if project.programs|length is more_than_one %}
<li class="visible-xs hidden-sm visible-lg">
<a href="{{ project_url }}/lists/programs.html">Programs</a>
</li>
{% elif project.programs|length == 1 %}
<li class="visible-xs hidden-sm visible-lg">
<a href="{{ project.programs[0].get_url() }}">Program</a>
</li>
{% endif %}
{% if privacy_policy_url %}
<li class="visible-xs hidden-sm visible-lg">
<a href="{{ privacy_policy_url }}">Privacy Policy</a>
</li>
{% endif %}
{% if terms_of_service_url %}
<li class="visible-xs hidden-sm visible-lg">
<a href="{{ terms_of_service_url }}">Terms Of Service</a>
</li>
{% endif %}
</ul>
{% if search|lower == 'true' %}
<form action="{{ project_url }}/search.html" class="navbar-form navbar-right" role="search">
<div class="form-group">
<input type="text" class="form-control" placeholder="Search" name="q" id="tipue_search_input" autocomplete="off" required>
</div>
<!--
<button type="submit" class="btn btn-default">Submit</button>
-->
</form>
{% endif %}
</div><!--/.nav-collapse -->
</div>
</nav>
</div><!--/.nav-collapse -->
</div>
</nav>
</div>

<div class="container">
{% block body %}
Expand All @@ -189,15 +132,15 @@
</div> <!-- /container -->
<footer>
<div class="container">
<div class="row">
<div class="col-xs-6 col-md-6"><p>{{ project }} was developed by {{ author }}<br>&copy; {{ year }} {{ license }}
<div class="row justify-content-between">
<div class="col"><p>{{ project }} was developed by {{ author }}<br>&copy; {{ year }} {{ license }}
{% if revision %}<br /><small>{{ revision }}</small>{% endif %}</p>
</div>
<div class="col-xs-6 col-md-6">
<p class="text-right">
<div class="col">
<p class="text-end">
Documentation generated by
<a href="https://github.com/Fortran-FOSS-Programmers/ford">FORD</a>
{% if print_creation_date|lower == 'true' %} on {{ creation_date }} {% endif %}
{% if print_creation_date %} on {{ creation_date }} {% endif %}
{% if doc_license %}<br>&copy; {{ doc_license }} {% endif %}
</p>
</div>
Expand All @@ -206,17 +149,12 @@
</div> <!-- /container -->
</footer>

<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<!--
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
-->
<script src="{{ project_url }}/js/bootstrap.min.js"></script>
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
<script src="{{ project_url }}/js/ie10-viewport-bug-workaround.js"></script>
<!-- Bootstrap core JavaScript -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"
integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p" crossorigin="anonymous"></script>

<!-- MathJax JavaScript
<!-- MathJax JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script type="text/x-mathjax-config">
Expand Down
7 changes: 1 addition & 6 deletions ford/templates/block_page.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,6 @@ <h1>{{ blockdat.name }}
{{ blockdat.doc }}
<br>

<section class="visible-xs visible-sm hidden-md">
{{ macros.content_list(blockdat,1) }}
</section>
<br class="visible-xs visible-sm hidden-md">

{% if blockdat.common|length > 0 %}
<section>
<h2>Common Blocks</h2>
Expand All @@ -35,7 +30,7 @@ <h2>Common Blocks</h2>
<br>
<script>
$(function () {
$('[data-toggle="popover"]').popover()
$('[data-bs-toggle="popover"]').popover()
})
</script>
{% endif %}
Expand Down
Loading

0 comments on commit 904e16b

Please sign in to comment.