5
5
// Get the keys of the first value in the translations array
6
6
$ LOCALES = array_keys ($ TRANSLATIONS );
7
7
8
+ $ darkmode = $ _COOKIE ["darkmode " ] ?? null ;
9
+
8
10
/**
9
11
* Convert a camelCase string to a skewer-case string
10
12
* @param string $str The camelCase string
@@ -58,7 +60,7 @@ function gtag() {
58
60
<script async defer src="https://buttons.github.io/buttons.js"></script>
59
61
</head>
60
62
61
- <body <?php echo ( $ _COOKIE [ " darkmode " ] ?? null ) == "on " ? 'data-theme="dark" ' : "" ; ?> >
63
+ <body <?php echo $ darkmode = == "on " ? 'data-theme="dark" ' : "" ; ?> >
62
64
<h1>🔥 GitHub Readme Streak Stats</h1>
63
65
64
66
<!-- GitHub badges/links section -->
@@ -76,10 +78,10 @@ function gtag() {
76
78
<h2>Properties</h2>
77
79
<form class="parameters">
78
80
<label for="user">Username<span title="required">*</span></label>
79
- <input class="param" type="text" id="user" name="user" placeholder="DenverCoder1" required pattern="^[A-Za-z\d-]{0,39}[A-Za-z\d]$" title="Up to 40 letters or hyphens but not ending with hyphen">
81
+ <input class="param" type="text" id="user" name="user" placeholder="DenverCoder1" pattern="^[A-Za-z\d-]{0,39}[A-Za-z\d]$" title="Up to 40 letters or hyphens but not ending with hyphen">
80
82
81
83
<label for="theme">Theme</label>
82
- <select class="param" id="theme" name="theme" placeholder="default" >
84
+ <select class="param" id="theme" name="theme">
83
85
<?php foreach ($ THEMES as $ theme => $ options ): ?>
84
86
<?php
85
87
$ dataAttrs = "" ;
@@ -97,7 +99,7 @@ function gtag() {
97
99
</select>
98
100
99
101
<label for="hide_border">Hide Border</label>
100
- <select class="param" id="hide_border" name="hide_border" placeholder="false" >
102
+ <select class="param" id="hide_border" name="hide_border">
101
103
<option>false</option>
102
104
<option>true</option>
103
105
</select>
@@ -127,7 +129,7 @@ function gtag() {
127
129
<summary>⚙ Advanced Options</summary>
128
130
<div class="content parameters">
129
131
<label for="theme">Add Property</label>
130
- <select id="properties" name="properties" placeholder="background" >
132
+ <select id="properties" name="properties">
131
133
<?php foreach ($ THEMES ["default " ] as $ option => $ color ): ?>
132
134
<option><?php echo $ option ; ?> </option>
133
135
<?php endforeach ; ?>
@@ -136,10 +138,9 @@ function gtag() {
136
138
</div>
137
139
<button class="btn" type="button" onclick='return preview.exportPhp()'>Export to PHP</button>
138
140
<textarea id="exportedPhp" hidden></textarea>
139
-
140
141
</details>
141
142
142
- <input class="btn" type="submit" value="Submit ">
143
+ <input class="btn" type="submit" value="Open Permalink ">
143
144
</form>
144
145
</div>
145
146
@@ -175,7 +176,7 @@ function gtag() {
175
176
</div>
176
177
177
178
<a href="javascript:toggleTheme()" class="darkmode" title="toggle dark mode">
178
- <i class="<?php echo ( $ _COOKIE [ " darkmode " ] ?? null ) == "on " ? "gg-sun " : "gg-moon " ; ?> "></i>
179
+ <i class="<?php echo $ darkmode = == "on " ? "gg-sun " : "gg-moon " ; ?> "></i>
179
180
</a>
180
181
</body>
181
182
0 commit comments