Commit f6ad2354 authored by Porter Libby's avatar Porter Libby
Browse files

fix some style things etc

parent 2eae2a8f
......@@ -49,9 +49,9 @@
<div id="myModal" class="modal">
<!-- Modal content -->
<div class="modal-content">
<div id='modal_body' class="modal-content">
<div style="display:inline-block; width: 100%;">
<span id='close_btn' class="close">&times;</span>
<span style='font-size:35px !important;' id='close_btn' class="close"><span class="btn-label"><i class="fa fa-times-circle"></i></span></span>
<div id='modal_text'>Some text in the Modal..</div>
<iframe id='modal-video' allow_embedding=true width="40%" height="300px" src="https://www.youtube.com/embed/vjsbZiBVFRM"
......
......@@ -2,7 +2,7 @@
.modal {
display: none; /* Hidden by default */
position: fixed; /* Stay in place */
z-index: 10; /* Sit on top */
z-index: 100; /* Sit on top */
padding-top: 100px; /* Location of the box */
left: 0;
top: 0;
......@@ -10,7 +10,7 @@
height: 100%; /* Full height */
overflow: auto; /* Enable scroll if needed */
background-color: rgb(0,0,0); /* Fallback color */
background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
background-color: rgba(0,0,0,0.8); /* Black w/ opacity */
}
/* Modal Content */
......@@ -18,8 +18,10 @@
background-color: #fefefe;
margin: auto;
padding: 20px;
border: 1px solid #888;
border: 2px solid black;
box-shadow: inset 0 3px 9px rgba(0, 0, 0, 0.5), 0 1px rgba(255, 255, 255, 0.1);
width: 80%;
color: white;
}
#modal_text{
width: 45%;
......
......@@ -7,4 +7,11 @@
#pdf_out h{
font-size: 30px;
color: red;
}
#pdf_out #pdf_heading{
font-size:14px;
text-decoration: solid;
}
#pdf_out #pdf_item{
font-size:12px;
}
\ No newline at end of file
......@@ -352,19 +352,19 @@ var dictionary = {
"ways_forward": {
"carrie_seltzer": [
"",
"I think my Earlham education allowed me to grow into my true self. I didn’t feel like I had to pretend to be someone who I wasn’t. And that for me was an incredible, sort of personal awakening.",
'"I think my Earlham education allowed me to grow into my true self. I didn’t feel like I had to pretend to be someone who I wasn’t. And that for me was an incredible, sort of personal awakening."',
"Carrie Seltzer, the Digital Naturalist",
""
],
"oneido_luis": [
"",
"I think the great thing about an Earlham education is, by design, that it is versatile, it is dynamic, it is full of inquiry and, as cheesy as it sounds, it’s also quite inspiring.",
'"I think the great thing about an Earlham education is, by design, that it is versatile, it is dynamic, it is full of inquiry and, as cheesy as it sounds, it’s also quite inspiring."',
"Oneido Luis, the Community Connector",
""
],
"sonat_hart": [
"",
"An Earlham education is incredibly beneficial because it really teaches you what it takes to succeed.",
'"An Earlham education is incredibly beneficial because it really teaches you what it takes to succeed."',
"Sonat Hart, the Gold Medal Distiller",
""
]
......
......@@ -53,13 +53,27 @@ function generatePDF() {
const content = document.getElementById("pdf_content");
if (selection_tracking[0] != "" && selection_tracking[1] != "" && selection_tracking[2] != "" && selection_tracking[3] != ""){
content.innerHTML = "1. Major Selection: " + selection_tracking[0] + "<br>";
content.innerHTML += "2. Passion Project Selection: " + selection_tracking[1] + "<br>";
content.innerHTML += "3. Access opportunities Selection: " + selection_tracking[2] + "<br>";
content.innerHTML += "4. Explore Ways Forward: " + selection_tracking[3] + "<br>";
html2pdf().from(element).save("My EPIC Journey");
content.innerHTML = "<span id='pdf_heading'>1. Major Selection </span><br>";
for (x=0;x<selection_tracking[0].length;x++){
content.innerHTML += "<span id='pdf_item'>&emsp;" + dictionary["major_selection"][selection_tracking[0][x]][2] + "</span><br>"
}
content.innerHTML += "<br><span id='pdf_heading'>2. Passion Project Selection </span><br>";
for (x=0;x<selection_tracking[1].length;x++){
content.innerHTML += "<span id='pdf_item'>&emsp;" + dictionary["passion_project"][selection_tracking[1][x]][2] + "</span><br>"
}
content.innerHTML += "<br><span id='pdf_heading'>3. Access opportunities Selection </span><br>";
for (x=0;x<selection_tracking[2].length;x++){
content.innerHTML += "<span id='pdf_item'>&emsp;" + dictionary["access_opportunities"][selection_tracking[2][x]][2] + "</span><br>"
}
content.innerHTML += "<br><span id='pdf_heading'>4. Explore Ways Forward </span><br>";
for (x=0;x<selection_tracking[3].length;x++){
content.innerHTML += "<span id='pdf_item'>&emsp;" + dictionary["ways_forward"][selection_tracking[3][x]][2] + "</span><br>"
}
html2pdf().from(element).save("My EPIC Journey"); // create pdf
return true;
}else{
alert("Please make a selection for each section to export your results!");
......
......@@ -16,9 +16,11 @@ $(document).ready(function() {
});
// this function handles opening the modal when it IS closed.
function open_modal() {
function open_modal(color) {
console.log(color)
var modal = document.getElementById("myModal");
modal.style.display = "block";
document.getElementById("modal_body").style.backgroundColor = color;
}
// this function sets the content of the model. (INCOMPLETE)
......@@ -26,7 +28,7 @@ function set_modal_text(url, description, title, video_url) {
var text_obj = document.getElementById('modal_text');
var video_obj = document.getElementById('modal-video');
text_obj.innerHTML = "<strong>" + title + "</strong>";
text_obj.innerHTML = "<strong style='font-size: 20px;'>" + title + "</strong>";
text_obj.innerHTML += "<br><br>";
text_obj.innerHTML += description;
......@@ -40,7 +42,12 @@ function set_modal_text(url, description, title, video_url) {
// OPEN MODAL FOR SPECIFIC BLOCK
function section_two(val){ // load info for section two based on value
function section_two(val, c){ // load info for section two based on value
console.log(val);
console.log(c);
if (selection_tracking[1].includes(val)){
// UNSELECT
console.log(selection_tracking)
......@@ -57,12 +64,12 @@ function section_two(val){ // load info for section two based on value
var title = dictionary["passion_project"][val][2];
var video = dictionary["passion_project"][val][3];
selection_tracking[1].push(val); // set value for export
open_modal()
open_modal($('label[for="'+c+'"]')[0].style.backgroundColor)
set_modal_text(url,desc,title,video)
}
}
function section_three(val){ // load info for section three based on value
function section_three(val, c){ // load info for section three based on value
if (selection_tracking[2].includes(val)){
// UNSELECT
console.log(selection_tracking)
......@@ -79,12 +86,12 @@ function section_three(val){ // load info for section three based on value
var title = dictionary["access_opportunities"][val][2];
var video = dictionary["access_opportunities"][val][3];
selection_tracking[2].push(val); // set value for export
open_modal()
open_modal($('label[for="'+c+'"]')[0].style.backgroundColor)
set_modal_text(url,desc,title,video)
}
}
function section_four(val){ // load info for section two based on value
function section_four(val, c){ // load info for section two based on value
if (selection_tracking[3].includes(val)){
// UNSELECT
console.log(selection_tracking)
......@@ -101,7 +108,7 @@ function section_four(val){ // load info for section two based on value
var title = dictionary["ways_forward"][val][2];
var video = dictionary["ways_forward"][val][3];
selection_tracking[3].push(val); // set value for export
open_modal()
open_modal($('label[for="'+c+'"]')[0].style.backgroundColor)
set_modal_text(url,desc,title,video)
}
}
\ No newline at end of file
......@@ -7,7 +7,7 @@ $(document).ready(function() { // populate when document is loaded
for (property in dictionary["passion_project"]) {
// for each item in passion project section, create a form element
count++;
form.innerHTML += '<input type="checkbox" id="' + "passion-project-" + count + '" name="' + property + '" value="' + property + '" onchange="section_two(this.value)">';
form.innerHTML += '<input type="checkbox" id="' + "passion-project-" + count + '" name="passion-project" value="' + property + '" onchange="section_two(this.value, this.id)">';
form.innerHTML += '<label style="border: 1px solid black; background-color:' + random_ec_color() + ';" for="' + "passion-project-" + count + '">' + dictionary["passion_project"][property][2] + '</label><br>';
}
......@@ -18,7 +18,7 @@ $(document).ready(function() { // populate when document is loaded
for (property in dictionary["access_opportunities"]) {
// for each item in passion project section, create a form element
count++;
form.innerHTML += '<input type="checkbox" id="' + "access_opportunities-" + count + '" name="' + property + '" value="' + property + '" onchange="section_three(this.value)">';
form.innerHTML += '<input type="checkbox" id="' + "access_opportunities-" + count + '" name="access_opportunities" value="' + property + '" onchange="section_three(this.value,this.id)">';
form.innerHTML += '<label style="border: 1px solid black; background-color:' + random_ec_color() + ';" for="' + "access_opportunities-" + count + '">' + dictionary["access_opportunities"][property][2] + '</label><br>';
}
......@@ -29,7 +29,7 @@ $(document).ready(function() { // populate when document is loaded
for (property in dictionary["ways_forward"]) {
// for each item in passion project section, create a form element
count++;
form.innerHTML += '<input type="checkbox" id="' + "ways_forward-" + count + '" name="' + property + '" value="' + property + '" onchange="section_four(this.value)">';
form.innerHTML += '<input type="checkbox" id="' + "ways_forward-" + count + '" name="ways_forward" value="' + property + '" onchange="section_four(this.value, this.id)">';
form.innerHTML += '<label style="border: 1px solid black; background-color:' + random_ec_color() + ';"for="' + "ways_forward-" + count + '">' + dictionary["ways_forward"][property][2] + '</label><br>';
}
});
\ No newline at end of file
......@@ -106,8 +106,8 @@ function autocomplete(inp, arr, sub_dict) {
function createInfo(info_arr){
console.log(info_arr);
selection_tracking[0] = info_arr[2]; // set value for export
open_modal();
selection_tracking[0].push(info_arr[2]); // set value for export
open_modal(random_ec_color());
}
function destroyInfo(){
console.log('No info')
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment