die
This commit is contained in:
parent
aa20cf0f0b
commit
1bf90caeec
17 changed files with 147 additions and 7 deletions
4
app/controllers/svelte_controller.rb
Normal file
4
app/controllers/svelte_controller.rb
Normal file
|
@ -0,0 +1,4 @@
|
|||
class SvelteController < ApplicationController
|
||||
def index
|
||||
end
|
||||
end
|
|
@ -1,11 +1,19 @@
|
|||
<script>
|
||||
export let name;
|
||||
export let names;
|
||||
</script>
|
||||
|
||||
<div width="100%" height="100%">
|
||||
<div align="center">
|
||||
<h1>jane {names[Math.floor(Math.random() * names.length)]} petrovna</h1>
|
||||
<h2>jane#0009</h2>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
h1 {
|
||||
color: #FF3E00;
|
||||
color: #75004a;
|
||||
}
|
||||
h2 {
|
||||
color: #753dad;
|
||||
}
|
||||
</style>
|
||||
|
||||
<h1>Hello {name}!</h1>
|
0
app/javascript/friends.svelte
Normal file
0
app/javascript/friends.svelte
Normal file
10
app/javascript/packs/friends.js
Normal file
10
app/javascript/packs/friends.js
Normal file
|
@ -0,0 +1,10 @@
|
|||
import App from '../friends.svelte'
|
||||
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
const app = new App({
|
||||
target: document.body,
|
||||
});
|
||||
|
||||
window.app = app;
|
||||
})
|
||||
|
0
app/javascript/packs/games.js
Normal file
0
app/javascript/packs/games.js
Normal file
|
@ -11,7 +11,9 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||
const app = new App({
|
||||
target: document.body,
|
||||
props: {
|
||||
name: 'Svelte'
|
||||
names: ['sunset', 'luna', 'bonnibel', 'marceline', 'artemis',
|
||||
'diana', 'constanze', 'twilight', 'bianca', 'dawn', 'rosa', 'akemi',
|
||||
'glimmer']
|
||||
}
|
||||
});
|
||||
|
10
app/javascript/packs/portfolio.js
Normal file
10
app/javascript/packs/portfolio.js
Normal file
|
@ -0,0 +1,10 @@
|
|||
import App from '../portfolio.svelte'
|
||||
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
const app = new App({
|
||||
target: document.body,
|
||||
});
|
||||
|
||||
window.app = app;
|
||||
})
|
||||
|
67
app/javascript/portfolio.svelte
Normal file
67
app/javascript/portfolio.svelte
Normal file
|
@ -0,0 +1,67 @@
|
|||
<script>
|
||||
let type = 'tech';
|
||||
let switchPortfolio = () => {
|
||||
type = (
|
||||
type === 'tech' ?
|
||||
'arts' : 'tech'
|
||||
);
|
||||
};
|
||||
</script>
|
||||
<div width="100%" height="100%">
|
||||
<div id='center'>
|
||||
<button on:click={switchPortfolio}>switch to {type === 'tech' ? 'arts' : 'tech'} portfolio</button>
|
||||
<ul>
|
||||
{#if type === 'tech'}
|
||||
<li><h1><a href="https://github.com/janeptrv">github</a></h1></li>
|
||||
<li><h1><a href="https://gitlab.com/janeptrv">gitlab</a></h1></li>
|
||||
<li><h1><a href="https://gitdab.com/jane">gitdab</a></h1></li>
|
||||
<br/>
|
||||
<li><h1><a href='https://gitdab.com/jane/pinbot'>democratic discord pins bot</a></h1></li>
|
||||
<br/>
|
||||
<li><h1><a href='https://gitdab.com/jane/leds'>ws2812b pi controller</a></h1></li>
|
||||
<li><h1><a href='https://gitdab.com/jane/led-bot'>ws2812b discord bot interface</a></h1></li>
|
||||
<br/>
|
||||
<li><h1><a href='https://gitdab.com/jane/lastfm-wrapped'>last.fm statistics scraper</a></h1></li>
|
||||
<br/>
|
||||
<li><h1><a href='https://gitdab.com/makise'>public miscellaneous projects</a></h1></li>
|
||||
{/if}
|
||||
{#if type === 'arts'}
|
||||
<li><h1>tbd</h1></li>
|
||||
{/if}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
h1 {
|
||||
font-size: 1.5em;
|
||||
color: #75004a;
|
||||
}
|
||||
a {
|
||||
color: #75004a;
|
||||
}
|
||||
li::marker {
|
||||
color: #753dad;
|
||||
}
|
||||
#center {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
margin-top: -300px;
|
||||
margin-left: -200px;
|
||||
width: 400px;
|
||||
height: 200px;
|
||||
}
|
||||
li {
|
||||
text-align: center;
|
||||
width: auto;
|
||||
}
|
||||
button {
|
||||
background-color: #201020;
|
||||
border: none;
|
||||
text-align: center;
|
||||
color: #fff;
|
||||
width: inherit;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<html style='background-color: #101010;'>
|
||||
<head>
|
||||
<title>J4pm</title>
|
||||
<title>j4.pm</title>
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<%= csrf_meta_tags %>
|
||||
<%= csp_meta_tag %>
|
||||
|
|
1
app/views/svelte/friends.html.erb
Normal file
1
app/views/svelte/friends.html.erb
Normal file
|
@ -0,0 +1 @@
|
|||
<%= javascript_pack_tag 'friends' %>
|
3
app/views/svelte/index.html.erb
Normal file
3
app/views/svelte/index.html.erb
Normal file
|
@ -0,0 +1,3 @@
|
|||
<%= javascript_pack_tag 'home' %>
|
||||
<!--THOUGHTS: spell system to navigate between pages-->
|
||||
<!--THOUGHTS: rng star field background-->
|
1
app/views/svelte/portfolio.html.erb
Normal file
1
app/views/svelte/portfolio.html.erb
Normal file
|
@ -0,0 +1 @@
|
|||
<%= javascript_pack_tag 'portfolio' %>
|
Loading…
Add table
Add a link
Reference in a new issue