Просмотр исходного кода

Fix Navigation to ComparisonView in .zip mode

Nesta Bentum 4 лет назад
Родитель
Сommit
2a3a82524e

+ 139 - 67
report-viewer/src/components/ComparisonsTable.vue

@@ -10,120 +10,192 @@
       <th>Submission 2</th>
       <th>Match %</th>
     </tr>
-    <tr v-for="(comparison, index) in topComparisons"
-        :key="comparison.firstSubmissionId
-            + comparison.secondSubmissionId
-            + comparison.matchPercentage"
-        class="selectable"
+    <tr
+      v-for="(comparison, index) in topComparisons"
+      :key="
+        comparison.firstSubmissionId +
+        comparison.secondSubmissionId +
+        comparison.matchPercentage
+      "
+      class="selectable"
     >
-      <td @click="navigateToComparisonView(comparison.firstSubmissionId, comparison.secondSubmissionId)">{{
-          index + 1
-        }}.
+      <td
+        @click="
+          navigateToComparisonView(
+            comparison.firstSubmissionId,
+            comparison.secondSubmissionId
+          )
+        "
+      >
+        {{ index + 1 }}.
       </td>
-      <td :class="{ 'anonymous-style' : isAnonymous(comparison.firstSubmissionId)}"
-          @click="navigateToComparisonView(comparison.firstSubmissionId, comparison.secondSubmissionId)">
-        {{ isAnonymous(comparison.firstSubmissionId) ? "Hidden" : comparison.firstSubmissionId }}
+      <td
+        :class="{
+          'anonymous-style': isAnonymous(comparison.firstSubmissionId),
+        }"
+        @click="
+          navigateToComparisonView(
+            comparison.firstSubmissionId,
+            comparison.secondSubmissionId
+          )
+        "
+      >
+        {{
+          isAnonymous(comparison.firstSubmissionId)
+            ? "Hidden"
+            : comparison.firstSubmissionId
+        }}
       </td>
       <td
-          @click="navigateToComparisonView(comparison.firstSubmissionId, comparison.secondSubmissionId)">
-        <img alt=">>" src="@/assets/double_arrow_black_18dp.svg"/>
+        @click="
+          navigateToComparisonView(
+            comparison.firstSubmissionId,
+            comparison.secondSubmissionId
+          )
+        "
+      >
+        <img alt=">>" src="@/assets/double_arrow_black_18dp.svg" />
       </td>
-      <td :class="{ 'anonymous-style' : isAnonymous(comparison.secondSubmissionId)}"
-          @click="navigateToComparisonView(comparison.firstSubmissionId, comparison.secondSubmissionId)">
-        {{ isAnonymous(comparison.secondSubmissionId) ? "Hidden" : comparison.secondSubmissionId }}
+      <td
+        :class="{
+          'anonymous-style': isAnonymous(comparison.secondSubmissionId),
+        }"
+        @click="
+          navigateToComparisonView(
+            comparison.firstSubmissionId,
+            comparison.secondSubmissionId
+          )
+        "
+      >
+        {{
+          isAnonymous(comparison.secondSubmissionId)
+            ? "Hidden"
+            : comparison.secondSubmissionId
+        }}
       </td>
       <td>{{ formattedMatchPercentage(comparison.matchPercentage) }}</td>
       <td>
-        <img v-if="isInCluster(comparison.firstSubmissionId, comparison.secondSubmissionId)"
-             alt=">>"
-             src="@/assets/keyboard_double_arrow_down_black_18dp.svg"
-             @click="toggleDialog(index)"
+        <img
+          v-if="
+            isInCluster(
+              comparison.firstSubmissionId,
+              comparison.secondSubmissionId
+            )
+          "
+          alt=">>"
+          src="@/assets/keyboard_double_arrow_down_black_18dp.svg"
+          @click="toggleDialog(index)"
         />
       </td>
       <GDialog v-model="dialog[index]">
-        <ClustersList :clusters="getClustersFor(comparison.firstSubmissionId, comparison.secondSubmissionId)"
-                      :comparison="comparison"/>
+        <ClustersList
+          :clusters="
+            getClustersFor(
+              comparison.firstSubmissionId,
+              comparison.secondSubmissionId
+            )
+          "
+          :comparison="comparison"
+        />
       </GDialog>
     </tr>
   </table>
 </template>
 
 <script>
