This commit is contained in:
SG
2025-06-17 13:46:08 +03:00
parent 0583eb07ee
commit 438a8d6a14
3 changed files with 7 additions and 3 deletions

View File

@@ -13,7 +13,10 @@ from config import Config
from jinja2 import Environment, FileSystemLoader
# get the scrip directory
if getattr(sys, 'frozen', False):
if Path(f'themes/{Config.THEME}/templates').exists():
base_dir = "."
elif getattr(sys, 'frozen', False):
# Running fron Pyinstaller-packed binary
base_dir = Path(sys._MEIPASS)
else:
@@ -26,6 +29,7 @@ env = Environment(loader=FileSystemLoader(f"{jinja_env_dir}"))
env.globals['header_image'] = f"{base_dir}/themes/{Config.THEME}/static/images/header.jpg"
index_template = env.get_template("index.html")
content_item_template = env.get_template("content_item.html")
print(env.loader.searchpath)
class ContentItem:
def render_content(self, categories, target_file = False):

View File

@@ -4,7 +4,7 @@ from config import Config
# Logging config section
LOG_TO = sys.stdout
LOG_LEVEL = logging.DEBUG
LOG_LEVEL = logging.INFO
logger = logging.getLogger(Config.APP_NAME)
logger.setLevel(LOG_LEVEL)

View File

@@ -21,7 +21,7 @@ body {
font-weight: bold;
font-size: 1em;
line-height: 2em;
background: rgba(0, 0, 0, 0.85);
background: rgba(0, 0, 0, 0.75);
width: 100%;
text-decoration: none;
}