Coder Social home page Coder Social logo

wsb-dev's Introduction

wsb-dev

  I. Adding a Card

Add the following code template after each card’s </div>. Make sure that the code below is not copied into another alumni card’s <div> otherwise the page will not look as intended.

Card Code Template

 ```html

<a href = “LINK TO PAGE“> <img src=“REPLACE WITH IMAGE LINK“ alt=“REPLACE WITH ALT IMAGE NAME>

REPLACE WITH ALUMNI NAME

REPLACE WITH ALUMNI DESCRIPTION


II. Adding Tags to Letter

	After adding formatting and encoding your letter, you can paste the xml directly to the page and add tags to sort through the letters.

	Tag Creation Template

      <button class="tag" onclick="filterTag(‘all love travel’)”>Love</button>
      <button class="tag" onclick="filterTag(‘all scenery’)”>Scenery</button>

	   
	  Note: The text in the ‘’ is what to use as your data-tag, the text in between the > and </button> is what will actually show up on the page as your label


	Creating a Letter + Tag Template

    <div class="letter-item" data-tags="tag1 tag2">Letter 1</div>

	Note: This snippet uses the tags love and scenery. Make sure that in data-tags the text used is the text written in the ‘’ and not the text that would show on the webpage after the >. You do not need to use commas or hyphens in between each tag, just spaces


	Blank Alumni Page Code with Example Tags

	Note: You can edit the CSS and any other part of this as needed

		
		
<div class="letter">
    <div class="letter-item" data-tags="tag1 tag2">Letter 1</div>
    <div class="letter-item" data-tags="tag2 tag3">Letter 2</div>
    <div class="letter-item" data-tags="tag1 tag3">Letter 3</div>
</div>

<button onclick="filterLetters('tag1')">Tag 1</button>
<button onclick="filterLetters('tag2')">Tag 2</button>
<button onclick="filterLetters('tag3')">Tag 3</button>

<script>
function filterLetters(tag) {
    var letters = document.getElementsByClassName("letter-item");
    for (var i = 0; i < letters.length; i++) {
        var tags = letters[i].dataset.tags.split(" ");
        if (tags.includes(tag)) {
            letters[i].classList.remove("hidden");
        } else {
            letters[i].classList.add("hidden");
        }
    }
}
</script>

<style>
.hidden {
    display: none;
}
</style>


</body>
</html>

	
	



wsb-dev's People

Contributors

madihabdul avatar giannetti avatar

Watchers

 avatar

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.