Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tilføj spaceapi widget til forsiden #21

Open
blackthornedk opened this issue Jun 29, 2024 · 2 comments
Open

Tilføj spaceapi widget til forsiden #21

blackthornedk opened this issue Jun 29, 2024 · 2 comments

Comments

@blackthornedk
Copy link
Member

Vi mangler en widget på forsiden, der loader spaceapi status.
Den skal ligge over nyheder men under 'bliv medlem', så den er over 'folden' på siden.

Jeg havde tænkt mig at lave en to-part løsning, hvor der loades en IFrame i et NoScript tag, og hvis JS er enabled, bliver der vist et logo og en status, baseret på det JSON output der kommer fra SpaceApi.
Iframen kræver lidt kode på selve SpaceAPI siden, som udstiller en status rendered server side, fx i PHP.

@blackthornedk
Copy link
Member Author

The static changes on spaceapi is done:
English version: https://spaceapi.osaa.dk/status/static/
Danish version: https://spaceapi.osaa.dk/status/static/da/

The pages are somewhat responsive, and should be used for an iframe on osaa.dk, which is only visible in a noscript tag.
It the user actually uses JavaScript, we should embed the logo and text directly, without hideous borders.

@blackthornedk
Copy link
Member Author

Confirmed that the NoScript tag works for iframes, in both FireFox and Chrome:
image
The bottom version is loaded inside Noscript:

<!DOCTYPE html>
<html>
	<body>
		<h1>SpaceApi EN</h1>
		<iframe src="https://spaceapi.osaa.dk/status/static/" title="OSAA SpaceApi English">
		</iframe>
		<noscript>
			<h1>SpaceApi DA</h1>
			<iframe src="https://spaceapi.osaa.dk/status/static/da/" title="OSAA SpaceApi Danish">
			</iframe>
		</noscript>
	</body>
</html>

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

No branches or pull requests

1 participant