Difference between revisions of "Template:Northwestern Page Head"

Line 81: Line 81:
 
/******** circle nav ********/
 
/******** circle nav ********/
  
 +
 +
@import url(http://netdna.bootstrapcdn.com/font-awesome/2.0/css/font-awesome.css);
  
 
* {
 
* {
position: relative;
+
  -moz-box-sizing: border-box;
-moz-box-sizing: border-box;
+
  box-sizing: border-box;
box-sizing: border-box;
+
  margin: 0;
margin: 0;
+
  padding: 0;
padding: 0;
+
  list-style: none;
list-style: none;
+
  position: relative
 
}
 
}
  
 
html,
 
html,
 
body {
 
body {
height: 100%;
+
  height: 100%;
 
}
 
}
  
 
body {
 
body {
background: #52be7f;
+
  background: #f06060;
color: #fff;
+
  color: #fff;
 
}
 
}
  
.component {
+
.csstransforms .cn-wrapper {
position: relative;
+
  font-size: 1em;
margin-bottom: 3em;
+
  width: 26em;
height: 15em;
+
  height: 26em;
background: rgba(0,0,0,0.05);
+
  overflow: hidden;
font-family: 'Lato', Arial, sans-serif;
+
  position: fixed;
 +
  z-index: 10;
 +
  bottom: -13em;
 +
  left: 50%;
 +
  border-radius: 50%;
 +
  margin-left: -13em;
 +
  -webkit-transform: scale(0.1);
 +
  -ms-transform: scale(0.1);
 +
  -moz-transform: scale(0.1);
 +
  transform: scale(0.1);
 +
  pointer-events: none;
 +
  -webkit-transition: all .3s ease;
 +
  -moz-transition: all .3s ease;
 +
  transition: all .3s ease;
 
}
 
}
  
.component > h2 {
+
.csstransforms .opened-nav {
position: absolute;
+
  border-radius: 50%;
overflow: hidden;
+
  pointer-events: auto;
width: 100%;
+
  -webkit-transform: scale(1);
text-align: center;
+
  -moz-transform: scale(1);
text-transform: uppercase;
+
  -ms-transform: scale(1);
white-space: nowrap;
+
  transform: scale(1);
font-weight: 300;
+
font-style: italic;
+
font-size: 12em;
+
opacity: 0.1;
+
cursor: default;
+
 
}
 
}
  
.cn-button {
+
.cn-overlay {
position: absolute;
+
  width: 100%;
top: 100%;
+
  height: 100%;
left: 50%;
+
  background-color: rgba(0,0,0,0.6);
z-index: 11;
+
  position: fixed;
margin-top: -2.25em;
+
  top: 0;
margin-left: -2.25em;
+
  left: 0;
padding-top: 0em;
+
  bottom: 0;
width: 4.5em;
+
  right: 0;
height: 4.5em;
+
  opacity: 0;
border: none;
+
  visibility: hidden;
border-radius: 50%;
+
  -webkit-transition: all .3s ease;
background: none;
+
  -moz-transition: all .3s ease;
background-color: #fff;
+
  transition: all .3s ease;
color: #52be7f;
+
  z-index: 2;
text-align: center;
+
font-weight: 700;
+
font-size: 1.5em;
+
text-transform: uppercase;
+
cursor: pointer;
+
-webkit-backface-visibility: hidden;
+
 
}
 
}
  
.csstransforms .cn-wrapper {
+
.cn-overlay.on-overlay {
position: absolute;
+
  visibility: visible;
top: 100%;
+
  opacity: 1;
left: 50%;
+
z-index: 10;
+
margin-top: -13em;
+
margin-left: -13.5em;
+
width: 27em;
+
height: 27em;
+
border-radius: 50%;
+
background: transparent;
+
opacity: 0;
+
-webkit-transition: all .3s ease 0.3s;
+
-moz-transition: all .3s ease 0.3s;
+
transition: all .3s ease 0.3s;
+
-webkit-transform: scale(0.1);
+
-ms-transform: scale(0.1);
+
-moz-transform: scale(0.1);
+
transform: scale(0.1);
+
pointer-events: none;
+
overflow: hidden;
+
 
}
 
}
  
/*cover to prevent extra space of anchors from being clickable*/
+
.cn-button {
.csstransforms .cn-wrapper:after{
+
   border: none;
   content:".";
+
   background: none;
   display:block;
+
  color: #f06060;
   font-size:2em;
+
  text-align: center;
   width:6.2em;
+
   font-size: 1.8em;
   height:6.2em;
+
   padding-bottom: 1em;
   position: absolute;
+
   height: 3.5em;
 +
  width: 3.5em;
 +
  background-color: #fff;
 +
   position: fixed;
 
   left: 50%;
 
   left: 50%;
   margin-left: -3.1em;
+
   margin-left: -1.75em;
   top:50%;
+
   bottom: -1.75em;
  margin-top: -3.1em;
+
 
   border-radius: 50%;
 
   border-radius: 50%;
   z-index:10;
+
   cursor: pointer;
   color: transparent;
+
   z-index: 11;
 
}
 
}
  
.csstransforms .opened-nav {
+
.cn-button:hover,
border-radius: 50%;
+
.cn-button:active,
opacity: 1;
+
.cn-button:focus {
-webkit-transition: all .3s ease;
+
  color: #aa1010;
-moz-transition: all .3s ease;
+
transition: all .3s ease;
+
-webkit-transform: scale(1);
+
-moz-transform: scale(1);
+
-ms-transform: scale(1);
+
transform: scale(1);
+
pointer-events: auto;
+
 
}
 
}
  
 
.csstransforms .cn-wrapper li {
 
.csstransforms .cn-wrapper li {
position: absolute;
+
  position: absolute;
top: 50%;
+
  font-size: 1.5em;
left: 50%;
+
  width: 10em;
overflow: hidden;
+
  height: 10em;
margin-top: -1.3em;
+
  -webkit-transform-origin: 100% 100%;
margin-left: -10em;
+
  -moz-transform-origin: 100% 100%;
width: 10em;
+
  -ms-transform-origin: 100% 100%;
height: 10em;
+
  transform-origin: 100% 100%;
font-size: 1.5em;
+
  overflow: hidden;
-webkit-transition: all .3s ease;
+
  left: 50%;
-moz-transition: all .3s ease;
+
  top: 50%;
transition: all .3s ease;
+
  margin-top: -1.3em;
-webkit-transform: rotate(76deg) skew(60deg);
+
  margin-left: -10em;
-moz-transform: rotate(76deg) skew(60deg);
+
  -webkit-transition: border .3s ease;
-ms-transform: rotate(76deg) skew(60deg);
+
  -moz-transition: border .3s ease;
transform: rotate(76deg) skew(60deg);
+
  transition: border .3s ease;
-webkit-transform-origin: 100% 100%;
+
-moz-transform-origin: 100% 100%;
+
transform-origin: 100% 100%;
+
pointer-events: none;
+
 
}
 
}
  
 
.csstransforms .cn-wrapper li a {
 
.csstransforms .cn-wrapper li a {
position: absolute;
+
  display: block;
right: -7.25em;
+
  font-size: 1.18em;
bottom: -7.25em;
+
  height: 14.5em;
display: block;
+
  width: 14.5em;
width: 14.5em;
+
  position: absolute;
height: 14.5em;
+
  bottom: -7.25em;
border-radius: 50%;
+
  right: -7.25em;
background: #429a67;
+
  border-radius: 50%;
background: -webkit-radial-gradient(transparent 35%, #429a67 35%);
+
  text-decoration: none;
background: -moz-radial-gradient(transparent 35%, #429a67 35%);
+
  color: #fff;
background: radial-gradient(transparent 35%, #429a67 35%);
+
  padding-top: 1.8em;
color: #fff;
+
  text-align: center;
text-align: center;
+
  -webkit-transform: skew(-50deg) rotate(-70deg) scale(1);
text-decoration: none;
+
  -ms-transform: skew(-50deg) rotate(-70deg) scale(1);
font-size: 1.2em;
+
  -moz-transform: skew(-50deg) rotate(-70deg) scale(1);
line-height: 2;
+
  transform: skew(-50deg) rotate(-70deg) scale(1);
-webkit-transform: skew(-60deg) rotate(-75deg) scale(1);
+
  -webkit-backface-visibility: hidden;
-moz-transform: skew(-60deg) rotate(-75deg) scale(1);
+
  -webkit-transition: opacity 0.3s, color 0.3s;
-ms-transform: skew(-60deg) rotate(-75deg) scale(1);
+
  -moz-transition: opacity 0.3s, color 0.3s;
transform: skew(-60deg) rotate(-75deg) scale(1);
+
  transition: opacity 0.3s, color 0.3s;
-webkit-backface-visibility: hidden;
+
backface-visibility: hidden;
+
pointer-events: auto;
+
 
}
 
}
  
 
.csstransforms .cn-wrapper li a span {
 
.csstransforms .cn-wrapper li a span {
position: relative;
+
  font-size: 1.1em;
top: 1.8em;
+
  opacity: 0.7;
display: block;
+
font-size: .5em;
+
font-weight: 700;
+
text-transform: uppercase;
+
 
}
 
}
  
.csstransforms .cn-wrapper li a:hover,
+
/* for a central angle x, the list items must be skewed by 90-x degrees
.csstransforms .cn-wrapper li a:active,
+
in our case x=40deg so skew angle is 50deg
.csstransforms .cn-wrapper li a:focus {
+
items should be rotated by x, minus (sum of angles - 180)2s (for this demo) */
background: -webkit-radial-gradient(transparent 35%, #449e6a 35%);
+
background: -moz-radial-gradient(transparent 35%, #449e6a 35%);
+
background: radial-gradient(transparent 35%, #449e6a 35%);
+
}
+
.csstransforms .cn-wrapper li a:focus {
+
    position: fixed; /* fix the displacement bug in webkit browsers when using tab key */
+
}
+
  
.csstransforms .opened-nav li {
+
.csstransforms .cn-wrapper li:first-child {
-webkit-transition: all .3s ease .3s;
+
  -webkit-transform: rotate(-10deg) skew(50deg);
-moz-transition: all .3s ease .3s;
+
  -ms-transform: rotate(-10deg) skew(50deg);
transition: all .3s ease .3s;
+
  -moz-transform: rotate(-10deg) skew(50deg);
 +
  transform: rotate(-10deg) skew(50deg);
 
}
 
}
  
.csstransforms .opened-nav li:first-child {
+
.csstransforms .cn-wrapper li:nth-child(2) {
-webkit-transform: rotate(-20deg) skew(60deg);
+
  -webkit-transform: rotate(30deg) skew(50deg);
-moz-transform: rotate(-20deg) skew(60deg);
+
  -ms-transform: rotate(30deg) skew(50deg);
-ms-transform: rotate(-20deg) skew(60deg);
+
  -moz-transform: rotate(30deg) skew(50deg);
transform: rotate(-20deg) skew(60deg);
+
  transform: rotate(30deg) skew(50deg);
 
}
 
}
  
.csstransforms .opened-nav li:nth-child(2) {
+
.csstransforms .cn-wrapper li:nth-child(3) {
-webkit-transform: rotate(12deg) skew(60deg);
+
  -webkit-transform: rotate(70deg) skew(50deg);
-moz-transform: rotate(12deg) skew(60deg);
+
  -ms-transform: rotate(70deg) skew(50deg);
-ms-transform: rotate(12deg) skew(60deg);
+
  -moz-transform: rotate(70deg) skew(50deg);
transform: rotate(12deg) skew(60deg);
+
  transform: rotate(70deg) skew(50deg)
 
}
 
}
  
.csstransforms .opened-nav  li:nth-child(3) {
+
.csstransforms .cn-wrapper li:nth-child(4) {
-webkit-transform: rotate(44deg) skew(60deg);
+
  -webkit-transform: rotate(110deg) skew(50deg);
-moz-transform: rotate(44deg) skew(60deg);
+
  -ms-transform: rotate(110deg) skew(50deg);
-ms-transform: rotate(44deg) skew(60deg);
+
  -moz-transform: rotate(110deg) skew(50deg);
transform: rotate(44deg) skew(60deg);
+
  transform: rotate(110deg) skew(50deg);
 
}
 
}
  
.csstransforms .opened-nav li:nth-child(4) {
+
.csstransforms .cn-wrapper li:nth-child(5) {
-webkit-transform: rotate(76deg) skew(60deg);
+
  -webkit-transform: rotate(150deg) skew(50deg);
-moz-transform: rotate(76deg) skew(60deg);
+
  -ms-transform: rotate(150deg) skew(50deg);
-ms-transform: rotate(76deg) skew(60deg);
+
  -moz-transform: rotate(150deg) skew(50deg);
transform: rotate(76deg) skew(60deg);
+
  transform: rotate(150deg) skew(50deg);
 
}
 
}
  
.csstransforms .opened-nav li:nth-child(5) {
+
.csstransforms .cn-wrapper li:nth-child(odd) a {
-webkit-transform: rotate(108deg) skew(60deg);
+
  background-color: #a11313;
-moz-transform: rotate(108deg) skew(60deg);
+
  background-color: hsla(0, 88%, 63%, 1);
-ms-transform: rotate(108deg) skew(60deg);
+
transform: rotate(108deg) skew(60deg);
+
 
}
 
}
  
.csstransforms .opened-nav li:nth-child(6) {
+
.csstransforms .cn-wrapper li:nth-child(even) a {
-webkit-transform: rotate(140deg) skew(60deg);
+
  background-color: #a61414;
-moz-transform: rotate(140deg) skew(60deg);
+
  background-color: hsla(0, 88%, 65%, 1);
-ms-transform: rotate(140deg) skew(60deg);
+
transform: rotate(140deg) skew(60deg);
+
 
}
 
}
  
.csstransforms .opened-nav li:nth-child(7) {
+
/* active style */
-webkit-transform: rotate(172deg) skew(60deg);
+
.csstransforms .cn-wrapper li.active a {
-moz-transform: rotate(172deg) skew(60deg);
+
  background-color: #b31515;
-ms-transform: rotate(172deg) skew(60deg);
+
  background-color: hsla(0, 88%, 70%, 1);
transform: rotate(172deg) skew(60deg);
+
 
}
 
}
  
.no-csstransforms .cn-wrapper {
+
 
overflow: hidden;
+
/* hover style */
margin: 10em auto;
+
.csstransforms .cn-wrapper li:not(.active) a:hover,
padding: .5em;
+
.csstransforms .cn-wrapper li:not(.active) a:active,
text-align: center;
+
.csstransforms .cn-wrapper li:not(.active) a:focus {
 +
  background-color: #b31515;
 +
  background-color: hsla(0, 88%, 70%, 1);
 
}
 
}
 +
.csstransforms .cn-wrapper li:not(.active) a:focus
 +
{
 +
    position:fixed;
 +
}
 +
  
.no-csstransforms .cn-wrapper ul {
+
/* fallback */
display: inline-block;
+
.no-csstransforms .cn-button {
 +
  display: none;
 
}
 
}
  
 
.no-csstransforms .cn-wrapper li {
 
.no-csstransforms .cn-wrapper li {
float: left;
+
  position: static;
width: 5em;
+
  float: left;
height: 5em;
+
  font-size: 1em;
background-color: #fff;
+
  height: 5em;
text-align: center;
+
  width: 5em;
font-size: 1em;
+
  background-color: #eee;
line-height: 5em;
+
  text-align: center;
 +
  line-height: 5em;
 
}
 
}
  
 
.no-csstransforms .cn-wrapper li a {
 
.no-csstransforms .cn-wrapper li a {
display: block;
+
  display: block;
width: 100%;
+
  width: 100%;
height: 100%;
+
  height: 100%;
color: inherit;
+
  text-decoration: none;
text-decoration: none;
+
  color: inherit;
 +
  font-size: 1.3em;
 +
  border-right: 1px solid #ddd;
 +
}
 +
 
 +
.no-csstransforms .cn-wrapper li a:last-child {
 +
  border: none;
 
}
 
}
  
Line 355: Line 329:
 
.no-csstransforms .cn-wrapper li a:active,
 
.no-csstransforms .cn-wrapper li a:active,
 
.no-csstransforms .cn-wrapper li a:focus {
 
.no-csstransforms .cn-wrapper li a:focus {
background-color: #f8f8f8;
+
  background-color: white;
 
}
 
}
  
.no-csstransforms .cn-wrapper li.active a{
+
.no-csstransforms .cn-wrapper li.active a {
background-color: #6F325C;
+
  background-color: #6F325C;
color: #fff;
+
  color: #fff;
 
}
 
}
  
.no-csstransforms .cn-button {
+
.no-csstransforms .cn-wrapper {
display: none;
+
  font-size: 1em;
 +
  height: 5em;
 +
  width: 25.15em;
 +
  bottom: 0;
 +
  margin-left: -12.5em;
 +
  overflow: hidden;
 +
  position: fixed;
 +
  z-index: 10;
 +
  left: 50%;
 +
  border: 1px solid #ddd;
 
}
 
}
  
@media only screen and (max-width: 620px) {
+
@media screen and (max-width:480px) {
.no-csstransforms li {
+
  .csstransforms .cn-wrapper {
width: 4em;
+
    font-size: .68em;
height: 4em;
+
  }
line-height: 4em;
+
}
+
}
+
  
@media only screen and (max-width: 500px) {
+
  .cn-button {
.no-ccstransforms .cn-wrapper {
+
    font-size: 1em;
padding: .5em;
+
  }
}
+
  
.no-csstransforms .cn-wrapper li {
+
  .csstransforms .cn-wrapper li {
width: 4em;
+
    font-size: 1.52em;
height: 4em;
+
  }
font-size: .9em;
+
line-height: 4em;
+
}
+
 
}
 
}
  
@media only screen and (max-width: 480px) {
+
@media screen and (max-width:320px) {
.csstransforms .cn-wrapper {
+
  .no-csstransforms .cn-wrapper {
font-size: .68em;
+
    width: 15.15px;
}
+
    margin-left: -7.5em;
 
+
  }
.cn-button {
+
font-size: 1em;
+
}
+
}
+
  
@media only screen and (max-width:420px) {
+
  .no-csstransforms .cn-wrapper li {
.no-csstransforms .cn-wrapper li {
+
    height: 3em;
width: 100%;
+
    width: 3em;
height: 3em;
+
  }
line-height: 3em;
+
}
+
 
}
 
}
 
/******** Links n' such (NavBar)********/
 
/******** Links n' such (NavBar)********/

Revision as of 18:02, 24 July 2017

Northwestern Template