-import {defineComponent, ref} from "vue";
+import { defineComponent, ref } from "vue";
 import router from "@/router";
-import store from "@/store/store";
-import {GDialog} from "gitart-vue-dialog";
+import { GDialog } from "gitart-vue-dialog";
 import ClustersList from "@/components/ClustersList";
+import { useStore } from "vuex";
 
 export default defineComponent({
   name: "ComparisonsTable",
-  components: {ClustersList, GDialog},
+  components: { ClustersList, GDialog },
   props: {
     topComparisons: {
       type: Array,
-      required: true
+      required: true,
     },
     clusters: {
-      type: Array
-    }
+      type: Array,
+    },
   },
   setup(props) {
-    let formattedMatchPercentage = (number) => number.toFixed(2)
-    const dialog = ref([])
-    props.topComparisons.forEach(() => dialog.value.push(false))
+    const store = useStore();
+    console.log(store.state.files);
+    let formattedMatchPercentage = (number) => number.toFixed(2);
+    const dialog = ref([]);
+    props.topComparisons.forEach(() => dialog.value.push(false));
 
     const toggleDialog = (index) => {
-      dialog.value[index] = true
-    }
+      dialog.value[index] = true;
+    };
 
     const navigateToComparisonView = (firstId, secondId) => {
       if (!store.state.single) {
         router.push({
           name: "ComparisonView",
-          query: {firstId: firstId, secondId: secondId},
-        })
+          params: { firstId, secondId },
+        });
       }
-    }
+    };
 
     const isInCluster = (id1, id2) => {
-      return props.clusters.some(c => c.members.includes(id1) && c.members.includes(id2))
-    }
+      return props.clusters.some(
+        (c) => c.members.includes(id1) && c.members.includes(id2)
+      );
+    };
 
     const isAnonymous = (id) => {
-      return store.state.anonymous.has(id)
-    }
-
+      return store.state.anonymous.has(id);
+    };
 
     const getParticipatingMatchesForId = (id, others) => {
-      let matches = []
-      props.topComparisons.forEach(comparison => {
-        if (comparison.firstSubmissionId.includes(id) && others.includes(comparison.secondSubmissionId)) {
-          matches.push({matchedWith: comparison.secondSubmissionId, percentage: comparison.matchPercentage})
-        } else if (comparison.secondSubmissionId.includes(id) && others.includes(comparison.firstSubmissionId)) {
-          matches.push({matchedWith: comparison.firstSubmissionId, percentage: comparison.matchPercentage})
+      let matches = [];
+      props.topComparisons.forEach((comparison) => {
+        if (
+          comparison.firstSubmissionId.includes(id) &&
+          others.includes(comparison.secondSubmissionId)
+        ) {
+          matches.push({
+            matchedWith: comparison.secondSubmissionId,
+            percentage: comparison.matchPercentage,
+          });
+        } else if (
+          comparison.secondSubmissionId.includes(id) &&
+          others.includes(comparison.firstSubmissionId)
+        ) {
+          matches.push({
+            matchedWith: comparison.firstSubmissionId,
+            percentage: comparison.matchPercentage,
+          });
         }
-      })
+      });
       return matches;
-    }
+    };
 
-    const clustersWithParticipatingMatches = props.clusters.map(cluster => {
-      let membersArray = {}
-      cluster.members.forEach(member => {
-        let others = cluster.members.filter(m => !m.includes(member))
-        membersArray[member] = getParticipatingMatchesForId(member, others)
-      })
+    const clustersWithParticipatingMatches = props.clusters.map((cluster) => {
+      let membersArray = {};
+      cluster.members.forEach((member) => {
+        let others = cluster.members.filter((m) => !m.includes(member));
+        membersArray[member] = getParticipatingMatchesForId(member, others);
+      });
 
       return {
         averageSimilarity: cluster.averageSimilarity,
         strength: cluster.strength,
-        members: membersArray
-      }
-    })
+        members: membersArray,
+      };
+    });
 
     const getClustersFor = (id1, id2) => {
-      return clustersWithParticipatingMatches.filter(c => Object.keys(c.members).includes(id1)
-          && Object.keys(c.members).includes(id2))
-    }
+      return clustersWithParticipatingMatches.filter(
+        (c) =>
+          Object.keys(c.members).includes(id1) &&
+          Object.keys(c.members).includes(id2)
+      );
+    };
 
     return {
       clustersWithParticipatingMatches,
@@ -134,10 +206,10 @@ export default defineComponent({
       toggleDialog,
       formattedMatchPercentage,
       navigateToComparisonView,
-      isInCluster
-    }
-  }
-})
+      isInCluster,
+    };
+  },
+});
 </script>
 
 <style scoped>
