Skip to content

Commit

Permalink
delete editor workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
sammil98 committed Feb 11, 2025
1 parent 50f7dcc commit 59e07f7
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 36 deletions.
2 changes: 0 additions & 2 deletions static/admin/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ logo_url: "/favicon.png"
media_folder: "assets/images/blog" # Folder untuk menyimpan gambar blog
public_folder: "/images/blog" # Path publik untuk gambar blog

publish_mode: editorial_workflow

collections:
- name: "authors"
label: "Penulis"
Expand Down
34 changes: 0 additions & 34 deletions static/admin/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,39 +9,5 @@
</head>
<body>
<script src="https://unpkg.com/netlify-cms@^2.0.0/dist/netlify-cms.js"></script>
<script>
document.addEventListener('DOMContentLoaded', () => {
netlifyIdentity.init();

netlifyIdentity.on('init', user => {
if (user) {
const role = user.app_metadata.roles[0];
displayFeatures(role);
}
});

netlifyIdentity.on('login', user => {
const role = user.app_metadata.roles[0];
displayFeatures(role);
});

netlifyIdentity.on('logout', () => {
displayFeatures(null);
});

function displayFeatures(role) {
if (role === 'admin') {
document.getElementById('publish-button').style.display = 'block';
document.getElementById('write-button').style.display = 'block';
} else if (role === 'author') {
document.getElementById('publish-button').style.display = 'none';
document.getElementById('write-button').style.display = 'block';
} else {
document.getElementById('publish-button').style.display = 'none';
document.getElementById('write-button').style.display = 'none';
}
}
});
</script>
</body>
</html>

0 comments on commit 59e07f7

Please # to comment.