Skip to content

Conversation

@meldra
Copy link
Contributor

@meldra meldra commented Nov 15, 2025

This PR is massive and involves a bunch of structural changes.
It updates the framework of the site from Material-Kit based
on Bootstrap 4, to vanilla Bootstrap 5.3. JQuery jumps from
3.2.1 to 3.7.1. Unused libraries from the kit have also been
removed. The general appearance of the site has been
preserved on request.

There is now a dark theme, and within the scope of this site
(so not the the hugo-managed codeblocks) there should not be
any violations per the IBM Equal Access Accessibility Checker.

Several layouts were added. There is now a layout that puts the
table of contents in a left sidebar, and a landing page layout
for the front page.

The original front page content has been relocated and the front
page now introduces CodeMeta; its purpose, adoption, and its use
cases. Crosswalks are also introduced.

Finally, the supporters of CodeMeta now get more appropriate
visibility for their contributions.

meldra added 30 commits October 7, 2025 16:16
This brings in Bootstrap 5.3.8, JQuery 3.7.1, and removes all
except the material-kit.css "Product Page" file which forms
the basis of the current theme of CodeMeta's website.
This prepares us for cleaning up the extra/duplicate static assets.
This directory included image files which after investigation
were deemed not in current use on the website and could be safely
removed. If this assertion is wrong and they are needed later,
this commit can be reverted without harm to the current theme,
or the images can be retrieved from git history.
Glyphicon.css is no longer necessary in Bootstrap 5.x, and the
duplicated material-kit was a hack to change the theme base color
to blue from purple.
material-kit.js no longer calls bootstrapMaterialDesign which seems
neither compatible with current bootstrap nor maintained.
Default mode is either system preference if supported, or light mode if
not.

Highlight.js removed from config.toml as it did not seem to be in use.
The "monokai" theme for codeblocks has been changed to "pygments" theme
to support dark/light mode switching. It's not amazing on dark mode but
it's better than eye strain.
…odemeta#79)

The publication of RSS can be disabled by adding to the config.toml:
[outputs]
    home = ["HTML"]
    section = ["HTML"]
This partial uses a json file of: name, url, logo, currently
uses the five acknowledgements on the front page.

This is not included anywhere yet, but it's the first part of
breaking up the front page into reusable sections.
Does not have functionality yet
Aside from the codeblocks (styling of which is not entirely in
our control), this puts us with 0 violations according to the
IBM Accessibility 7.3 guidelines which seem to be quite strict.
Copy link
Member

@progval progval left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thanks

- uses: actions/checkout@v4
- name: Download File
run: |
curl https://www.softwareheritage.org/tag/codemeta/feed/ --output ./data/softwareheritage.xml
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are there other sources we could add too?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

@meldra meldra Nov 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If there are, I'll need to refactor the live-refresh JS a bit. I left it as it is because it was working enough for rollout with the one feed.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@progval not yet :)
I hope we get some feedback on this during a SciCodes consortium meeting.
For this PR, this is fine as is.

Comment on lines +38 to +41
Reproducibility
: Tracking the software libraries and applications used in research, using
CodeMeta's _versions_ and _dependencies_ metadata, ensures that important
findings can be reviewed and verified with greater accuracy.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Off-topic for this PR, but I find that dependency metadata in Codemeta is either missing or unusable because it's underspecified

Edited Use cases
CodeMeta meeting in Portland
Created 20160415 (use cases group pulled from here 230pm 20160516) https://docs.google.com/document/d/1SalOP_tLw7FC6jnoz5hJBB2jA7xBClKqc88wgmJu5Ro/edit
Created 20160415 (use cases group pulled from here 230pm 20160516) [PDF export of google doc notes](/CodeMeta_Software_Use_Cases-Day2PM_WrkngGrp.pdf)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thx

Comment on lines 43 to 46
let url = `https://softwareheritage.org/tag/codemeta/feed/`;
let response = await fetch(url, {
method: "GET",
});
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is there a request here in addition to the curl in the Github Actions?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Originally it was just going to be a list of links on the page. It was easy enough to make it update periodically. The scope crept a bit to want immediate updates...

I left the action in place because it being pulled in daily gives the page something to build a placeholder list that's only ever slightly out of date. That way it's basically seamless and there's not a huge jump in the page when the JS lags during loading and parsing the feed.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see.

