Skip to content

Commit 048cd5f

Browse files
Merge pull request #76 from andreasfertig/supportersPage
Added dedicated supporters page and first corporate sponsor.
2 parents 13b1b48 + 5a4d847 commit 048cd5f

File tree

9 files changed

+283
-39
lines changed

9 files changed

+283
-39
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
- name: Setup Python environment
2727
uses: actions/setup-python@v5
2828
with:
29-
python-version: '3.7' # Server has 3.5
29+
python-version: '3.8' # Server has 3.5
3030

3131
- name: Install SSH Key
3232
uses: shimataro/[email protected]

app/__init__.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,18 @@ def version():
344344
return response
345345
#------------------------------------------------------------------------------
346346

347+
@app.route("/supporters", methods=['GET'])
348+
def supporters():
349+
patreons =''
350+
351+
if os.path.exists('patreons.txt'):
352+
patreons = open('patreons.txt').read()#.splitlines()
353+
354+
response = make_response(render_template('supporters.html', **locals()))
355+
356+
return response
357+
#------------------------------------------------------------------------------
358+
347359
def getDbName():
348360
return 'urls.db'
349361
#------------------------------------------------------------------------------

app/static/about.html

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,7 @@ <h1>About</h1>
103103
<p>You can find the <a href="https://github.com/andreasfertig/cppinsights-web">source</a> of the web front-end
104104
and
105105
the tool <a href="https://github.com/andreasfertig/cppinsights">C++ Insights</a> on Github.</p>
106-
<p>If you like to support the project, consider <a href="https://github.com/andreasfertig/cppinsights/blob/master/CONTRIBUTING.md">submitting</a>
107-
a patch. Another alternative is to become a <a href="https://www.patreon.com/cppinsights" target="_blank">Patreon</a>
108-
supporter.</p>
106+
<p>If you like to support the project, checkout the <a href="/supporters">supporters</a> page.</p>
109107
<p>Contact: <a href="mailto:andy at cppinsights.io">andy at cppinsights.io</a></p>
110108

111109
<div id="footer">

app/static/css/s.css

Lines changed: 129 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,10 @@ h1 {
147147
font-size: larger;
148148
}
149149

150+
#insightsOptions {
151+
width: 180px;
152+
}
153+
150154
input {}
151155

152156
label {
@@ -176,7 +180,7 @@ nav {
176180
grid-area: nav;
177181
display: grid;
178182
grid-template:
179-
"controls news about" 41px / max-content minmax(100px, auto) max-content;
183+
"controls news sponsors about" 41px / max-content minmax(340px, 1fr) minmax(230px, 1fr) max-content;
180184
align-items: center;
181185
}
182186

@@ -221,9 +225,26 @@ news {
221225
margin-right: auto;
222226
}
223227

228+
sponsor {
229+
grid-area: sponsors;
230+
margin-left: auto;
231+
margin-right: 10px;
232+
white-space: nowrap;
233+
border-left: 1px dotted var(--cl-black);
234+
height: 41px;
235+
align-content: center;
236+
}
237+
238+
#sponsor {
239+
font-size: x-small;
240+
padding-left: 10px;
241+
padding-top: 5px;
242+
}
243+
224244
about {
225245
grid-area: about;
226246
align-self: baseline;
247+
border-left: 1px dotted var(--cl-black);
227248
}
228249

