Skip to content
This repository has been archived by the owner on Jul 23, 2024. It is now read-only.

Commit

Permalink
carousel
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt Brehmer committed Mar 11, 2017
1 parent a636592 commit 3b38bef
Show file tree
Hide file tree
Showing 9 changed files with 151 additions and 33 deletions.
36 changes: 17 additions & 19 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
Copyright (c) 2017 Microsoft

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
------------------------------------------ START OF LICENSE -----------------------------------------

Timeline Storyteller

Copyright (c) Microsoft Corporation

All rights reserved.

MIT License

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the ""Software""), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

----------------------------------------------- END OF LICENSE ------------------------------------------
9 changes: 0 additions & 9 deletions public/app/js/main.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,3 @@
/**
--------------------------------------------------------------------------------------
TIMELINE STORYTELLER
Matthew Brehmer
© 2017 Microsoft
--------------------------------------------------------------------------------------
**/

/**
--------------------------------------------------------------------------------------
GLOBAL VARIABLES
Expand Down
73 changes: 73 additions & 0 deletions public/css/about.css
Original file line number Diff line number Diff line change
Expand Up @@ -586,3 +586,76 @@ margin-bottom: 30px;
#launch_btn {
text-decoration: none;
}

.carousel_element {
width: 540px;
height: 540px;
display: flex;
justify-content: center;
align-items: center;
background-color: #eee;
padding: 10px;
user-select: none;
}

.carousel_element_img {
max-width: 540px;
max-height: 540px;
cursor: pointer;
}

.carousel_element_img:hover {
border: 1px solid #333;
}

.carousel_control_div {
background-color: #eee;
text-align: center!important;
font-size: 24px!important;
box-sizing: inherit;
display: block;
user-select: none;
line-height: 1.5;
width: 540px;
padding-left: 10px;
padding-right: 10px;
}

.carousel_control {
font-size: 24px;
font-weight: bold;
color: #888;
cursor: pointer;
}

.carousel_control:hover {
color: #333;
}

.carousel_left {
float: left;
}

.carousel_right {
float: right;
}

.carousel_indicator {
height: 13px;
background-color: #888;
width: 13px;
border-radius: 50%;
padding: 0;
border: 1px solid #888!important;
display: inline-block;
text-align: center;
}

.carousel_indicator:hover {
background-color: #333;
transition: background-color .25s,color .15s,box-shadow .15s,opacity .25s,filter .25s,border .15s;
}

#carousel_selected {
background-color: #333;
}
Binary file added public/img/canada.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/dailyroutines.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/empires.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/olympians.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/war.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
66 changes: 61 additions & 5 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@

<div id="left-column">

<!-- <p><a href="#examples">Examples</a></p> -->
<p><a href="#examples">Examples</a></p>
<p><a href="#preparing">Preparing data</a></p>
<p><a href="#usage">Usage overview</a></p>
<p><a href="#code">Source code</a></p>
Expand Down Expand Up @@ -117,12 +117,37 @@ <h3>Project Team:</h3>
</div>
</div>

<!-- <div class="section">
<div class="section">
<span id="examples" class="anchor"></span>
<h3>Example gallery</h3>
<div class="carousel_element">
<a title='The daily routines of olympians' href='img/olympians.gif' target='_top'><img class="carousel_element_img" src="img/olympians.gif"></a>
</div>
<div class="carousel_element">
<a title='US armed conflicts' href='img/war.png' target='_top'><img class="carousel_element_img" src="img/war.png"></a>
</div>
<div class="carousel_element">
<a title='A history of Canada' href='img/canada.gif' target='_top'><img class="carousel_element_img" src="img/canada.gif"></a>
</div>
<div class="carousel_element">
<a title='The daily routines of creative people' href='img/dailyroutines.png' target='_top'><img class="carousel_element_img" src="img/dailyroutines.png"></a>
</div>
<div class="carousel_element">
<a title='Empires of China, Korea, Japan' href='img/empires.png' target='_top'><img class="carousel_element_img" src="img/empires.png"></a>
</div>
<!-- <span id="examples" class="anchor"></span>
<h3>Examples</h3>
<video width="560" height="350" controls><source src="img/dailyroutines.mp4" type="video/mp4">Your browser does not support the video tag</video>
</div> -->
<video width="560" height="350" controls><source src="img/dailyroutines.mp4" type="video/mp4">Your browser does not support the video tag</video> -->
<div class="carousel_control_div">
<div class="carousel_control carousel_left" onclick="plusDivs(-1)">&#10094;</div>
<div class="carousel_control carousel_right" onclick="plusDivs(+1)">&#10095;</div>
<span class="carousel_control carousel_indicator" onclick="currentDiv(1)"></span>
<span class="carousel_control carousel_indicator" onclick="currentDiv(2)"></span>
<span class="carousel_control carousel_indicator" onclick="currentDiv(3)"></span>
<span class="carousel_control carousel_indicator" onclick="currentDiv(4)"></span>
<span class="carousel_control carousel_indicator" onclick="currentDiv(5)"></span>
</div>
</div>

<div class="section">
<span id="preparing" class="anchor"></span>
Expand Down Expand Up @@ -360,4 +385,35 @@ <h4>Noun Project icons (<a href="https://creativecommons.org/licenses/by/3.0/us/

</body>

<script type="text/javascript">
var slideIndex = 1;
showDivs(slideIndex);

function plusDivs(n) {
showDivs(slideIndex += n);
}

function currentDiv(n) {
slideIndex = +n;
showDivs(slideIndex);
}

function showDivs(n) {
var i;
var x = document.getElementsByClassName("carousel_element");
if (n > x.length) {slideIndex = 1}
if (n < 1) {slideIndex = x.length} ;
for (i = 0; i < x.length; i++) {
x[i].style.display = "none";
}
x[slideIndex-1].style.display = "flex";

var y = document.getElementsByClassName("carousel_indicator");
for (i = 0; i < y.length; i++) {
y[i].id = "";
}
y[slideIndex-1].id = "carousel_selected";
}
</script>

</html>

0 comments on commit 3b38bef

Please sign in to comment.