@@ -180,4 +252,4 @@ td {
   background: var(--primary-color-dark);
   cursor: pointer;
 }
-</style>
+</style>

+ 1 - 0
report-viewer/src/router/index.ts

@@ -21,6 +21,7 @@ const routes: Array<RouteRecordRaw> = [
     path: "/comparison",
     name: "ComparisonView",
     component: ComparisonView,
+    props: true,
   },
 ];
 

+ 114 - 59
report-viewer/src/views/ComparisonView.vue

@@ -3,102 +3,154 @@
 -->
 <template>
   <div class="container">
-    <button id="show-button" :class="{hidden : !hideLeftPanel}" title="Show sidebar" @click="togglePanel">
-      <img alt="show" src="@/assets/double_arrow_black_24dp.svg">
+    <button
+      id="show-button"
+      :class="{ hidden: !hideLeftPanel }"
+      title="Show sidebar"
+      @click="togglePanel"
+    >
+      <img alt="show" src="@/assets/double_arrow_black_24dp.svg" />
     </button>
-    <div id="sidebar" :class="{ hidden : hideLeftPanel }">
+    <div id="sidebar" :class="{ hidden: hideLeftPanel }">
       <div class="title-section">
         <h1>JPlag Comparison</h1>
         <button id="hide-button" title="Hide sidebar" @click="togglePanel">
-          <img alt="hide" src="@/assets/keyboard_double_arrow_left_black_24dp.svg"></button>
+          <img
+            alt="hide"
+            src="@/assets/keyboard_double_arrow_left_black_24dp.svg"
+          />
+        </button>
       </div>
-      <TextInformation :anonymous="store.state.anonymous.has(firstId)" :value="firstId" label="Submission 1"/>
-      <TextInformation :anonymous="store.state.anonymous.has(secondId)" :value="secondId" label="Submission 2"/>
-      <TextInformation :value="comparison.match_percentage" label="Match %"/>
-      <MatchTable :id1="firstId" :id2="secondId" :matches="comparison.allMatches" @match-selected="showMatch"/>
+      <TextInformation
+        :anonymous="store.state.anonymous.has(firstId)"
+        :value="firstId"
+        label="Submission 1"
+      />
+      <TextInformation
+        :anonymous="store.state.anonymous.has(secondId)"
+        :value="secondId"
+        label="Submission 2"
+      />
+      <TextInformation :value="comparison.match_percentage" label="Match %" />
+      <MatchTable
+        :id1="firstId"
+        :id2="secondId"
+        :matches="comparison.allMatches"
+        @match-selected="showMatch"
+      />
     </div>
-    <FilesContainer :container-id="1" :files="filesOfFirst" :matches="comparison.matchesInFirstSubmission"
-                    files-owner="Submission 1"
-                    @toggle-collapse="toggleCollapseFirst"
-                    @line-selected="showMatchInSecond"/>
-    <FilesContainer :container-id="2" :files="filesOfSecond" :matches="comparison.matchesInSecondSubmissions"
-                    files-owner="Submission 2"
-                    @toggle-collapse="toggleCollapseSecond"
-                    @line-selected="showMatchInFirst"/>
+    <FilesContainer
+      :container-id="1"
+      :files="filesOfFirst"
+      :matches="comparison.matchesInFirstSubmission"
+      files-owner="Submission 1"
+      @toggle-collapse="toggleCollapseFirst"
+      @line-selected="showMatchInSecond"
+    />
+    <FilesContainer
+      :container-id="2"
+      :files="filesOfSecond"
+      :matches="comparison.matchesInSecondSubmissions"
+      files-owner="Submission 2"
+      @toggle-collapse="toggleCollapseSecond"
+      @line-selected="showMatchInFirst"
+    />
   </div>
 </template>
 
 <script>
-import {defineComponent, ref} from "vue";
-import {generateLineCodeLink} from "@/utils/Utils";
-import store from "@/store/store";
-import router from "@/router";
+import { defineComponent, ref } from "vue";
+import { generateLineCodeLink } from "@/utils/Utils";
 import TextInformation from "@/components/TextInformation";
 import MatchTable from "@/components/MatchTable";
