Skip to content

Commit d90a2e7

Browse files
committed
Fixed cog img locations for CC invasion tracker
Cog images are now pointed to the correct URL. Also some fixes for mobile viewing.
1 parent d5df80e commit d90a2e7

File tree

7 files changed

+20
-13
lines changed

7 files changed

+20
-13
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@
22
__pycache__/
33
*.py[cod]
44
*$py.class
5+
# Other
56
*.env

toonkit/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
app = Flask(__name__)
66
app.config['SECRET_KEY'] = os.environ.get('SECRET_KEY')
77
app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///site.db' # Testing DB (SQLite)
8-
# app.config['SQLALCHEMY_DATABASE_URI'] = os.environ.get('DATABASE_URI') # Production DB (PostgreSQL)
8+
# app.config['SQLALCHEMY_DATABASE_URI'] = os.environ.get('DATABASE_URL') # Production DB (PostgreSQL)
99
db = SQLAlchemy(app)
1010

1111
from toonkit.routes.main import main

toonkit/static/css/style.css

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -185,15 +185,21 @@ header div img {
185185
}
186186

187187
.contributor > .main-content {
188-
min-width: 70%
188+
min-width: 70%;
189+
margin-left: 2%;
190+
}
191+
.contributor > .main-content > h1 {
192+
font-size: 2.2em;
189193
}
190194

191195
.contributor > img {
192196
vertical-align: middle;
193-
display: inline-block;
194-
width: 170px;
195-
height: 170px;
196-
margin-right: 1%;
197+
display: block;
198+
width: 100%;
199+
min-height: 100px;
200+
min-width: 100px;
201+
max-height: 170px;
202+
max-width: 170px;
197203
}
198204

199205
/*CC Invasion Tracker*/

toonkit/static/js/cc-tracker.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ function initInvasions() {
2727
`<div class="cog-card">
2828
<h2 style="text-align: center;">${o.cogs_attacking}</h3>
2929
<div class="cog-card-inner">
30-
<img draggable="false" class="cog" src="http://localhost:5000/static/images/cogs/${o.cogs_attacking.toLowerCase().replace(/ /g,'_')}.png">
30+
<img draggable="false" class="cog" src="http://toonkit.herokuapp.com/static/images/cogs/${o.cogs_attacking.toLowerCase().replace(/ /g,'_')}.png">
3131
<div style="text-align: center;">
3232
<h3>${o.name}</h3>
3333
<p style="font-size:12px;">${o.count_total-o.count_defeated} / ${o.count_total} Cogs<br/>
@@ -49,7 +49,7 @@ function initInvasions() {
4949
$("#noinv").hide();
5050
// Use Cog silhouette image if regular image missing
5151
$(".cog").on("error", function() {
52-
$(this).attr('src', 'http://localhost:5000/static/images/cogs/1_unknown_cog.png');
52+
$(this).attr('src', 'http://toonkit.herokuapp.com/static/images/cogs/1_unknown_cog.png');
5353
});
5454
}
5555
}

toonkit/templates/cc/cc-support.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
{% block content %}
88
<div class="main-content">
9-
<h1><a id="Toontown_Corporate_Clash_Technical_Issues_FAQ_0"></a>Toontown: Corporate Clash Technical Issues FAQ</h1>
9+
<h1 class="pad-left"><a id="Toontown_Corporate_Clash_Technical_Issues_FAQ_0"></a>Corporate Clash Technical Issues FAQ</h1>
1010
<p>Read this before posting about your issue in <code>#game-support</code>. The purpose of this document is to provide a central hub for common issues relating to Toontown: Corporate Clash, and how to solve them. To submit a solution, please create a <a href="https://github.com/Toonkit/Website">pull request</a> by editing the appropriate text with a description of how to fix the issue.</p>
1111
<p>You may submit both questions and issues: for <strong>gameplay-related issues</strong>, please make sure that the issue is reproducable by other users before submitting a solution, and that it isn’t too obscure.</p>
1212
<blockquote>

toonkit/templates/cc/cc-tracker.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ <h1 class="pad-left">Invasions Tracker</h1>
99
This tracker uses API publicly provided by the Corporate Clash Team.
1010
<a href="https://github.com/CorporateClash/api-docs">View it on GitHub</a>
1111
<h3 class="pad-left">This list automatically refreshes every minute.</h3>
12-
<h2 id="noinv" style="display: none;">Sorry, there aren't any invasions right now!</h2>
12+
<h2 id="noinv" class="pad-left" style="display: none;">Sorry, there aren't any invasions right now!</h2>
1313
<div id="curinv">
1414
<!-- Invasion cards inserted here by cc-tracker.js -->
1515
</div>

toonkit/templates/staff.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ <h1>Toonkit Contributors</h1>
77
<div class="contributor">
88
<img draggable="false" src="{{ url_for('static', filename='images/staff/zach.png') }}">
99
<div class="main-content">
10-
<h1>Contributor - Zach</h1>
10+
<h1 class="pad-left">Contributor - Zach</h1>
1111
<div class="pad-left">
1212
<h2>Pythonista / Web Dev / Backend </h2>
1313
<p><b>Zach</b> is a contributor of Toonkit. Questions about Toonkit's codebase and contributing to the site should be directed to Zach through the Toonkit Discord.</p>
@@ -23,7 +23,7 @@ <h2>Pythonista / Web Dev / Backend </h2>
2323
<div class="contributor">
2424
<img draggable="false" src="https://i.imgur.com/KAXiUwm.png">
2525
<div class="main-content">
26-
<h1>Admin - Vice</h1>
26+
<h1 class="pad-left">Admin - Vice</h1>
2727
<div class="pad-left">
2828
<h2>Founder, Web Dev</h2>
2929
<p><b>Vice</b>, also known as ViceWatercolour, is a founder of Toonkit. His main interests are music production, journalism, creative writing, and politics. His primary language is English, born and raised in the United States.</p>
@@ -39,7 +39,7 @@ <h2>Founder, Web Dev</h2>
3939
<div class="contributor">
4040
<img draggable="false" src="https://i.imgur.com/jaXreg8.png">
4141
<div class="main-content">
42-
<h1>Admin - Bin</h1>
42+
<h1 class="pad-left">Admin - Bin</h1>
4343
<div class="pad-left">
4444
<h2>Founder, Web Dev / Backend</h2>
4545
<p><b>Bin</b> is a founder of Toonkit. His main interests are software development, game design, cybersecurity, and cryptography. His primary language is English, born in the United States. He prefers to remain largely anonymous online.</p>

0 commit comments

Comments
 (0)