- 📕 Portfolio
- 🌐 Blog
- 📑 Qiita
- 💻 Speaker Deck
atria64 / cuiportfolio Goto Github PK
View Code? Open in Web Editor NEWCUI風Portfolio
Home Page: https://atria64.github.io/CUIPortfolio/
CUI風Portfolio
Home Page: https://atria64.github.io/CUIPortfolio/
atria $ help
{commandNames} -> {commandDiscription}
...
みたいな
いちいち手打ちはエグい
メンテナンス性皆無すぎる
changecolor
などで変更したカラー情報を localstorage
に保存し適用してほしい
毎回変更するのが面倒なため
起動アニメーション終了後自動で help
を打った画面を表示したい
起動した後どう操作すればよいのか、一見わからないため
helpをステータスとして渡したコンポーネントを配置すればワンチャンありそう
works cs
でC#製のものを絞り込めるようなもの
works js
でJavaScript製を絞り込める
きっとカッコイイから…
LINQ使って抽出(Where)
以下の実装だとなにか更新があるたびに ''@SetCommand''などが呼ばれている。
List<string> console
に入力を格納し、随時レンダリングするという方式を取る以上大きな計算量の削減は難しそう。
@foreach (string item in console.ToList())
{
@if (commands.Contains(item.Split(' ')[0]))
{
@*コマンド入力時*@
<div class="console">
<span style="color:@Setting.NameColor">atria </span>
<span style="color:@Setting.DollarMarkColor">$</span>
<span style="color:@Setting.CommandColor">@item</span>
</div>
<div class="console">
@*ここにコマンド出力*@
@SetCommand(item)
</div>
}
else
{
@*コマンド以外入力時*@
<div class="console">
<span style="color:@Setting.NameColor">atria </span>
<span style="color:@Setting.DollarMarkColor">$</span>
@if (item == "")
{
@*入力バー(最終行のみ)*@
<span><input id="commandLine" style="color:@inputColor" autocomplete="off" maxlength="50" type="url" @bind="inputV" @onkeyup="NextLine" @bind:event="oninput" /></span>
}
else
{
<span style="color:white">@item</span>
@if (item != "")
{
<div>
<span style="color:white">@item : Unknown Command. Recommend "help".</span>
</div>
}
}
</div>
}
}
ChangeColorWithCommand();
しか動作させない(余計な再レンダリングを防止する)Console
の設計を変える(重い)コマンドにインターフェースとかいろいろ使って安全化したい。
↑キーを押下することで前回の入力を繰り返すことができる
さらにコンソールっぽさが増す
コンソール(つまり atria $ |
)が表示されない状態
コマンド入力後インタラクティブなものを表示させたいときに使うため。
ロード後のアニメーションを作成するため。
await JSRuntime.InvokeVoidAsync("focusCommandLine");
)IWebHostEnvironmentからcontent root pathを取得してやる
Getting the Web Root Path and the Content Root Path in ASP.NET Core
cd hoge
や
urlcolor hoge ( #7 )
みたいなやつ
これがないと実装できる機能の幅が狭いから
<hoge status = ""></hoge>
みたいな感じでパラメータを与える形を取り、のちの処理はコマンド(Razorファイル)側で処理する
index.razor側で基本コマンドの処理は行わない
コマンドの認識処理ははsplitつかってよしなに実装
infoでどのバージョンのものが動いているかを把握できるようにしたい。
具体的には こんな感じ
バグを報告する際に情報量が少ない
atria/hogeの色や $ の色、コマンド認識時の色などを設定できるようにしたい
色変えれたら面白いかなと考えた
cd
で works
に移動し ls
を叩くと現在登録されているworksのコマンド一覧が出るようなもの
ls
や cd
を打ちたい!
大規模改修になるためよく考えなければならない。
開発を進める場合はfeatureブランチを切って、リリース時にはメジャーバージョンを上げる。
SSIA
いちいち手作業で変えたくない
JavaScriptをTypeScriptに置き換える
どうせならJavaScript部分もTypeScriptにして型のあるプログラミングがしたい
CIファイルも書き換えないといけないかもしれない(TSはコンパイルが必要なため)(するととたんに面倒に感じる)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.