-import {ComparisonFactory} from "@/model/factories/ComparisonFactory";
+import { ComparisonFactory } from "@/model/factories/ComparisonFactory";
 import FilesContainer from "@/components/FilesContainer";
+import { useStore } from "vuex";
+import { useRouter } from "vue-router";
 
 export default defineComponent({
   name: "ComparisonView",
-  components: {FilesContainer, MatchTable, TextInformation},
+  components: { FilesContainer, MatchTable, TextInformation },
   props: {
     firstId: {
       type: String,
+      required: true,
     },
     secondId: {
       type: String,
+      required: true,
     },
   },
   setup(props) {
+    const store = useStore();
+    const router = useRouter();
     /**
      * Name of the comparison file. Comparison files should be named {ID1}-{ID2}
      * @type {string}
      */
-    const fileName1 = props.firstId.concat("-").concat(props.secondId)
-    const fileName2 = props.firstId.concat("-").concat(props.secondId)
+    const fileName1 = props.firstId.concat("-").concat(props.secondId);
+    const fileName2 = props.firstId.concat("-").concat(props.secondId);
 
     let comparison;
     //getting the comparison file based on the used mode (zip, local, single)
     if (store.state.local) {
       try {
-        // eslint-disable-next-line @typescript-eslint/no-var-requires
-        comparison = ComparisonFactory.getComparison(require(`../files/${fileName1}.json`))
+        comparison = ComparisonFactory.getComparison(
+          // eslint-disable-next-line @typescript-eslint/no-var-requires
+          require(`../files/${fileName1}.json`)
+        );
       } catch (exception) {
         try {
-          // eslint-disable-next-line @typescript-eslint/no-var-requires
-          comparison = ComparisonFactory.getComparison(require(`../files/${fileName2}.json`))
+          comparison = ComparisonFactory.getComparison(
+            // eslint-disable-next-line @typescript-eslint/no-var-requires
+            require(`../files/${fileName2}.json`)
+          );
         } catch (exception) {
-          router.back()
+          router.back();
         }
       }
     } else if (store.state.zip) {
-      if (store.state.files[fileName1.concat(".json")]) {
-        comparison = ComparisonFactory.getComparison(JSON.parse(store.state.files[fileName1.concat(".json")]))
-      } else {
-        comparison = ComparisonFactory.getComparison(JSON.parse(store.state.files[fileName2.concat(".json")]))
-      }
+      const getComparisonFileFor = (id1, id2) => {
+        const index = Object.keys(store.state.files).filter((name) =>
+          name.endsWith(
+            id1.concat("-").concat(id2).concat(".json") ||
+              name.endsWith(id2.concat("-").concat(id1).concat(".json"))
+          )
+        )[0];
+        return store.state.files[index];
+      };
 
+      let comparisonFile = getComparisonFileFor(props.firstId, props.secondId);
+      if (comparisonFile) {
+        comparison = ComparisonFactory.getComparison(
+          JSON.parse(comparisonFile)
+        );
+      }
     } else if (store.state.single) {
-      comparison = ComparisonFactory.getComparison(JSON.parse(store.state.fileString))
+      comparison = ComparisonFactory.getComparison(
+        JSON.parse(store.state.fileString)
+      );
     }
 
-    const filesOfFirst = ref(comparison.filesOfFirstSubmission)
-    const filesOfSecond = ref(comparison.filesOfSecondSubmission)
+    const filesOfFirst = ref(comparison.filesOfFirstSubmission);
+    const filesOfSecond = ref(comparison.filesOfSecondSubmission);
 
     /**
      * Collapses a file in the first files container.
      * @param title
      */
     const toggleCollapseFirst = (title) => {
-      filesOfFirst.value[title].collapsed = !filesOfFirst.value[title].collapsed
-    }
+      filesOfFirst.value[title].collapsed =
+        !filesOfFirst.value[title].collapsed;
+    };
     /**
      * Collapses a file in the second files container.
      * @param title
      */
     const toggleCollapseSecond = (title) => {
-      filesOfSecond.value[title].collapsed = !filesOfSecond.value[title].collapsed
-    }
+      filesOfSecond.value[title].collapsed =
+        !filesOfSecond.value[title].collapsed;
+    };
     /**
      * Shows a match in the first files container
      * @param e
@@ -108,10 +160,12 @@ export default defineComponent({
      */
     const showMatchInFirst = (e, panel, file, line) => {
       if (!filesOfFirst.value[file].collapsed) {
-        toggleCollapseFirst(file)
+        toggleCollapseFirst(file);
       }
-      document.getElementById(generateLineCodeLink(panel, file, line)).scrollIntoView()
-    }
+      document
+        .getElementById(generateLineCodeLink(panel, file, line))
+        .scrollIntoView();
+    };
     /**
      * Shows a match in the second files container.
      * @param e
@@ -121,22 +175,23 @@ export default defineComponent({
      */
     const showMatchInSecond = (e, panel, file, line) => {
       if (!filesOfSecond.value[file].collapsed) {
-        toggleCollapseSecond(file)
+        toggleCollapseSecond(file);
       }
-      document.getElementById(generateLineCodeLink(panel, file, line)).scrollIntoView()
-    }
+      document
+        .getElementById(generateLineCodeLink(panel, file, line))
+        .scrollIntoView();
+    };
 
     const showMatch = (e, match) => {
-      showMatchInFirst(e, 1, match.firstFile, match.startInFirst)
-      showMatchInSecond(e, 2, match.secondFile, match.startInSecond)
-    }
-
+      showMatchInFirst(e, 1, match.firstFile, match.startInFirst);
+      showMatchInSecond(e, 2, match.secondFile, match.startInSecond);
+    };
 
     //Left panel
