Skip to content

Commit 038a05f

Browse files
committed
🗳 Oyla sayfasına başla @MuhammetCoskun ile (#38)
1 parent da5553e commit 038a05f

File tree

9 files changed

+331
-5
lines changed

9 files changed

+331
-5
lines changed

‎Makefile

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
MAKEFLAGS := -j 8
2-
PAGES := al ana incele
2+
PAGES := al ana incele oyla
33

44
all: build
55

@@ -10,6 +10,7 @@ include ana/Makefile
1010
include birim/cüzdan/Makefile
1111
include incele/Makefile
1212
include iptal/Makefile
13+
include oyla/Makefile
1314
include lib/test/Makefile
1415

1516
clean:

‎birim/cüzdan/birim.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ const adresDeÄŸiÅŸti = (adresler) => {
9898
if (ad) AdresButonu.innerText = ad;
9999
});
100100
if (!eskiAdres) {
101-
Bağlanınca(Adres);
101+
if (Bağlanınca) Bağlanınca(Adres);
102102
} else if (AdresDeÄŸiÅŸince) {
103103
AdresDeÄŸiÅŸince(Adres);
104104
}

‎oyla/Makefile

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
JsDeps_oyla/sayfa := oyla/sayfa.js \
2+
birim/cüzdan/birim.js \
3+
lib/dom.js lib/ethereum.js lib/TCKT.js
4+
5+
build/oyla/sayfa.css: oyla/sayfa.css oyla/*/*.css
6+
mkdir -p $(dir $@)
7+
cat $^ | yarn csso --output $@
8+
9+
build/oyla/sayfa.keymap: $(call compressions, build/oyla/sayfa.css)
10+
mkdir -p $(dir $@) && > $@
11+
tools/keyhasher.py $@ build/oyla/sayfa.css
12+
13+
build/oyla/sayfa-%.keymap: $(call compressions, build/oyla/sayfa-%.js)
14+
mkdir -p $(dir $@) && > $@
15+
tools/keyhasher.py $@ build/oyla/sayfa-$*.js
16+
17+
build/oyla-%.html: oyla/sayfa.html \
18+
birim/cüzdan.birim \
19+
build/oyla/sayfa.keymap \
20+
build/oyla/sayfa-%.keymap \
21+
build/ana/sayfa-%.keymap \
22+
build/birim/cüzdan/birim.keymap
23+
node tools/htmlProcessor $< $*
24+
tools/keymapper.py $@ $(filter %.keymap,$^)
25+
yarn html-minifier -c tools/html-minifier.conf $@ -o $@

‎oyla/sayfa.css

+222
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,222 @@
1+
#oy {
2+
margin: 5em auto;
3+
display: flex;
4+
flex-direction: column;
5+
justify-content: space-around;
6+
align-items: center;
7+
}
8+
9+
.oyc {
10+
max-width: 900px;
11+
width: 80%;
12+
background-color: #fff;
13+
box-shadow: 2px 2px 10px rgb(0 0 0 / 15%);
14+
border-radius: 10px;
15+
margin-bottom: 3em;
16+
}
17+
18+
.oycb {
19+
padding: 1em 1em 1em 2em;
20+
font-weight: 700;
21+
font-size: 11pt;
22+
color: #888;
23+
}
24+
25+
.oyok {
26+
padding: 2em;
27+
cursor: pointer;
28+
border-top: 1px solid rgba(0 0 0 / 10%);
29+
}
30+
31+
.oyaotop {
32+
display: flex;
33+
justify-content: space-between;
34+
}
35+
36+
.oyaotitle {
37+
font-size: 12pt;
38+
font-weight: 700;
39+
color: #555;
40+
}
41+
42+
.oyaotb {
43+
position: relative;
44+
width: 25px;
45+
height: 20px;
46+
opacity: 0.3;
47+
background-color: rgb(0 0 0);
48+
border-radius: 2px;
49+
transition: opacity 0.3s ease-in;
50+
}
51+
52+
.oyaotb:hover {
53+
opacity: 0.7;
54+
}
55+
56+
.oyaotb::before {
57+
position: absolute;
58+
top: 8px;
59+
left: 8px;
60+
content: "";
61+
height: 6px;
62+
width: 6px;
63+
border: solid #fff;
64+
border-width: 2px 2px 0 0;
65+
border-radius: 1px;
66+
transform: rotate(-45deg);
67+
}
68+
69+
.oyaobody {
70+
display: flex;
71+
}
72+
73+
@media (max-width: 425px) {
74+
.oyaobody {
75+
display: block;
76+
}
77+
}
78+
79+
.oyaodac {
80+
width: 100%;
81+
}
82+
83+
.oyaod {
84+
margin-top: 0.5em;
85+
}
86+
87+
.oyaoac {
88+
margin-top: 1em;
89+
font-family: monospace;
90+
color: rgb(0 0 0 / 50%);
91+
}
92+
93+
.oyaorem {
94+
color: rgb(0 0 0 / 60%);
95+
font-size: 10pt;
96+
margin-top: 2em;
97+
display: flex;
98+
}
99+
100+
.oyaoclock {
101+
position: relative;
102+
width: 16px;
103+
height: 16px;
104+
margin-right: 5px;
105+
}
106+
107+
.oyaoclock::before {
108+
position: absolute;
109+
content: "";
110+
width: 16px;
111+
height: 16px;
112+
top: 0;
113+
left: 0;
114+
border-radius: 50%;
115+
border: 2px solid #90C8AC;
116+
box-sizing: border-box;
117+
}
118+
119+
.oyaoclock::after {
120+
position: absolute;
121+
content: "";
122+
width: 4px;
123+
height: 5px;
124+
top: 3px;
125+
left: 7px;
126+
border: solid #90C8AC;
127+
border-width: 0 0 1.5px 1.5px;
128+
}
129+
130+
.oyaochart {
131+
/* width: 20%; */
132+
}
133+
134+
.columns {
135+
display: flex;
136+
justify-content: center;
137+
align-items: flex-end;
138+
}
139+
140+
.column {
141+
margin-right: 0.5em;
142+
box-shadow: 2px 2px 10px rgb(0 0 0 / 15%);
143+
border-radius: 2px;
144+
width: 25px;
145+
height: 80px;
146+
}
147+
148+
.column.yes {
149+
height: 80px;
150+
background-color: #90C8AC;
151+
}
152+
153+
.column.no {
154+
height: 30px;
155+
background-color: #FF8B8B;
156+
}
157+
158+
.column.yn {
159+
height: 45px;
160+
background-color: #D3CEDF;
161+
}
162+
163+
.chartbtns {
164+
display: flex;
165+
}
166+
167+
.chartbtn {
168+
display: inline-block;
169+
width: 25px;
170+
height: 25px;
171+
opacity: 0.3;
172+
border-radius: 50%;
173+
margin: 0.5em 0.5em 0 0;
174+
transition: opacity 1s;
175+
}
176+
177+
.chartbtn.yes {
178+
background-color: #90C8AC;
179+
}
180+
181+
.chartbtn.no {
182+
background-color: #FF8B8B;
183+
}
184+
185+
.chartbtn.yn {
186+
background-color: #D3CEDF;
187+
}
188+
189+
.chartbtn:hover,
190+
.chartbtn:focus {
191+
opacity: 0.9;
192+
}
193+
194+
.oyiac {
195+
max-width: 600px;
196+
width: 60%;
197+
background-color: #fff;
198+
box-shadow: 2px 2px 10px rgb(0 0 0 / 15%);
199+
border-radius: 10px;
200+
margin-bottom: 5em;
201+
}
202+
203+
.oyiaob {
204+
font-size: 12pt;
205+
font-weight: 700;
206+
}
207+
208+
.oyiaod {
209+
margin-top: 0.5em;
210+
}
211+
212+
.code_network {
213+
color: #b85144;
214+
}
215+
216+
.code_adr {
217+
color: #6d78d8;
218+
}
219+
220+
.code_function {
221+
color: #6D42C7;
222+
}

