1
0

Docs and improvements and test

This commit is contained in:
devenblake 2020-12-22 09:14:05 -05:00
parent 15f3bb7767
commit f93e22b37a
3 changed files with 74 additions and 45 deletions

View File

@ -1,6 +1,8 @@
/* /*
these code snippets stolen from these code snippets stolen from
https://www.w3schools.com/js/js_cookies.asp https://www.w3schools.com/js/js_cookies.asp
window.setCookie() sets a cookie, window.getCookie() gets a cookie.
*/ */
window.setCookie = function(cname, cvalue, exdays) { window.setCookie = function(cname, cvalue, exdays) {
@ -21,5 +23,3 @@ window.getCookie = function(cname) {
} }
return ""; return "";
}; };
/* end stolen code; */

View File

@ -5,9 +5,9 @@
<LINK HREF="https://raw.githubusercontent.com/devenblake/homepage/main/favicon.ico" REL="shortcut icon" TYPE="image/x-icon" /> <LINK HREF="https://raw.githubusercontent.com/devenblake/homepage/main/favicon.ico" REL="shortcut icon" TYPE="image/x-icon" />
<LINK HREF="" ID="styling" REL="stylesheet" /> <LINK HREF="" ID="styling" REL="stylesheet" />
<META CHARSET="UTF-8" /> <META CHARSET="UTF-8" />
<META name="author" content="Deven Blake" /> <META CONTENT="Deven Blake" NAME="author" />
<META name="description" content="Deven Blake is just your normal everyday nerd." /> <META CONTENT="Deven Blake is just your normal everyday nerd." NAME="description" />
<META name="viewport" content="width=device-width, initial-scale=1" /> <META CONTENT="width=device-width, initial-scale=1" NAME="viewport" />
<META CONTENT="https://ia601509.us.archive.org/31/items/trinitydotmoe88x31/trinitydotmoe88x31.bmp" NAME="og:image" /> <META CONTENT="https://ia601509.us.archive.org/31/items/trinitydotmoe88x31/trinitydotmoe88x31.bmp" NAME="og:image" />
<TITLE>(d + (7 - s))</TITLE> <TITLE>(d + (7 - s))</TITLE>
</HEAD> </HEAD>
@ -19,9 +19,9 @@ Use TOR if you're worried.
</SMALL> </SMALL>
</HEADER> </HEADER>
<SCRIPT TYPE="application/javascript" SRC="/cookies.js" ></SCRIPT> <SCRIPT TYPE="application/javascript" SRC="/cookies.js" ></SCRIPT>
<SCRIPT TYPE="application/javascript" SRC="/sheets.js" ></SCRIPT> <SCRIPT ASYNC TYPE="application/javascript" SRC="/quotes.js" ></SCRIPT>
<SCRIPT TYPE="application/javascript" SRC="/quotes.js" ASYNC></SCRIPT> <SCRIPT TYPE="application/javascript" SRC="/sheets.js" ></SCRIPT>
<SCRIPT TYPE="application/javascript"> <SCRIPT TYPE="application/javascript">
window.onload = function() { window.onload = function() {
@ -30,37 +30,36 @@ window.onload = function() {
window.genQuote(); window.genQuote();
}; };
</SCRIPT> </SCRIPT>
<TABLE><TR><TD valign="top" width="50%"> <TABLE><TR><TD VALIGN="top" WIDTH="50%">
<P>Hi, I'm Deven Blake. I'm just your normal everyday nerd.</P> <P>Hi, I'm Deven Blake. I'm just your normal everyday nerd.</P>
<P><SMALL> <P><SMALL>
translations of my name include: <BR /> translations of my name include: <BR />
ديفين بلايك <BR /> ديفين بلايك <BR />
バレイク デビン (BLAKE Deven) バレイク デビン (BLAKE Deven)
</SMALL></P> </SMALL></P>
<P>My pronouns are <CODE><A href="./pronouns">they/them</A></CODE>.</P> <P>My pronouns are <CODE><A HREF="./pronouns">they/them</A></CODE>.</P>
<P>My <A href="https://www.politicalcompass.org">political compass</A> co-ordinates are <A href="https://www.politicalcompass.org/chart?ec=-8.88&amp;soc=-8.56">(-8.88, -8.56)</A>.</P> <P>My <A HREF="https://www.politicalcompass.org">political compass</A> co-ordinates are <A HREF="https://www.politicalcompass.org/chart?ec=-8.88&amp;soc=-8.56">(-8.88, -8.56)</A>.</P>
<P><A href="https://duckduckgo.com/?q=deven+blake">Look me up online</A>.</P> <P><A HREF="https://duckduckgo.com/?q=deven+blake">Look me up online</A>.</P>
<HR size="1" width="25%" align="left">
<P> <P>
This website is currently hosted on GitHub and lives in <A HREF="https://github.com/devenblake/homepage">a git repository.</A> This website is currently hosted on GitHub and lives in <A HREF="https://github.com/devenblake/homepage">a git repository.</A>
See something wack? File an issue. Got something to share? Make a pull request. Please! See something wack? File an issue. Got something to share? Make a pull request. Please!
</P> </P>
<HR size="1" width="25%" align="left" /> <HR ALIGN="left" SIZE="1" WIDTH="25%" />
<P> <P>
I'm TestOut PC Pro certified (which doesn't mean much, but I earned 2000 of the 2000 possible points on the certification exam). I'm TestOut PC Pro certified (which doesn't mean much, but I earned 2000 of the 2000 possible points on the certification exam).
I have a functional knowledge of Python and almost grasp C. I have a functional knowledge of Python and almost grasp C.
</P> </P>
<HR size="1" width="25%" align="left" /> <HR ALIGN="left" SIZE="1" WIDTH="25%" />
<H4>You can contact me at...</H4> <H4>You can contact me at...</H4>
<P>blakedevendesu@gmail.com (<I>preferably</I>)</P> <P>blakedevendesu@gmail.com (<I>preferably</I>)</P>
<P>deven@waifu.club</P> <P>deven@waifu.club</P>
<HR size="1" width="25%" align="left" /> <HR ALIGN="left" SIZE="1" WIDTH="25%" />
<H4>Services I'm on include...</H4> <H4>Services I'm on include...</H4>
<P>1mb.site, blake.1mb.site</P> <P>1mb.site, blake.1mb.site</P>
@ -98,59 +97,61 @@ None of these are guaranteed to still be on-line.
I would much rather talk to you via email or Signal instead of using something like Facebook or Discord. I would much rather talk to you via email or Signal instead of using something like Facebook or Discord.
</P> </P>
<HR size="1" width="25%" align="left" /> <HR ALIGN="left" SIZE="1" WIDTH="25%" />
<P>Here's a quote for you:</P> <P>Here's a quote for you:</P>
<P ID="quote">"Enable JavaScript to see a quote here."</P> <P ID="quote">"Enable JavaScript to see a quote here."</P>
<P ID="quoteauthor">~ Deven Blake</P> <P ID="quoteauthor">~ Deven Blake</P>
</TD> </TD>
<TD valign="top" width="50%"> <TD VALIGN="top" WIDTH="50%">
<H4>Gallery</H4> <H4>Gallery</H4>
<P><A href="./films">check out my favorite movies</A></P> <P><A HREF="./films">check out my favorite movies</A></P>
<P><A href="https://www.youtube.com/watch?v=dQw4w9WgXcQ">here's a video of me waterboarding myself with mountain dew</A></P> <P><A HREF="https://www.youtube.com/watch?v=dQw4w9WgXcQ">here's a video of me waterboarding myself with mountain dew</A></P>
<P><A href="./home">check out a web browser landing page i made</A></P> <P><A HREF="./home">check out a web browser landing page i made</A></P>
<P><A href="./textediting">here are my opinions on text editing</A></P> <P><A HREF="./textediting">here are my opinions on text editing</A></P>
<P><A href="./thegame">you just lost the game</A></P> <P><A HREF="./thegame">you just lost the game</A></P>
<P><A href="./git">here's my take on the git main thing</A></P> <P><A HREF="./git">here's my take on the git main thing</A></P>
<P><A href="./now">here's what i'm doing right now</A></P> <P><A HREF="./now">here's what i'm doing right now</A></P>
<P><A href="./devenzone">have you been to devenzone?</A></P> <P><A HREF="./devenzone">have you been to devenzone?</A></P>
<P><A href="./kinlist">here's my "kinlist" i guess</A></P> <P><A HREF="./kinlist">here's my "kinlist" i guess</A></P>
<P><A href="./faq">here are frequently (and infrequently) asked questions about me</A></P> <P><A HREF="./faq">here are frequently (and infrequently) asked questions about me</A></P>
<P><A href="./highschoolsenioryear">here are my high school yearbook entries</A></P> <P><A HREF="./highschoolsenioryear">here are my high school yearbook entries</A></P>
<P><A HREF="./bookmarks">here's my massive bookmarks list</A></P> <P><A HREF="./bookmarks">here's my massive bookmarks list</A></P>
<HR size="1" width="25%" align="left" /> <HR ALIGN="left" SIZE="1" WIDTH="25%" />
<H4>Control panel</H4> <H4>Control panel</H4>
<P><SMALL>The following inputs use JavaScript to change this page's stylesheet.</SMALL></P> <P><SMALL>The following inputs use JavaScript to change this page's stylesheet.</SMALL></P>
<INPUT type="button" value="notheme" onclick="document.getElementById('styling').setAttribute('href', ''); sheet='';" /> <INPUT ONCLICK="document.getElementById('styling').setAttribute('href', ''); sheet='';" TYPE="button" VALUE="notheme" />
<INPUT type="button" value="givemerights" onclick="sheet = window.setStyling('/givemerights.css');" /> <INPUT ONCLICK="sheet = window.setStyling('/givemerights.css');" TYPE="button" VALUE="givemerights" />
<INPUT type="button" value="windowsclassic" onclick="sheet = window.setStyling('/windowsclassic.css');" /> <INPUT ONCLICK="sheet = window.setStyling('/windowsclassic.css');" TYPE="button" VALUE="windowsclassic" />
<P><SMALL> <P><SMALL>
This input lets you summon an external stylesheet. Thise input lets you summon an external stylesheet.
For instance, you can enter in "/windowsclassic.css" to manually use that theme rather than pushing a button. For instance, you can enter in "/windowsclassic.css" to manually use that theme rather than pushing a button.
Any stylesheet from any on-line source will work. Any stylesheet from any on-line source will work.
<B>Be careful because there's surely someone out there that will inject a virus into a stylesheet and get some poor sap to plug that in here.</B> <B>Be careful because there's surely someone out there that will inject a virus into a stylesheet and get some poor sap to plug that in here.</B>
</SMALL></P> </SMALL></P>
<INPUT id="customSheet" type="text" value="custom" /> <INPUT ID="customSheet" TYPE="text" VALUE="custom" />
<INPUT type="button" value="<-" onclick="sheet = window.setStyling(document.getElementById('customSheet').value);" /> <INPUT ONCLICK="sheet = window.setStyling(document.getElementById('customSheet').value);" TYPE="button" VALUE="<-" />
<P><SMALL>Here are some cool <B>unsafe</B> external stylesheets if you'd like to live on the edge in comfort.</SMALL></P>
<INPUT ONCLICK="sheet = window.setStyling('//cdn.jwz.org/blog/wp-content/themes/jwz/style.css?ver=24');" TYPE="button" VALUE="jwz" />
<P><SMALL> <P><SMALL>
The following button manipulates the site cookie. This setting is the only use of cookies anywhere on this website. The following button manipulates the site cookie. This setting is the only use of cookies anywhere on this website.
</SMALL></P> </SMALL></P>
<INPUT type="button" value="save theme settings" onclick="window.setCookie('sheet', sheet, 365);" /> <INPUT ONCLICK="window.setCookie('sheet', sheet, 365);" TYPE="button" VALUE="save theme settings" />
<P><SMALL>The following buttons use JavaScript to modify the page title.</SMALL></P> <P><SMALL>The following buttons use JavaScript to modify the page title.</SMALL></P>
<INPUT type="button" value="prefix (s-expression)" onclick="document.title='(+ d (- 7 s))';" /> <INPUT ONCLICK="document.title='(+ d (- 7 s))';" TYPE="button" VALUE="prefix (s-expression)" />
<INPUT type="button" value="infix (algrebraic)" onclick="document.title='(d + (7 - s))';" /> <INPUT ONCLICK="document.title='(d + (7 - s))';" TYPE="button" VALUE="infix (algrebraic)" />
<INPUT type="button" value="postfix (rpn)" onclick="document.title='d 7 s - +';" /> <INPUT ONCLICK="document.title='d 7 s - +';" TYPE="button" VALUE="postfix (rpn)" />
<HR size="1" width="25%" align="left" /> <HR ALIGN="left" SIZE="1" WIDTH="25%" />
<A href="https://u.fsf.org/upcycle"><IMG src="https://static.fsf.org/nosvn/windows/winupcycle_text.png" width="300" alt="Upcycle Windows 7" /></A> <A HREF="https://u.fsf.org/upcycle"><IMG ALT="Upcycle Windows 7." SRC="https://static.fsf.org/nosvn/windows/winupcycle_text.png" WIDTH="300" /></A>
<!-- <A href="https://stallman.org/facebook.html"><IMG src="https://stallman.org/no-facebook-svg.png" alt="Not f'd. You won't find me on Facebook" width="200" /></A> Someday... --> <!-- <A href="https://stallman.org/facebook.html"><IMG src="https://stallman.org/no-facebook-svg.png" alt="Not f'd. You won't find me on Facebook" width="200" /></A> Someday... -->
<HR size="1" width="25%" align="left" /> <HR ALIGN="left" SIZE="1" WIDTH="25%" />
<H4>Rants and other unsavory mumblings</H4> <H4>Rants and other unsavory mumblings</H4>
<P><A HREF="./rants/liberalism">here's my <B>rant</B> (not essay) on liberals (from a leftist perspective)</A></P> <P><A HREF="./rants/liberalism">here's my <B>rant</B> (not essay) on liberals (from a leftist perspective)</A></P>
@ -175,9 +176,9 @@ WIDTH="88px"
</TD></TR></TABLE> </TD></TR></TABLE>
<FOOTER> <FOOTER>
<HR size="1" width="25%" align="left" /> <HR ALIGN="left" SIZE="1" WIDTH="25%" />
<P>This site is best viewed in Firefox but is tested in Lynx.</P> <P>This site is best viewed in Firefox but is tested in Lynx.</P>
<IMG src="http://textfiles.com/underconstruction/CoColosseumBleachers1625construction.gif" alt="This website under continuous development." /> <IMG ALT="This website under continuous development." SRC="http://textfiles.com/underconstruction/CoColosseumBleachers1625construction.gif" />
</FOOTER> </FOOTER>
</BODY> </BODY>
</HTML> </HTML>

