Skip to content

Commit

Permalink
Update Home page news list
Browse files Browse the repository at this point in the history
  • Loading branch information
snoidetx committed Nov 6, 2024
1 parent 2ed01d0 commit 896297c
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 31 deletions.
8 changes: 4 additions & 4 deletions docs/_includes/js/home/control_news_list.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
document.addEventListener('DOMContentLoaded', function() {
const newsList = document.getElementById('list-news');
const newsList = document.getElementById('news-list');
var listItems = newsList.children;
const newsButton = document.getElementById('list-news-btn');
const newsButton = document.getElementById('news-btn');
const maxVisibleItems = 10; // Maximum number of visible items

if (listItems.length > maxVisibleItems) {
Expand All @@ -18,12 +18,12 @@ document.addEventListener('DOMContentLoaded', function() {
for (var i = 0; i < hiddenItems.length; i++) {
hiddenItems[i].style.display = "block"; // Show hidden items
}
this.textContent = "Collapse"; // Change button text to "Show Less"
this.textContent = "Collapse";
} else {
for (var i = 0; i < hiddenItems.length; i++) {
hiddenItems[i].style.display = "none"; // Hide items again
}
this.textContent = "Expand"; // Change button text back to "Show More"
this.textContent = "Expand";
}
});
});
2 changes: 1 addition & 1 deletion docs/_sass/custom/custom.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
@import "./tables/table-resource.scss";

@import "./custom_images.scss";
@import "./news_lists.scss";
@import "./news.scss";
@import "./snoidepaedia_buttons.scss";
@import "./collapsible_tables.scss";
@import "./custom_tables.scss";
Expand Down
34 changes: 34 additions & 0 deletions docs/_sass/custom/news.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
@import "buttons";
@import "./snoidepaedia_buttons.scss";

#news-list {
background-color: $s-lightergreen;
padding: $sp-2;
padding-left: $sp-7;
border-radius: 16px;
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
margin-bottom: 0;
}

.hidden-news {
display: none;
}

.news-btn {
@extend .btn-small-1;
}

#news-btn {
display: none;
}

.news-btn-container {
background-color: $s-lightergreen;
display: flex;
justify-content: center;
align-items: center;
padding-bottom: $sp-4;
border-bottom-left-radius: 16px;
border-bottom-right-radius: 16px;
}
21 changes: 0 additions & 21 deletions docs/_sass/custom/news_lists.scss

This file was deleted.

12 changes: 7 additions & 5 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,17 @@ Check out my **résumé** above to know more about me!
- *09/2024* - I received my Ph.D. offer from NUS School of Computing.
- *06/2024* - 🏆 I was awarded the **Outstanding Undergraduate Researcher (OUR) Prize** as the best individual undergraduate researcher in NUS.
- *05/2024* - 🎉 Our paper [*Deletion-Anticipative Data Selection with a Limited Budget*](./research/deletion-anticipative-data.md) was accepted to **ICML-24**.
- *02/2024* - 🏆 I was placed in the **Honour List of Student Tutors** by NUS School of Computing.
- *02/2024* - 🏆 I was placed in the **Honour List of Student Tutors** by NUS School of Computing for the academic year 2022 - 2023.
- *02/2024* - I attended **AAAI-24** at Vancouver, Canada.
- *01/2024* - 🏆 I received the NUS School of Computing **Take on the World (STOW) award**.
- *01/2024* - 🏆 I received the NUS **S**chool of Computing **Take on the World (STOW) award**.
- *12/2023* - 🎉 Our paper [*DeRDaVa: Deletion-Robust Data Valuation for Machine Learning*](./research/derdava-deletion-robust.md) was accepted to **AAAI-24**.
- *09/2023* - 🏆 I was admitted to **Turing Programme**.
- *12/2022* - 🏆 I was placed in the **Honour List of Student Tutors** by NUS School of Computing for the academic year 2021 - 2022.
- *08/2020* - I joined National University of Singapore (NUS).
{: #list-news }
{: #news-list }

<div style="display: flex; justify-content: center; align-items: center;">
<button id="list-news-btn" class="list-news-btn">Expand</button>
<div class="news-btn-container">
<button id="news-btn" class="news-btn">Expand</button>
</div>

<script>{% include js/home/control_news_list.js %}</script>

0 comments on commit 896297c

Please sign in to comment.