Add missing card templates for PostgreSQL deployment
- Recovered player_card.html and related templates from old server
- Required for card generation endpoints (/players/{id}/battingcard)
- Fixes TemplateNotFound errors in production
This commit is contained in:
parent
b6743f704b
commit
0437eab92a
65
storage/templates/player_card.html
Normal file
65
storage/templates/player_card.html
Normal file
@ -0,0 +1,65 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
{% include 'style.html' %}
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;700&family=Source+Sans+3:wght@400;700&display=swap" rel="stylesheet">
|
||||
</head>
|
||||
<body>
|
||||
<div id="fullCard" style="width: 1200px; height: 600px;">
|
||||
<div id="header" class="row-wrapper header-text border-bot" style="height: 65px">
|
||||
<!-- <div id="headerLeft" style="flex-grow: 3; height: auto">-->
|
||||
<div id="headerLeft" style="width: 477px; height: auto">
|
||||
<div class="row-wrapper" style="height: 100%">
|
||||
<div style="width: 29px; height: auto; font-size: 30px; margin-left: 6px">
|
||||
<b>{{ hand }}</b>
|
||||
</div>
|
||||
<div class="vline"></div>
|
||||
<div class="header-text" style="padding-left: 5px; width: 462px">
|
||||
<div style="height: 50%; font-variant: small-caps; font-size: 27px"><b>{{ player.p_name }}</b></div>
|
||||
<div style="height: 50%; padding-left: 18px; margin-top: {{ position_margin }}px; font-size: {{ position_font }}px;">{{ position_string }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="headerMiddle" style="width: 246px; height: auto; ">
|
||||
<img src="data:image/png;base64,{{ rarity_file|safe }}" class="center" style="height: {% if player.rarity.name == 'Hall of Fame' %}62.{% else %}6{% endif %}5px; width: auto;"/>
|
||||
</div>
|
||||
{% if card_type == 'batter' %}
|
||||
{% include 'topright_batter.html' %}
|
||||
{% else %}
|
||||
{% include 'topright_pitcher.html' %}
|
||||
{% endif %}
|
||||
</div>
|
||||
<div id="allResults" class="result">
|
||||
<div id="resultHeader" class="row-wrapper border-bot" style="height: 30px">
|
||||
<div class="row-wrapper border-right-thick" style="width: 600px; ">
|
||||
<div id="leftResultHeaderOne" class="column-num border-right-thin blue-gradient" style="width: 200px">
|
||||
<b>{{ 1 if card_type == 'batter' else 4 }}</b>
|
||||
</div>
|
||||
<div id="leftResultHeaderTwo" class="column-num border-right-thin blue-gradient" style="width: 200px">
|
||||
<b>{{ 2 if card_type == 'batter' else 5 }}</b>
|
||||
</div>
|
||||
<div id="leftResultHeaderThree" class="column-num blue-gradient" style="width: 200px">
|
||||
<b>{{ 3 if card_type == 'batter' else 6 }}</b>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row-wrapper" style="width: 600px; ">
|
||||
<div id="rightResultHeaderOne" class="column-num border-right-thin red-gradient" style="width: 200px">
|
||||
<b>{{ 1 if card_type == 'batter' else 4 }}</b>
|
||||
</div>
|
||||
<div id="rightResultHeaderTwo" class="column-num border-right-thin red-gradient" style="width: 200px">
|
||||
<b>{{ 2 if card_type == 'batter' else 5 }}</b>
|
||||
</div>
|
||||
<div id="rightResultHeaderThree" class="column-num red-gradient" style="width: 200px">
|
||||
<b>{{ 3 if card_type == 'batter' else 6 }}</b>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="resultWrapper" class="row-wrapper" style="height: 505px">
|
||||
{% include 'result_columns.html' %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
37
storage/templates/result_columns.html
Normal file
37
storage/templates/result_columns.html
Normal file
@ -0,0 +1,37 @@
|
||||
<div id="resultWrapper" class="row-wrapper" style="height: 100%">
|
||||
<div class="row-wrapper border-right-thick" style="width: 600px; background-color: #ACE6FF">
|
||||
<div class="row-wrapper border-right-thin" style="width: 200px; position: relative;">
|
||||
<div class="result-2d6">{{ vl_one_2d6|safe }}</div>
|
||||
<div class="result-col">{{ vl_one_results|safe }}</div>
|
||||
<div class="result-d20">{{ vl_one_d20|safe }}</div>
|
||||
</div>
|
||||
<div class="border-right-thin" style="width: 200px; position: relative;">
|
||||
<div class="result-2d6">{{ vl_two_2d6|safe }}</div>
|
||||
<div class="result-col">{{ vl_two_results|safe }}</div>
|
||||
<div class="result-d20">{{ vl_two_d20|safe }}</div>
|
||||
</div>
|
||||
<div style="width: 200px; position: relative;">
|
||||
<div class="result-2d6">{{ vl_three_2d6|safe }}</div>
|
||||
<div class="result-col">{{ vl_three_results|safe }}</div>
|
||||
<div class="result-d20">{{ vl_three_d20|safe }}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row-wrapper" style="width: 600px; background-color: #EAA49C">
|
||||
<div class="row-wrapper border-right-thin" style="width: 200px; position: relative;">
|
||||
<div class="result-2d6">{{ vr_one_2d6|safe }}</div>
|
||||
<div class="result-col">{{ vr_one_results|safe }}</div>
|
||||
<div class="result-d20">{{ vr_one_d20|safe }}</div>
|
||||
</div>
|
||||
<div class="border-right-thin" style="width: 200px; position: relative;">
|
||||
<div class="result-2d6">{{ vr_two_2d6|safe }}</div>
|
||||
<div class="result-col">{{ vr_two_results|safe }}</div>
|
||||
<div class="result-d20">{{ vr_two_d20|safe }}</div>
|
||||
</div>
|
||||
<div style="width: 200px; position: relative;">
|
||||
<div class="result-2d6">{{ vr_three_2d6|safe }}</div>
|
||||
<div class="result-col">{{ vr_three_results|safe }}</div>
|
||||
<div class="result-d20">{{ vr_three_d20|safe }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
15
storage/templates/results_vl.html
Normal file
15
storage/templates/results_vl.html
Normal file
@ -0,0 +1,15 @@
|
||||
<div class="row-wrapper border-right-thick" style="width: 600px; background-color: #ACE6FF">
|
||||
<div class="row-wrapper border-right-thin" style="width: 200px; position: relative;">
|
||||
<div class="result-2d6"><b>1-</b></div>
|
||||
<div class="result-col"><b>{{ results_vl_one }}</b></div>
|
||||
<div class="result-d20"><b>1-20</b></div>
|
||||
</div>
|
||||
<div class="border-right-thin" style="width: 200px; position: relative;">
|
||||
<div class="result-2d6"><b>1-</b></div>
|
||||
<div class="result-col"><b>{{ results_vl_two }}</b></div>
|
||||
<div class="result-d20"><b>1-20</b></div>
|
||||
</div>
|
||||
<div style="width: 200px">
|
||||
{{ results_vl_three }}
|
||||
</div>
|
||||
</div>
|
||||
11
storage/templates/results_vr.html
Normal file
11
storage/templates/results_vr.html
Normal file
@ -0,0 +1,11 @@
|
||||
<div class="row-wrapper" style="width: 600px; background-color: #EAA49C">
|
||||
<div class="border-right-thin" style="width: 200px">
|
||||
{{ results_vr_one }}
|
||||
</div>
|
||||
<div class="border-right-thin" style="width: 200px">
|
||||
{{ results_vr_two }}
|
||||
</div>
|
||||
<div style="width: 200px">
|
||||
{{ results_vr_three }}
|
||||
</div>
|
||||
</div>
|
||||
103
storage/templates/style.html
Normal file
103
storage/templates/style.html
Normal file
@ -0,0 +1,103 @@
|
||||
<style>
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: "Open Sans", sans-serif;
|
||||
font-weight: 400;
|
||||
<!-- margin-top: 5px;-->
|
||||
<!-- margin-bottom: 5px;-->
|
||||
justify-content: center;
|
||||
overflow: hidden;
|
||||
<!-- background-color: red;-->
|
||||
}
|
||||
|
||||
.row-wrapper {
|
||||
width: 100%;
|
||||
flex-grow: 1;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
}
|
||||
|
||||
.vline {
|
||||
border-left: 3px solid black;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.header-text {
|
||||
font-size: 25px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.column-num {
|
||||
display: flex;
|
||||
height: 100%;
|
||||
justify-content: center;
|
||||
align-items: center
|
||||
}
|
||||
|
||||
.border-bot {
|
||||
border-bottom: 3px solid black;
|
||||
}
|
||||
|
||||
.border-right-thick {
|
||||
border-right: 5px solid black
|
||||
}
|
||||
|
||||
.border-right-thin {
|
||||
border-right: 3px solid black
|
||||
}
|
||||
|
||||
.red-gradient {
|
||||
background-image: linear-gradient(to right, rgba(211, 49, 21, 1), rgba(211, 49, 21, 0.5), rgba(211, 49, 21, 1))
|
||||
}
|
||||
|
||||
.blue-gradient {
|
||||
background-image: linear-gradient(to right, rgba(0, 156, 224, 1), rgba(0, 156, 224, 0.5), rgba(0, 156, 224, 1))
|
||||
}
|
||||
|
||||
.result {
|
||||
font-family: 'Source Sans 3', sans-serif;
|
||||
font-size: 26px;
|
||||
line-height: 1.3;
|
||||
}
|
||||
|
||||
.result-2d6 {
|
||||
position: absolute;
|
||||
left: 1px;
|
||||
width: 35px;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.result-col {
|
||||
position: absolute;
|
||||
left: 36px;
|
||||
width: 170
|
||||
text-align: left;
|
||||
align-items: left
|
||||
}
|
||||
|
||||
.result-d20 {
|
||||
position: absolute;
|
||||
left: 124px;
|
||||
width: 70px;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.center {
|
||||
display: block;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
<!-- .neg-margin {-->
|
||||
<!-- line-height: 1.3;-->
|
||||
<!-- }-->
|
||||
|
||||
<!-- b {-->
|
||||
<!-- font-weight: 800-->
|
||||
<!-- }-->
|
||||
</style>
|
||||
7
storage/templates/topright_batter.html
Normal file
7
storage/templates/topright_batter.html
Normal file
@ -0,0 +1,7 @@
|
||||
<div id="headerRight" style="width: 477px; height: auto; text-align: right">
|
||||
<div style="position: absolute; left: 705px; width: 320px;">stealing <b>{{ stealing_string }}</b></div>
|
||||
<div style="position: absolute; left: 1040px; width: 150px;">running <b>{{ bat_card.running }}</b></div>
|
||||
<div style="position: absolute; left: 920px; top: 29px; width: 120px; ">bunting <b>{{ bat_card.bunting }}</b></div>
|
||||
<div style="position: absolute; left: 1060px; top: 29px; width: 130px;">hit & run <b>{{ bat_card.hit_and_run }}</b></div>
|
||||
<div style="position: absolute; left: 760px; top: 40px; width: 140px; font-size: 14px">{{ cardset_name }}</div>
|
||||
</div>
|
||||
9
storage/templates/topright_pitcher.html
Normal file
9
storage/templates/topright_pitcher.html
Normal file
@ -0,0 +1,9 @@
|
||||
<div id="headerRight" style="width: 477px; height: auto; text-align: right">
|
||||
<div style="position: absolute; left: 785px; width: 160px;">bat <b>{{ pit_card.batting[1:] if pit_card.batting.startswith('#') else pit_card.batting }}</b></div>
|
||||
<div style="position: absolute; left: 970px; width: 90px;">hold <b>{% if pit_card.hold >= 0 %}+{% endif %}{{ pit_card.hold }}</b></div>
|
||||
<div style="position: absolute; left: 1060px; width: 130px;">starter({{ pit_card.starter_rating }})</div>
|
||||
<div style="position: absolute; left: 725px; top: 40px; width: 160px; font-size: 14px">{{ cardset_name }}</div>
|
||||
<div style="position: absolute; left: 900px; top: 29px; width: 80px; ">wp <b>{{ pit_card.wild_pitch }}</b></div>
|
||||
<div style="position: absolute; left: 995px; top: 29px; width: 65px; ">bk <b>{{ pit_card.balk }}</b></div>
|
||||
<div style="position: absolute; left: 1070px; top: 29px; width: 120px;">relief({{ pit_card.relief_rating }})/{{ pit_card.closer_rating if pit_card.closer_rating is not none else 'N' }}</div>
|
||||
</div>
|
||||
Loading…
Reference in New Issue
Block a user