229250
.icon-run,
@@ -529,7 +550,6 @@ a.close-cookie-banner:hover {
529550
#header {
530551
text-align: left;
531552
font-size: 70%;
532-
border-left: 1px dotted var(--cl-black);
533553
padding-left: 10px;
534554
color: var(--cl-text-light-gray);
535555
padding-top: 5px;
@@ -731,7 +751,7 @@ div.CodeMirror span.CodeMirror-matchingbracket {
731751
.logo {
732752
height: 32px;
733753
width: auto;
734-
margin-right: 2em;
754+
margin-right: 15px;
735755
filter: brightness(var(--filter-logo-brightness));
736756
}
737757

@@ -890,6 +910,12 @@ h2 {
890910
height: 23px;
891911
}
892912

913+
.sponsorlogo {
914+
position: relative;
915+
max-height: 30px;
916+
padding-left: 5px;
917+
}
918+
893919
.copyDownDownContent,
894920
.moreDownDownContent {
895921
display: none;
@@ -948,13 +974,28 @@ h2 {
948974
margin-top: 5px;
949975
}
950976

977+
.sponsors {
978+
display: block;
979+
vertical-align: middle;
980+
margin-top: 5px;
981+
}
982+
951983
#banner {
952984
border: 1px dotted #0275d8;
953-
border-radius: 2px;
985+
border-radius: 4px;
954986
padding: 5px 10px 5px 10px;
955987
font-size: small;
956988
}
957989

990+
#banner a {
991+
overflow: hidden;
992+
white-space: nowrap;
993+
text-overflow: ellipsis;
994+
max-width: 300px;
995+
display: inline-block;
996+
vertical-align: sub;
997+
}
998+
958999
.nocommunityevent {
9591000
display: none !important;
9601001
}
@@ -1048,7 +1089,7 @@ h2 {
10481089
.ms-choice>div.open {}
10491090

10501091
.ms-drop {
1051-
width: 100%;
1092+
/*width: 100%;*/
10521093
overflow: hidden;
10531094
display: none;
10541095
margin-top: -1px;
@@ -1156,20 +1197,98 @@ h2 {
11561197
margin-left: .8em;
11571198
}
11581199

1200+
ul.patreons {
1201+
columns: 2;
1202+
-webkit-columns: 2;
1203+
-moz-columns: 2;
1204+
}
1205+
1206+
ul.corporate {
1207+
list-style-type: none;
1208+
}
1209+
1210+
.corporate img {
1211+
width: 100%;
1212+
height: 100%;
1213+
object-fit: contain;
1214+
}
1215+
1216+
div.corporate {
1217+
padding-left: 50px;
1218+
padding-top: 40px;
1219+
padding-bottom: 40px;
1220+
border-bottom: var(--cl-text-light-gray) 1px dotted;
1221+
display: flex;
1222+
}
1223+
1224+
logo {
1225+
width: 300px;
1226+
display: inline-block;
1227+
padding-right: 3em;
1228+
flex: 0 0 auto;
1229+
}
1230+
11591231
/* settings */
11601232

1161-
@media screen and (max-width: 750px) {
1233+
@media screen and (max-width: 1398px) {
11621234
main {
11631235
grid-template:
1164-
"nav nav" max-content "srcin srcin" 100% "vdragbar vdragbar" 0 "insights insights" 100% "hdragbar hdragbar" 0 "console console" 150px / 100%;
1236+
"nav nav nav" max-content
1237+
"srcin vdragbar insights" minmax(60vh, auto) "hdragbar hdragbar hdragbar" 10px
1238+
"console console console" minmax(0, 150px) / calc(50% - 5px) 10px calc(50% - 5px);
1239+
}
1240+
1241+
nav {
1242+
grid-template:
1243+
"controls sponsors sponsors about" auto
1244+
"news news news news" auto
1245+
/ 1fr 1fr 1fr 100px;
1246+
row-gap: 0.5rem;
1247+
align-items: start;
1248+
}
1249+
1250+
controls {
1251+
display: flex;
1252+
align-items: center;
1253+
gap: 0.5rem;
1254+
justify-self: baseline;
1255+
}
1256+
1257+
sponsor {
1258+
justify-self: start;
1259+
margin-right: 0;
1260+
width: max-content;
1261+
}
1262+
1263+
news {
1264+
justify-self: start;
1265+
}
1266+
1267+
about {
1268+
justify-self: end;
1269+
align-self: center;
1270+
}
1271+
}
1272+
1273+
@media screen and (max-width: 700px) {
1274+
main {
1275+
grid-template:
1276+
"nav nav" 100%
1277+
"srcin srcin" 100%
1278+
"vdragbar vdragbar" 0
1279+
"insights insights" 100%
1280+
"hdragbar hdragbar" 0
1281+
"console console" 150px / 100%;
11651282

11661283
}
11671284

11681285
nav {
11691286
grid-template:
1170-
"controls controls"
1171-
"news news"
1172-
"about about" 100% / 100%;
1287+
"controls controls" 100%
1288+
"sponsors sponsors" 100%
1289+
"news news" 100% / 1fr 1fr;
1290+
1291+
height: 41px;
11731292
}
11741293

11751294
.logo {

0 commit comments

Comments
 (0)