-    const hideLeftPanel = ref(true)
+    const hideLeftPanel = ref(true);
     const togglePanel = () => {
-      hideLeftPanel.value = !hideLeftPanel.value
-    }
+      hideLeftPanel.value = !hideLeftPanel.value;
+    };
 
     return {
       comparison,
@@ -151,10 +206,10 @@ export default defineComponent({
       showMatch,
       togglePanel,
 
-      store
-    }
-  }
-})
+      store,
+    };
+  },
+});
 </script>
 
 <style scoped>
@@ -234,4 +289,4 @@ h1 {
 #show-button:hover img {
   display: block;
 }
-</style>
+</style>

+ 88 - 63
report-viewer/src/views/FileUploadView.vue

@@ -3,25 +3,27 @@
 -->
 <template>
   <div class="container" @dragover.prevent @drop.prevent="uploadFile">
-    <img alt="JPlag" src="@/assets/logo-nobg.png"/>
+    <img alt="JPlag" src="@/assets/logo-nobg.png" />
     <h1>JPlag Report Viewer</h1>
     <h2>Select an overview or comparison file or a zip to display.</h2>
-    <div class="drop-container" >
-      <p> Drop a .json or .zip on this page</p>
+    <div class="drop-container">
+      <p>Drop a .json or .zip on this page</p>
     </div>
     <div v-if="hasLocalFile" class="local-files-container">
       <p class="local-files-text">Detected local files!</p>
-      <button class="local-files-button" @click="continueWithLocal">Continue with local files</button>
+      <button class="local-files-button" @click="continueWithLocal">
+        Continue with local files
+      </button>
     </div>
   </div>
 </template>
 
-<script>
-import {defineComponent} from "vue";
-import jszip from "jszip"
+<script lang="ts">
+import { defineComponent } from "vue";
+import jszip from "jszip";
 import router from "@/router";
 import store from "@/store/store";
-import {getFileExtension} from "@/utils/Utils";
+import { getFileExtension } from "@/utils/Utils";
 
 export default defineComponent({
   name: "FileUploadView",
@@ -29,95 +31,119 @@ export default defineComponent({
     let hasLocalFile;
     //Tries to detect local file. If no files detected, hides local mode from screen.
     try {
-      require("../files/overview.json")
-      hasLocalFile = true
+      require("../files/overview.json");
+      hasLocalFile = true;
     } catch (e) {
-      console.log(e)
-      hasLocalFile = false
+      console.log(e);
+      hasLocalFile = false;
     }
 
-
     const navigateToOverview = () => {
       router.push({
-            name: "OverviewView",
-          }
-      )
-    }
+        name: "OverviewView",
+      });
+    };
 
-    const navigateToComparisonView = (id1, id2) => {
+    const navigateToComparisonView = (firstId: string, secondId: string) => {
       router.push({
         name: "ComparisonView",
-        query: {
-          id1: id1,
-          id2: id2
-        }
-      })
-    }
+        params: {
+          firstId,
+          secondId,
+        },
+      });
+    };
     /**
      * Handles zip file on drop. It extracts the zip and saves each file in the store.
      * @param file
      */
