|
2 | 2 |
|
3 | 3 | #carousel { |
4 | 4 | background: #FAFAFA; |
5 | | - height: 480px; |
| 5 | + height: 500px; |
6 | 6 | min-width: 100%; |
7 | 7 | overflow: hidden; |
8 | 8 | position: relative; |
9 | 9 |
|
10 | 10 | #carousel-inner { |
11 | | - width: 1600px; |
| 11 | + height: 100%; |
12 | 12 | } |
13 | 13 |
|
14 | 14 | .carousel-sect { |
15 | 15 | background: linear-gradient(rgba(variables.$acm-black, 0.8), rgba(variables.$acm-black, 1)); |
16 | 16 | position: absolute; |
17 | 17 | top: 0; |
18 | 18 | width: 1600px; |
| 19 | + height: 100%; |
| 20 | + display: flex; |
| 21 | + flex-wrap: wrap; |
| 22 | + align-content: flex-start; |
19 | 23 |
|
20 | | - div { |
21 | | - background-size: cover; |
22 | | - display: inline-block; |
23 | | - height: 240px; |
| 24 | + .image-frame { |
| 25 | + width: 340px; |
| 26 | + height: 250px; |
24 | 27 | margin: 0; |
25 | | - opacity: 0.9; |
26 | | - padding: 0; |
| 28 | + background: #FFF; |
| 29 | + border: 1px solid #D0D0D0; |
| 30 | + box-shadow: |
| 31 | + 0 2px 8px rgba(0, 0, 0, 0.1), |
| 32 | + inset 0 0 0 1px rgba(255, 255, 255, 0.8); |
| 33 | + box-sizing: border-box; |
| 34 | + display: flex; |
| 35 | + align-items: center; |
| 36 | + justify-content: center; |
| 37 | + position: relative; |
27 | 38 | transition: 0.35s cubic-bezier(0.05, 1.04, 0.72, 0.98); |
28 | | - vertical-align: top; |
29 | | - width: 360px; |
| 39 | + |
| 40 | + // Photo frame texture effect |
| 41 | + &::before { |
| 42 | + content: ''; |
| 43 | + position: absolute; |
| 44 | + top: 0; |
| 45 | + left: 0; |
| 46 | + right: 0; |
| 47 | + bottom: 0; |
| 48 | + } |
| 49 | + |
| 50 | + &:hover { |
| 51 | + transform: translateY(-4px); |
| 52 | + box-shadow: |
| 53 | + 0 6px 16px rgba(0, 0, 0, 0.15), |
| 54 | + inset 0 0 0 1px rgba(255, 255, 255, 0.9); |
| 55 | + } |
| 56 | + |
| 57 | + .image-click { |
| 58 | + width: 100%; |
| 59 | + height: 100%; |
| 60 | + display: flex; |
| 61 | + align-items: center; |
| 62 | + justify-content: center; |
| 63 | + overflow: hidden; |
| 64 | + |
| 65 | + .framed-image { |
| 66 | + max-width: 100%; |
| 67 | + max-height: 100%; |
| 68 | + width: 100%; |
| 69 | + height: 100%; |
| 70 | + object-fit: cover; |
| 71 | + display: block; |
| 72 | + transition: 0.35s cubic-bezier(0.05, 1.04, 0.72, 0.98); |
| 73 | + } |
| 74 | + } |
| 75 | + |
| 76 | + &:hover .framed-image { |
| 77 | + transform: scale(1.05); |
| 78 | + } |
| 79 | + } |
| 80 | + } |
| 81 | + |
| 82 | + // Popup Overlay w/ the darkened fullscreen background |
| 83 | + .popup-overlay { |
| 84 | + position: fixed; |
| 85 | + top: 0; |
| 86 | + left: 0; |
| 87 | + width: 100vw; |
| 88 | + height: 100vh; |
| 89 | + background: rgba(0, 0, 0, 0.8); |
| 90 | + display: flex; |
| 91 | + justify-content: center; |
| 92 | + align-items: center; |
| 93 | + z-index: 9999; |
| 94 | + animation: fadeIn 0.25s ease-out; |
| 95 | + |
| 96 | + #close-button { |
| 97 | + position: fixed; |
| 98 | + top: 20px; |
| 99 | + right: 20px; |
| 100 | + background: rgba(0, 0, 0, 0.7); |
| 101 | + color: #FFF; |
| 102 | + border: 2px solid #FFF; |
| 103 | + font-size: 1.5em; |
| 104 | + width: 50px; |
| 105 | + height: 50px; |
| 106 | + border-radius: 50%; |
| 107 | + cursor: pointer; |
| 108 | + display: flex; |
| 109 | + align-items: center; |
| 110 | + justify-content: center; |
| 111 | + transition: 0.3s; |
| 112 | + z-index: 10001; |
30 | 113 |
|
31 | 114 | &:hover { |
32 | | - opacity: 0.6; |
| 115 | + background: rgba(255, 255, 255, 0.2); |
| 116 | + transform: scale(1.1); |
33 | 117 | } |
34 | 118 | } |
35 | 119 | } |
| 120 | + |
| 121 | + // Inner box that holds the image |
| 122 | + .popup-content { |
| 123 | + position: relative; |
| 124 | + animation: scaleIn 0.25s ease-out; // smooth zoom animation |
| 125 | + |
| 126 | + img.popup-image { |
| 127 | + max-width: min(80vw, 1200px); |
| 128 | + max-height: min(80vh, 800px); |
| 129 | + border-radius: 10px; |
| 130 | + box-shadow: 0 0 20px rgba(0, 0, 0, 0.5); |
| 131 | + display: block; |
| 132 | + } |
| 133 | + } |
| 134 | + |
| 135 | + // Fade and scale animations |
| 136 | + @keyframes fadeIn { |
| 137 | + from { |
| 138 | + background: rgba(0, 0, 0, 0); |
| 139 | + } |
| 140 | + |
| 141 | + to { |
| 142 | + background: rgba(0, 0, 0, 0.8); |
| 143 | + } |
| 144 | + } |
| 145 | + |
| 146 | + @keyframes scaleIn { |
| 147 | + from { |
| 148 | + transform: scale(0.9); |
| 149 | + opacity: 0; |
| 150 | + } |
| 151 | + |
| 152 | + to { |
| 153 | + transform: scale(1); |
| 154 | + opacity: 1; |
| 155 | + } |
| 156 | + } |
36 | 157 | } |
0 commit comments