View File

@ -1,3 +1,24 @@
/*
quotes.js
PUBLIC DOMAIN. CODED BY DEVEN BLAKE WITH HELP FROM КАМИ ON DISCORD.
To use
* add two P elements with the IDs "quote" and "quoteauthor" respectively
* call window.initializequotes() on page load.
* use window.genQuote() to get a new quote.
*/
/*
Will set window.quotes to the list of quotes and window.quote to 0 (to
indicate a quote hasn't yet been generated).
window.quotes is a list of quotes and each quote is itself a list with
[ quote, author ]. Kinda sucks that it has to load like (what could be)
a huge list every time the page loads but I (like most webdevs) am lazy
and It Works How It Is.
*/
window.initializequotes = function() { window.initializequotes = function() {
window.quotes = [ window.quotes = [
[ "Yeah, that's just how it is. Just, nothing. So much nothing that it hurts.", [ "Yeah, that's just how it is. Just, nothing. So much nothing that it hurts.",
@ -24,6 +45,13 @@ window.initializequotes = function() {
window.quote = 0; window.quote = 0;
} }
/*
You can pop this in window.onload() to generate the quote on page load
OR make a button with onclick="window.genQuote();" to let the user get
moar quotes.
Will not give you the same quote twice in a row!
*/
window.genQuote = function() { window.genQuote = function() {
window.oldquote = window.quote; window.oldquote = window.quote;
quoteindex = Math.floor(Math.random() * window.quotes.length); quoteindex = Math.floor(Math.random() * window.quotes.length);