Compare commits

..

No commits in common. "b73a9be37978661753f1186497a8e38b8efe6008" and "eaacf09e12330b0f6a93af38655fb4e8fb8df86d" have entirely different histories.

4 changed files with 75 additions and 83 deletions

View file

@ -2,29 +2,27 @@
Ever felt lost in a group conversation? Ever felt lost in a group conversation?
Have you run out of conversation topics with your friends? Have you run out of conversation topics with your friends?
Don't worry, *socialize* is here to support you. Don't worry, *socialize* is there to support you.
It is a self-contained web page which asks socializing, funny and interesting questions. It is a self-contained web page which asks socializing, funny and interesting questions.
Use it as conversation starter or just for fun. Use it as conversation starter or just for fun.
You can see it in action [[https://deleh.github.io/socialize][here]].
** Installation ** Installation
This is just one HTML file, grab the =index.html= and open it in your favourite browser or host it with whatever webserver you like. This is just one HTML file, grab the =index.html= and open it in your favourite browser or host it with whatever webserver you like.
This web page is also available as [[https://nixos.wiki/wiki/Flakes][Nix Flake]]. This web page is also available as [[https://nixos.wiki/wiki/Flakes][Nix Flake]].
The =index.html= file is provided in the root of the flake package output. The =index.html= file is provided in =/var/www/socialize= of the flake output.
To use it for example with Nginx, the flakes (here included as =socialize=) content can be accessed like this: To use it for example with Nginx, the flakes (here included as =socialize=) content can be accessed like this:
#+begin_example nix #+begin_example nix
services.nginx.virtualHosts."example.org".locations."/".root = "${socialize.packages."<your-arch>".socialize}"; services.nginx.virtualHosts."example.org".locations."/".root = "${socialize.packages."<your-arch>".socialize}/var/www/socialize";
#+end_example #+end_example
*** Requirements *** Requirements
The browser must have JavaScript enabled. The browser must have JavaScript enabled.
But don't worry, nothing gets loaded from a third party. But don't worry, nothing is loaded from a third party.
** Adding questions ** Adding questions

17
flake.lock generated
View file

@ -2,11 +2,11 @@
"nodes": { "nodes": {
"flake-utils": { "flake-utils": {
"locked": { "locked": {
"lastModified": 1644229661, "lastModified": 1629481132,
"narHash": "sha256-1YdnJAsNy69bpcjuoKdOYQX0YxZBiCYZo4Twxerqv7k=", "narHash": "sha256-JHgasjPR0/J1J3DRm4KxM4zTyAj4IOJY8vIl75v/kPI=",
"owner": "numtide", "owner": "numtide",
"repo": "flake-utils", "repo": "flake-utils",
"rev": "3cecb5b042f7f209c56ffd8371b2711a290ec797", "rev": "997f7efcb746a9c140ce1f13c72263189225f482",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -17,12 +17,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1646506091, "lastModified": 1628077112,
"narHash": "sha256-sWNAJE2m+HOh1jtXlHcnhxsj6/sXrHgbqVNcVRlveK4=", "narHash": "sha256-ehfkGNBdq0GFbezcXZP4OPcik+k4Lm7mF8NUKJlq6Ho=",
"owner": "NixOS", "path": "/nix/store/gy0x00sjl3lczh2h6akhhcfyp263nmy5-source",
"repo": "nixpkgs", "rev": "465daf79b4a23d6e47d2efddece7120da8800c63",
"rev": "3e644bd62489b516292c816f70bf0052c693b3c7", "type": "path"
"type": "github"
}, },
"original": { "original": {
"id": "nixpkgs", "id": "nixpkgs",

View file

@ -1,22 +1,28 @@
{ {
description = "socialize web page"; description = "socialize web page";
inputs.flake-utils.url = "github:numtide/flake-utils"; inputs.flake-utils.url = "github:numtide/flake-utils";
outputs = { self, nixpkgs, flake-utils }: outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem flake-utils.lib.eachDefaultSystem
(system: (system:
let let
pkgs = nixpkgs.legacyPackages.${system}; pkgs = nixpkgs.legacyPackages.${system};
in in
{ {
# Package
packages.socialize = packages.socialize =
pkgs.stdenv.mkDerivation { pkgs.stdenv.mkDerivation {
name = "socialize"; name = "socialize";
src = self; src = self;
installPhase = '' installPhase = ''
install -m 444 -D index.html $out/index.html install -m 444 -D index.html $out/var/www/socialize/index.html
''; '';
}; };
defaultPackage = self.packages.${system}.socialize; defaultPackage = self.packages.${system}.socialize;
} }
); );
} }

View file

@ -60,21 +60,13 @@
// Questions // Questions
const questions = [ const questions = [
"Are you a cat person or a normal person?", "Are you a cat person or a normal person?",
"Are you into musicals?",
"Blueberry muffin, with ketchup or mustard?", "Blueberry muffin, with ketchup or mustard?",
"Do you like bread?",
"Do you sympathize more with the Empire or the Rebels?", "Do you sympathize more with the Empire or the Rebels?",
"Do you think there are more doors or wheels in the world?",
"For which folk band would you like to be a roadie?",
"Have you ever been to work without pants?",
"How do you feel about beeing disadvantaged as a woman/privileged as a man in society?", "How do you feel about beeing disadvantaged as a woman/privileged as a man in society?",
"How do you feel about putting pineapple on pizza?", "How do you feel about putting pineapple on pizza?",
"If animals could talk, which would be the rudest?", "If animals could talk, which would be the rudest?",
"If peanut butter wasnt called peanut butter, what would it be called?", "If peanut butter wasnt called peanut butter, what would it be called?",
"If you could be born elsewhere and completely restart all of your experiences, where would you go?",
"If you could change one law of nature, what would it be and what would be the consequences?",
"If you could merge two different animals to create the ultimate animal, what two animals would it be and what would be their product?", "If you could merge two different animals to create the ultimate animal, what two animals would it be and what would be their product?",
"If you could program one app, what would it be?",
"If you could replace all of the grass in the world with something else, what would it be and why?", "If you could replace all of the grass in the world with something else, what would it be and why?",
"If you had to go to jail for any reason, what would it be?", "If you had to go to jail for any reason, what would it be?",
"If you were transported 400 years into the past with no clothes or anything else, how would you prove that you were from the future?", "If you were transported 400 years into the past with no clothes or anything else, how would you prove that you were from the future?",
@ -84,7 +76,6 @@
"Is cereal soup?", "Is cereal soup?",
"Toilet paper, over or under?", "Toilet paper, over or under?",
"What are some fun and interesting alternatives to war that countries could settle their differences with?", "What are some fun and interesting alternatives to war that countries could settle their differences with?",
"What are your thoughts on raisins?",
"What did you miss most during the Covid-19 pandemic?", "What did you miss most during the Covid-19 pandemic?",
"What do you normally do for fun?", "What do you normally do for fun?",
"What hat would you wear right now if it were fashionable to wear one at every occasion?", "What hat would you wear right now if it were fashionable to wear one at every occasion?",
@ -110,7 +101,6 @@
"Whats the worst purchase you have ever made?", "Whats the worst purchase you have ever made?",
"Whats your animal of the day?", "Whats your animal of the day?",
"Whats your favorite sock color?", "Whats your favorite sock color?",
"Whats your favorite thing to spend on or would love to spend on?",
"Whats your favourite Austin Powers movie?", "Whats your favourite Austin Powers movie?",
"Whats your favourite Gilmore Girls episode?", "Whats your favourite Gilmore Girls episode?",
"Whats your favourite beer brewery?", "Whats your favourite beer brewery?",
@ -120,7 +110,6 @@
"Which company will put advertising on the moon first?", "Which company will put advertising on the moon first?",
"Which fruit describes you best?", "Which fruit describes you best?",
"Which sport do you think theyll invent next?", "Which sport do you think theyll invent next?",
"Which three records do you take with you to a desert island?",
"Would you rather be always 15 minutes late or always 30 minutes early?", "Would you rather be always 15 minutes late or always 30 minutes early?",
"Would you rather brush your teeth with a toilet brush or clean the toilet with your toothbrush?", "Would you rather brush your teeth with a toilet brush or clean the toilet with your toothbrush?",
"Would you rather have drill-hands or rollerblade-feet?", "Would you rather have drill-hands or rollerblade-feet?",