Links awakening

This commit is contained in:
nikurasu 2022-10-15 21:13:48 +02:00
parent 2c826970e3
commit c5c5639043
3 changed files with 9 additions and 4 deletions

View file

@ -4,4 +4,7 @@ links:
- text: "YouTube" # text on the link - text: "YouTube" # text on the link
hyperlink: "Test" # the actual hyperlink hyperlink: "Test" # the actual hyperlink
brandcolor: "youtube" # set this if you want to set the color of the link to the brand color of a platform... brandcolor: "youtube" # set this if you want to set the color of the link to the brand color of a platform...
color: "#0D0D0D" # or that if you want to set it to an exact color color: "#0D0D0D" # or that if you want to set it to an exact color
- text: "Twitter"
hyperlink: "test"
brandcolor: "twitter"

View file

@ -15,10 +15,10 @@ app.use(express.static('src/assets'))
app.get('/', (req, res) => { app.get('/', (req, res) => {
let config = yaml.load(fs.readFileSync('config/config.yml'), 'utf8') let config = yaml.load(fs.readFileSync('config/config.yml'), 'utf8')
console.log(JSON.stringify(config))
res.render('index', { res.render('index', {
name: config.name, name: config.name,
filenameProfilePic: config.profilePic ? config.profilePic : 'profilepic.jpg' filenameProfilePic: config.profilePic ? config.profilePic : 'profilepic.jpg',
links: config.links
}) })
}) })

View file

@ -8,7 +8,9 @@
<h1><%= name %></h1> <h1><%= name %></h1>
</div> </div>
<div class="linkbox"> <div class="linkbox">
<% links.forEach(link => { %>
<p>Hello World</p>
<% }) %>
</div> </div>
</div> </div>
<%- include('partials/footer') %> <%- include('partials/footer') %>