Added test.html to examples, added js-cookie for dynamic cookies and CGI update.
This commit is contained in:
parent
c9716bc7bd
commit
8ca2a9cf23
6 changed files with 32 additions and 1 deletions
1
Makefile
1
Makefile
|
|
@ -73,5 +73,6 @@ runreload:
|
|||
|
||||
sync:
|
||||
rsync -avr --delete --delete-excluded ./_site/ xw3.org:/var/www/xw3.org/www/_site/
|
||||
ssh a.xw3.org 'cd /var/www/xw3.org/www/lib/ && git pull'
|
||||
ssh a.xw3.org 'cd /var/www/xw3.org/www/_site/cgi/bin/ && gcc index.c -o index'
|
||||
|
||||
|
|
|
|||
|
|
@ -15,5 +15,6 @@
|
|||
<link rel="stylesheet" type="text/css" href="/css/main.css">
|
||||
<!--<script src="/js/bootstrap-5.0.2.min.js" charset="{{ site.charset }}"></script>-->
|
||||
<script src="/js/jquery-3.6.4.min.js" charset="{{ site.charset }}"></script>
|
||||
<script src="/js/js-cookie-3.0.5.min.js" charset="{{ site.charset }}"></script>
|
||||
<script src="/js/matomo.min.js" charset="{{ site.charset }}"></script>
|
||||
</head>
|
||||
|
|
|
|||
|
|
@ -53,6 +53,7 @@ tags:
|
|||
<li><a href="https://git-scm.com/" class="ext">Git</a> - A free and open source distributed version control system</li>
|
||||
<li><a href="https://isso-comments.de/" class="ext">Isso</a> - A commenting server similar to Disqus</li>
|
||||
<li><a href="https://jekyllrb.com/" class="ext">Jekyll</a> - A simple, blog-aware, static site generator</li>
|
||||
<li><a href="https://github.com/js-cookie/js-cookie" class="ext">js-cookie</a> - A simple, lightweight JavaScript API for handling browser cookies </li>
|
||||
<li><a href="https://jquery.com/" class="ext">jQuery</a> - A fast, small, and feature-rich JavaScript library</li>
|
||||
<li><a href="https://www.lighttpd.net/" class="ext">lighttpd</a> - A secure, fast, compliant, and very flexible web server</li>
|
||||
<li><a href="https://kernel.org/" class="ext">Linux</a> - A family of open-source Unix-like operating systems based on the Linux kernel</li>
|
||||
|
|
|
|||
2
cgi
2
cgi
|
|
@ -1 +1 @@
|
|||
Subproject commit 64b54dd697b5b4a05be136f309341365568bcdc1
|
||||
Subproject commit 3e753c07d407561c30c1c059abd5a6ab87b79070
|
||||
26
examples/test/test.html
Normal file
26
examples/test/test.html
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
---
|
||||
layout: page
|
||||
published: true
|
||||
noToc: true
|
||||
noDate: true
|
||||
title: /examples/test/
|
||||
subtitle:
|
||||
permalink: /examples/test/
|
||||
tags:
|
||||
- bash
|
||||
- cgi
|
||||
---
|
||||
|
||||
<h2>Test output</h2>
|
||||
|
||||
<h3>Cookies</h3>
|
||||
|
||||
<p><span id="cgi-test" name="cgi-test">NULL</span></p>
|
||||
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
$("#cgi-test").html("KEY=" + Cookies.get("KEY") + " (Set by the server via HTTP-Header. By requesting /examples/test/ a second Cookie (KEY2) ist set by the Client for testing.)");
|
||||
Cookies.set("KEY2", "VALUE2")
|
||||
});
|
||||
</script>
|
||||
|
||||
2
js/js-cookie-3.0.5.min.js
vendored
Normal file
2
js/js-cookie-3.0.5.min.js
vendored
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
/*! js-cookie v3.0.5 | MIT */
|
||||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self,function(){var n=e.Cookies,o=e.Cookies=t();o.noConflict=function(){return e.Cookies=n,o}}())}(this,(function(){"use strict";function e(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)e[o]=n[o]}return e}var t=function t(n,o){function r(t,r,i){if("undefined"!=typeof document){"number"==typeof(i=e({},o,i)).expires&&(i.expires=new Date(Date.now()+864e5*i.expires)),i.expires&&(i.expires=i.expires.toUTCString()),t=encodeURIComponent(t).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var c="";for(var u in i)i[u]&&(c+="; "+u,!0!==i[u]&&(c+="="+i[u].split(";")[0]));return document.cookie=t+"="+n.write(r,t)+c}}return Object.create({set:r,get:function(e){if("undefined"!=typeof document&&(!arguments.length||e)){for(var t=document.cookie?document.cookie.split("; "):[],o={},r=0;r<t.length;r++){var i=t[r].split("="),c=i.slice(1).join("=");try{var u=decodeURIComponent(i[0]);if(o[u]=n.read(c,u),e===u)break}catch(e){}}return e?o[e]:o}},remove:function(t,n){r(t,"",e({},n,{expires:-1}))},withAttributes:function(n){return t(this.converter,e({},this.attributes,n))},withConverter:function(n){return t(e({},this.converter,n),this.attributes)}},{attributes:{value:Object.freeze(o)},converter:{value:Object.freeze(n)}})}({read:function(e){return'"'===e[0]&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"});return t}));
|
||||
Loading…
Add table
Add a link
Reference in a new issue