‎oyla/sayfa.html

+67
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
<!DOCTYPE html>
2+
<html data-en-lang=en lang=tr>
3+
4+
<head>
5+
<meta charset="utf-8">
6+
<meta name="viewport" content="width=device-width, initial-scale=1">
7+
<title data-en="KimlikDAO | Governance">KimlikDAO | Oylamalar</title>
8+
<link rel="preload" crossorigin href="/font/f400.woff2" as="font" />
9+
<link rel="preload" crossorigin href="/font/f700.woff2" as="font" />
10+
<link href="/font/lato-ttf.css" rel="stylesheet" type="text/css" data-remove />
11+
<link href="/ana/sayfa.css" rel="stylesheet" type="text/css" />
12+
<link href="/oyla/sayfa.css" rel="stylesheet" type="text/css" />
13+
</head>
14+
15+
<body>
16+
<div id="nal">
17+
<h2><a href="/">KimlikDAO</a></h2>
18+
<birim:cüzdan />
19+
</div>
20+
<div id="oy">
21+
<div id="oyac" class="oyc">
22+
<div class="oycb">Devam eden oylamalar</div>
23+
<div class="oyok">
24+
<div class="oyaotop">
25+
<div class="oyaotitle">TCKT Fiyat DeÄŸiÅŸikliÄŸi</div>
26+
<div class="oyaotb"></div>
27+
</div>
28+
<div class="oyaobody">
29+
<div class="oyaodac">
30+
<div class="oyaod">TCKT fiyatı $1,5 olarak belirlensin.</div>
31+
<div class="oyaoac">
32+
<div>Address: <span class="code_adr">TCKT</span> on <span class="code_network">Avalanche</span>(<span
33+
class="code_network">Raw</span>: <span class="code_adr">"0xa86a, 0xcCc23478203948cCc"</span>)</div>
34+
<div>Calldata: <span class="code_function">updatePrice</span>(USDC, $1.5) (<span
35+
class="code_network">Raw</span>: "0x94934811238773733")</div>
36+
</div>
37+
<div class="oyaorem">
38+
<div class="oyaoclock"></div><span id="sikko">13D 21H REMAINING</span>
39+
</div>
40+
</div>
41+
<div class="oyaochart">
42+
<div class="columns">
43+
<div class="column yes"></div>
44+
<div class="column no"></div>
45+
<div class="column yn"></div>
46+
</div>
47+
<div class="chartbtns">
48+
<a href="javascript:" class="chartbtn yes"></a>
49+
<a href="javascript:" class="chartbtn no"></a>
50+
<a href="javascript:" class="chartbtn yn"></a>
51+
</div>
52+
</div>
53+
</div>
54+
</div>
55+
</div>
56+
<div id="oyiac" class="oyc">
57+
<div class="oycb">Eski oylamalar</div>
58+
<div class="oyok">
59+
<div class="oyiaob">TCKT Fiyat DeÄŸiÅŸikliÄŸi</div>
60+
<div class="oyiaod">TCKT fiyatı 1.5$ olarak belirlensin.</div>
61+
</div>
62+
</div>
63+
</div>
64+
<script async type="module" src="/oyla/sayfa.js" data-remove-type></script>
65+
</body>
66+
67+
</html>

