diff --git a/src/index.html b/src/index.html index 6c9e411..42e10ce 100644 --- a/src/index.html +++ b/src/index.html @@ -7,17 +7,47 @@
  • New Diagram
  • Open File
  • Save
  • -
  • +
  • Snapshots
  • +
  • Help
  • +
    +
    + Welcome to CryptoAssist! This is an online tool for manipulating data using various common ciphers. +

    + You can operate the system by dragging blocks down from the top scrolling bar to place them on the diagram. You should probably start with an input and output block, and then add extra cipher blocks between them. +

    + To join multiple blocks together, just drag from the bottom output section, and draw a line to the top of another block. +

    + If you're interested, you can view the code on GitHub. The entire project is written in Javascript, and uses the webpack build system to combine many CommonJS modules. The following libraries, all licensed under the MIT license, are used in this project: +

    +
    +
    diff --git a/src/menu.js b/src/menu.js index 5da80ee..d759963 100644 --- a/src/menu.js +++ b/src/menu.js @@ -51,11 +51,19 @@ events.subscribe(["snapshotsChanged", "diagramImport"], function(){ }); $("#header #snapshots").on("click", ".snapshot>a", function(){ - var snapshot = diagram.snapshots[parseInt($(this).data("i"))] + var snapshot = diagram.snapshots[parseInt($(this).data("i"))] //get the snapshot with the ID from this element var newSnapshotName = prompt("Reverting to this snapshot will cause you to lose your current work. If you would like to make a snapshot of your current workspace, please enter a name for it:"); - if(newSnapshotName){ + if(newSnapshotName){ //if user wants another snapshot, make one require("./diagram/addSnapshot.js")(newSnapshotName); } - diagram.state = JSON.parse(JSON.stringify(snapshot.state)); + diagram.state = JSON.parse(JSON.stringify(snapshot.state)); //load in snapshot require("./diagram/updateState.js")(); }); + +$("#header #help-button").click(function(){ + $("#help").fadeIn().css("display", "flex"); +}); + +$("#help").click(function(){ + $("#help").fadeOut(); +}); diff --git a/src/styles.scss b/src/styles.scss index 898b3ac..7cb7400 100644 --- a/src/styles.scss +++ b/src/styles.scss @@ -114,7 +114,7 @@ body{ } } - >li:last-child{ + >li#snapshots-parent{ position: relative; min-width: 150px; ul#snapshots{ @@ -147,3 +147,20 @@ body{ display: none; } } + +#help{ + position: fixed; + top: 0; + left: 0; + background-color: rgba(0, 0, 0, 0.7); + width: 100vw; + height: 100vh; + display: none; + >div{ + background-color: white; + width: 80%; + margin: auto; + padding: 20px; + border-radius: 20px; + } +}