this is the end my friend

main
zvevqx 5 months ago
parent 9171e1aa3c
commit 7099ac3aef
  1. BIN
      __pycache__/app.cpython-313.pyc
  2. 11
      app.py
  3. BIN
      pages/front/EDC.jpg
  4. BIN
      pages/front/ESC.jpg
  5. BIN
      pages/front/GWG.jpg
  6. BIN
      pages/front/LDW.jpg
  7. BIN
      pages/front/VMN.jpg
  8. BIN
      pages/front/WSB.jpg
  9. 6
      static/main.js
  10. 58
      static/style.css
  11. 1
      templates/index.html
  12. 5
      templates/over.html

Binary file not shown.

@ -3,6 +3,7 @@ import subprocess
from flask import Flask , send_from_directory , request , jsonify from flask import Flask , send_from_directory , request , jsonify
from flask_flatpages import FlatPages from flask_flatpages import FlatPages
from flask import render_template from flask import render_template
import random
import os import os
FLATPAGES_EXTENSION = '.md' FLATPAGES_EXTENSION = '.md'
@ -43,9 +44,17 @@ def imagelist(articlename):
return None, None return None, None
def get_front_img():
img_dir=os.getcwd()+'/pages/front/'
if os.path.exists(img_dir):
images = [f for f in os.listdir(img_dir) if f.endswith('.jpg') or f.endswith('.jpeg') or f.endswith('.png') or f.endswith('.gif')]
fimg = random.choice(images)
return fimg
@app.route('/') @app.route('/')
def index(): def index():
# Articles are pages with a publication date # Articles are pages with a publication date
fimg = get_front_img()
news = pages.get('news') news = pages.get('news')
info = pages.get('info') info = pages.get('info')
articles = (p for p in pages if 'published' in p.meta and 'static' not in p.meta) articles = (p for p in pages if 'published' in p.meta and 'static' not in p.meta)
@ -55,7 +64,7 @@ def index():
for a in latest: for a in latest:
g_path, imgs = imagelist(a.path) g_path, imgs = imagelist(a.path)
imgDict[a.path]=imgs imgDict[a.path]=imgs
return render_template('index.html', articles=latest ,imgDict=imgDict , news=news , info = info) return render_template('index.html', articles=latest ,imgDict=imgDict , news=news , info = info , fimg = fimg)
@app.route('/<path:path>') @app.route('/<path:path>')

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 MiB

@ -1,3 +1,4 @@
$(document).ready(function() { $(document).ready(function() {
var imgW = $(".gal .img_container").width() var imgW = $(".gal .img_container").width()
@ -8,6 +9,7 @@ $(document).ready(function() {
$(this).find(".content-wrapper").addClass('open'); $(this).find(".content-wrapper").addClass('open');
}); });
$("a.news").click(function(){ $("a.news").click(function(){
$("#news").toggleClass('open'); $("#news").toggleClass('open');
}); });
@ -22,7 +24,9 @@ $(".closebtn").click(function(e){
console.log("Close button clicked - should remove 'open' class"); console.log("Close button clicked - should remove 'open' class");
}); });
$("#bg").click(function(){
$(this).css('display','none');
});
// //
//$(".alist").on("click", "li",function(){ //$(".alist").on("click", "li",function(){

@ -50,6 +50,33 @@ body{
} }
#bg{
width:100vw;
height:100vh;
background:rgba(255,255,255,0.7);
position: fixed;
z-index: 100000;
top:0;
left:0;
}
#bg #img_full {
z-index: 100000;
width: 50vw;
height:auto;
margin:auto;
margin-top:10vh;
}
#bg #img_full img{
min-width: 100%;
height: auto;
display: block;
}
nav { nav {
position : fixed ; position : fixed ;
background: #fff; background: #fff;
@ -61,12 +88,32 @@ nav {
.closebtn{ .closebtn{
width:50px; width:50px;
height:50px; height:50px;
background:red;
top:30px; top:30px;
right:20px; right:20px;
position: absolute; position: absolute;
z-index: 1000000; opacity: 0.3;
}
.closebtn:hover {
opacity: 1;
}
.closebtn:before, .closebtn:after {
position: absolute;
left: 15px;
content: ' ';
height: 33px;
width: 2px;
background-color: #333;
}
.closebtn:before {
transform: rotate(45deg);
} }
.closebtn:after {
transform: rotate(-45deg);
}
#content{ #content{
@ -169,7 +216,7 @@ a:hover{
background: #e6e6e6; background: #e6e6e6;
cursor: pointer; cursor: pointer;
position:sticky; position:sticky;
width:99.5%; width:99.9%;
top:110px; top:110px;
z-index:10000; z-index:10000;
} }
@ -202,7 +249,7 @@ a:hover{
height:20px; height:20px;
content: ' ▲'; content: ' ▲';
right:0; right:0;
font-size: 0.5em; font-size: 1em;
} }
.legend li.sort-desc::after { .legend li.sort-desc::after {
@ -211,7 +258,7 @@ a:hover{
height:20px; height:20px;
right:0; right:0;
content: ' ▼'; content: ' ▼';
font-size: 0.5em; font-size: 1em;
} }
.legend li:last-of-type { .legend li:last-of-type {
border-right: none; border-right: none;
@ -233,6 +280,7 @@ ul.legend {
list-style:none; list-style:none;
padding:0 0 0 0px; padding:0 0 0 0px;
margin:0; margin:0;
margin-top:20px
} }

@ -10,6 +10,7 @@
<body> <body>
{% include 'menu.html' %} {% include 'menu.html' %}
{% include 'over.html' %}
<div id="content"> <div id="content">

@ -0,0 +1,5 @@
<div id="bg">
<div id="img_full">
<img src="pages/front/{{fimg}}" alt="front image">
</div>
</div>
Loading…
Cancel
Save