Code Monkey home page Code Monkey logo

connect-your-tribe-profile-card's Introduction

connect-your-tribe-profile-card's People

Contributors

koopreynders avatar ju5tu5 avatar tomdeeterink1 avatar joostf avatar robin1224 avatar suustenvoorde avatar

connect-your-tribe-profile-card's Issues

Javascript in index.ejs

Vertel over je issue
Probeer de script tag in een script.js bestand te doen, bijvoorbeeld in public/scripts/script.js

Locatie:

<script>
// Function to make buttons move in the right way
function toggleButtonVisibility() {
// Define the elements that are used in the html
let selectElement = document.querySelector('.repo-select');
let selectedValue = selectElement.value;
// Connect html buttons to const
const button = document.getElementById('triple');
const button2 = document.getElementById('portfolio');
const button3 = document.getElementById('berain');
if (selectedValue === 'default') {
button.style.marginLeft = '-300px';
button2.style.marginLeft = '-300px';
button3.style.marginLeft = '-300px';
} else {
if (selectedValue === 'Triple') {
button2.style.marginLeft = '-300px';
button3.style.marginLeft = '-300px';
button.style.marginLeft = '0px';
} else {
if (selectedValue === 'Portfolio') {
button.style.marginLeft = '-300px';
button2.style.marginLeft = '0px';
button3.style.marginLeft = '-300px';
} else {
if (selectedValue === 'B-Rain') {
button.style.marginLeft = '-300px';
button2.style.marginLeft = '-300px';
button3.style.marginLeft = '0px';
}
}
}
}
}
</script>

Bronnen:

  • Heb ik niet

tip leesbare code

<section class="card">
<h1> <%= data.name %> </h1>
<h2> <%= data.surname %> </h2>
<p> <%= data.bio %> </p>
<a class="link" href=" <%= data.website %> "> Mijn Website</a>
<a class="link secondary" href=" <%= data.github_handle%> "> Mijn Github</a>
<!-- Choose a repo with the select element-->
<select class="repo-select" onchange="toggleButtonVisibility()">
<option class="option" value="default">Select a reposatory</option>
<option class="option" value="Portfolio">Portfolio</option>
<option class="option" value="Triple">Triple page</option>
<option class="option" value="B-Rain">B-Rain</option>
</select>
<!-- These buttons are used for the javascript function, they are not visible in the website at frist sight -->
<a id="portfolio" class="link" href=" https://github.com/TomDeeterink1/portfolio-site "> Portfolio</a>
<a id="triple" class="link" href=" https://github.com/TomDeeterink1/the-startup-responsive-interactieve-website "> Triple webpage</a>
<a id="berain" class="link" href=" https://github.com/TomDeeterink1/fix-the-flow-interactive-website "> B-rain Webpage</a>
</section>

er mag wel een enter komen na : Mijn Github zodat er meer ruimte is tussen de html elementen

dit heb je wel mooi gedaan bij je javascript code die eronder zit

je visitekaartje vind ik er mooi uitzien

Je gebruikt data. , hoeft niet perse als je een kleine aanpassing maakt in je code

Je gebruik nu nog data. maar als je een kleine aanpassing maakt, dan hoeft dat niet

Als je naar de file server.js gaat, op lijn 8 waar const data staat, verandert naar const { data }, dan kun je direct <=% name => opschrijven

const { data } = await fetchJson('https://fdnd.directus.app/items/person/19')

<h1> <%= data.name %> </h1>
<h2> <%= data.surname %> </h2>
<p> <%= data.bio %> </p>

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.