Fixing-main #4
@@ -1,16 +1,22 @@
|
|||||||
export const Footer = () => {
|
import {socialLinkData} from '../data/socialLinkData'
|
||||||
const currentYear = new Date().getFullYear()
|
export interface socialLink {
|
||||||
|
icon: string;
|
||||||
|
url: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export const Footer = () => {
|
||||||
|
const socialLinks: socialLink[] = socialLinkData;
|
||||||
|
|
||||||
|
const currentYear = new Date().getFullYear()
|
||||||
return (
|
return (
|
||||||
<footer className="footer">
|
<footer className="footer">
|
||||||
<div className="container">
|
<div className="container">
|
||||||
<div className="social-links">
|
<div className="social-links">
|
||||||
<a href="#" className="social-icon"><i className="fab fa-github"></i></a>
|
{socialLinks.map((link, index) => (
|
||||||
<a href="#" className="social-icon"><i className="fab fa-linkedin"></i></a>
|
<a key={index} href={link.url} className="social-icon">
|
||||||
<a href="#" className="social-icon"><i className="fab fa-twitter"></i></a>
|
<i className={link.icon}></i>
|
||||||
<a href="#" className="social-icon"><i className="fab fa-discord"></i></a>
|
</a>
|
||||||
<a href="#" className="social-icon"><i className="fas fa-envelope"></i></a>
|
))}
|
||||||
<a href="#" className="social-icon"><i className="fab fa-hackerrank"></i></a>
|
|
||||||
</div>
|
</div>
|
||||||
<p className="copyright">© {currentYear} SecCodeSmith. All rights forged in digital fire.</p>
|
<p className="copyright">© {currentYear} SecCodeSmith. All rights forged in digital fire.</p>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -0,0 +1,102 @@
|
|||||||
|
export const randomCodeLineData :string[] = [
|
||||||
|
'print("Hello, world!")',
|
||||||
|
'int main() { return 0; }',
|
||||||
|
'std::vector<int> v{1, 2, 3, 4};',
|
||||||
|
'Console.WriteLine(\"Enter your name:\");',
|
||||||
|
'for i in range(10):',
|
||||||
|
'char* buffer = malloc(256);',
|
||||||
|
'using (var fs = new FileStream(path, FileMode.Open))',
|
||||||
|
'if (x > y) x = y;',
|
||||||
|
'def factorial(n):',
|
||||||
|
'double result = pow(x, y);',
|
||||||
|
'string greeting = \"Hi there\";',
|
||||||
|
'auto it = map.find(key);',
|
||||||
|
'List<string> names = new List<string>();',
|
||||||
|
'while (ptr != nullptr) {',
|
||||||
|
'with open(\"file.txt\", \"r\") as f:',
|
||||||
|
'int *arr = new int[10];',
|
||||||
|
'var dict = new Dictionary<string, int>();',
|
||||||
|
'std::cout << \"Value: \" << value << std::endl;',
|
||||||
|
'await Task.Delay(1000);',
|
||||||
|
'lambda x: x * x',
|
||||||
|
'float pi = 3.14159f;',
|
||||||
|
'bool success = TryParse(input, out result);',
|
||||||
|
'try { /* ... */ } catch (Exception ex) { }',
|
||||||
|
'def hello(name=\"User\"):',
|
||||||
|
'constexpr int MAX = 100;',
|
||||||
|
'public class Person { }',
|
||||||
|
'if __name__ == \"__main__\":',
|
||||||
|
'switch(choice) { case 1: break; }',
|
||||||
|
'var json = JsonConvert.DeserializeObject(data);',
|
||||||
|
'std::sort(v.begin(), v.end());',
|
||||||
|
'Console.ReadKey();',
|
||||||
|
'for (int i = 0; i < n; i++)',
|
||||||
|
'x = x[::-1]',
|
||||||
|
'char c = getchar();',
|
||||||
|
'[Obsolete(\"Use NewMethod instead\")]',
|
||||||
|
'str_list = [s.upper() for s in strings]',
|
||||||
|
'uint64_t id = generate_id();',
|
||||||
|
'public interface IService { }',
|
||||||
|
'import os',
|
||||||
|
'static void Helper() { }',
|
||||||
|
'client.SendAsync(request);',
|
||||||
|
'matrix[i][j] = i * j;',
|
||||||
|
'def merge(a, b): return a + b',
|
||||||
|
'std::unique_ptr<Foo> p = std::make_unique<Foo>();',
|
||||||
|
'Task.Run(() => DoWork());',
|
||||||
|
'with lock(mutex):',
|
||||||
|
'vector.push_back(elem);',
|
||||||
|
'string.Join(\", \", list)',
|
||||||
|
'if (obj is MyClass mc) { }',
|
||||||
|
'os.remove(\"temp.txt\")',
|
||||||
|
'char16_t ch = u\'A\';',
|
||||||
|
'public static readonly string ID = Guid.NewGuid().ToString();',
|
||||||
|
'def fib(n): return fib(n-1) + fib(n-2)',
|
||||||
|
'memcpy(dest, src, size);',
|
||||||
|
'foreach (var item in collection) { }',
|
||||||
|
'assert(x != null);',
|
||||||
|
'std::thread t([](){ doWork(); });',
|
||||||
|
'[Serializable]',
|
||||||
|
'lst.append(item)',
|
||||||
|
'GC.Collect();',
|
||||||
|
'auto lambda = [](int x){ return x+1; };',
|
||||||
|
'public override string ToString() => Name;',
|
||||||
|
'if (!File.Exists(path)) File.Create(path);',
|
||||||
|
'double average = accumulate(v.begin(), v.end(), 0.0) / v.size();',
|
||||||
|
'using System.Text;',
|
||||||
|
'def decorator(func):',
|
||||||
|
'for (auto &p : pairs) { }',
|
||||||
|
'var query = from x in db.Items select x;',
|
||||||
|
'bytes_data = b\"\\x00\\xFF\"',
|
||||||
|
'cout << std::hex << n;',
|
||||||
|
'string.Format(\"{0}, {1}\", a, b);',
|
||||||
|
'import sys, json',
|
||||||
|
'bool isEmpty = list.Count == 0;',
|
||||||
|
'std::map<string,int> mp;',
|
||||||
|
'Console.ForegroundColor = ConsoleColor.Green;',
|
||||||
|
'def prime(n):',
|
||||||
|
'int score = Random().Next(0, 100);',
|
||||||
|
'var path = Path.Combine(dir, file);',
|
||||||
|
'auto now = std::chrono::system_clock::now();',
|
||||||
|
'if (val?.Length > 0) { }',
|
||||||
|
'with session.begin():',
|
||||||
|
'list<int> primes;',
|
||||||
|
'public event EventHandler Clicked;',
|
||||||
|
'x, y = y, x',
|
||||||
|
'char16_t* wstr = L\"wide\";',
|
||||||
|
'dynamic obj = new ExpandoObject();',
|
||||||
|
'assert(sizeof(int) == 4);',
|
||||||
|
'Console.Write($\"Count: {count}\");',
|
||||||
|
'std::tie(a, b) = getPair();',
|
||||||
|
'byte[] buffer = new byte[1024];',
|
||||||
|
'def async_func():',
|
||||||
|
'virtual void Render() override;',
|
||||||
|
'os.getcwd()',
|
||||||
|
'for k, v in dict.items():',
|
||||||
|
'std::shared_ptr<Foo> sp = ptr;',
|
||||||
|
'public bool Equals(Person other) => Id==other.Id;',
|
||||||
|
'return x is not None',
|
||||||
|
'size_t len = strlen(str);',
|
||||||
|
'var enumerable = Enumerable.Range(1,10);',
|
||||||
|
'float angle = atan2(y, x);',
|
||||||
|
]
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
import {type socialLink} from "../components/Footer";
|
||||||
|
|
||||||
|
export const socialLinkData: socialLink[] = [
|
||||||
|
{
|
||||||
|
icon: "fab fa-github",
|
||||||
|
url: ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
icon: "fab fa-linkedin",
|
||||||
|
url: ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
icon: "fab fa-twitter",
|
||||||
|
url: ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
icon: "fab fa-discord",
|
||||||
|
url: ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
icon: "fas fa-envelope",
|
||||||
|
url: ""
|
||||||
|
},
|
||||||
|
]
|
||||||
+5
-7
@@ -4,30 +4,28 @@ import { Link } from 'react-router-dom';
|
|||||||
import styles from '@styles/Home.module.scss';
|
import styles from '@styles/Home.module.scss';
|
||||||
import SkillCard from '../components/SkillCard'
|
import SkillCard from '../components/SkillCard'
|
||||||
import { skillCardData } from '../data/skillCardData';
|
import { skillCardData } from '../data/skillCardData';
|
||||||
|
import { randomCodeLineData } from '../data/randomCodeLineData';
|
||||||
|
|
||||||
export const Home = () => {
|
export const Home = () => {
|
||||||
const skills = skillCardData;
|
const skills = skillCardData;
|
||||||
|
const randomCodeLines = randomCodeLineData;
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const createBinaryBg = () => {
|
const createBinaryBg = () => {
|
||||||
const binaryBg = document.getElementById('binary-bg');
|
const binaryBg = document.getElementById('binary-bg');
|
||||||
if (!binaryBg) return;
|
if (!binaryBg) return;
|
||||||
|
|
||||||
const chars = '01';
|
|
||||||
const linesCount = 20;
|
const linesCount = 20;
|
||||||
|
|
||||||
binaryBg.innerHTML = '';
|
binaryBg.innerHTML = '';
|
||||||
|
|
||||||
for (let i = 0; i < linesCount; i++) {
|
for (let i = 0; i < linesCount; i++) {
|
||||||
|
|
||||||
const line = document.createElement('div');
|
const line = document.createElement('div');
|
||||||
line.className = styles.binaryLine;
|
line.className = styles.binaryLine;
|
||||||
line.style.left = `${Math.random() * 100}%`;
|
line.style.left = `${Math.random() * 100}%`;
|
||||||
line.style.animationDuration = `${Math.random() * 10 + 15}s`;
|
line.style.animationDuration = `${Math.random() * 10 + 15}s`;
|
||||||
|
|
||||||
let binaryString = '';
|
let lineNumber = Math.floor(Math.random() * randomCodeLines.length);
|
||||||
for (let j = 0; j < 100; j++) {
|
let binaryString = randomCodeLines[lineNumber];
|
||||||
binaryString += chars.charAt(Math.floor(Math.random() * chars.length));
|
|
||||||
}
|
|
||||||
|
|
||||||
line.textContent = binaryString;
|
line.textContent = binaryString;
|
||||||
binaryBg.appendChild(line);
|
binaryBg.appendChild(line);
|
||||||
|
|||||||
Reference in New Issue
Block a user