Browse Source

css updates

graphics
Cailean Finn 3 months ago
parent
commit
9ca9e66365
  1. 44
      public/css/styles.css
  2. 17
      public/js/article.js
  3. 10
      templates/article.html

44
public/css/styles.css

@ -67,7 +67,7 @@ hr {
} }
#main-container { #main-container {
padding-top: 25px; padding-top: 50px;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 50px; gap: 50px;
@ -79,6 +79,15 @@ hr {
flex: 1; flex: 1;
} }
#main-container-article {
display: flex;
flex-direction: column;
gap: 50px;
overflow-y: hidden;
box-sizing: border-box; /* Include padding in the height calculation */
flex: 1;
}
#main-text { #main-text {
font-size: 26px; font-size: 26px;
width: 60%; width: 60%;
@ -89,7 +98,7 @@ hr {
#hyperlink-container { #hyperlink-container {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
gap: 20px; gap: 25px;
font-size: 30px; font-size: 30px;
color:#ffffff; color:#ffffff;
font-weight: 400; font-weight: 400;
@ -156,6 +165,7 @@ hr {
column-gap: 50px; column-gap: 50px;
justify-content: space-evenly; justify-content: space-evenly;
padding-top: 40px; padding-top: 40px;
padding-bottom: 40px;
} }
.list { .list {
@ -194,7 +204,7 @@ hr {
position: absolute; position: absolute;
width: calc(100% + .2rem); width: calc(100% + .2rem);
height: 100%; height: 100%;
box-shadow: 0 0 .25rem .5rem white inset; box-shadow: 0 0 .25rem .1rem white inset;
pointer-events: none; pointer-events: none;
} }
@ -272,8 +282,7 @@ hr {
flex-direction: row; flex-direction: row;
width: 100%; width: 100%;
height: 100%; height: 100%;
padding-top: 50px; gap: 40px;
gap: 40px
} }
#article-image { #article-image {
@ -296,8 +305,15 @@ hr {
font-size: 26px; font-size: 26px;
line-height: 40px; line-height: 40px;
width: 100%; width: 100%;
padding-left: 50px;
padding-top: 50px;
overflow-y: scroll;
} }
#article-text::-webkit-scrollbar {
display: none;
}
#article-information { #article-information {
font-size: 20px; font-size: 20px;
} }
@ -312,7 +328,8 @@ hr {
font-size: 30px; font-size: 30px;
font-family: 'Syne Mono', monospace; font-family: 'Syne Mono', monospace;
color: #0075FF; color: #0075FF;
padding-bottom: 50px; margin-bottom: 25px;
width: fit-content;
} }
#article-artists { #article-artists {
@ -354,8 +371,7 @@ hr {
flex-direction: column; flex-direction: column;
width: 100%; width: 100%;
height: 100%; height: 100%;
padding-top: 50px; gap: 0px
gap: 40px
} }
#article-image { #article-image {
@ -366,6 +382,8 @@ hr {
#article-text { #article-text {
order: 2; order: 2;
gap: 10px; gap: 10px;
width: auto;
padding-right: 50px;
} }
#page-header { #page-header {
@ -457,8 +475,7 @@ hr {
#article-container { #article-container {
flex-direction: column; flex-direction: column;
width: auto; width: auto;
margin-left: 20px; gap:0px;
margin-right: 20px;
align-items: center; align-items: center;
padding-top: 0px; padding-top: 0px;
} }
@ -466,11 +483,16 @@ hr {
#article-image { #article-image {
order: 1; order: 1;
width: 100%; width: 100%;
flex-basis: 40%;
} }
#article-text { #article-text {
order: 2; order: 2;
gap: 10px; gap: 10px;
padding-left: 20px;
padding-right: 20px;
width: auto;
flex-basis: 60%;
} }
#article-title { #article-title {
@ -487,7 +509,7 @@ hr {
} }
#article-book { #article-book {
font-size: 20px; font-size: 25px;
} }
#page-header { #page-header {

17
public/js/article.js