‎oyla/sayfa.js

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
/**
2+
* @fileoverview Oyla sayfası giriş noktası
3+
*
4+
*/
5+
import '/birim/cüzdan/birim';

‎tools/dev.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ const birimOku = (dosyaAdı) => {
1515
stiller.push("/" + dosyaAdı.slice(0, -11) + '.css');
1616
}
1717

18-
sayfa = sayfa.replace(/<birim:([^\/]*)\/>/g, (_, birimAdı) => {
18+
sayfa = sayfa.replace(/<birim:([^\s]+)[^\/]+\/>/g, (_, birimAdı) => {
1919
let [birim, altStiller] = birimOku(`birim/${birimAdı.trim()}/birim.html`);
2020
stiller.push(...altStiller);
2121
return birim;
2222
});
23-
sayfa = sayfa.replace(/<altbirim:([^\/]*)\/>/g, (_, birimAdı) => {
23+
sayfa = sayfa.replace(/<altbirim:([^\s]+)[^\/]+\/>/g, (_, birimAdı) => {
2424
let [birim, altStiller] = birimOku(`${path.dirname(dosyaAdı)}/${birimAdı.trim()}/birim.html`);
2525
stiller.push(...altStiller);
2626
return birim;
@@ -43,6 +43,8 @@ const SAYFALAR = {
4343
"/al": "al/sayfa.html",
4444
"/get": "al/sayfa.html",
4545
"/incele": "incele/sayfa.html",
46+
"/oyla": "oyla/sayfa.html",
47+
"/vote": "oyla/sayfa.html",
4648
};
4749

4850
createServer({

‎tools/prod.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@ const PAGES = {
2222
"/al": "al-tr.html",
2323
"/get": "al-en.html",
2424
"/incele": "incele-tr.html",
25-
"/view": "incele-en.html"
25+
"/view": "incele-en.html",
26+
"/oyla": "oyla-tr.html",
27+
"/vote": "oyla-en.html",
2628
};
2729

2830
addEventListener('fetch', async (event) => {

‎tools/staging.py

+2
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
"/get": "al-en.html",
2323
"/incele": "incele-tr.html",
2424
"/view": "incele-en.html",
25+
"/oyla": "oyla-tr.html",
26+
"/vote": "oyla-en.html",
2527
}
2628

2729
MIMES = {

0 commit comments

Comments
 (0)