diff options
-rwxr-xr-x | calculators/index.php | 14 | ||||
-rwxr-xr-x | computers/index.php | 13 | ||||
-rw-r--r-- | inc/head.html | 4 | ||||
-rw-r--r-- | inc/nav.php (renamed from nav.php) | 1 | ||||
-rwxr-xr-x | index.php | 41 | ||||
-rwxr-xr-x | me/index.php | 13 | ||||
-rwxr-xr-x | pics/index.php | 14 | ||||
-rwxr-xr-x | projects/index.php | 13 | ||||
-rwxr-xr-x | revisions/index.html | 46 |
9 files changed, 37 insertions, 122 deletions
diff --git a/calculators/index.php b/calculators/index.php index 6063437..e7ca785 100755 --- a/calculators/index.php +++ b/calculators/index.php @@ -1,23 +1,19 @@ - <!DOCTYPE html> <html lang="en"> <head> + <!-- Global --> + <?php require('../inc/head.html'); ?> + + <!-- Page-specific --> <title>Calculators</title> - <meta charset="utf-8"> - <meta name="viewport" content="width=device-width, initial-scale=1.0"/> - <link rel="stylesheet" id="theme" href="../res/css/dark.css" type="text/css" /> <link rel="shortcut icon" href="../res/img/icons/ico/calc.ico" type="image/x-icon"> - - <meta property="og:type" content="website"> <meta property="og:title" content="Calculators"> <meta property="og:description" content="C a l c u l a t o r s"> <meta property="og:image" content="/res/img/icons/png/calc.png"> - - <script lang="javascript" src="../res/js/themeswap.js"></script> </head> <body> <div class="page"> -<?php require('../nav.php') ?> +<?php require('../inc/nav.php') ?> <div id="pagebody"> <div id="content"> diff --git a/computers/index.php b/computers/index.php index 5176d9f..83b159c 100755 --- a/computers/index.php +++ b/computers/index.php @@ -2,22 +2,19 @@ <!DOCTYPE html> <html lang="en"> <head> + <!-- Global --> + <?php require('../inc/head.html'); ?> + + <!-- Page-specific --> <title>Calculators</title> - <meta charset="utf-8"> - <meta name="viewport" content="width=device-width, initial-scale=1.0"/> - <link rel="stylesheet" id="theme" href="../res/css/dark.css" type="text/css" /> <link rel="shortcut icon" href="../res/img/icons/ico/calc.ico" type="image/x-icon"> - - <meta property="og:type" content="website"> <meta property="og:title" content="Calculators"> <meta property="og:description" content="C a l c u l a t o r s"> <meta property="og:image" content="/res/img/icons/png/calc.png"> - - <script lang="javascript" src="../res/js/themeswap.js"></script> </head> <body> <div class="page"> -<?php require('../nav.php') ?> +<?php require('../inc/nav.php') ?> <div id="pagebody"> <div id="content"> diff --git a/inc/head.html b/inc/head.html new file mode 100644 index 0000000..93953e9 --- /dev/null +++ b/inc/head.html @@ -0,0 +1,4 @@ +<meta charset="utf-8"> + <meta property="og:type" content="website"> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + <link rel="stylesheet" id="theme" href="/res/css/dark.css" type="text/css"> @@ -1,3 +1,4 @@ +<script lang="javascript" src="/res/js/themeswap.js"></script> <div class="header"> <nav> <div> @@ -2,46 +2,19 @@ <html lang="en"> <head> - <title>~floppydisk</title> - <meta charset="utf-8"> - <meta name="viewport" content="width=device-width, initial-scale=1.0" /> - <link rel="stylesheet" id="theme" href="./res/css/dark.css" type="text/css" /> - - <meta property="og:type" content="website"> - <meta property="og:title" content="~floppydisk"> + <!-- Global --> + <?php require('./inc/head.html'); ?> + + <!-- Page-specific --> + <title>~floppydisk</title> +> <meta property="og:title" content="~floppydisk"> <meta property="og:description" content="This is the personal homepage of floppydisk. Every now and then, I dabble in software/hardware projects, take pictures, or write blogposts."> <meta property="og:image" content="/favicon.png"> - - <!--<script lang="javascript" href="/res/js/themeswap.js"></script>--> - <script> - function addStyleSheet(name, id) { - var path = '/res/css/' + name + '.css'; - var old = document.getElementById(id); - if (old && (old.href != path)) { - old.href = path; - } - } - var otherTheme = { - 'dark': 'light', - 'light': 'dark', - }; - var currentTheme = localStorage.getItem('theme'); - if (!otherTheme.hasOwnProperty(currentTheme)) { - currentTheme = window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light'; - } - addStyleSheet(currentTheme, 'theme'); - - function toggleTheme() { - currentTheme = otherTheme[currentTheme] || 'light'; - localStorage.setItem('theme', currentTheme); - addStyleSheet(currentTheme, 'theme'); - } - </script> </head> <body> <div class="page"> -<?php require('nav.php') ?> +<?php require('./inc/nav.php') ?> <div id="pagebody"> <div id="content"> <p>Hi!</p> diff --git a/me/index.php b/me/index.php index e14aa8c..3b634cd 100755 --- a/me/index.php +++ b/me/index.php @@ -2,22 +2,19 @@ <!DOCTYPE html> <html lang="en"> <head> + <!-- Global --> + <?php require('../inc/head.html'); ?> + + <!-- Page-specific --> <title>Calculators</title> - <meta charset="utf-8"> - <meta name="viewport" content="width=device-width, initial-scale=1.0"/> - <link rel="stylesheet" id="theme" href="../res/css/dark.css" type="text/css" /> <link rel="shortcut icon" href="../res/img/icons/ico/calc.ico" type="image/x-icon"> - - <meta property="og:type" content="website"> <meta property="og:title" content="Calculators"> <meta property="og:description" content="C a l c u l a t o r s"> <meta property="og:image" content="/res/img/icons/png/calc.png"> - - <script lang="javascript" src="../res/js/themeswap.js"></script> </head> <body> <div class="page"> -<?php require('../nav.php') ?> +<?php require('../inc/nav.php') ?> <div id="pagebody"> <div id="content"> diff --git a/pics/index.php b/pics/index.php index e14aa8c..089cfbd 100755 --- a/pics/index.php +++ b/pics/index.php @@ -2,22 +2,18 @@ <!DOCTYPE html> <html lang="en"> <head> + <!-- Global --> + <?php require('../inc/head.html'); ?> + + <!-- Page-specific --> <title>Calculators</title> - <meta charset="utf-8"> - <meta name="viewport" content="width=device-width, initial-scale=1.0"/> - <link rel="stylesheet" id="theme" href="../res/css/dark.css" type="text/css" /> <link rel="shortcut icon" href="../res/img/icons/ico/calc.ico" type="image/x-icon"> - - <meta property="og:type" content="website"> - <meta property="og:title" content="Calculators"> <meta property="og:description" content="C a l c u l a t o r s"> <meta property="og:image" content="/res/img/icons/png/calc.png"> - - <script lang="javascript" src="../res/js/themeswap.js"></script> </head> <body> <div class="page"> -<?php require('../nav.php') ?> +<?php require('../inc/nav.php') ?> <div id="pagebody"> <div id="content"> diff --git a/projects/index.php b/projects/index.php index 3dd5884..79c6244 100755 --- a/projects/index.php +++ b/projects/index.php @@ -2,21 +2,18 @@ <!DOCTYPE html> <html lang="en"> <head> + <!-- Global --> + <?php require('../inc/head.html'); ?> + + <!-- Page-specific --> <title>Calculators</title> - <meta charset="utf-8"> - <meta name="viewport" content="width=device-width, initial-scale=1.0"/> - <link rel="stylesheet" id="theme" href="../res/css/dark.css" type="text/css" /> <link rel="shortcut icon" href="../res/img/icons/ico/calc.ico" type="image/x-icon"> - - <meta property="og:type" content="website"> <meta property="og:title" content="Calculators"> <meta property="og:description" content="C a l c u l a t o r s"> <meta property="og:image" content="/res/img/icons/png/calc.png"> - - <script lang="javascript" src="../res/js/themeswap.js"></script> </head> <body> -<?php require('../nav.php') ?> +<?php require('../inc/nav.php') ?> <div id="pagebody"> <div id="content"> diff --git a/revisions/index.html b/revisions/index.html deleted file mode 100755 index 31345bb..0000000 --- a/revisions/index.html +++ /dev/null @@ -1,46 +0,0 @@ - -<!DOCTYPE html> -<html lang="en"> -<head> - <title>Calculators</title> - <meta charset="utf-8"> - <meta name="viewport" content="width=device-width, initial-scale=1.0"/> - <link rel="stylesheet" id="theme" href="../res/css/dark.css" type="text/css" /> - <link rel="shortcut icon" href="../res/img/icons/ico/calc.ico" type="image/x-icon"> - - <meta property="og:type" content="website"> - <meta property="og:title" content="Calculators"> - <meta property="og:description" content="C a l c u l a t o r s"> - <meta property="og:image" content="/res/img/icons/png/calc.png"> - - <script lang="javascript" src="../res/js/themeswap.js"></script> -</head> -<body> -<div class="page"> - <div class="header"> - <nav> - <div> - <a href="../me/">about</a> | - <a href="../pics/">pics</a> | - <a href="../projects/">projects</a> | - <a href="../cgit">repos</a> | - <a href="../interblag/">weblog</a> | - calculators - </div> - </nav> - <div class="pagetree"> - <div style="float: left;">Design based on <a href="https://finalrewind.org/">finalrewind.org</a></div> - <span class="title"> - <a href="/">~floppydisk</a> / calculators - </span> - <div style="float: right;"><a onClick="javascript:toggleTheme()">dark / light mode</a></div> - </div> -</div> <!-- header --> - -<div id="pagebody"> - <div id="content"> - </div> <!-- content --> -</div> <!-- pagebody --> -</div> <!-- page --> -</body> -</html> |