{{ range .Paginator.Pages }}
<div class="article">
<h2><a href="{{ .RelPermalink }}">{{if .Params.image }} <img src="{{ .Params.image }}" height="50px"/> {{ end }}{{ .Title }}</a></h2>
<h2><a href="{{ .RelPermalink }}">{{if .Params.image }} <img alt="{{ substr .Params.image 5 -4 }} logo" src="{{ .Params.image }}" height="50px"/> {{ end }}{{ .Title }}</a></h2>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What are typical values of the alt here? I'm worried it would be redundant with the text (eg. make a screen reader say "Foo logo Foo" instead of just "Foo")

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's more "Foo logo Crosswalk for Foo" but sometimes it's "Foo logo Crosswalk for Bar". It could be a blank alt I guess...

Comment on lines 43 to 90
function formatAMPM(date) {
var hours = date.getUTCHours();
var minutes = date.getUTCMinutes();
var ampm = hours >= 12 ? 'PM' : 'AM';
hours = hours % 12;
hours = hours ? hours : 12; // the hour '0' should be '12'
minutes = minutes < 10 ? '0'+minutes : minutes;
var strTime = hours + ':' + minutes + ' ' + ampm;
return strTime;
}

async function fetchCodeMetaPostsFromSWHWordPress() {
let url = `https://softwareheritage.org/tag/codemeta/feed/`;
let response = await fetch(url, {
method: "GET",
});

const text = await response.text();
const parser = new DOMParser();
const doc = parser.parseFromString(text, "text/xml");
const items = doc.getElementsByTagName("item");

$("#newslinks ul").empty();
for (let i = 0 ; i < items.length ; ++i) {
const title = items[i].querySelector("title").textContent;
const link = items[i].querySelector("link").textContent;
const date = new Date(items[i].querySelector("pubDate").textContent);
const desc = items[i].querySelector("description").textContent;

const year = date.getUTCFullYear();
const months = ["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];
const month = months[date.getUTCMonth()];
const day = date.getUTCDate().toString().padStart(2, '0');
const timestr = formatAMPM(date);

const utc = `${month} ${day}, ${year} ${timestr} UTC`

if (i <= ({{ .Site.Params.newslimit }} - 1 ))
$("#newslinks ul").append(
`<li class="ps-2 refreshed">
<a class="list-group-item newslink lh-base p-2" href="${link}">${title}</a>
<small class="p-2 text-secondary-emphasis">${utc}</small>
</li>`
)
};
}

fetchCodeMetaPostsFromSWHWordPress();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this meant to duplicate layouts/shortcodes/news.md?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It shouldn't but it's where I got to. I'll tidy it up.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deduped the bits that didn't vary, and multi-feed support added.

Comment on lines 54 to 56
<iframe id="generator" title="CodeMeta Generator" onload="iframeResize()" src="/codemeta-generator" class="d-inline-block w-100" frameborder="0">
If there is no form visible here, you can also access the [CodeMeta Generator](https://codemeta.github.io/codemeta-generator) directly. This may be due to browser security settings.
</iframe>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like this on Firefox 140.4.0esr:

Screenshot 2025-11-16 at 00-48-12 The CodeMeta Project

But also, why replace the link with an iframe? The codemeta generator intentionally uses a theme adapted from Codemeta's with smaller margins so it's usable on small screens, but with an iframe the margins are more than doubled.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm really not sure why it's not displaying full-height for you here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe the rationale for preferring the iframe solution was the loss of the site's menu when sent directly to the generator, but @moranegg can clarify more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can drop the iframe.
With @meldra we tried to find an elegant solution without leaving the website.
This is not a blocker; we can keep the text and a button to the CodeMeta generator site.

Thank you @progval, for your careful review here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@moranegg

No problem! I've pushed 7553715

Screenshot 2025-11-17 at 15 19 20

Do we also want the button on the front page to go there directly or should it still point to /create ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we also want the button on the front page to go there directly or should it still point to /create ?

I have a weak preference for the former.

Comment on lines 43 to 46
let url = `https://softwareheritage.org/tag/codemeta/feed/`;
let response = await fetch(url, {
method: "GET",
});
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see.

@moranegg
Copy link
Member

Thanks, @meldra!
Let me know if we are ready for a merge (PR still in draft).

@meldra meldra marked this pull request as ready for review November 19, 2025 16:15
@meldra
Copy link
Contributor Author

meldra commented Nov 19, 2025

@moranegg I think we're ready for merge. Sorry I didn't notice it was still in draft.

@moranegg moranegg merged commit 83ebdcf into codemeta:master Nov 20, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants