Skip to content

Commit f5a3c27

Browse files
authored
Redesign website (#155)
* Start working on a redesign * updating website style * Add fontawesome * remove test of removed snippets * fix test * link to branding * upload artifact when not on main * instructions for artifact
1 parent 1b74074 commit f5a3c27

File tree

2,140 files changed

+361451
-188
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,140 files changed

+361451
-188
lines changed

.github/workflows/build.yml

+8
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,11 @@ jobs:
3030
- name: rsync over ssh
3131
run: rsync -r ./_site/* [email protected]:/var/www/vhosts/fenicsproject.org/newsite
3232
if: ${{ github.repository == 'FEniCS/web' && github.ref == 'refs/heads/main' }}
33+
34+
- name: Upload build as artifact
35+
uses: actions/upload-artifact@v3
36+
with:
37+
name: website
38+
path: _site
39+
if-no-files-found: error
40+
if: ${{ github.repository == 'FEniCS/web' && github.ref != 'refs/heads/main' && github.event_name == 'pull_request' }}

README.md

+9
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,15 @@ If you think something on the website should be change, but you're not sure how
1414
please [open an issue](https://github.com/FEniCS/web/issues) describing the change you
1515
would like to suggest.
1616

17+
When a pull request is opened, the website will be build and an artifact of this build will be uploaded.
18+
To see what the website will look look like after the pull request is merged, you can:
19+
20+
1) Download the artifact
21+
22+
2) unzip the artifact
23+
24+
3) Run `python -m http.server` in the unzipped folder
25+
1726
## Code of conduct
1827

1928
When interacting with others (eg when discussing issues or pull requests), you

_config.yml

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ description: Open-source finite element library
55
fenicsversion: 2019.1.0
66
fenicsversiondate: April 2019
77
fenicsxversion: 0.7
8+
dolfinxversion: 0.7.2 # this is used in the URL of the Python demos
89
fenicsxversiondate: October 2023
910

1011
defaults:

_data/navbar.yml

+2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
# Site navigation links
2+
- title: Home
3+
page: /
24
- title: FEniCS 2024
35
page: /fenics-2024
46
- title: Download

_includes/_head.html

+3-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@
2929

3030
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
3131
<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
32-
<script src="https://kit.fontawesome.com/5506de0e1b.js" crossorigin="anonymous"></script>
32+
<script src="/assets/fontawesome/js/fontawesome.js"></script>
33+
<script src="/assets/fontawesome/js/brands.js"></script>
34+
<script src="/assets/fontawesome/js/solid.js"></script>
3335
<script type='text/javascript'>
3436
document.getElementById("MathJax-script").addEventListener('load', function () {
3537
window.MathJax = {

_includes/_header.html

+12-4
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,22 @@
66
</header>
77
</div>
88
{% if page.image %}
9-
<div id="header_wrap" class="outer" style="background-image:url(/{{ page.image }});background-size:cover;background-position-y:center">
9+
<div id="header_wrap" class="outer" style="background-image:url(/{{ page.image }});background-position-y:center;background-position-x:center{% if page.image-zoom %}{% if page.image-zoom == "fill" %}background-size:cover{% else %}background-size:auto 600px{% endif %}{% else %}background-size:auto 600px{% endif %}">
1010
{% else %}
11-
<div id="header_wrap" class="outer" style="background-image:url(/assets/img/default-bg.png);background-repeat:repeat">
11+
<div id="header_wrap" class="outer" style="background-image:url(/assets/img/headers/fenics_fire.png);background-repeat:repeat">
12+
{% endif %}
13+
<header class="inner{% if page.subtitle %}{% else %} lesstall{% endif %}">
14+
{% if page.subtitle %}
15+
{% if page.subtitle == "logo" %}
16+
<div style='text-align:center'><img src='/assets/logo/fenics_logo.png' style='height:200px;margin-top:40px;margin-bottom:-100px'></div>
17+
{% endif %}
1218
{% endif %}
13-
<header class="inner">
1419
<h1 id="project_title">{{ page.title | default: site.title }}</h1>
1520
{% if page.subtitle %}
16-
{% if page.subtitle == "fenicsxversion" %}
21+
{% if page.subtitle == "logo" %}
22+
{% elsif page.subtitle == "FEniCSx fenicsxversion" %}
23+
<h2 id="project_subtitle">FEniCSx {{ site.fenicsxversion }}</h2>
24+
{% elsif page.subtitle == "fenicsxversion" %}
1725
<h2 id="project_subtitle">{{ site.fenicsxversion }}</h2>
1826
{% elsif page.subtitle == "fenicsversion" %}
1927
<h2 id="project_subtitle">{{ site.fenicsversion }}</h2>

_includes/_large_icon.html

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{% if include.href %}<a href="{{include.href}}" class='iconlink'>{% endif %}
2+
<i class='{{include.icon}}' style='font-size:110px;padding:10px'></i><br />
3+
{{include.label}}
4+
{% if include.href %}</a>{% endif %}

_includes/_person.html

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<h2 style='margin-top:80px;text-align:center'>{{ include.name }}{% if {{include.country}} %} {% include _country.html country=include.country %}{% endif %}</h2>
22
<div class='person-social'>{{ include.job }}{{% if include.institution %}}, {{ include.institution }}{{% endif %}}</div>
3-
{% if include.website %}<div class='person-social'><a href="{{include.website}}"><i class="fa fa-internet-explorer" aria-hidden="true"></i> {{ include.website | split:"//" | last}}</a></div>
4-
{% endif %}{% if include.github %}<div class='person-social'><a href="https://github.com/{{include.github}}"><i class="fa fa-github" aria-hidden="true"></i> {{include.github}}</a></div>
5-
{% endif %}{% if include.twitter %}<div class='person-social'><a href="https://twitter.com/{{include.twitter}}"><i class="fa fa-twitter" aria-hidden="true"></i> @{{include.twitter}}</a></div>
6-
{% endif %}{% if include.linkedin %}<div class='person-social'><a href="https://linkedin.com/in/{{include.linkedin}}"><i class="fa fa-linkedin" aria-hidden="true"></i> @{{include.linkedin}}</a></div>
3+
{% if include.website %}<div class='person-social'><a href="{{include.website}}"><i class="fa-brands fa-internet-explorer" aria-hidden="true"></i> {{ include.website | split:"//" | last}}</a></div>
4+
{% endif %}{% if include.github %}<div class='person-social'><a href="https://github.com/{{include.github}}"><i class="fa-brands fa-github" aria-hidden="true"></i> {{include.github}}</a></div>
5+
{% endif %}{% if include.twitter %}<div class='person-social'><a href="https://twitter.com/{{include.twitter}}"><i class="fa-brands fa-twitter" aria-hidden="true"></i> @{{include.twitter}}</a></div>
6+
{% endif %}{% if include.linkedin %}<div class='person-social'><a href="https://linkedin.com/in/{{include.linkedin}}"><i class="fa-brands fa-linkedin" aria-hidden="true"></i> @{{include.linkedin}}</a></div>
77
{% endif %}{{% if include.img %}}
88
<img src="{{ include.img }}" style="float:{{ include.imgfloat | right}};width:40%;padding:15px">
99
{{% endif %}}{{% if include.quote %}}

_test/test_code.py

-37
This file was deleted.

_test/test_links.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def load_page_list(dir):
2121
root_dir = os.path.join(os.path.dirname(os.path.realpath(__file__)), "..")
2222
pagelist = load_page_list(root_dir)
2323

24-
permalinks = []
24+
permalinks = [""]
2525
for dir, p in pagelist:
2626
with open(os.path.join(dir, p)) as f:
2727
content = f.read()

assets/css/customsty.css

+66-9
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ blue: #2E93CD
4242
}
4343

4444
.nav ul {
45+
float:right;
4546
list-style-type: none;
4647
margin: 0;
4748
padding: 0;
@@ -59,21 +60,21 @@ blue: #2E93CD
5960

6061
a {color: #0F79D0 !important}
6162

63+
.nav li a:hover {
64+
color: #000000 !important;
65+
transition: 0.3s;
66+
}
6267
.nav li a {
6368
padding: 10px;
6469
display: block;
65-
color: black !important;
70+
color: #777777 !important;
6671
text-align: center;
6772
text-decoration: none;
6873
font-weight:bold !important;
69-
font-size: 11px !important;
74+
font-size: 14px !important;
7075
font-family: 'Lato', sans-serif !important;
7176
}
7277

73-
.nav li a:hover {
74-
color: #2E93CD;
75-
}
76-
7778
h1, h2, h3, h4, h5, h6
7879
{
7980
margin: 10px 0 !important;
@@ -95,13 +96,50 @@ h1, h2, h3, h4, h5, h6
9596

9697
.inner {max-width:850px}
9798

98-
#nav_head_inner {max-width: 1050px !important;}
99+
#nav_head_inner {max-width: unset !important;}
100+
101+
#header_wrap {
102+
padding: 100px 0px !important;
103+
}
104+
105+
@media(min-width:600px) {
99106

100107
#header_wrap .inner {
101-
padding: 80px 20px !important;
102-
background-color: #FFFFFFCC;
108+
width: 500px;
103109
}
104110

111+
}
112+
113+
@media(max-width:600px) {
114+
115+
#header_wrap .inner {
116+
width: 100%;
117+
}
118+
119+
}
120+
121+
#header_wrap .inner {
122+
height: 400px;
123+
padding: 0px 0px !important;
124+
background-color: #FFFFFFDD;
125+
}
126+
127+
#header_wrap .inner.lesstall {
128+
height: 300px;
129+
}
130+
#header_wrap h1
131+
{
132+
margin: 0px !important;
133+
padding-top: 100px !important;
134+
line-height:100px;
135+
}
136+
137+
#header_wrap h2 {
138+
margin-top:20px !important;
139+
background:none
140+
}
141+
142+
105143
#footer_wrap {background-color:#FFFFFF}
106144

107145
body {
@@ -160,6 +198,7 @@ a.colorlink {
160198

161199
a.colorlink:hover {
162200
background-color: #0F79D0
201+
transition: 0.3s;
163202
}
164203

165204
img.image-center-smaller {
@@ -289,3 +328,21 @@ mjx-container
289328
img {
290329
border: none!important
291330
}
331+
332+
a.iconlink {
333+
display:inline-block;text-align:center;padding:50px;
334+
font-family: 'Lato', sans-serif;
335+
}
336+
337+
a.iconlink,
338+
a.iconlink:link,
339+
a.iconlink:active,
340+
a.iconlink:visited
341+
{
342+
color:black !important
343+
}
344+
345+
a.iconlink:hover {
346+
color:#0F79D0 !important;
347+
transition: 0.3s;
348+
}

0 commit comments

Comments
 (0)