-    const handleZipFile = (file) => {
+    const handleZipFile = (file: File) => {
       jszip.loadAsync(file).then(async (zip) => {
         for (const fileName of Object.keys(zip.files)) {
-          console.log(fileName)
-          await zip.files[fileName].async("string").then(data => {
-                store.commit("saveFile", {fileName: fileName, data: data})
-              }
-          )
+          console.log(fileName);
+          await zip.files[fileName].async("string").then((data) => {
+            store.commit("saveFile", { fileName: fileName, data: data });
+          });
         }
-        store.commit("setLoadingType", {local: false, zip: true, single: false, fileString: ""})
-        navigateToOverview()
-      })
-    }
+        store.commit("setLoadingType", {
+          local: false,
+          zip: true,
+          single: false,
+          fileString: "",
+        });
+        navigateToOverview();
+      });
+    };
     /**
      * Handles a json file on drop. It read the file and passes the file string to next window.
      * @param str
      */
-    const handleJsonFile = (str) => {
-      let json = JSON.parse(str)
+    const handleJsonFile = (str: string) => {
+      let json = JSON.parse(str);
       if (json["submission_folder_path"]) {
-        store.commit("setLoadingType", {local: false, zip: false, single: true, fileString: str})
-        navigateToOverview()
+        store.commit("setLoadingType", {
+          local: false,
+          zip: false,
+          single: true,
+          fileString: str,
+        });
+        navigateToOverview();
       } else if (json["first_submission_id"] && json["second_submission_id"]) {
-        store.commit("setLoadingType", {local: false, zip: false, single: true, fileString: str})
-        navigateToComparisonView(json["first_submission_id"], json["second_submission_id"])
+        store.commit("setLoadingType", {
+          local: false,
+          zip: false,
+          single: true,
+          fileString: str,
+        });
+        navigateToComparisonView(
+          json["first_submission_id"],
+          json["second_submission_id"]
+        );
       }
-    }
+    };
     /**
      * Handles file drop.
      * @param e
      */
-    const uploadFile = (e) => {
-      let dropped = e.dataTransfer.files
-      if (!dropped) return
-      let files = [...dropped]
-      if (files.length > 1 || files.length === 0) return
-      let read = new FileReader()
+    const uploadFile = (e: DragEvent) => {
+      let dropped = e.dataTransfer?.files;
+      if (!dropped) return; // TODO add some kind of error message
+      let files = [...dropped];
+      if (files.length > 1 || files.length === 0) return;
+      let read = new FileReader();
       read.onload = (e) => {
-        let extension = getFileExtension(files[0])
+        let extension = getFileExtension(files[0]);
         if (extension === "zip") {
-          handleZipFile(files[0])
+          handleZipFile(files[0]);
         } else if (extension === "json") {
-          handleJsonFile(e.target.result)
+          let file = e.target?.result;
+          if (!file) return;
+          if (typeof file === "string") {
+            handleJsonFile(file);
+          }
         }
-      }
-      read.readAsText(files[0])
-    }
+      };
+      read.readAsText(files[0]);
+    };
     /**
      * Handles click on Continue with local files.
      */
     const continueWithLocal = () => {
-      store.commit("setLoadingType", {local: true, zip: false, single: false, fileString: ""})
-      navigateToOverview()
-    }
+      store.commit("setLoadingType", {
+        local: true,
+        zip: false,
+        single: false,
+        fileString: "",
+      });
+      navigateToOverview();
+    };
     return {
       continueWithLocal,
       uploadFile,
-      hasLocalFile
-    }
-  }
-})
+      hasLocalFile,
+    };
+  },
+});
 </script>
 
 <style scoped>
@@ -179,11 +205,10 @@ input {
 label {
   font-weight: bold;
   font-size: larger;
-  background: #ECECEC;
+  background: #ececec;
   border-radius: 10px;
   box-shadow: #777777 2px 3px 3px;
   padding: 2%;
   margin-top: 1%;
 }
-
-</style>
+</style>