@ -19,9 +19,6 @@
let imgW, imgH, imgRatio let imgW, imgH, imgRatio
console.log(containerH, containerW)
var clock = new THREE.Clock(); var clock = new THREE.Clock();
@ -32,7 +29,7 @@
SetupControls() SetupControls()
composer = new EffectComposer( renderer ); composer = new EffectComposer( renderer );
const renderPixelatedPass = new RenderPixelatedPass( 1.2, scene, camera ); const renderPixelatedPass = new RenderPixelatedPass( 3, scene, camera );
renderPixelatedPass.normalEdgeStrength = 1; renderPixelatedPass.normalEdgeStrength = 1;
renderPixelatedPass.depthEdgeStrength = 1; renderPixelatedPass.depthEdgeStrength = 1;
renderPixelatedPass.pixelAlignedPanning = false; renderPixelatedPass.pixelAlignedPanning = false;
@ -47,7 +44,6 @@
textureLoader.crossOrigin = "Anonymous" textureLoader.crossOrigin = "Anonymous"
const texture = textureLoader.load(imageUrl, function ( tex ) { const texture = textureLoader.load(imageUrl, function ( tex ) {
// tex and texture are the same in this example, but that might not always be the case // tex and texture are the same in this example, but that might not always be the case
console.log( tex.image.width, tex.image.height );
imgW = tex.image.width imgW = tex.image.width
imgH = tex.image.height imgH = tex.image.height
imgRatio = imgW / imgH imgRatio = imgW / imgH
@ -73,7 +69,7 @@
function SetupCamera(){ function SetupCamera(){
aspect = (containerW) / (containerH) aspect = (containerW) / (containerH)
frustumSize = 1.5 frustumSize = 0.5
camera = new THREE.OrthographicCamera( camera = new THREE.OrthographicCamera(
frustumSize * aspect / -2, frustumSize * aspect / -2,
frustumSize * aspect / 2, frustumSize * aspect / 2,
@ -96,7 +92,10 @@
MIDDLE: THREE.MOUSE.DOLLY, MIDDLE: THREE.MOUSE.DOLLY,
LEFT: THREE.MOUSE.PAN LEFT: THREE.MOUSE.PAN
} }
camera.position.set(0, 0, 20) controls.minZoom = 0.3
controls.maxZoom = 0.75
camera.position.set(0, 0, 5)
controls.update() controls.update()
} }
@ -106,9 +105,9 @@
scene.add(ambientLight); scene.add(ambientLight);
// Add Directional Light // Add Directional Light
const directionalLight = new THREE.DirectionalLight(0xffffff, 0); // Soft white light const directionalLight = new THREE.DirectionalLight(0x0075FF, 4); // Soft white light
directionalLight.position.set(-5, 0, 5).normalize(); directionalLight.position.set(-5, 0, 5).normalize();
scene.add(directionalLight); //scene.add(directionalLight);
} }
function animate(){ function animate(){

10
templates/article.html

@ -5,7 +5,7 @@
{% block content %} {% block content %}
<div id="main-wrapper"> <div id="main-wrapper">
{% include '_nav.html' %} {% include '_nav.html' %}
<div id="main-container"> <div id="main-container-article">
{% for article in content %} {% for article in content %}
<div id="article-container"> <div id="article-container">
<div id="article-text"> <div id="article-text">
@ -13,7 +13,7 @@
<div id="article-artists">{{ article.artists | join(', ') }}</div> <div id="article-artists">{{ article.artists | join(', ') }}</div>
<div id="article-information">{{ article.information }}</div> <div id="article-information">{{ article.information }}</div>
{% if article.bookUrl %} {% if article.bookUrl %}
<a href="{{ article.bookUrl }}" target="_blank"><div id="article-book">BOOK ↗</div></a> <a href="{{ article.bookUrl }}" target="_blank"><div id="article-book">↳ Book</div></a>
{% endif %} {% endif %}
</div> </div>
<div id="article-image"> <div id="article-image">
@ -27,18 +27,18 @@
{% for article in content %} {% for article in content %}
{% if article.dates %} {% if article.dates %}
<div class="page-info-cont"> <div class="page-info-cont">
<div class="page-info-title">/Date:</div> <div class="page-info-title">/ Date:</div>
<div class="page-info-entry">{{ article.dates | join(', ') }}</div> <div class="page-info-entry">{{ article.dates | join(', ') }}</div>
</div> </div>
{% endif %} {% endif %}
{% if article.times%} {% if article.times%}
<div class="page-info-cont"> <div class="page-info-cont">
<div class="page-info-title">/Time:</div> <div class="page-info-title">/ Time:</div>
<div class="page-info-entry">{{ article.times | join(', ') }}</div> <div class="page-info-entry">{{ article.times | join(', ') }}</div>
</div> </div>
{% endif %} {% endif %}
<div class="page-info-cont"> <div class="page-info-cont">
<div class="page-info-title">/Location:</div> <div class="page-info-title">/ Location:</div>
<div class="page-info-entry">{{ article.location[0] }}</div> <div class="page-info-entry">{{ article.location[0] }}</div>
</div> </div>
<script> <script>

Loading…
Cancel
Save