first commit

This commit is contained in:
Divarahma22 2026-06-16 13:07:14 +07:00
commit 271a1039a8
191 changed files with 45211 additions and 0 deletions

18
.editorconfig Normal file
View File

@ -0,0 +1,18 @@
root = true
[*]
charset = utf-8
end_of_line = lf
indent_size = 4
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true
[*.md]
trim_trailing_whitespace = false
[*.{yml,yaml}]
indent_size = 2
[compose.yaml]
indent_size = 4

65
.env.example Normal file
View File

@ -0,0 +1,65 @@
APP_NAME=Laravel
APP_ENV=local
APP_KEY=
APP_DEBUG=true
APP_URL=http://localhost
APP_LOCALE=en
APP_FALLBACK_LOCALE=en
APP_FAKER_LOCALE=en_US
APP_MAINTENANCE_DRIVER=file
# APP_MAINTENANCE_STORE=database
# PHP_CLI_SERVER_WORKERS=4
BCRYPT_ROUNDS=12
LOG_CHANNEL=stack
LOG_STACK=single
LOG_DEPRECATIONS_CHANNEL=null
LOG_LEVEL=debug
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=web_smk
DB_USERNAME=root
DB_PASSWORD=
SESSION_DRIVER=file
SESSION_LIFETIME=120
SESSION_ENCRYPT=false
SESSION_PATH=/
SESSION_DOMAIN=null
BROADCAST_CONNECTION=log
FILESYSTEM_DISK=local
QUEUE_CONNECTION=database
CACHE_STORE=database
# CACHE_PREFIX=
MEMCACHED_HOST=127.0.0.1
REDIS_CLIENT=phpredis
REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379
MAIL_MAILER=log
MAIL_SCHEME=null
MAIL_HOST=127.0.0.1
MAIL_PORT=2525
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_FROM_ADDRESS="hello@example.com"
MAIL_FROM_NAME="${APP_NAME}"
AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_DEFAULT_REGION=us-east-1
AWS_BUCKET=
AWS_USE_PATH_STYLE_ENDPOINT=false
VITE_APP_NAME="${APP_NAME}"

11
.gitattributes vendored Normal file
View File

@ -0,0 +1,11 @@
* text=auto eol=lf
*.blade.php diff=html
*.css diff=css
*.html diff=html
*.md diff=markdown
*.php diff=php
/.github export-ignore
CHANGELOG.md export-ignore
.styleci.yml export-ignore

24
.gitignore vendored Normal file
View File

@ -0,0 +1,24 @@
*.log
.DS_Store
.env
.env.backup
.env.production
.phpactor.json
.phpunit.result.cache
/.fleet
/.idea
/.nova
/.phpunit.cache
/.vscode
/.zed
/auth.json
/node_modules
/public/build
/public/hot
/public/storage
/storage/*.key
/storage/pail
/vendor
Homestead.json
Homestead.yaml
Thumbs.db

463
ERD-smkberbek.drawio Normal file
View File

@ -0,0 +1,463 @@
<mxfile host="app.diagrams.net">
<diagram name="ERD Fisikal (Physical)" id="ERD-Physical">
<mxGraphModel dx="1413" dy="733" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0">
<root>
<mxCell id="0" />
<mxCell id="1" parent="0" />
<!-- Table: admins -->
<mxCell id="admin" value="admins" style="shape=table;startSize=30;container=1;collapsible=1;childLayout=tableLayout;fixedRows=1;rowLines=0;fontStyle=1;align=center;resizeLast=1;fillColor=#dae8fc;strokeColor=#6c8ebf;" vertex="1" parent="1">
<mxGeometry x="320" y="20" width="200" height="270" as="geometry" />
</mxCell>
<mxCell id="admin_id" value="id (PK)" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;" vertex="1" parent="admin">
<mxGeometry y="30" width="200" height="30" as="geometry" />
</mxCell>
<mxCell id="admin_nama" value="nama_lengkap" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;" vertex="1" parent="admin">
<mxGeometry y="60" width="200" height="30" as="geometry" />
</mxCell>
<mxCell id="admin_email" value="email (Unique)" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;" vertex="1" parent="admin">
<mxGeometry y="90" width="200" height="30" as="geometry" />
</mxCell>
<mxCell id="admin_password" value="password" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;" vertex="1" parent="admin">
<mxGeometry y="120" width="200" height="30" as="geometry" />
</mxCell>
<mxCell id="admin_phone" value="nomor_telepon" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;" vertex="1" parent="admin">
<mxGeometry y="150" width="200" height="30" as="geometry" />
</mxCell>
<mxCell id="admin_photo" value="foto_profil" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;" vertex="1" parent="admin">
<mxGeometry y="180" width="200" height="30" as="geometry" />
</mxCell>
<mxCell id="admin_token" value="remember_token" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;" vertex="1" parent="admin">
<mxGeometry y="210" width="200" height="30" as="geometry" />
</mxCell>
<mxCell id="admin_times" value="timestamps" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;" vertex="1" parent="admin">
<mxGeometry y="240" width="200" height="30" as="geometry" />
</mxCell>
<!-- Table: jurusans -->
<mxCell id="jurusan" value="jurusans" style="shape=table;startSize=30;container=1;collapsible=1;childLayout=tableLayout;fixedRows=1;rowLines=0;fontStyle=1;align=center;resizeLast=1;fillColor=#d5e8d4;strokeColor=#82b366;" vertex="1" parent="1">
<mxGeometry x="40" y="360" width="220" height="270" as="geometry" />
</mxCell>
<mxCell id="jurusan_id" value="id (PK)" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;" vertex="1" parent="jurusan">
<mxGeometry y="30" width="220" height="30" as="geometry" />
</mxCell>
<mxCell id="jurusan_admin" value="admin_id (FK)" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;" vertex="1" parent="jurusan">
<mxGeometry y="60" width="220" height="30" as="geometry" />
</mxCell>
<mxCell id="jurusan_nama" value="nama_jurusan" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;" vertex="1" parent="jurusan">
<mxGeometry y="90" width="220" height="30" as="geometry" />
</mxCell>
<mxCell id="jurusan_desc" value="deskripsi_jurusan" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;" vertex="1" parent="jurusan">
<mxGeometry y="120" width="220" height="30" as="geometry" />
</mxCell>
<mxCell id="jurusan_kode" value="kode_jurusan (Unique)" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;" vertex="1" parent="jurusan">
<mxGeometry y="150" width="220" height="30" as="geometry" />
</mxCell>
<mxCell id="jurusan_status" value="status (Boolean)" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;" vertex="1" parent="jurusan">
<mxGeometry y="180" width="220" height="30" as="geometry" />
</mxCell>
<mxCell id="jurusan_order" value="urutan (Integer)" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;" vertex="1" parent="jurusan">
<mxGeometry y="210" width="220" height="30" as="geometry" />
</mxCell>
<mxCell id="jurusan_times" value="timestamps" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;" vertex="1" parent="jurusan">
<mxGeometry y="240" width="220" height="30" as="geometry" />
</mxCell>
<!-- Table: banners -->
<mxCell id="banner" value="banners" style="shape=table;startSize=30;container=1;collapsible=1;childLayout=tableLayout;fixedRows=1;rowLines=0;fontStyle=1;align=center;resizeLast=1;fillColor=#f5f5f5;strokeColor=#666666;" vertex="1" parent="1">
<mxGeometry x="310" y="360" width="220" height="270" as="geometry" />
</mxCell>
<mxCell id="banner_id" value="id (PK)" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;" vertex="1" parent="banner">
<mxGeometry y="30" width="220" height="30" as="geometry" />
</mxCell>
<mxCell id="banner_admin" value="admin_id (FK)" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;" vertex="1" parent="banner">
<mxGeometry y="60" width="220" height="30" as="geometry" />
</mxCell>
<mxCell id="banner_img" value="gambar" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;" vertex="1" parent="banner">
<mxGeometry y="90" width="220" height="30" as="geometry" />
</mxCell>
<mxCell id="banner_title" value="judul" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;" vertex="1" parent="banner">
<mxGeometry y="120" width="220" height="30" as="geometry" />
</mxCell>
<mxCell id="banner_desc" value="deskripsi" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;" vertex="1" parent="banner">
<mxGeometry y="150" width="220" height="30" as="geometry" />
</mxCell>
<mxCell id="banner_status" value="status (Boolean)" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;" vertex="1" parent="banner">
<mxGeometry y="180" width="220" height="30" as="geometry" />
</mxCell>
<mxCell id="banner_order" value="urutan (Integer)" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;" vertex="1" parent="banner">
<mxGeometry y="210" width="220" height="30" as="geometry" />
</mxCell>
<mxCell id="banner_times" value="timestamps" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;" vertex="1" parent="banner">
<mxGeometry y="240" width="220" height="30" as="geometry" />
</mxCell>
<!-- Table: fasilitas -->
<mxCell id="fasilitas" value="fasilitas" style="shape=table;startSize=30;container=1;collapsible=1;childLayout=tableLayout;fixedRows=1;rowLines=0;fontStyle=1;align=center;resizeLast=1;fillColor=#ffe6cc;strokeColor=#d79b00;" vertex="1" parent="1">
<mxGeometry x="580" y="360" width="220" height="270" as="geometry" />
</mxCell>
<mxCell id="fasilitas_id" value="id (PK)" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;" vertex="1" parent="fasilitas">
<mxGeometry y="30" width="220" height="30" as="geometry" />
</mxCell>
<mxCell id="fasilitas_admin" value="admin_id (FK)" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;" vertex="1" parent="fasilitas">
<mxGeometry y="60" width="220" height="30" as="geometry" />
</mxCell>
<mxCell id="fasilitas_nama" value="nama_fasilitas" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;" vertex="1" parent="fasilitas">
<mxGeometry y="90" width="220" height="30" as="geometry" />
</mxCell>
<mxCell id="fasilitas_desc" value="deskripsi_fasilitas" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;" vertex="1" parent="fasilitas">
<mxGeometry y="120" width="220" height="30" as="geometry" />
</mxCell>
<mxCell id="fasilitas_foto" value="foto_fasilitas" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;" vertex="1" parent="fasilitas">
<mxGeometry y="150" width="220" height="30" as="geometry" />
</mxCell>
<mxCell id="fasilitas_status" value="status (Boolean)" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;" vertex="1" parent="fasilitas">
<mxGeometry y="180" width="220" height="30" as="geometry" />
</mxCell>
<mxCell id="fasilitas_order" value="urutan (Integer)" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;" vertex="1" parent="fasilitas">
<mxGeometry y="210" width="220" height="30" as="geometry" />
</mxCell>
<mxCell id="fasilitas_times" value="timestamps" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;" vertex="1" parent="fasilitas">
<mxGeometry y="240" width="220" height="30" as="geometry" />
</mxCell>
<!-- Table: galleries -->
<mxCell id="gallery" value="galleries" style="shape=table;startSize=30;container=1;collapsible=1;childLayout=tableLayout;fixedRows=1;rowLines=0;fontStyle=1;align=center;resizeLast=1;fillColor=#f5f5f5;strokeColor=#666666;" vertex="1" parent="1">
<mxGeometry x="40" y="680" width="220" height="270" as="geometry" />
</mxCell>
<mxCell id="gallery_id" value="id (PK)" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;" vertex="1" parent="gallery">
<mxGeometry y="30" width="220" height="30" as="geometry" />
</mxCell>
<mxCell id="gallery_admin" value="admin_id (FK)" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;" vertex="1" parent="gallery">
<mxGeometry y="60" width="220" height="30" as="geometry" />
</mxCell>
<mxCell id="gallery_nama" value="nama_gallery" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;" vertex="1" parent="gallery">
<mxGeometry y="90" width="220" height="30" as="geometry" />
</mxCell>
<mxCell id="gallery_desc" value="deskripsi_gallery" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;" vertex="1" parent="gallery">
<mxGeometry y="120" width="220" height="30" as="geometry" />
</mxCell>
<mxCell id="gallery_foto" value="foto_gallery" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;" vertex="1" parent="gallery">
<mxGeometry y="150" width="220" height="30" as="geometry" />
</mxCell>
<mxCell id="gallery_status" value="status (Boolean)" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;" vertex="1" parent="gallery">
<mxGeometry y="180" width="220" height="30" as="geometry" />
</mxCell>
<mxCell id="gallery_order" value="urutan (Integer)" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;" vertex="1" parent="gallery">
<mxGeometry y="210" width="220" height="30" as="geometry" />
</mxCell>
<mxCell id="gallery_times" value="timestamps" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;" vertex="1" parent="gallery">
<mxGeometry y="240" width="220" height="30" as="geometry" />
</mxCell>
<!-- Table: pengajars -->
<mxCell id="pengajar" value="pengajars" style="shape=table;startSize=30;container=1;collapsible=1;childLayout=tableLayout;fixedRows=1;rowLines=0;fontStyle=1;align=center;resizeLast=1;fillColor=#d5e8d4;strokeColor=#82b366;" vertex="1" parent="1">
<mxGeometry x="310" y="680" width="220" height="300" as="geometry" />
</mxCell>
<mxCell id="pengajar_id" value="id (PK)" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;" vertex="1" parent="pengajar">
<mxGeometry y="30" width="220" height="30" as="geometry" />
</mxCell>
<mxCell id="pengajar_admin" value="admin_id (FK)" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;" vertex="1" parent="pengajar">
<mxGeometry y="60" width="220" height="30" as="geometry" />
</mxCell>
<mxCell id="pengajar_jurusan" value="jurusan_id (FK, Nullable)" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;" vertex="1" parent="pengajar">
<mxGeometry y="90" width="220" height="30" as="geometry" />
</mxCell>
<mxCell id="pengajar_nama" value="nama_pengajar" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;" vertex="1" parent="pengajar">
<mxGeometry y="120" width="220" height="30" as="geometry" />
</mxCell>
<mxCell id="pengajar_nip" value="nip" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;" vertex="1" parent="pengajar">
<mxGeometry y="150" width="220" height="30" as="geometry" />
</mxCell>
<mxCell id="pengajar_jabatan" value="jabatan" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;" vertex="1" parent="pengajar">
<mxGeometry y="180" width="220" height="30" as="geometry" />
</mxCell>
<mxCell id="pengajar_foto" value="foto_pengajar" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;" vertex="1" parent="pengajar">
<mxGeometry y="210" width="220" height="30" as="geometry" />
</mxCell>
<mxCell id="pengajar_status" value="status (Boolean)" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;" vertex="1" parent="pengajar">
<mxGeometry y="240" width="220" height="30" as="geometry" />
</mxCell>
<mxCell id="pengajar_times" value="timestamps" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;" vertex="1" parent="pengajar">
<mxGeometry y="270" width="220" height="30" as="geometry" />
</mxCell>
<!-- Table: prestasis -->
<mxCell id="prestasi" value="prestasis" style="shape=table;startSize=30;container=1;collapsible=1;childLayout=tableLayout;fixedRows=1;rowLines=0;fontStyle=1;align=center;resizeLast=1;fillColor=#f8cecc;strokeColor=#b85450;" vertex="1" parent="1">
<mxGeometry x="580" y="680" width="220" height="330" as="geometry" />
</mxCell>
<mxCell id="prestasi_id" value="id (PK)" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;" vertex="1" parent="prestasi">
<mxGeometry y="30" width="220" height="30" as="geometry" />
</mxCell>
<mxCell id="prestasi_admin" value="admin_id (FK)" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;" vertex="1" parent="prestasi">
<mxGeometry y="60" width="220" height="30" as="geometry" />
</mxCell>
<mxCell id="prestasi_jurusan" value="jurusan_id (FK)" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;" vertex="1" parent="prestasi">
<mxGeometry y="90" width="220" height="30" as="geometry" />
</mxCell>
<mxCell id="prestasi_siswa" value="nama_siswa" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;" vertex="1" parent="prestasi">
<mxGeometry y="120" width="220" height="30" as="geometry" />
</mxCell>
<mxCell id="prestasi_nama" value="nama_prestasi" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;" vertex="1" parent="prestasi">
<mxGeometry y="150" width="220" height="30" as="geometry" />
</mxCell>
<mxCell id="prestasi_peringkat" value="peringkat" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;" vertex="1" parent="prestasi">
<mxGeometry y="180" width="220" height="30" as="geometry" />
</mxCell>
<mxCell id="prestasi_tahun" value="tahun_prestasi (Integer)" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;" vertex="1" parent="prestasi">
<mxGeometry y="210" width="220" height="30" as="geometry" />
</mxCell>
<mxCell id="prestasi_foto" value="foto_prestasi" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;" vertex="1" parent="prestasi">
<mxGeometry y="240" width="220" height="30" as="geometry" />
</mxCell>
<mxCell id="prestasi_status" value="status (Boolean)" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;" vertex="1" parent="prestasi">
<mxGeometry y="270" width="220" height="30" as="geometry" />
</mxCell>
<mxCell id="prestasi_times" value="timestamps" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;" vertex="1" parent="prestasi">
<mxGeometry y="300" width="220" height="30" as="geometry" />
</mxCell>
<!-- Table: pengumuman -->
<mxCell id="pengumuman" value="pengumuman" style="shape=table;startSize=30;container=1;collapsible=1;childLayout=tableLayout;fixedRows=1;rowLines=0;fontStyle=1;align=center;resizeLast=1;fillColor=#ffe6cc;strokeColor=#d79b00;" vertex="1" parent="1">
<mxGeometry x="40" y="1000" width="220" height="270" as="geometry" />
</mxCell>
<mxCell id="pengumuman_id" value="id (PK)" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;" vertex="1" parent="pengumuman">
<mxGeometry y="30" width="220" height="30" as="geometry" />
</mxCell>
<mxCell id="pengumuman_admin" value="admin_id (FK)" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;" vertex="1" parent="pengumuman">
<mxGeometry y="60" width="220" height="30" as="geometry" />
</mxCell>
<mxCell id="pengumuman_nama" value="nama_pengumuman" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;" vertex="1" parent="pengumuman">
<mxGeometry y="90" width="220" height="30" as="geometry" />
</mxCell>
<mxCell id="pengumuman_desc" value="deskripsi_pengumuman" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;" vertex="1" parent="pengumuman">
<mxGeometry y="120" width="220" height="30" as="geometry" />
</mxCell>
<mxCell id="pengumuman_foto" value="foto_pengumuman" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;" vertex="1" parent="pengumuman">
<mxGeometry y="150" width="220" height="30" as="geometry" />
</mxCell>
<mxCell id="pengumuman_status" value="status (Boolean)" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;" vertex="1" parent="pengumuman">
<mxGeometry y="180" width="220" height="30" as="geometry" />
</mxCell>
<mxCell id="pengumuman_order" value="urutan (Integer)" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;" vertex="1" parent="pengumuman">
<mxGeometry y="210" width="220" height="30" as="geometry" />
</mxCell>
<mxCell id="pengumuman_times" value="timestamps" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;" vertex="1" parent="pengumuman">
<mxGeometry y="240" width="220" height="30" as="geometry" />
</mxCell>
<!-- Table: strukturs -->
<mxCell id="struktur" value="strukturs" style="shape=table;startSize=30;container=1;collapsible=1;childLayout=tableLayout;fixedRows=1;rowLines=0;fontStyle=1;align=center;resizeLast=1;fillColor=#f5f5f5;strokeColor=#666666;" vertex="1" parent="1">
<mxGeometry x="310" y="1000" width="220" height="180" as="geometry" />
</mxCell>
<mxCell id="struktur_id" value="id (PK)" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;" vertex="1" parent="struktur">
<mxGeometry y="30" width="220" height="30" as="geometry" />
</mxCell>
<mxCell id="struktur_admin" value="admin_id (FK)" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;" vertex="1" parent="struktur">
<mxGeometry y="60" width="220" height="30" as="geometry" />
</mxCell>
<mxCell id="struktur_img" value="gambar_struktur" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;" vertex="1" parent="struktur">
<mxGeometry y="90" width="220" height="30" as="geometry" />
</mxCell>
<mxCell id="struktur_status" value="status (Boolean)" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;" vertex="1" parent="struktur">
<mxGeometry y="120" width="220" height="30" as="geometry" />
</mxCell>
<mxCell id="struktur_times" value="timestamps" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;" vertex="1" parent="struktur">
<mxGeometry y="150" width="220" height="30" as="geometry" />
</mxCell>
<!-- Relationships -->
<!-- admin -> jurusans -->
<mxCell id="rel_admin_jurusan" value="1:N" style="endArrow=diamondThin;endFill=0;endSize=16;html=1;exitX=0.5;exitY=1;entryX=0.5;entryY=0;exitDx=0;exitDy=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="admin" target="jurusan">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="420" y="320" />
<mxPoint x="150" y="320" />
</Array>
</mxGeometry>
</mxCell>
<!-- admin -> banners -->
<mxCell id="rel_admin_banner" value="1:N" style="endArrow=diamondThin;endFill=0;endSize=16;html=1;exitX=0.5;exitY=1;entryX=0.5;entryY=0;exitDx=0;exitDy=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="admin" target="banner">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="420" y="320" />
</Array>
</mxGeometry>
</mxCell>
<!-- admin -> fasilitas -->
<mxCell id="rel_admin_fasilitas" value="1:N" style="endArrow=diamondThin;endFill=0;endSize=16;html=1;exitX=0.5;exitY=1;entryX=0.5;entryY=0;exitDx=0;exitDy=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="admin" target="fasilitas">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="420" y="320" />
<mxPoint x="690" y="320" />
</Array>
</mxGeometry>
</mxCell>
<!-- admin -> galleries -->
<mxCell id="rel_admin_gallery" value="1:N" style="endArrow=diamondThin;endFill=0;endSize=16;html=1;exitX=0.5;exitY=1;entryX=0;entryY=0.5;exitDx=0;exitDy=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="admin" target="gallery">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="420" y="320" />
<mxPoint x="20" y="320" />
<mxPoint x="20" y="815" />
</Array>
</mxGeometry>
</mxCell>
<!-- admin -> pengajars -->
<mxCell id="rel_admin_pengajar" value="1:N" style="endArrow=diamondThin;endFill=0;endSize=16;html=1;exitX=1;exitY=0.5;entryX=1;entryY=0.5;exitDx=0;exitDy=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="admin" target="pengajar">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="550" y="155" />
<mxPoint x="550" y="830" />
</Array>
</mxGeometry>
</mxCell>
<!-- admin -> prestasis -->
<mxCell id="rel_admin_prestasi" value="1:N" style="endArrow=diamondThin;endFill=0;endSize=16;html=1;exitX=1;exitY=0.25;entryX=1;entryY=0.5;exitDx=0;exitDy=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="admin" target="prestasi">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="830" y="87.5" />
<mxPoint x="830" y="845" />
</Array>
</mxGeometry>
</mxCell>
<!-- admin -> pengumuman -->
<mxCell id="rel_admin_pengumuman" value="1:N" style="endArrow=diamondThin;endFill=0;endSize=16;html=1;exitX=0;exitY=0.5;entryX=0;entryY=0.5;exitDx=0;exitDy=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="admin" target="pengumuman">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="10" y="155" />
<mxPoint x="10" y="1135" />
</Array>
</mxGeometry>
</mxCell>
<!-- admin -> strukturs -->
<mxCell id="rel_admin_struktur" value="1:N" style="endArrow=diamondThin;endFill=0;endSize=16;html=1;exitX=1;exitY=0.75;entryX=1;entryY=0.5;exitDx=0;exitDy=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="admin" target="struktur">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="550" y="222.5" />
<mxPoint x="550" y="1090" />
</Array>
</mxGeometry>
</mxCell>
<!-- jurusan -> pengajars -->
<mxCell id="rel_jurusan_pengajar" value="1:N" style="endArrow=diamondThin;endFill=0;endSize=16;html=1;exitX=0.5;exitY=1;entryX=0;entryY=0.25;exitDx=0;exitDy=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="jurusan" target="pengajar">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="150" y="755" />
</Array>
</mxGeometry>
</mxCell>
<!-- jurusan -> prestasis -->
<mxCell id="rel_jurusan_prestasi" value="1:N" style="endArrow=diamondThin;endFill=0;endSize=16;html=1;exitX=0.5;exitY=1;entryX=0.5;entryY=0;exitDx=0;exitDy=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="jurusan" target="prestasi">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="150" y="650" />
<mxPoint x="690" y="650" />
</Array>
</mxGeometry>
</mxCell>
</root>
</mxGraphModel>
</diagram>
<diagram name="ERD Konseptual (Conceptual)" id="ERD-Conceptual">
<mxGraphModel dx="1413" dy="733" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0">
<root>
<mxCell id="0" />
<mxCell id="1" parent="0" />
<!-- Entity: Admin -->
<mxCell id="c_admin" value="Admin" style="whiteSpace=wrap;html=1;align=center;fillColor=#dae8fc;strokeColor=#6c8ebf;fontStyle=1" vertex="1" parent="1">
<mxGeometry x="360" y="300" width="120" height="60" as="geometry" />
</mxCell>
<!-- Relationship: Mengelola -->
<mxCell id="r_manage" value="Mengelola" style="rhombus;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;" vertex="1" parent="1">
<mxGeometry x="380" y="440" width="80" height="80" as="geometry" />
</mxCell>
<!-- Entities managed by Admin -->
<mxCell id="c_jurusan" value="Jurusan" style="whiteSpace=wrap;html=1;align=center;fillColor=#d5e8d4;strokeColor=#82b366;fontStyle=1" vertex="1" parent="1">
<mxGeometry x="100" y="560" width="100" height="50" as="geometry" />
</mxCell>
<mxCell id="c_banner" value="Banner" style="whiteSpace=wrap;html=1;align=center;fillColor=#f5f5f5;strokeColor=#666666;fontStyle=1" vertex="1" parent="1">
<mxGeometry x="220" y="560" width="100" height="50" as="geometry" />
</mxCell>
<mxCell id="c_fasilitas" value="Fasilitas" style="whiteSpace=wrap;html=1;align=center;fillColor=#ffe6cc;strokeColor=#d79b00;fontStyle=1" vertex="1" parent="1">
<mxGeometry x="340" y="560" width="100" height="50" as="geometry" />
</mxCell>
<mxCell id="c_gallery" value="Gallery" style="whiteSpace=wrap;html=1;align=center;fillColor=#f5f5f5;strokeColor=#666666;fontStyle=1" vertex="1" parent="1">
<mxGeometry x="460" y="560" width="100" height="50" as="geometry" />
</mxCell>
<mxCell id="c_pengumuman" value="Pengumuman" style="whiteSpace=wrap;html=1;align=center;fillColor=#ffe6cc;strokeColor=#d79b00;fontStyle=1" vertex="1" parent="1">
<mxGeometry x="580" y="560" width="100" height="50" as="geometry" />
</mxCell>
<mxCell id="c_struktur" value="Struktur" style="whiteSpace=wrap;html=1;align=center;fillColor=#f5f5f5;strokeColor=#666666;fontStyle=1" vertex="1" parent="1">
<mxGeometry x="700" y="560" width="100" height="50" as="geometry" />
</mxCell>
<!-- Entities related to Jurusan -->
<mxCell id="c_pengajar" value="Pengajar" style="whiteSpace=wrap;html=1;align=center;fillColor=#d5e8d4;strokeColor=#82b366;fontStyle=1" vertex="1" parent="1">
<mxGeometry x="40" y="760" width="100" height="50" as="geometry" />
</mxCell>
<mxCell id="c_prestasi" value="Prestasi" style="whiteSpace=wrap;html=1;align=center;fillColor=#f8cecc;strokeColor=#b85450;fontStyle=1" vertex="1" parent="1">
<mxGeometry x="160" y="760" width="100" height="50" as="geometry" />
</mxCell>
<!-- Relationship: Memiliki -->
<mxCell id="r_has" value="Memiliki" style="rhombus;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;" vertex="1" parent="1">
<mxGeometry x="110" y="660" width="80" height="60" as="geometry" />
</mxCell>
<!-- Connections -->
<mxCell id="l1" edge="1" parent="1" source="c_admin" target="r_manage">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="l2" edge="1" parent="1" source="r_manage" target="c_jurusan">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="l3" edge="1" parent="1" source="r_manage" target="c_banner">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="l4" edge="1" parent="1" source="r_manage" target="c_fasilitas">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="l5" edge="1" parent="1" source="r_manage" target="c_gallery">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="l6" edge="1" parent="1" source="r_manage" target="c_pengumuman">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="l7" edge="1" parent="1" source="r_manage" target="c_struktur">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="l8" edge="1" parent="1" source="c_jurusan" target="r_has">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="l9" edge="1" parent="1" source="r_has" target="c_pengajar">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="l10" edge="1" parent="1" source="r_has" target="c_prestasi">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<!-- N:M labels or 1:N labels -->
<mxCell id="t1" value="1" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
<mxGeometry x="420" y="360" width="30" height="30" as="geometry" />
</mxCell>
<mxCell id="t2" value="N" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
<mxGeometry x="420" y="520" width="30" height="30" as="geometry" />
</mxCell>
<mxCell id="t3" value="1" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
<mxGeometry x="150" y="610" width="30" height="30" as="geometry" />
</mxCell>
<mxCell id="t4" value="N" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
<mxGeometry x="150" y="720" width="30" height="30" as="geometry" />
</mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>

126
README.md Normal file
View File

@ -0,0 +1,126 @@
# Website SMK Muhammadiyah 1 Berbek 🏫
[![Laravel](https://img.shields.io/badge/Laravel-11.x-brightgreen)](https://laravel.com)
[![PHP](https://img.shields.io/badge/PHP-8.1+-blue)](https://php.net)
Platform profil sekolah berbasis **Laravel** lengkap dengan panel admin untuk mengelola semua konten publik secara dinamis.
## ✨ Fitur Utama
### 📱 Halaman Publik
- 🏠 **Landing page** dengan banner dinamis
- 👥 **Profil sekolah** dengan struktur organisasi
- 🏆 **Prestasi** siswa dan sekolah
- 📢 **Pengumuman** terbaru
### 🛠️ Panel Admin (Full CRUD)
- 📊 **Dashboard** dengan statistik
- 🖼️ **Manajemen Banner** (upload gambar)
- 📈 **Manajemen Struktur Organisasi** (upload foto)
- 📢 **Manajemen Pengumuman** (upload gambar)
- 🏢 **Manajemen Fasilitas** (upload foto)
- 🏆 **Manajemen Prestasi** (upload gambar)
- 🎓 **Manajemen Jurusan**
- 👨‍🏫 **Manajemen Tenaga Pendidik** (upload foto)
- 🖼️ **Manajemen Gallery** (upload gambar)
- 👮 **Manajemen Admin** (CRUD user admin)
- ⚙️ **Pengaturan** (profil & ganti password)
### 🔐 Autentikasi Admin
- Login admin
- Forgot password & reset password via email
## 🧰 Teknologi Stack
- **Backend:** Laravel 11.x, PHP 8.1+
- **Frontend:** Blade Templates, Bootstrap 5, Font Awesome
- **Build:** Vite + npm
- **Database:** MySQL / MariaDB
- **Assets:** Upload gambar ke `public/images/*`
## ✅ Prasyarat
- PHP 8.1+
- Composer
- Node.js 18+ + npm
- MySQL 8.0+ / MariaDB
- **XAMPP** (sudah siap di `c:/xampp/htdocs/web-smk`)
## 🚀 Instalasi & Setup
1. **Install dependencies:**
```bash
composer install --optimize-autoloader --no-dev
npm install
```
2. **Environment setup:**
```bash
copy .env.example .env
php artisan key:generate
```
3. **Database config** di `.env` (XAMPP default):
```env
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=web_smk_muhammadiyah
DB_USERNAME=root
DB_PASSWORD=
```
4. **Migrasi & Seed data awal:**
```bash
php artisan migrate --seed
```
5. **Jalankan development server:**
```bash
php artisan serve
npm run dev # di terminal lain
```
Akses app di **`http://localhost:8000`**.
## 👤 Akun Admin Default (dari Seeder)
| Email | Password |
|------------------------|-----------|
| `diva.rahma@smk.com` | `password` |
| `admin@smk.com` | `password` |
**Login:** `/admin/login`
## 🗺️ Rute Penting
| Route | Deskripsi |
|------------------------|-----------------------|
| `/` | Landing Page |
| `/profil` | Profil Sekolah |
| `/prestasi` | Daftar Prestasi |
| `/pengumuman` | Daftar Pengumuman |
| `/admin/dashboard` | Admin Dashboard |
## 📁 Struktur Folder Utama
```
public/images/
├── banner/ # Banner landing
├── fasilitas/ # Foto fasilitas
├── gallery/ # Galeri sekolah
├── guru/ # Foto pengajar
├── prestasi/ # Gambar prestasi
├── struktur/ # Foto struktur organisasi
└── ...
```
## 🧪 Testing
```bash
php artisan test
```
## 🤝 Kontribusi
1. Fork repo & buat branch `feature/xxx`
2. Commit dengan format: `feat/module: deskripsi` atau `fix/bug: deskripsi`
3. Push & buka Pull Request
**Terima kasih telah berkontribusi! 🎉**
## 📄 Lisensi
[MIT](LICENSE)

View File

@ -0,0 +1,149 @@
<?php
namespace App\Http\Controllers;
use App\Models\Admin;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Hash;
use Illuminate\Support\Facades\Validator;
class AuthController extends Controller
{
/**
* Get current logged in admin
*/
public function getCurrentAdmin()
{
$admin = Auth::guard('admin')->user();
return response()->json([
'success' => true,
'admin' => [
'id' => $admin->id,
'nama_lengkap' => $admin->nama_lengkap,
'email' => $admin->email,
'foto_profil' => $admin->foto_profil ? asset('images/photo/' . $admin->foto_profil) : null,
]
]);
}
/**
* Show login form
*/
public function showLoginForm()
{
return view('auth.login');
}
/**
* Handle login request
*/
public function login(Request $request)
{
// Validasi input
$validator = Validator::make($request->all(), [
'email' => 'required|email',
'password' => 'required|min:6',
], [
'email.required' => 'Email harus diisi',
'email.email' => 'Format email tidak valid',
'password.required' => 'Password harus diisi',
'password.min' => 'Password minimal 6 karakter',
]);
if ($validator->fails()) {
return redirect()->back()
->withErrors($validator)
->withInput($request->except('password'));
}
// Coba login
$credentials = $request->only('email', 'password');
if (Auth::guard('admin')->attempt($credentials, $request->filled('remember'))) {
$request->session()->regenerate();
return redirect()->intended(route('admin.dashboard'))
->with('success', 'Login berhasil! Selamat datang.');
}
return redirect()->back()
->with('error', 'Email atau password salah!')
->withInput($request->except('password'));
}
/**
* Handle logout request
*/
public function logout(Request $request)
{
Auth::guard('admin')->logout();
$request->session()->invalidate();
$request->session()->regenerateToken();
return redirect()->route('login')
->with('success', 'Logout berhasil!');
}
/**
* Show forgot password form
*/
public function showForgotPasswordForm()
{
return view('auth.forgot-password');
}
/**
* Process forgot password request
*/
public function processForgotPassword(Request $request)
{
$request->validate([
'email' => 'required|email',
], [
'email.required' => 'Email harus diisi',
'email.email' => 'Format email tidak valid',
]);
$admin = Admin::where('email', $request->email)->first();
if ($admin) {
return redirect()->route('password.reset', ['email' => $request->email]);
}
return redirect()->back()->with('swal_error', 'Email yang Anda masukkan tidak terdaftar dalam sistem. Harap masukkan email yang sudah terdaftar!');
}
/**
* Show reset password form
*/
public function showResetPasswordForm($email)
{
return view('auth.reset-password', compact('email'));
}
/**
* Process reset password request
*/
public function processResetPassword(Request $request)
{
$request->validate([
'email' => 'required|email|exists:admins,email',
'password' => 'required|min:6|confirmed',
], [
'email.required' => 'Email harus diisi',
'email.exists' => 'Email tidak terdaftar',
'password.required' => 'Password baru harus diisi',
'password.min' => 'Password minimal 6 karakter',
'password.confirmed' => 'Konfirmasi password tidak cocok',
]);
$admin = Admin::where('email', $request->email)->first();
$admin->password = Hash::make($request->password);
$admin->save();
return redirect()->route('login')->with('swal_success', 'Perubahan password baru berhasil dilakukan!');
}
}

View File

@ -0,0 +1,8 @@
<?php
namespace App\Http\Controllers;
abstract class Controller
{
//
}

View File

@ -0,0 +1,77 @@
<?php
namespace App\Http\Controllers;
use App\Models\Jurusan;
use App\Models\Pengajar;
use App\Models\Fasilitas;
use App\Models\Prestasi;
use App\Models\Pengumuman;
use App\Models\Gallery;
use App\Models\Struktur;
use App\Models\Banner;
use Illuminate\Http\Request;
class DashboardController extends Controller
{
public function index()
{
$totalJurusan = Jurusan::active()->count();
$totalPengajar = Pengajar::active()->count();
$totalFasilitas = Fasilitas::active()->count();
$totalPrestasi = Prestasi::active()->count();
$totalPengumuman = Pengumuman::active()->count();
$totalGallery = Gallery::active()->count();
$totalStruktur = Struktur::active()->count();
$totalBanner = Banner::active()->count();
$prestasiPerTahun = Prestasi::active()
->selectRaw('tahun_prestasi, COUNT(*) as total')
->groupBy('tahun_prestasi')
->orderBy('tahun_prestasi')
->get();
$pengumumanPerBulan = Pengumuman::active()
->where('created_at', '>=', now()->subMonths(6))
->selectRaw('YEAR(created_at) as tahun, MONTH(created_at) as bulan, COUNT(*) as total')
->groupBy('tahun', 'bulan')
->orderBy('tahun')
->orderBy('bulan')
->get();
$latestPrestasi = Prestasi::active()->ordered()->take(5)->get();
$latestPengumuman = Pengumuman::active()->ordered()->take(5)->get();
return view('admin.dashboard.index', compact(
'totalJurusan',
'totalPengajar',
'totalFasilitas',
'totalPrestasi',
'totalPengumuman',
'totalGallery',
'totalStruktur',
'totalBanner',
'prestasiPerTahun',
'pengumumanPerBulan',
'latestPrestasi',
'latestPengumuman'
));
}
public function getChartData()
{
$prestasiData = Prestasi::active()
->selectRaw('tahun_prestasi, COUNT(*) as total')
->groupBy('tahun_prestasi')
->orderBy('tahun_prestasi')
->get();
$labels = $prestasiData->pluck('tahun_prestasi');
$data = $prestasiData->pluck('total');
return response()->json([
'labels' => $labels,
'data' => $data
]);
}
}

View File

@ -0,0 +1,29 @@
<?php
namespace App\Http\Controllers;
use App\Models\Banner;
use App\Models\Fasilitas;
use App\Models\Gallery;
use App\Models\Jurusan;
use App\Models\Pengajar;
use App\Models\Pengumuman;
use App\Models\Prestasi;
class IndexController extends Controller
{
public function index()
{
$jumlahFasilitas = Fasilitas::active()->count();
$jumlahPengajar = Pengajar::active()->count();
$jumlahJurusan = Jurusan::active()->count();
$jumlahPrestasi = Prestasi::active()->count();
$banners = Banner::active()->ordered()->get();
$pengumumans = Pengumuman::active()->ordered()->get();
$fasilitas = Fasilitas::active()->ordered()->get();
$galleries = Gallery::active()->ordered()->get();
$jurusan = Jurusan::active()->ordered()->get();
return view('index', compact('banners', 'fasilitas', 'galleries', 'jurusan', 'pengumumans', 'jumlahJurusan', 'jumlahPengajar', 'jumlahPrestasi', 'jumlahFasilitas'));
}
}

View File

@ -0,0 +1,249 @@
<?php
namespace App\Http\Controllers;
use App\Models\Admin;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Hash;
use Illuminate\Support\Facades\Validator;
use Illuminate\Validation\Rule;
class ManajemenAdminController extends Controller
{
/**
* Display a listing of the resource.
*/
public function index()
{
$admins = Admin::where('id', '!=', auth()->guard('admin')->id())->get();
return view('admin.manajemen-admin.index', compact('admins'));
}
/**
* Store a newly created resource in storage.
*/
public function store(Request $request)
{
$validator = Validator::make($request->all(), [
'nama_lengkap' => 'required|string|max:255',
'email' => 'required|email|unique:admins,email',
'nomor_telepon' => 'nullable|string|max:15',
'password' => 'required|min:6|confirmed',
'foto_profil' => 'nullable|image|mimes:jpeg,png,jpg,gif|max:2048',
], [
'nama_lengkap.required' => 'Nama lengkap harus diisi',
'email.required' => 'Email harus diisi',
'email.email' => 'Format email tidak valid',
'email.unique' => 'Email sudah digunakan',
'password.required' => 'Password harus diisi',
'password.min' => 'Password minimal 6 karakter',
'password.confirmed' => 'Konfirmasi password tidak cocok',
'foto_profil.image' => 'File harus berupa gambar',
'foto_profil.mimes' => 'Format gambar harus jpeg, png, jpg, atau gif',
'foto_profil.max' => 'Ukuran gambar maksimal 2MB',
]);
if ($validator->fails()) {
return response()->json([
'success' => false,
'message' => 'Validasi gagal',
'errors' => $validator->errors()
], 422);
}
try {
$data = [
'nama_lengkap' => $request->nama_lengkap,
'email' => $request->email,
'password' => Hash::make($request->password),
'nomor_telepon' => $request->nomor_telepon,
];
if ($request->hasFile('foto_profil')) {
$file = $request->file('foto_profil');
$fileName = time() . '_' . uniqid() . '.' . $file->getClientOriginalExtension();
$file->move(public_path('images/photo'), $fileName);
$data['foto_profil'] = $fileName;
}
$admin = Admin::create($data);
return response()->json([
'success' => true,
'message' => 'Admin berhasil ditambahkan!',
'admin' => [
'id' => $admin->id,
'nama_lengkap' => $admin->nama_lengkap,
'email' => $admin->email,
'nomor_telepon' => $admin->nomor_telepon,
'foto_profil' => $admin->foto_profil ? asset('images/photo/' . $admin->foto_profil) : null,
'created_at' => $admin->created_at->format('d M Y'),
]
]);
} catch (\Exception $e) {
return response()->json([
'success' => false,
'message' => 'Terjadi kesalahan: ' . $e->getMessage()
], 500);
}
}
/**
* Display the specified resource.
*/
public function show(Admin $admin)
{
return response()->json([
'success' => true,
'admin' => [
'id' => $admin->id,
'nama_lengkap' => $admin->nama_lengkap,
'email' => $admin->email,
'nomor_telepon' => $admin->nomor_telepon,
'foto_profil' => $admin->foto_profil ? asset('images/photo/' . $admin->foto_profil) : null,
'created_at' => $admin->created_at->format('d F Y'),
'updated_at' => $admin->updated_at->format('d F Y'),
]
]);
}
/**
* Update the specified resource in storage.
*/
public function update(Request $request, Admin $admin)
{
$validator = Validator::make($request->all(), [
'nama_lengkap' => 'required|string|max:255',
'email' => [
'required',
'email',
Rule::unique('admins')->ignore($admin->id)
],
'nomor_telepon' => 'nullable|string|max:15',
'foto_profil' => 'nullable|image|mimes:jpeg,png,jpg,gif|max:2048',
], [
'nama_lengkap.required' => 'Nama lengkap harus diisi',
'email.required' => 'Email harus diisi',
'email.email' => 'Format email tidak valid',
'email.unique' => 'Email sudah digunakan',
'foto_profil.image' => 'File harus berupa gambar',
'foto_profil.mimes' => 'Format gambar harus jpeg, png, jpg, atau gif',
'foto_profil.max' => 'Ukuran gambar maksimal 2MB',
]);
if ($validator->fails()) {
return response()->json([
'success' => false,
'message' => 'Validasi gagal',
'errors' => $validator->errors()
], 422);
}
try {
$data = [
'nama_lengkap' => $request->nama_lengkap,
'email' => $request->email,
'nomor_telepon' => $request->nomor_telepon,
];
// Handle foto profil upload
if ($request->hasFile('foto_profil')) {
// Hapus foto lama jika ada
if ($admin->foto_profil && file_exists(public_path('images/photo/' . $admin->foto_profil))) {
unlink(public_path('images/photo/' . $admin->foto_profil));
}
$file = $request->file('foto_profil');
$fileName = time() . '_' . uniqid() . '.' . $file->getClientOriginalExtension();
$file->move(public_path('images/photo'), $fileName);
$data['foto_profil'] = $fileName;
}
$admin->update($data);
return response()->json([
'success' => true,
'message' => 'Data admin berhasil diperbarui!',
'admin' => [
'id' => $admin->id,
'nama_lengkap' => $admin->nama_lengkap,
'email' => $admin->email,
'nomor_telepon' => $admin->nomor_telepon,
'foto_profil' => $admin->foto_profil ? asset('images/photo/' . $admin->foto_profil) : null,
'updated_at' => $admin->updated_at->format('d M Y'),
]
]);
} catch (\Exception $e) {
return response()->json([
'success' => false,
'message' => 'Terjadi kesalahan: ' . $e->getMessage()
], 500);
}
}
/**
* Remove the specified resource from storage.
*/
public function destroy(Admin $admin)
{
try {
if ($admin->foto_profil && file_exists(public_path('images/photo/' . $admin->foto_profil))) {
unlink(public_path('images/photo/' . $admin->foto_profil));
}
$admin->delete();
return response()->json([
'success' => true,
'message' => 'Admin berhasil dihapus!'
]);
} catch (\Exception $e) {
return response()->json([
'success' => false,
'message' => 'Terjadi kesalahan: ' . $e->getMessage()
], 500);
}
}
/**
* Update password for admin
*/
public function updatePassword(Request $request, Admin $admin)
{
$validator = Validator::make($request->all(), [
'password' => 'required|min:6|confirmed',
], [
'password.required' => 'Password harus diisi',
'password.min' => 'Password minimal 6 karakter',
'password.confirmed' => 'Konfirmasi password tidak cocok',
]);
if ($validator->fails()) {
return response()->json([
'success' => false,
'message' => 'Validasi gagal',
'errors' => $validator->errors()
], 422);
}
try {
$admin->update([
'password' => Hash::make($request->password)
]);
return response()->json([
'success' => true,
'message' => 'Password admin berhasil diperbarui!'
]);
} catch (\Exception $e) {
return response()->json([
'success' => false,
'message' => 'Terjadi kesalahan: ' . $e->getMessage()
], 500);
}
}
}

View File

@ -0,0 +1,223 @@
<?php
namespace App\Http\Controllers;
use App\Models\Banner;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Validator;
class ManajemenBannerController extends Controller
{
public function index()
{
$banners = Banner::ordered()->get();
$nextUrutan = (Banner::max('urutan') ?? 0) + 1;
return view('admin.manajemen-banner.index', compact('banners', 'nextUrutan'));
}
public function store(Request $request)
{
$validator = Validator::make($request->all(), [
'gambar' => 'required|image|mimes:jpeg,png,jpg,gif,webp|max:5120',
'judul' => 'nullable|string|max:255',
'deskripsi' => 'nullable|string|max:500',
'status' => 'boolean',
], [
'gambar.required' => 'Gambar banner harus diisi',
'gambar.image' => 'File harus berupa gambar',
'gambar.mimes' => 'Format gambar harus jpeg, png, jpg, gif, atau webp',
'gambar.max' => 'Ukuran gambar maksimal 5MB',
'judul.max' => 'Judul maksimal 255 karakter',
'deskripsi.max' => 'Deskripsi maksimal 500 karakter',
]);
if ($validator->fails()) {
return response()->json([
'success' => false,
'message' => 'Validasi gagal',
'errors' => $validator->errors()
], 422);
}
try {
$fileName = null;
if ($request->hasFile('gambar')) {
$file = $request->file('gambar');
$fileName = time() . '_' . uniqid() . '.' . $file->getClientOriginalExtension();
$file->move(storage_path('banner'), $fileName);
}
$banner = Banner::create([
'admin_id' => auth()->id(),
'gambar' => $fileName,
'judul' => $request->judul,
'deskripsi' => $request->deskripsi,
'status' => $request->has('status') ? true : false,
'urutan' => (Banner::max('urutan') ?? 0) + 1,
]);
return response()->json([
'success' => true,
'message' => 'Banner berhasil ditambahkan!',
'banner' => [
'id' => $banner->id,
'gambar_url' => $banner->gambar_url,
'judul' => $banner->judul,
'deskripsi' => $banner->deskripsi,
'status' => $banner->status,
'urutan' => $banner->urutan,
'created_at' => $banner->created_at->format('d M Y'),
]
]);
} catch (\Exception $e) {
return response()->json([
'success' => false,
'message' => 'Terjadi kesalahan: ' . $e->getMessage()
], 500);
}
}
public function show(Banner $banner)
{
return response()->json([
'success' => true,
'banner' => [
'id' => $banner->id,
'gambar_url' => $banner->gambar_url,
'judul' => $banner->judul,
'deskripsi' => $banner->deskripsi,
'status' => $banner->status,
'urutan' => $banner->urutan,
'created_at' => $banner->created_at->format('d F Y'),
'updated_at' => $banner->updated_at->format('d F Y'),
]
]);
}
public function update(Request $request, Banner $banner)
{
$validator = Validator::make($request->all(), [
'gambar' => 'nullable|image|mimes:jpeg,png,jpg,gif,webp|max:5120',
'judul' => 'nullable|string|max:255',
'deskripsi' => 'nullable|string|max:500',
'status' => 'boolean',
'urutan' => 'nullable|integer|min:0',
], [
'gambar.image' => 'File harus berupa gambar',
'gambar.mimes' => 'Format gambar harus jpeg, png, jpg, gif, atau webp',
'gambar.max' => 'Ukuran gambar maksimal 5MB',
'judul.max' => 'Judul maksimal 255 karakter',
'deskripsi.max' => 'Deskripsi maksimal 500 karakter',
'urutan.integer' => 'Urutan harus berupa angka',
'urutan.min' => 'Urutan minimal 0',
]);
if ($validator->fails()) {
return response()->json([
'success' => false,
'message' => 'Validasi gagal',
'errors' => $validator->errors()
], 422);
}
try {
$data = [
'judul' => $request->judul,
'deskripsi' => $request->deskripsi,
'status' => $request->has('status') ? true : false,
'urutan' => $request->urutan ?? $banner->urutan,
];
if ($request->hasFile('gambar')) {
if ($banner->gambar && file_exists(storage_path('banner/' . $banner->gambar))) {
unlink(storage_path('banner/' . $banner->gambar));
}
$file = $request->file('gambar');
$fileName = time() . '_' . uniqid() . '.' . $file->getClientOriginalExtension();
$file->move(storage_path('banner'), $fileName);
$data['gambar'] = $fileName;
}
$banner->update($data);
return response()->json([
'success' => true,
'message' => 'Banner berhasil diperbarui!',
'banner' => [
'id' => $banner->id,
'gambar_url' => $banner->gambar_url,
'judul' => $banner->judul,
'deskripsi' => $banner->deskripsi,
'status' => $banner->status,
'urutan' => $banner->urutan,
'updated_at' => $banner->updated_at->format('d M Y'),
]
]);
} catch (\Exception $e) {
return response()->json([
'success' => false,
'message' => 'Terjadi kesalahan: ' . $e->getMessage()
], 500);
}
}
public function destroy(Banner $banner)
{
try {
if ($banner->gambar && file_exists(storage_path('banner/' . $banner->gambar))) {
unlink(storage_path('banner/' . $banner->gambar));
}
$banner->delete();
return response()->json([
'success' => true,
'message' => 'Banner berhasil dihapus!'
]);
} catch (\Exception $e) {
return response()->json([
'success' => false,
'message' => 'Terjadi kesalahan: ' . $e->getMessage()
], 500);
}
}
public function updateStatus(Request $request, Banner $banner)
{
$validator = Validator::make($request->all(), [
'status' => 'required|boolean',
]);
if ($validator->fails()) {
return response()->json([
'success' => false,
'message' => 'Validasi gagal'
], 422);
}
try {
$banner->update([
'status' => $request->status
]);
return response()->json([
'success' => true,
'message' => 'Status banner berhasil diperbarui!',
'banner' => [
'id' => $banner->id,
'status' => $banner->status,
]
]);
} catch (\Exception $e) {
return response()->json([
'success' => false,
'message' => 'Terjadi kesalahan: ' . $e->getMessage()
], 500);
}
}
}

View File

@ -0,0 +1,229 @@
<?php
namespace App\Http\Controllers;
use App\Models\Fasilitas;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Validator;
class ManajemenFasilitasController extends Controller
{
public function index()
{
$fasilitas = Fasilitas::ordered()->get();
$nextUrutan = (Fasilitas::max('urutan') ?? 0) + 1;
return view('admin.manajemen-fasilitas.index', compact('fasilitas', 'nextUrutan'));
}
public function store(Request $request)
{
$validator = Validator::make($request->all(), [
'nama_fasilitas' => 'required|string|max:255',
'deskripsi_fasilitas' => 'required|string|max:1000',
'foto_fasilitas' => 'required|image|mimes:jpeg,png,jpg,gif,webp|max:5120',
'status' => 'boolean',
], [
'nama_fasilitas.required' => 'Nama fasilitas harus diisi',
'nama_fasilitas.max' => 'Nama fasilitas maksimal 255 karakter',
'deskripsi_fasilitas.required' => 'Deskripsi fasilitas harus diisi',
'deskripsi_fasilitas.max' => 'Deskripsi fasilitas maksimal 1000 karakter',
'foto_fasilitas.required' => 'Foto fasilitas harus diisi',
'foto_fasilitas.image' => 'File harus berupa gambar',
'foto_fasilitas.mimes' => 'Format gambar harus jpeg, png, jpg, gif, atau webp',
'foto_fasilitas.max' => 'Ukuran gambar maksimal 5MB',
]);
if ($validator->fails()) {
return response()->json([
'success' => false,
'message' => 'Validasi gagal',
'errors' => $validator->errors()
], 422);
}
try {
$fileName = null;
if ($request->hasFile('foto_fasilitas')) {
$file = $request->file('foto_fasilitas');
$fileName = time() . '_' . uniqid() . '.' . $file->getClientOriginalExtension();
$file->move(storage_path('fasilitas'), $fileName);
}
$fasilitas = Fasilitas::create([
'admin_id' => auth()->id(),
'nama_fasilitas' => $request->nama_fasilitas,
'deskripsi_fasilitas' => $request->deskripsi_fasilitas,
'foto_fasilitas' => $fileName,
'status' => $request->has('status') ? true : false,
'urutan' => (Fasilitas::max('urutan') ?? 0) + 1,
]);
return response()->json([
'success' => true,
'message' => 'Fasilitas berhasil ditambahkan!',
'fasilitas' => [
'id' => $fasilitas->id,
'nama_fasilitas' => $fasilitas->nama_fasilitas,
'deskripsi_fasilitas' => $fasilitas->deskripsi_fasilitas,
'deskripsi_pendek' => $fasilitas->deskripsi_pendek,
'foto_fasilitas_url' => $fasilitas->foto_fasilitas_url,
'status' => $fasilitas->status,
'urutan' => $fasilitas->urutan,
'created_at' => $fasilitas->created_at->format('d M Y'),
]
]);
} catch (\Exception $e) {
return response()->json([
'success' => false,
'message' => 'Terjadi kesalahan: ' . $e->getMessage()
], 500);
}
}
public function show(Fasilitas $fasilitas)
{
return response()->json([
'success' => true,
'fasilitas' => [
'id' => $fasilitas->id,
'nama_fasilitas' => $fasilitas->nama_fasilitas,
'deskripsi_fasilitas' => $fasilitas->deskripsi_fasilitas,
'foto_fasilitas_url' => $fasilitas->foto_fasilitas_url,
'status' => $fasilitas->status,
'urutan' => $fasilitas->urutan,
'created_at' => $fasilitas->created_at->format('d F Y'),
'updated_at' => $fasilitas->updated_at->format('d F Y'),
]
]);
}
public function update(Request $request, Fasilitas $fasilitas)
{
$validator = Validator::make($request->all(), [
'nama_fasilitas' => 'required|string|max:255',
'deskripsi_fasilitas' => 'required|string|max:1000',
'foto_fasilitas' => 'nullable|image|mimes:jpeg,png,jpg,gif,webp|max:5120',
'status' => 'boolean',
'urutan' => 'nullable|integer|min:0',
], [
'nama_fasilitas.required' => 'Nama fasilitas harus diisi',
'nama_fasilitas.max' => 'Nama fasilitas maksimal 255 karakter',
'deskripsi_fasilitas.required' => 'Deskripsi fasilitas harus diisi',
'deskripsi_fasilitas.max' => 'Deskripsi fasilitas maksimal 1000 karakter',
'foto_fasilitas.image' => 'File harus berupa gambar',
'foto_fasilitas.mimes' => 'Format gambar harus jpeg, png, jpg, gif, atau webp',
'foto_fasilitas.max' => 'Ukuran gambar maksimal 5MB',
'urutan.integer' => 'Urutan harus berupa angka',
'urutan.min' => 'Urutan minimal 0',
]);
if ($validator->fails()) {
return response()->json([
'success' => false,
'message' => 'Validasi gagal',
'errors' => $validator->errors()
], 422);
}
try {
$data = [
'nama_fasilitas' => $request->nama_fasilitas,
'deskripsi_fasilitas' => $request->deskripsi_fasilitas,
'status' => $request->has('status') ? true : false,
'urutan' => $request->urutan ?? $fasilitas->urutan,
];
if ($request->hasFile('foto_fasilitas')) {
if ($fasilitas->foto_fasilitas && file_exists(storage_path('fasilitas/' . $fasilitas->foto_fasilitas))) {
unlink(storage_path('fasilitas/' . $fasilitas->foto_fasilitas));
}
$file = $request->file('foto_fasilitas');
$fileName = time() . '_' . uniqid() . '.' . $file->getClientOriginalExtension();
$file->move(storage_path('fasilitas'), $fileName);
$data['foto_fasilitas'] = $fileName;
}
$fasilitas->update($data);
return response()->json([
'success' => true,
'message' => 'Fasilitas berhasil diperbarui!',
'fasilitas' => [
'id' => $fasilitas->id,
'nama_fasilitas' => $fasilitas->nama_fasilitas,
'deskripsi_fasilitas' => $fasilitas->deskripsi_fasilitas,
'deskripsi_pendek' => $fasilitas->deskripsi_pendek,
'foto_fasilitas_url' => $fasilitas->foto_fasilitas_url,
'status' => $fasilitas->status,
'urutan' => $fasilitas->urutan,
'updated_at' => $fasilitas->updated_at->format('d M Y'),
]
]);
} catch (\Exception $e) {
return response()->json([
'success' => false,
'message' => 'Terjadi kesalahan: ' . $e->getMessage()
], 500);
}
}
public function destroy(Fasilitas $fasilitas)
{
try {
if ($fasilitas->foto_fasilitas && file_exists(storage_path('fasilitas/' . $fasilitas->foto_fasilitas))) {
unlink(storage_path('fasilitas/' . $fasilitas->foto_fasilitas));
}
$fasilitas->delete();
return response()->json([
'success' => true,
'message' => 'Fasilitas berhasil dihapus!'
]);
} catch (\Exception $e) {
return response()->json([
'success' => false,
'message' => 'Terjadi kesalahan: ' . $e->getMessage()
], 500);
}
}
public function updateStatus(Request $request, Fasilitas $fasilitas)
{
$validator = Validator::make($request->all(), [
'status' => 'required|boolean',
]);
if ($validator->fails()) {
return response()->json([
'success' => false,
'message' => 'Validasi gagal'
], 422);
}
try {
$fasilitas->update([
'status' => $request->status
]);
return response()->json([
'success' => true,
'message' => 'Status fasilitas berhasil diperbarui!',
'fasilitas' => [
'id' => $fasilitas->id,
'status' => $fasilitas->status,
]
]);
} catch (\Exception $e) {
return response()->json([
'success' => false,
'message' => 'Terjadi kesalahan: ' . $e->getMessage()
], 500);
}
}
}

View File

@ -0,0 +1,229 @@
<?php
namespace App\Http\Controllers;
use App\Models\Gallery;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Validator;
class ManajemenGalleryController extends Controller
{
public function index()
{
$galleries = Gallery::ordered()->get();
$nextUrutan = (Gallery::max('urutan') ?? 0) + 1;
return view('admin.manajemen-gallery.index', compact('galleries', 'nextUrutan'));
}
public function store(Request $request)
{
$validator = Validator::make($request->all(), [
'nama_gallery' => 'required|string|max:255',
'deskripsi_gallery' => 'required|string|max:1000',
'foto_gallery' => 'required|image|mimes:jpeg,png,jpg,gif,webp|max:5120',
'status' => 'boolean',
], [
'nama_gallery.required' => 'Nama gallery harus diisi',
'nama_gallery.max' => 'Nama gallery maksimal 255 karakter',
'deskripsi_gallery.required' => 'Deskripsi gallery harus diisi',
'deskripsi_gallery.max' => 'Deskripsi gallery maksimal 1000 karakter',
'foto_gallery.required' => 'Foto gallery harus diisi',
'foto_gallery.image' => 'File harus berupa gambar',
'foto_gallery.mimes' => 'Format gambar harus jpeg, png, jpg, gif, atau webp',
'foto_gallery.max' => 'Ukuran gambar maksimal 5MB',
]);
if ($validator->fails()) {
return response()->json([
'success' => false,
'message' => 'Validasi gagal',
'errors' => $validator->errors()
], 422);
}
try {
$fileName = null;
if ($request->hasFile('foto_gallery')) {
$file = $request->file('foto_gallery');
$fileName = time() . '_' . uniqid() . '.' . $file->getClientOriginalExtension();
$file->move(storage_path('gallery'), $fileName);
}
$gallery = Gallery::create([
'admin_id' => auth()->id(),
'nama_gallery' => $request->nama_gallery,
'deskripsi_gallery' => $request->deskripsi_gallery,
'foto_gallery' => $fileName,
'status' => $request->has('status') ? true : false,
'urutan' => (Gallery::max('urutan') ?? 0) + 1,
]);
return response()->json([
'success' => true,
'message' => 'Gallery berhasil ditambahkan!',
'gallery' => [
'id' => $gallery->id,
'nama_gallery' => $gallery->nama_gallery,
'deskripsi_gallery' => $gallery->deskripsi_gallery,
'deskripsi_pendek' => $gallery->deskripsi_pendek,
'foto_gallery_url' => $gallery->foto_gallery_url,
'status' => $gallery->status,
'urutan' => $gallery->urutan,
'created_at' => $gallery->created_at->format('d M Y'),
]
]);
} catch (\Exception $e) {
return response()->json([
'success' => false,
'message' => 'Terjadi kesalahan: ' . $e->getMessage()
], 500);
}
}
public function show(Gallery $gallery)
{
return response()->json([
'success' => true,
'gallery' => [
'id' => $gallery->id,
'nama_gallery' => $gallery->nama_gallery,
'deskripsi_gallery' => $gallery->deskripsi_gallery,
'foto_gallery_url' => $gallery->foto_gallery_url,
'status' => $gallery->status,
'urutan' => $gallery->urutan,
'created_at' => $gallery->created_at->format('d F Y'),
'updated_at' => $gallery->updated_at->format('d F Y'),
]
]);
}
public function update(Request $request, Gallery $gallery)
{
$validator = Validator::make($request->all(), [
'nama_gallery' => 'required|string|max:255',
'deskripsi_gallery' => 'required|string|max:1000',
'foto_gallery' => 'nullable|image|mimes:jpeg,png,jpg,gif,webp|max:5120',
'status' => 'boolean',
'urutan' => 'nullable|integer|min:0',
], [
'nama_gallery.required' => 'Nama gallery harus diisi',
'nama_gallery.max' => 'Nama gallery maksimal 255 karakter',
'deskripsi_gallery.required' => 'Deskripsi gallery harus diisi',
'deskripsi_gallery.max' => 'Deskripsi gallery maksimal 1000 karakter',
'foto_gallery.image' => 'File harus berupa gambar',
'foto_gallery.mimes' => 'Format gambar harus jpeg, png, jpg, gif, atau webp',
'foto_gallery.max' => 'Ukuran gambar maksimal 5MB',
'urutan.integer' => 'Urutan harus berupa angka',
'urutan.min' => 'Urutan minimal 0',
]);
if ($validator->fails()) {
return response()->json([
'success' => false,
'message' => 'Validasi gagal',
'errors' => $validator->errors()
], 422);
}
try {
$data = [
'nama_gallery' => $request->nama_gallery,
'deskripsi_gallery' => $request->deskripsi_gallery,
'status' => $request->has('status') ? true : false,
'urutan' => $request->urutan ?? $gallery->urutan,
];
if ($request->hasFile('foto_gallery')) {
if ($gallery->foto_gallery && file_exists(storage_path('gallery/' . $gallery->foto_gallery))) {
unlink(storage_path('gallery/' . $gallery->foto_gallery));
}
$file = $request->file('foto_gallery');
$fileName = time() . '_' . uniqid() . '.' . $file->getClientOriginalExtension();
$file->move(storage_path('gallery'), $fileName);
$data['foto_gallery'] = $fileName;
}
$gallery->update($data);
return response()->json([
'success' => true,
'message' => 'Gallery berhasil diperbarui!',
'gallery' => [
'id' => $gallery->id,
'nama_gallery' => $gallery->nama_gallery,
'deskripsi_gallery' => $gallery->deskripsi_gallery,
'deskripsi_pendek' => $gallery->deskripsi_pendek,
'foto_gallery_url' => $gallery->foto_gallery_url,
'status' => $gallery->status,
'urutan' => $gallery->urutan,
'updated_at' => $gallery->updated_at->format('d M Y'),
]
]);
} catch (\Exception $e) {
return response()->json([
'success' => false,
'message' => 'Terjadi kesalahan: ' . $e->getMessage()
], 500);
}
}
public function destroy(Gallery $gallery)
{
try {
if ($gallery->foto_gallery && file_exists(storage_path('gallery/' . $gallery->foto_gallery))) {
unlink(storage_path('gallery/' . $gallery->foto_gallery));
}
$gallery->delete();
return response()->json([
'success' => true,
'message' => 'Gallery berhasil dihapus!'
]);
} catch (\Exception $e) {
return response()->json([
'success' => false,
'message' => 'Terjadi kesalahan: ' . $e->getMessage()
], 500);
}
}
public function updateStatus(Request $request, Gallery $gallery)
{
$validator = Validator::make($request->all(), [
'status' => 'required|boolean',
]);
if ($validator->fails()) {
return response()->json([
'success' => false,
'message' => 'Validasi gagal'
], 422);
}
try {
$gallery->update([
'status' => $request->status
]);
return response()->json([
'success' => true,
'message' => 'Status gallery berhasil diperbarui!',
'gallery' => [
'id' => $gallery->id,
'status' => $gallery->status,
]
]);
} catch (\Exception $e) {
return response()->json([
'success' => false,
'message' => 'Terjadi kesalahan: ' . $e->getMessage()
], 500);
}
}
}

View File

@ -0,0 +1,226 @@
<?php
namespace App\Http\Controllers;
use App\Models\Jurusan;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Validator;
use Illuminate\Support\Str;
class ManajemenJurusanController extends Controller
{
/**
* Display a listing of the resource.
*/
public function index()
{
$jurusans = Jurusan::ordered()->get();
$nextUrutan = (Jurusan::max('urutan') ?? 0) + 1;
return view('admin.manajemen-jurusan.index', compact('jurusans', 'nextUrutan'));
}
/**
* Store a newly created resource in storage.
*/
public function store(Request $request)
{
$validator = Validator::make($request->all(), [
'nama_jurusan' => 'required|string|max:255',
'deskripsi_jurusan' => 'required|string|max:1000',
'kode_jurusan' => 'required|string|max:10|unique:jurusans,kode_jurusan',
'status' => 'boolean',
], [
'nama_jurusan.required' => 'Nama jurusan harus diisi',
'nama_jurusan.max' => 'Nama jurusan maksimal 255 karakter',
'deskripsi_jurusan.required' => 'Deskripsi jurusan harus diisi',
'deskripsi_jurusan.max' => 'Deskripsi jurusan maksimal 1000 karakter',
'kode_jurusan.required' => 'Kode jurusan harus diisi',
'kode_jurusan.max' => 'Kode jurusan maksimal 10 karakter',
'kode_jurusan.unique' => 'Kode jurusan sudah digunakan',
]);
if ($validator->fails()) {
return response()->json([
'success' => false,
'message' => 'Validasi gagal',
'errors' => $validator->errors()
], 422);
}
try {
$jurusan = Jurusan::create([
'admin_id' => auth()->id(),
'nama_jurusan' => $request->nama_jurusan,
'deskripsi_jurusan' => $request->deskripsi_jurusan,
'kode_jurusan' => strtoupper($request->kode_jurusan),
'status' => $request->has('status') ? true : false,
'urutan' => (Jurusan::max('urutan') ?? 0) + 1,
]);
return response()->json([
'success' => true,
'message' => 'Jurusan berhasil ditambahkan!',
'jurusan' => [
'id' => $jurusan->id,
'nama_jurusan' => $jurusan->nama_jurusan,
'deskripsi_jurusan' => $jurusan->deskripsi_jurusan,
'deskripsi_pendek' => $jurusan->deskripsi_pendek,
'kode_jurusan' => $jurusan->kode_jurusan,
'kode_formatted' => $jurusan->kode_formatted,
'status' => $jurusan->status,
'urutan' => $jurusan->urutan,
'created_at' => $jurusan->created_at->format('d M Y'),
]
]);
} catch (\Exception $e) {
return response()->json([
'success' => false,
'message' => 'Terjadi kesalahan: ' . $e->getMessage()
], 500);
}
}
/**
* Display the specified resource.
*/
public function show(Jurusan $jurusan)
{
return response()->json([
'success' => true,
'jurusan' => [
'id' => $jurusan->id,
'nama_jurusan' => $jurusan->nama_jurusan,
'deskripsi_jurusan' => $jurusan->deskripsi_jurusan,
'kode_jurusan' => $jurusan->kode_jurusan,
'status' => $jurusan->status,
'urutan' => $jurusan->urutan,
'created_at' => $jurusan->created_at->format('d F Y'),
'updated_at' => $jurusan->updated_at->format('d F Y'),
]
]);
}
/**
* Update the specified resource in storage.
*/
public function update(Request $request, Jurusan $jurusan)
{
$validator = Validator::make($request->all(), [
'nama_jurusan' => 'required|string|max:255',
'deskripsi_jurusan' => 'required|string|max:1000',
'kode_jurusan' => 'required|string|max:10|unique:jurusans,kode_jurusan,' . $jurusan->id,
'status' => 'boolean',
'urutan' => 'nullable|integer|min:0',
], [
'nama_jurusan.required' => 'Nama jurusan harus diisi',
'nama_jurusan.max' => 'Nama jurusan maksimal 255 karakter',
'deskripsi_jurusan.required' => 'Deskripsi jurusan harus diisi',
'deskripsi_jurusan.max' => 'Deskripsi jurusan maksimal 1000 karakter',
'kode_jurusan.required' => 'Kode jurusan harus diisi',
'kode_jurusan.max' => 'Kode jurusan maksimal 10 karakter',
'kode_jurusan.unique' => 'Kode jurusan sudah digunakan',
'urutan.integer' => 'Urutan harus berupa angka',
'urutan.min' => 'Urutan minimal 0',
]);
if ($validator->fails()) {
return response()->json([
'success' => false,
'message' => 'Validasi gagal',
'errors' => $validator->errors()
], 422);
}
try {
$jurusan->update([
'nama_jurusan' => $request->nama_jurusan,
'deskripsi_jurusan' => $request->deskripsi_jurusan,
'kode_jurusan' => strtoupper($request->kode_jurusan),
'status' => $request->has('status') ? true : false,
'urutan' => $request->urutan ?? $jurusan->urutan,
]);
return response()->json([
'success' => true,
'message' => 'Jurusan berhasil diperbarui!',
'jurusan' => [
'id' => $jurusan->id,
'nama_jurusan' => $jurusan->nama_jurusan,
'deskripsi_jurusan' => $jurusan->deskripsi_jurusan,
'deskripsi_pendek' => $jurusan->deskripsi_pendek,
'kode_jurusan' => $jurusan->kode_jurusan,
'kode_formatted' => $jurusan->kode_formatted,
'status' => $jurusan->status,
'urutan' => $jurusan->urutan,
'updated_at' => $jurusan->updated_at->format('d M Y'),
]
]);
} catch (\Exception $e) {
return response()->json([
'success' => false,
'message' => 'Terjadi kesalahan: ' . $e->getMessage()
], 500);
}
}
/**
* Remove the specified resource from storage.
*/
public function destroy(Jurusan $jurusan)
{
try {
$jurusan->delete();
return response()->json([
'success' => true,
'message' => 'Jurusan berhasil dihapus!'
]);
} catch (\Exception $e) {
return response()->json([
'success' => false,
'message' => 'Terjadi kesalahan: ' . $e->getMessage()
], 500);
}
}
/**
* Update jurusan status
*/
public function updateStatus(Request $request, Jurusan $jurusan)
{
$validator = Validator::make($request->all(), [
'status' => 'required|boolean',
]);
if ($validator->fails()) {
return response()->json([
'success' => false,
'message' => 'Validasi gagal'
], 422);
}
try {
$jurusan->update([
'status' => $request->status
]);
return response()->json([
'success' => true,
'message' => 'Status jurusan berhasil diperbarui!',
'jurusan' => [
'id' => $jurusan->id,
'status' => $jurusan->status,
]
]);
} catch (\Exception $e) {
return response()->json([
'success' => false,
'message' => 'Terjadi kesalahan: ' . $e->getMessage()
], 500);
}
}
}

View File

@ -0,0 +1,250 @@
<?php
namespace App\Http\Controllers;
use App\Models\Pengumuman;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Validator;
class ManajemenPengumumanController extends Controller
{
/**
* Display a listing of the resource.
*/
public function index()
{
$pengumumen = Pengumuman::ordered()->get();
$nextUrutan = (Pengumuman::max('urutan') ?? 0) + 1;
return view('admin.manajemen-pengumuman.index', compact('pengumumen', 'nextUrutan'));
}
/**
* Store a newly created resource in storage.
*/
public function store(Request $request)
{
$validator = Validator::make($request->all(), [
'nama_pengumuman' => 'required|string|max:255',
'deskripsi_pengumuman' => 'required|string|max:1000',
'foto_pengumuman' => 'required|image|mimes:jpeg,png,jpg,gif,webp|max:5120',
'status' => 'boolean',
], [
'nama_pengumuman.required' => 'Nama pengumuman harus diisi',
'nama_pengumuman.max' => 'Nama pengumuman maksimal 255 karakter',
'deskripsi_pengumuman.required' => 'Deskripsi pengumuman harus diisi',
'deskripsi_pengumuman.max' => 'Deskripsi pengumuman maksimal 1000 karakter',
'foto_pengumuman.required' => 'Foto pengumuman harus diisi',
'foto_pengumuman.image' => 'File harus berupa gambar',
'foto_pengumuman.mimes' => 'Format gambar harus jpeg, png, jpg, gif, atau webp',
'foto_pengumuman.max' => 'Ukuran gambar maksimal 5MB',
]);
if ($validator->fails()) {
return response()->json([
'success' => false,
'message' => 'Validasi gagal',
'errors' => $validator->errors(),
], 422);
}
try {
$fileName = null;
if ($request->hasFile('foto_pengumuman')) {
$file = $request->file('foto_pengumuman');
$fileName = time().'_'.uniqid().'.'.$file->getClientOriginalExtension();
$file->move(storage_path('pengumuman'), $fileName);
}
$pengumuman = Pengumuman::create([
'admin_id' => auth()->id(),
'nama_pengumuman' => $request->nama_pengumuman,
'deskripsi_pengumuman' => $request->deskripsi_pengumuman,
'foto_pengumuman' => $fileName,
'status' => $request->has('status') ? true : false,
'urutan' => (Pengumuman::max('urutan') ?? 0) + 1,
]);
return response()->json([
'success' => true,
'message' => 'Pengumuman berhasil ditambahkan!',
'pengumuman' => [
'id' => $pengumuman->id,
'nama_pengumuman' => $pengumuman->nama_pengumuman,
'deskripsi_pengumuman' => $pengumuman->deskripsi_pengumuman,
'deskripsi_pendek' => $pengumuman->deskripsi_pendek,
'foto_pengumuman_url' => $pengumuman->foto_pengumuman_url,
'status' => $pengumuman->status,
'urutan' => $pengumuman->urutan,
'created_at' => $pengumuman->created_at->format('d M Y'),
],
]);
} catch (\Exception $e) {
return response()->json([
'success' => false,
'message' => 'Terjadi kesalahan: '.$e->getMessage(),
], 500);
}
}
/**
* Display the specified resource.
*/
public function show(Pengumuman $pengumuman)
{
return response()->json([
'success' => true,
'pengumuman' => [
'id' => $pengumuman->id,
'nama_pengumuman' => $pengumuman->nama_pengumuman,
'deskripsi_pengumuman' => $pengumuman->deskripsi_pengumuman,
'foto_pengumuman_url' => $pengumuman->foto_pengumuman_url,
'status' => $pengumuman->status,
'urutan' => $pengumuman->urutan,
'created_at' => $pengumuman->created_at->format('d F Y'),
'updated_at' => $pengumuman->updated_at->format('d F Y'),
],
]);
}
/**
* Update the specified resource in storage.
*/
public function update(Request $request, Pengumuman $pengumuman)
{
$validator = Validator::make($request->all(), [
'nama_pengumuman' => 'required|string|max:255',
'deskripsi_pengumuman' => 'required|string|max:1000',
'foto_pengumuman' => 'nullable|image|mimes:jpeg,png,jpg,gif,webp|max:5120',
'status' => 'boolean',
'urutan' => 'nullable|integer|min:0',
], [
'nama_pengumuman.required' => 'Nama pengumuman harus diisi',
'nama_pengumuman.max' => 'Nama pengumuman maksimal 255 karakter',
'deskripsi_pengumuman.required' => 'Deskripsi pengumuman harus diisi',
'deskripsi_pengumuman.max' => 'Deskripsi pengumuman maksimal 1000 karakter',
'foto_pengumuman.image' => 'File harus berupa gambar',
'foto_pengumuman.mimes' => 'Format gambar harus jpeg, png, jpg, gif, atau webp',
'foto_pengumuman.max' => 'Ukuran gambar maksimal 5MB',
'urutan.integer' => 'Urutan harus berupa angka',
'urutan.min' => 'Urutan minimal 0',
]);
if ($validator->fails()) {
return response()->json([
'success' => false,
'message' => 'Validasi gagal',
'errors' => $validator->errors(),
], 422);
}
try {
$data = [
'nama_pengumuman' => $request->nama_pengumuman,
'deskripsi_pengumuman' => $request->deskripsi_pengumuman,
'status' => $request->has('status') ? true : false,
'urutan' => $request->urutan ?? $pengumuman->urutan,
];
// Handle foto upload jika ada
if ($request->hasFile('foto_pengumuman')) {
// Hapus foto lama jika ada
if ($pengumuman->foto_pengumuman && file_exists(storage_path('pengumuman/'.$pengumuman->foto_pengumuman))) {
unlink(storage_path('pengumuman/'.$pengumuman->foto_pengumuman));
}
$file = $request->file('foto_pengumuman');
$fileName = time().'_'.uniqid().'.'.$file->getClientOriginalExtension();
$file->move(storage_path('pengumuman'), $fileName);
$data['foto_pengumuman'] = $fileName;
}
$pengumuman->update($data);
return response()->json([
'success' => true,
'message' => 'Pengumuman berhasil diperbarui!',
'pengumuman' => [
'id' => $pengumuman->id,
'nama_pengumuman' => $pengumuman->nama_pengumuman,
'deskripsi_pengumuman' => $pengumuman->deskripsi_pengumuman,
'deskripsi_pendek' => $pengumuman->deskripsi_pendek,
'foto_pengumuman_url' => $pengumuman->foto_pengumuman_url,
'status' => $pengumuman->status,
'urutan' => $pengumuman->urutan,
'updated_at' => $pengumuman->updated_at->format('d M Y'),
],
]);
} catch (\Exception $e) {
return response()->json([
'success' => false,
'message' => 'Terjadi kesalahan: '.$e->getMessage(),
], 500);
}
}
/**
* Remove the specified resource from storage.
*/
public function destroy(Pengumuman $pengumuman)
{
try {
// Hapus foto dari storage
if ($pengumuman->foto_pengumuman && file_exists(storage_path('pengumuman/'.$pengumuman->foto_pengumuman))) {
unlink(storage_path('pengumuman/'.$pengumuman->foto_pengumuman));
}
$pengumuman->delete();
return response()->json([
'success' => true,
'message' => 'Pengumuman berhasil dihapus!',
]);
} catch (\Exception $e) {
return response()->json([
'success' => false,
'message' => 'Terjadi kesalahan: '.$e->getMessage(),
], 500);
}
}
/**
* Update pengumuman status
*/
public function updateStatus(Request $request, Pengumuman $pengumuman)
{
$validator = Validator::make($request->all(), [
'status' => 'required|boolean',
]);
if ($validator->fails()) {
return response()->json([
'success' => false,
'message' => 'Validasi gagal',
], 422);
}
try {
$pengumuman->update([
'status' => $request->status,
]);
return response()->json([
'success' => true,
'message' => 'Status pengumuman berhasil diperbarui!',
'pengumuman' => [
'id' => $pengumuman->id,
'status' => $pengumuman->status,
],
]);
} catch (\Exception $e) {
return response()->json([
'success' => false,
'message' => 'Terjadi kesalahan: '.$e->getMessage(),
], 500);
}
}
}

View File

@ -0,0 +1,267 @@
<?php
namespace App\Http\Controllers;
use App\Models\Prestasi;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Validator;
class ManajemenPrestasiController extends Controller
{
public function index()
{
$prestasis = Prestasi::ordered()->with('jurusan')->get();
$jurusans = \App\Models\Jurusan::ordered()->get();
return view('admin.manajemen-prestasi.index', compact('prestasis', 'jurusans'));
}
public function store(Request $request)
{
$validator = Validator::make($request->all(), [
'nama_siswa' => 'required|string|max:255',
'jurusan_id' => 'required|exists:jurusans,id',
'nama_prestasi' => 'required|string|max:255',
'peringkat' => 'required|string|max:100',
'tahun_prestasi' => 'required|integer|min:2000|max:' . (date('Y') + 1),
'foto_prestasi' => 'required|image|mimes:jpeg,png,jpg,gif,webp|max:5120',
'status' => 'boolean',
'urutan' => 'nullable|integer|min:0',
], [
'nama_siswa.required' => 'Nama siswa harus diisi',
'nama_siswa.max' => 'Nama siswa maksimal 255 karakter',
'jurusan_id.required' => 'Jurusan harus dipilih',
'jurusan_id.exists' => 'Jurusan tidak valid',
'nama_prestasi.required' => 'Nama prestasi harus diisi',
'nama_prestasi.max' => 'Nama prestasi maksimal 255 karakter',
'peringkat.required' => 'Peringkat harus diisi',
'peringkat.max' => 'Peringkat maksimal 100 karakter',
'tahun_prestasi.required' => 'Tahun prestasi harus diisi',
'tahun_prestasi.integer' => 'Tahun prestasi harus berupa angka',
'tahun_prestasi.min' => 'Tahun prestasi minimal 2000',
'tahun_prestasi.max' => 'Tahun prestasi maksimal ' . (date('Y') + 1),
'foto_prestasi.required' => 'Foto prestasi harus diisi',
'foto_prestasi.image' => 'File harus berupa gambar',
'foto_prestasi.mimes' => 'Format gambar harus jpeg, png, jpg, gif, atau webp',
'foto_prestasi.max' => 'Ukuran gambar maksimal 5MB',
'urutan.integer' => 'Urutan harus berupa angka',
'urutan.min' => 'Urutan minimal 0',
]);
if ($validator->fails()) {
return response()->json([
'success' => false,
'message' => 'Validasi gagal',
'errors' => $validator->errors()
], 422);
}
try {
$fileName = null;
if ($request->hasFile('foto_prestasi')) {
$file = $request->file('foto_prestasi');
$fileName = time() . '_' . uniqid() . '.' . $file->getClientOriginalExtension();
$file->move(storage_path('prestasi'), $fileName);
}
$prestasi = Prestasi::create([
'nama_siswa' => $request->nama_siswa,
'jurusan_id' => $request->jurusan_id,
'nama_prestasi' => $request->nama_prestasi,
'peringkat' => $request->peringkat,
'tahun_prestasi' => $request->tahun_prestasi,
'foto_prestasi' => $fileName,
'status' => $request->has('status') ? true : false,
'urutan' => $request->urutan ?? 0,
]);
return response()->json([
'success' => true,
'message' => 'Prestasi berhasil ditambahkan!',
'prestasi' => [
'id' => $prestasi->id,
'nama_siswa' => $prestasi->nama_siswa,
'jurusan' => $prestasi->jurusan->nama_jurusan ?? '-',
'nama_prestasi' => $prestasi->nama_prestasi,
'peringkat' => $prestasi->peringkat,
'tahun_prestasi' => $prestasi->tahun_prestasi,
'foto_prestasi_url' => $prestasi->foto_prestasi_url,
'status' => $prestasi->status,
'urutan' => $prestasi->urutan,
'created_at' => $prestasi->created_at->format('d M Y'),
]
]);
} catch (\Exception $e) {
return response()->json([
'success' => false,
'message' => 'Terjadi kesalahan: ' . $e->getMessage()
], 500);
}
}
public function show(Prestasi $prestasi)
{
return response()->json([
'success' => true,
'prestasi' => [
'id' => $prestasi->id,
'nama_siswa' => $prestasi->nama_siswa,
'jurusan_id' => $prestasi->jurusan_id,
'nama_jurusan' => $prestasi->jurusan->nama_jurusan ?? '-',
'nama_prestasi' => $prestasi->nama_prestasi,
'peringkat' => $prestasi->peringkat,
'tahun_prestasi' => $prestasi->tahun_prestasi,
'foto_prestasi_url' => $prestasi->foto_prestasi_url,
'status' => $prestasi->status,
'urutan' => $prestasi->urutan,
'created_at' => $prestasi->created_at->format('d F Y'),
'updated_at' => $prestasi->updated_at->format('d F Y'),
]
]);
}
public function update(Request $request, Prestasi $prestasi)
{
$validator = Validator::make($request->all(), [
'nama_siswa' => 'required|string|max:255',
'jurusan_id' => 'required|exists:jurusans,id',
'nama_prestasi' => 'required|string|max:255',
'peringkat' => 'required|string|max:100',
'tahun_prestasi' => 'required|integer|min:2000|max:' . (date('Y') + 1),
'foto_prestasi' => 'nullable|image|mimes:jpeg,png,jpg,gif,webp|max:5120',
'status' => 'boolean',
'urutan' => 'nullable|integer|min:0',
], [
'nama_siswa.required' => 'Nama siswa harus diisi',
'nama_siswa.max' => 'Nama siswa maksimal 255 karakter',
'jurusan_id.required' => 'Jurusan harus dipilih',
'jurusan_id.exists' => 'Jurusan tidak valid',
'nama_prestasi.required' => 'Nama prestasi harus diisi',
'nama_prestasi.max' => 'Nama prestasi maksimal 255 karakter',
'peringkat.required' => 'Peringkat harus diisi',
'peringkat.max' => 'Peringkat maksimal 100 karakter',
'tahun_prestasi.required' => 'Tahun prestasi harus diisi',
'tahun_prestasi.integer' => 'Tahun prestasi harus berupa angka',
'tahun_prestasi.min' => 'Tahun prestasi minimal 2000',
'tahun_prestasi.max' => 'Tahun prestasi maksimal ' . (date('Y') + 1),
'foto_prestasi.image' => 'File harus berupa gambar',
'foto_prestasi.mimes' => 'Format gambar harus jpeg, png, jpg, gif, atau webp',
'foto_prestasi.max' => 'Ukuran gambar maksimal 5MB',
'urutan.integer' => 'Urutan harus berupa angka',
'urutan.min' => 'Urutan minimal 0',
]);
if ($validator->fails()) {
return response()->json([
'success' => false,
'message' => 'Validasi gagal',
'errors' => $validator->errors()
], 422);
}
try {
$data = [
'nama_siswa' => $request->nama_siswa,
'jurusan_id' => $request->jurusan_id,
'nama_prestasi' => $request->nama_prestasi,
'peringkat' => $request->peringkat,
'tahun_prestasi' => $request->tahun_prestasi,
'status' => $request->has('status') ? true : false,
'urutan' => $request->urutan ?? 0,
];
if ($request->hasFile('foto_prestasi')) {
if ($prestasi->foto_prestasi && file_exists(storage_path('prestasi/' . $prestasi->foto_prestasi))) {
unlink(storage_path('prestasi/' . $prestasi->foto_prestasi));
}
$file = $request->file('foto_prestasi');
$fileName = time() . '_' . uniqid() . '.' . $file->getClientOriginalExtension();
$file->move(storage_path('prestasi'), $fileName);
$data['foto_prestasi'] = $fileName;
}
$prestasi->update($data);
return response()->json([
'success' => true,
'message' => 'Prestasi berhasil diperbarui!',
'prestasi' => [
'id' => $prestasi->id,
'nama_siswa' => $prestasi->nama_siswa,
'jurusan' => $prestasi->jurusan->nama_jurusan ?? '-',
'nama_prestasi' => $prestasi->nama_prestasi,
'peringkat' => $prestasi->peringkat,
'tahun_prestasi' => $prestasi->tahun_prestasi,
'foto_prestasi_url' => $prestasi->foto_prestasi_url,
'status' => $prestasi->status,
'urutan' => $prestasi->urutan,
'updated_at' => $prestasi->updated_at->format('d M Y'),
]
]);
} catch (\Exception $e) {
return response()->json([
'success' => false,
'message' => 'Terjadi kesalahan: ' . $e->getMessage()
], 500);
}
}
public function destroy(Prestasi $prestasi)
{
try {
if ($prestasi->foto_prestasi && file_exists(storage_path('prestasi/' . $prestasi->foto_prestasi))) {
unlink(storage_path('prestasi/' . $prestasi->foto_prestasi));
}
$prestasi->delete();
return response()->json([
'success' => true,
'message' => 'Prestasi berhasil dihapus!'
]);
} catch (\Exception $e) {
return response()->json([
'success' => false,
'message' => 'Terjadi kesalahan: ' . $e->getMessage()
], 500);
}
}
public function updateStatus(Request $request, Prestasi $prestasi)
{
$validator = Validator::make($request->all(), [
'status' => 'required|boolean',
]);
if ($validator->fails()) {
return response()->json([
'success' => false,
'message' => 'Validasi gagal'
], 422);
}
try {
$prestasi->update([
'status' => $request->status
]);
return response()->json([
'success' => true,
'message' => 'Status prestasi berhasil diperbarui!',
'prestasi' => [
'id' => $prestasi->id,
'status' => $prestasi->status,
]
]);
} catch (\Exception $e) {
return response()->json([
'success' => false,
'message' => 'Terjadi kesalahan: ' . $e->getMessage()
], 500);
}
}
}

View File

@ -0,0 +1,191 @@
<?php
namespace App\Http\Controllers;
use App\Models\Struktur;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Validator;
class ManajemenStrukturController extends Controller
{
public function index()
{
$strukturs = Struktur::ordered()->get();
return view('admin.manajemen-struktur.index', compact('strukturs'));
}
public function store(Request $request)
{
$validator = Validator::make($request->all(), [
'gambar_struktur' => 'required|image|mimes:jpeg,png,jpg,gif,webp|max:5120',
], [
'gambar_struktur.required' => 'Gambar struktur harus diisi',
'gambar_struktur.image' => 'File harus berupa gambar',
'gambar_struktur.mimes' => 'Format gambar harus jpeg, png, jpg, gif, atau webp',
'gambar_struktur.max' => 'Ukuran gambar maksimal 5MB',
]);
if ($validator->fails()) {
return response()->json([
'success' => false,
'message' => 'Validasi gagal',
'errors' => $validator->errors()
], 422);
}
try {
$fileName = null;
if ($request->hasFile('gambar_struktur')) {
$file = $request->file('gambar_struktur');
$fileName = time() . '_' . uniqid() . '.' . $file->getClientOriginalExtension();
$file->move(storage_path('struktur'), $fileName);
}
$struktur = Struktur::create([
'gambar_struktur' => $fileName,
'status' => true,
]);
return response()->json([
'success' => true,
'message' => 'Struktur organisasi berhasil ditambahkan!',
'struktur' => [
'id' => $struktur->id,
'gambar_struktur_url' => $struktur->gambar_struktur_url,
'status' => $struktur->status,
'created_at' => $struktur->created_at->format('d M Y'),
]
]);
} catch (\Exception $e) {
return response()->json([
'success' => false,
'message' => 'Terjadi kesalahan: ' . $e->getMessage()
], 500);
}
}
public function show(Struktur $struktur)
{
return response()->json([
'success' => true,
'struktur' => [
'id' => $struktur->id,
'gambar_struktur_url' => $struktur->gambar_struktur_url,
'status' => $struktur->status,
'created_at' => $struktur->created_at->format('d F Y'),
'updated_at' => $struktur->updated_at->format('d F Y'),
]
]);
}
public function update(Request $request, Struktur $struktur)
{
$validator = Validator::make($request->all(), [
'gambar_struktur' => 'required|image|mimes:jpeg,png,jpg,gif,webp|max:5120',
], [
'gambar_struktur.required' => 'Gambar struktur harus diisi',
'gambar_struktur.image' => 'File harus berupa gambar',
'gambar_struktur.mimes' => 'Format gambar harus jpeg, png, jpg, gif, atau webp',
'gambar_struktur.max' => 'Ukuran gambar maksimal 5MB',
]);
if ($validator->fails()) {
return response()->json([
'success' => false,
'message' => 'Validasi gagal',
'errors' => $validator->errors()
], 422);
}
try {
if ($request->hasFile('gambar_struktur')) {
if ($struktur->gambar_struktur && file_exists(storage_path('struktur/' . $struktur->gambar_struktur))) {
unlink(storage_path('struktur/' . $struktur->gambar_struktur));
}
$file = $request->file('gambar_struktur');
$fileName = time() . '_' . uniqid() . '.' . $file->getClientOriginalExtension();
$file->move(storage_path('struktur'), $fileName);
$struktur->update([
'gambar_struktur' => $fileName,
]);
}
return response()->json([
'success' => true,
'message' => 'Struktur organisasi berhasil diperbarui!',
'struktur' => [
'id' => $struktur->id,
'gambar_struktur_url' => $struktur->gambar_struktur_url,
'status' => $struktur->status,
'updated_at' => $struktur->updated_at->format('d M Y'),
]
]);
} catch (\Exception $e) {
return response()->json([
'success' => false,
'message' => 'Terjadi kesalahan: ' . $e->getMessage()
], 500);
}
}
public function destroy(Struktur $struktur)
{
try {
if ($struktur->gambar_struktur && file_exists(storage_path('struktur/' . $struktur->gambar_struktur))) {
unlink(storage_path('struktur/' . $struktur->gambar_struktur));
}
$struktur->delete();
return response()->json([
'success' => true,
'message' => 'Struktur organisasi berhasil dihapus!'
]);
} catch (\Exception $e) {
return response()->json([
'success' => false,
'message' => 'Terjadi kesalahan: ' . $e->getMessage()
], 500);
}
}
public function updateStatus(Request $request, Struktur $struktur)
{
$validator = Validator::make($request->all(), [
'status' => 'required|boolean',
]);
if ($validator->fails()) {
return response()->json([
'success' => false,
'message' => 'Validasi gagal'
], 422);
}
try {
$struktur->update([
'status' => $request->status
]);
return response()->json([
'success' => true,
'message' => 'Status struktur berhasil diperbarui!',
'struktur' => [
'id' => $struktur->id,
'status' => $struktur->status,
]
]);
} catch (\Exception $e) {
return response()->json([
'success' => false,
'message' => 'Terjadi kesalahan: ' . $e->getMessage()
], 500);
}
}
}

View File

@ -0,0 +1,254 @@
<?php
namespace App\Http\Controllers;
use App\Models\Pengajar;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Validator;
class ManajemenTenagaPendidikController extends Controller
{
public function index()
{
$pengajars = Pengajar::ordered()->with('jurusan')->get();
$jurusans = \App\Models\Jurusan::ordered()->get();
return view('admin.tenaga-pendidik.index', compact('pengajars', 'jurusans'));
}
public function store(Request $request)
{
$validator = Validator::make($request->all(), [
'nama_pengajar' => 'required|string|max:255',
'nip' => 'nullable|string|max:50',
'jurusan_id' => 'required|exists:jurusans,id',
'jabatan' => 'required|string|max:255',
'foto_pengajar' => 'nullable|image|mimes:jpeg,png,jpg,gif,webp|max:5120',
'status' => 'boolean',
'urutan' => 'nullable|integer|min:0',
], [
'nama_pengajar.required' => 'Nama pengajar harus diisi',
'nama_pengajar.max' => 'Nama pengajar maksimal 255 karakter',
'nip.max' => 'NIP maksimal 50 karakter',
'jurusan_id.required' => 'Jurusan harus dipilih',
'jurusan_id.exists' => 'Jurusan tidak valid',
'jabatan.required' => 'Jabatan harus diisi',
'jabatan.max' => 'Jabatan maksimal 255 karakter',
'foto_pengajar.image' => 'File harus berupa gambar',
'foto_pengajar.mimes' => 'Format gambar harus jpeg, png, jpg, gif, atau webp',
'foto_pengajar.max' => 'Ukuran gambar maksimal 5MB',
'urutan.integer' => 'Urutan harus berupa angka',
'urutan.min' => 'Urutan minimal 0',
]);
if ($validator->fails()) {
return response()->json([
'success' => false,
'message' => 'Validasi gagal',
'errors' => $validator->errors()
], 422);
}
try {
$data = [
'nama_pengajar' => $request->nama_pengajar,
'nip' => $request->nip,
'jurusan_id' => $request->jurusan_id,
'jabatan' => $request->jabatan,
'status' => $request->has('status') ? true : false,
'urutan' => $request->urutan ?? 0,
];
if ($request->hasFile('foto_pengajar')) {
$file = $request->file('foto_pengajar');
$fileName = time() . '_' . uniqid() . '.' . $file->getClientOriginalExtension();
$file->move(storage_path('guru'), $fileName);
$data['foto_pengajar'] = $fileName;
}
$pengajar = Pengajar::create($data);
return response()->json([
'success' => true,
'message' => 'Tenaga pendidik berhasil ditambahkan!',
'pengajar' => [
'id' => $pengajar->id,
'nama_pengajar' => $pengajar->nama_pengajar,
'nip' => $pengajar->nip,
'jurusan' => $pengajar->jurusan->nama_jurusan ?? '-',
'jabatan' => $pengajar->jabatan,
'jabatan_pendek' => $pengajar->jabatan_pendek,
'foto_pengajar_url' => $pengajar->foto_pengajar_url,
'status' => $pengajar->status,
'urutan' => $pengajar->urutan,
'created_at' => $pengajar->created_at->format('d M Y'),
]
]);
} catch (\Exception $e) {
return response()->json([
'success' => false,
'message' => 'Terjadi kesalahan: ' . $e->getMessage()
], 500);
}
}
public function show(Pengajar $pengajar)
{
return response()->json([
'success' => true,
'pengajar' => [
'id' => $pengajar->id,
'nama_pengajar' => $pengajar->nama_pengajar,
'nip' => $pengajar->nip,
'jurusan_id' => $pengajar->jurusan_id,
'nama_jurusan' => $pengajar->jurusan->nama_jurusan ?? '-',
'jabatan' => $pengajar->jabatan,
'foto_pengajar_url' => $pengajar->foto_pengajar_url,
'status' => $pengajar->status,
'urutan' => $pengajar->urutan,
'created_at' => $pengajar->created_at->format('d F Y'),
'updated_at' => $pengajar->updated_at->format('d F Y'),
]
]);
}
public function update(Request $request, Pengajar $pengajar)
{
$validator = Validator::make($request->all(), [
'nama_pengajar' => 'required|string|max:255',
'nip' => 'nullable|string|max:50',
'jurusan_id' => 'required|exists:jurusans,id',
'jabatan' => 'required|string|max:255',
'foto_pengajar' => 'nullable|image|mimes:jpeg,png,jpg,gif,webp|max:5120',
'status' => 'boolean',
'urutan' => 'nullable|integer|min:0',
], [
'nama_pengajar.required' => 'Nama pengajar harus diisi',
'nama_pengajar.max' => 'Nama pengajar maksimal 255 karakter',
'nip.max' => 'NIP maksimal 50 karakter',
'jurusan_id.required' => 'Jurusan harus dipilih',
'jurusan_id.exists' => 'Jurusan tidak valid',
'jabatan.required' => 'Jabatan harus diisi',
'jabatan.max' => 'Jabatan maksimal 255 karakter',
'foto_pengajar.image' => 'File harus berupa gambar',
'foto_pengajar.mimes' => 'Format gambar harus jpeg, png, jpg, gif, atau webp',
'foto_pengajar.max' => 'Ukuran gambar maksimal 5MB',
'urutan.integer' => 'Urutan harus berupa angka',
'urutan.min' => 'Urutan minimal 0',
]);
if ($validator->fails()) {
return response()->json([
'success' => false,
'message' => 'Validasi gagal',
'errors' => $validator->errors()
], 422);
}
try {
$data = [
'nama_pengajar' => $request->nama_pengajar,
'nip' => $request->nip,
'jurusan_id' => $request->jurusan_id,
'jabatan' => $request->jabatan,
'status' => $request->has('status') ? true : false,
'urutan' => $request->urutan ?? $pengajar->urutan,
];
if ($request->hasFile('foto_pengajar')) {
if ($pengajar->foto_pengajar &&
file_exists(storage_path('guru/' . $pengajar->foto_pengajar))) {
unlink(storage_path('guru/' . $pengajar->foto_pengajar));
}
$file = $request->file('foto_pengajar');
$fileName = time() . '_' . uniqid() . '.' . $file->getClientOriginalExtension();
$file->move(storage_path('guru'), $fileName);
$data['foto_pengajar'] = $fileName;
}
$pengajar->update($data);
return response()->json([
'success' => true,
'message' => 'Tenaga pendidik berhasil diperbarui!',
'pengajar' => [
'id' => $pengajar->id,
'nama_pengajar' => $pengajar->nama_pengajar,
'nip' => $pengajar->nip,
'jurusan' => $pengajar->jurusan->nama_jurusan ?? '-',
'jabatan' => $pengajar->jabatan,
'jabatan_pendek' => $pengajar->jabatan_pendek,
'foto_pengajar_url' => $pengajar->foto_pengajar_url,
'status' => $pengajar->status,
'urutan' => $pengajar->urutan,
'updated_at' => $pengajar->updated_at->format('d M Y'),
]
]);
} catch (\Exception $e) {
return response()->json([
'success' => false,
'message' => 'Terjadi kesalahan: ' . $e->getMessage()
], 500);
}
}
public function destroy(Pengajar $pengajar)
{
try {
if ($pengajar->foto_pengajar &&
file_exists(storage_path('guru/' . $pengajar->foto_pengajar))) {
unlink(storage_path('guru/' . $pengajar->foto_pengajar));
}
$pengajar->delete();
return response()->json([
'success' => true,
'message' => 'Tenaga pendidik berhasil dihapus!'
]);
} catch (\Exception $e) {
return response()->json([
'success' => false,
'message' => 'Terjadi kesalahan: ' . $e->getMessage()
], 500);
}
}
public function updateStatus(Request $request, Pengajar $pengajar)
{
$validator = Validator::make($request->all(), [
'status' => 'required|boolean',
]);
if ($validator->fails()) {
return response()->json([
'success' => false,
'message' => 'Validasi gagal'
], 422);
}
try {
$pengajar->update([
'status' => $request->status
]);
return response()->json([
'success' => true,
'message' => 'Status tenaga pendidik berhasil diperbarui!',
'pengajar' => [
'id' => $pengajar->id,
'status' => $pengajar->status,
]
]);
} catch (\Exception $e) {
return response()->json([
'success' => false,
'message' => 'Terjadi kesalahan: ' . $e->getMessage()
], 500);
}
}
}

View File

@ -0,0 +1,21 @@
<?php
namespace App\Http\Controllers;
use App\Models\Pengumuman;
use Illuminate\Http\Request;
class PengumumanController extends Controller
{
/**
* Display a listing of the resource.
*/
public function index()
{
$pengumuman = Pengumuman::active()
->ordered()
->get();
return view('pengumuman', compact('pengumuman'));
}
}

View File

@ -0,0 +1,21 @@
<?php
namespace App\Http\Controllers;
use App\Models\Prestasi;
use Illuminate\Http\Request;
class PrestasiController extends Controller
{
/**
* Display a listing of the resource.
*/
public function index()
{
$prestasi = Prestasi::active()
->ordered()
->get();
return view('prestasi', compact('prestasi'));
}
}

View File

@ -0,0 +1,34 @@
<?php
namespace App\Http\Controllers;
use App\Models\Banner;
use App\Models\Pengajar;
use App\Models\Jurusan;
use App\Models\Fasilitas;
use App\Models\Prestasi;
use App\Models\Struktur;
class ProfilController extends Controller
{
public function index()
{
$jumlahFasilitas = Fasilitas::active()->count();
$jumlahPengajar = Pengajar::active()->count();
$jumlahJurusan = Jurusan::active()->count();
$jumlahPrestasi = Prestasi::active()->count();
$banners = Banner::active()->ordered()->get();
$pengajars = Pengajar::active()->ordered()->get();
$struktur = Struktur::active()->first();
return view('profil', compact(
'banners',
'pengajars',
'jumlahPengajar',
'jumlahJurusan',
'jumlahFasilitas',
'jumlahPrestasi',
'struktur'
));
}
}

View File

@ -0,0 +1,157 @@
<?php
namespace App\Http\Controllers;
use App\Models\Admin;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Hash;
use Illuminate\Support\Facades\Validator;
class SettingsController extends Controller
{
/**
* Show settings page
*/
public function index()
{
/** @var \App\Models\Admin|null $admin */
$admin = Auth::guard('admin')->user();
if (! $admin) {
return redirect()->route('admin.login');
}
return view('admin.settings.index', compact('admin'));
}
/**
* Update profile information
*/
public function updateProfile(Request $request)
{
/** @var \App\Models\Admin|null $admin */
$admin = Auth::guard('admin')->user();
if (! $admin) {
return response()->json([
'success' => false,
'message' => 'Unauthorized'
], 401);
}
$validator = Validator::make($request->all(), [
'nama_lengkap' => 'required|string|max:255',
'email' => 'required|email|unique:admins,email,' . $admin->id,
'nomor_telepon' => 'nullable|string|max:15',
'foto_profil' => 'nullable|image|mimes:jpeg,png,jpg,gif|max:2048',
], [
'nama_lengkap.required' => 'Nama lengkap harus diisi',
'email.required' => 'Email harus diisi',
'email.email' => 'Format email tidak valid',
'email.unique' => 'Email sudah digunakan',
'foto_profil.image' => 'File harus berupa gambar',
'foto_profil.mimes' => 'Format gambar harus jpeg, png, jpg, atau gif',
'foto_profil.max' => 'Ukuran gambar maksimal 2MB',
]);
if ($validator->fails()) {
return response()->json([
'success' => false,
'message' => 'Validasi gagal',
'errors' => $validator->errors()
], 422);
}
try {
$data = [
'nama_lengkap' => $request->nama_lengkap,
'email' => $request->email,
'nomor_telepon' => $request->nomor_telepon,
];
if ($request->hasFile('foto_profil')) {
if ($admin->foto_profil && file_exists(public_path('images/photo/' . $admin->foto_profil))) {
unlink(public_path('images/photo/' . $admin->foto_profil));
}
$file = $request->file('foto_profil');
$fileName = time() . '_' . uniqid() . '.' . $file->getClientOriginalExtension();
$file->move(public_path('images/photo'), $fileName);
$data['foto_profil'] = $fileName;
}
$admin->fill($data);
$admin->save();
return response()->json([
'success' => true,
'message' => 'Profil berhasil diperbarui!',
'admin' => [
'nama_lengkap' => $admin->nama_lengkap,
'email' => $admin->email,
'foto_profil' => $admin->foto_profil ? asset('images/photo/' . $admin->foto_profil) : null,
]
]);
} catch (\Exception $e) {
return response()->json([
'success' => false,
'message' => 'Terjadi kesalahan: ' . $e->getMessage()
], 500);
}
}
/**
* Update password
*/
public function updatePassword(Request $request)
{
/** @var \App\Models\Admin|null $admin */
$admin = Auth::guard('admin')->user();
if (! $admin) {
return response()->json([
'success' => false,
'message' => 'Unauthorized'
], 401);
}
$validator = Validator::make($request->all(), [
'current_password' => 'required',
'new_password' => 'required|min:6|confirmed',
], [
'current_password.required' => 'Password saat ini harus diisi',
'new_password.required' => 'Password baru harus diisi',
'new_password.min' => 'Password baru minimal 6 karakter',
'new_password.confirmed' => 'Konfirmasi password tidak cocok',
]);
if ($validator->fails()) {
return response()->json([
'success' => false,
'message' => 'Validasi gagal',
'errors' => $validator->errors()
], 422);
}
if (!Hash::check($request->current_password, $admin->password)) {
return response()->json([
'success' => false,
'message' => 'Password saat ini salah!'
], 422);
}
try {
$admin->password = Hash::make($request->new_password);
$admin->save();
return response()->json([
'success' => true,
'message' => 'Password berhasil diperbarui!'
]);
} catch (\Exception $e) {
return response()->json([
'success' => false,
'message' => 'Terjadi kesalahan: ' . $e->getMessage()
], 500);
}
}
}

87
app/Models/Admin.php Normal file
View File

@ -0,0 +1,87 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
class Admin extends Authenticatable
{
use HasFactory, Notifiable;
protected $guard = 'admin';
/**
* The attributes that are mass assignable.
*
* @var array<int, string>
*/
protected $fillable = [
'nama_lengkap',
'email',
'password',
'nomor_telepon',
'foto_profil',
];
/**
* The attributes that should be hidden for serialization.
*
* @var array<int, string>
*/
protected $hidden = [
'password',
'remember_token',
];
/**
* The attributes that should be cast.
*
* @var array<string, string>
*/
protected $casts = [
'email_verified_at' => 'datetime',
'password' => 'hashed',
];
public function jurusans()
{
return $this->hasMany(Jurusan::class);
}
public function banners()
{
return $this->hasMany(Banner::class);
}
public function fasilitas()
{
return $this->hasMany(Fasilitas::class);
}
public function galleries()
{
return $this->hasMany(Gallery::class);
}
public function pengajars()
{
return $this->hasMany(Pengajar::class);
}
public function prestasis()
{
return $this->hasMany(Prestasi::class);
}
public function pengumuman()
{
return $this->hasMany(Pengumuman::class);
}
public function strukturs()
{
return $this->hasMany(Struktur::class);
}
}

68
app/Models/Banner.php Normal file
View File

@ -0,0 +1,68 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Banner extends Model
{
use HasFactory;
/**
* The attributes that are mass assignable.
*
* @var array<int, string>
*/
protected $fillable = [
'admin_id',
'gambar',
'judul',
'deskripsi',
'status',
'urutan',
];
/**
* The attributes that should be cast.
*
* @var array<string, string>
*/
protected $casts = [
'status' => 'boolean',
'urutan' => 'integer',
];
public function admin()
{
return $this->belongsTo(Admin::class);
}
/**
* Scope a query to only include active banners.
*/
public function getGambarUrlAttribute()
{
if ($this->gambar) {
return url('/storage/banner/'.$this->gambar);
}
return asset('images/default-img.png');
}
/**
* Scope a query to only include active banners.
*/
public function scopeActive($query)
{
return $query->where('status', true);
}
/**
* Scope a query to order by urutan.
*/
public function scopeOrdered($query)
{
return $query->orderBy('urutan')->orderBy('created_at', 'desc');
}
}

76
app/Models/Fasilitas.php Normal file
View File

@ -0,0 +1,76 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Str;
class Fasilitas extends Model
{
use HasFactory;
/**
* The attributes that are mass assignable.
*
* @var array<int, string>
*/
protected $fillable = [
'admin_id',
'nama_fasilitas',
'deskripsi_fasilitas',
'foto_fasilitas',
'status',
'urutan',
];
/**
* The attributes that should be cast.
*
* @var array<string, string>
*/
protected $casts = [
'status' => 'boolean',
'urutan' => 'integer',
];
public function admin()
{
return $this->belongsTo(Admin::class);
}
/**
* Scope a query to only include active fasilitas.
*/
public function getFotoFasilitasUrlAttribute()
{
if ($this->foto_fasilitas) {
return asset('storage/fasilitas/' . $this->foto_fasilitas);
}
return asset('images/default-img.png');
}
/**
* Scope a query to only include active fasilitas.
*/
public function scopeActive($query)
{
return $query->where('status', true);
}
/**
* Scope a query to order by urutan.
*/
public function scopeOrdered($query)
{
return $query->orderBy('urutan')->orderBy('created_at', 'desc');
}
/**
* Get short description (limit to 150 characters)
*/
public function getDeskripsiPendekAttribute()
{
return Str::limit($this->deskripsi_fasilitas, 150);
}
}

77
app/Models/Gallery.php Normal file
View File

@ -0,0 +1,77 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Str;
class Gallery extends Model
{
use HasFactory;
/**
* The attributes that are mass assignable.
*
* @var array<int, string>
*/
protected $fillable = [
'admin_id',
'nama_gallery',
'deskripsi_gallery',
'foto_gallery',
'status',
'urutan',
];
/**
* The attributes that should be cast.
*
* @var array<string, string>
*/
protected $casts = [
'status' => 'boolean',
'urutan' => 'integer',
];
public function admin()
{
return $this->belongsTo(Admin::class);
}
/**
* Scope a query to only include active gallery.
*/
public function getFotoGalleryUrlAttribute()
{
if ($this->foto_gallery) {
return url('/storage/gallery/'.$this->foto_gallery);
}
return asset('images/default-img.png');
}
/**
* Scope a query to only include active galleries.
*/
public function scopeActive($query)
{
return $query->where('status', true);
}
/**
* Scope a query to order by urutan.
*/
public function scopeOrdered($query)
{
return $query->orderBy('urutan')->orderBy('created_at', 'desc');
}
/**
* Get short description (limit to 150 characters)
*/
public function getDeskripsiPendekAttribute()
{
return Str::limit($this->deskripsi_gallery, 150);
}
}

83
app/Models/Jurusan.php Normal file
View File

@ -0,0 +1,83 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Str;
class Jurusan extends Model
{
use HasFactory;
/**
* The attributes that are mass assignable.
*
* @var array<int, string>
*/
protected $fillable = [
'admin_id',
'nama_jurusan',
'deskripsi_jurusan',
'kode_jurusan',
'status',
'urutan',
];
/**
* The attributes that should be cast.
*
* @var array<string, string>
*/
protected $casts = [
'status' => 'boolean',
'urutan' => 'integer',
];
public function admin()
{
return $this->belongsTo(Admin::class);
}
public function prestasis()
{
return $this->hasMany(Prestasi::class);
}
public function pengajars()
{
return $this->hasMany(Pengajar::class);
}
/**
* Scope a query to only include active jurusan.
*/
public function scopeActive($query)
{
return $query->where('status', true);
}
/**
* Scope a query to order by urutan.
*/
public function scopeOrdered($query)
{
return $query->orderBy('urutan')->orderBy('created_at', 'desc');
}
/**
* Get short description (limit to 150 characters)
*/
public function getDeskripsiPendekAttribute()
{
return Str::limit($this->deskripsi_jurusan, 150);
}
/**
* Get formatted kode jurusan
*/
public function getKodeFormattedAttribute()
{
return strtoupper($this->kode_jurusan);
}
}

83
app/Models/Pengajar.php Normal file
View File

@ -0,0 +1,83 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Str;
class Pengajar extends Model
{
use HasFactory;
/**
* The attributes that are mass assignable.
*
* @var array<int, string>
*/
protected $fillable = [
'admin_id',
'jurusan_id',
'nama_pengajar',
'nip',
'jabatan',
'foto_pengajar',
'status',
'urutan',
];
/**
* The attributes that should be cast.
*
* @var array<string, string>
*/
protected $casts = [
'status' => 'boolean',
'urutan' => 'integer',
];
public function admin()
{
return $this->belongsTo(Admin::class);
}
public function jurusan()
{
return $this->belongsTo(Jurusan::class);
}
/**
* Get the pengajar image URL
*/
public function getFotoPengajarUrlAttribute()
{
if ($this->foto_pengajar) {
return asset('storage/guru/' . $this->foto_pengajar);
}
return asset('images/default-img.png');
}
/**
* Scope a query to only include active pengajar.
*/
public function scopeActive($query)
{
return $query->where('status', true);
}
/**
* Scope a query to order by urutan.
*/
public function scopeOrdered($query)
{
return $query->orderBy('urutan')->orderBy('created_at', 'desc');
}
/**
* Get short jabatan (limit to 50 characters)
*/
public function getJabatanPendekAttribute()
{
return Str::limit($this->jabatan, 50);
}
}

69
app/Models/Pengumuman.php Normal file
View File

@ -0,0 +1,69 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Str;
class Pengumuman extends Model
{
use HasFactory;
protected $table = 'pengumuman';
protected $fillable = [
'admin_id',
'nama_pengumuman',
'deskripsi_pengumuman',
'foto_pengumuman',
'status',
'urutan',
];
protected $casts = [
'status' => 'boolean',
'urutan' => 'integer',
];
public function admin()
{
return $this->belongsTo(Admin::class);
}
/**
* Get foto pengumuman URL
*/
public function getFotoPengumumanUrlAttribute()
{
if ($this->foto_pengumuman) {
return url('/storage/pengumuman/'.$this->foto_pengumuman);
}
return asset('images/default-img.png');
}
/**
* Get deskripsi pendek
*/
public function getDeskripsiPendekAttribute()
{
return Str::limit($this->deskripsi_pengumuman, 100);
}
/**
* Scope untuk pengumuman aktif
*/
public function scopeActive($query)
{
return $query->where('status', true);
}
/**
* Scope untuk urutan
*/
public function scopeOrdered($query)
{
return $query->orderBy('urutan', 'desc')->orderBy('created_at', 'desc');
}
}

57
app/Models/Prestasi.php Normal file
View File

@ -0,0 +1,57 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Prestasi extends Model
{
use HasFactory;
protected $fillable = [
'admin_id',
'jurusan_id',
'nama_siswa',
'nama_prestasi',
'peringkat',
'tahun_prestasi',
'foto_prestasi',
'status',
'urutan'
];
protected $casts = [
'status' => 'boolean',
'tahun_prestasi' => 'integer',
'urutan' => 'integer'
];
public function admin()
{
return $this->belongsTo(Admin::class);
}
public function jurusan()
{
return $this->belongsTo(Jurusan::class, 'jurusan_id');
}
public function getFotoPrestasiUrlAttribute()
{
if ($this->foto_prestasi) {
return asset('storage/prestasi/' . $this->foto_prestasi);
}
return asset('images/default-img.png');
}
public function scopeActive($query)
{
return $query->where('status', true);
}
public function scopeOrdered($query)
{
return $query->orderBy('urutan', 'desc')->orderBy('created_at', 'desc');
}
}

53
app/Models/Struktur.php Normal file
View File

@ -0,0 +1,53 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Struktur extends Model
{
use HasFactory;
protected $fillable = [
'admin_id',
'gambar_struktur',
'status'
];
protected $casts = [
'status' => 'boolean'
];
public function admin()
{
return $this->belongsTo(Admin::class);
}
/**
* Get gambar struktur URL
*/
public function getGambarStrukturUrlAttribute()
{
if ($this->gambar_struktur) {
return asset('storage/struktur/' . $this->gambar_struktur);
}
return asset('images/default-img.png');
}
/**
* Scope untuk struktur aktif
*/
public function scopeActive($query)
{
return $query->where('status', true);
}
/**
* Scope untuk urutan
*/
public function scopeOrdered($query)
{
return $query->orderBy('created_at', 'desc');
}
}

View File

@ -0,0 +1,24 @@
<?php
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
class AppServiceProvider extends ServiceProvider
{
/**
* Register any application services.
*/
public function register(): void
{
//
}
/**
* Bootstrap any application services.
*/
public function boot(): void
{
//
}
}

18
artisan Normal file
View File

@ -0,0 +1,18 @@
#!/usr/bin/env php
<?php
use Illuminate\Foundation\Application;
use Symfony\Component\Console\Input\ArgvInput;
define('LARAVEL_START', microtime(true));
// Register the Composer autoloader...
require __DIR__.'/vendor/autoload.php';
// Bootstrap Laravel and handle the command...
/** @var Application $app */
$app = require_once __DIR__.'/bootstrap/app.php';
$status = $app->handleCommand(new ArgvInput);
exit($status);

18
bootstrap/app.php Normal file
View File

@ -0,0 +1,18 @@
<?php
use Illuminate\Foundation\Application;
use Illuminate\Foundation\Configuration\Exceptions;
use Illuminate\Foundation\Configuration\Middleware;
return Application::configure(basePath: dirname(__DIR__))
->withRouting(
web: __DIR__.'/../routes/web.php',
commands: __DIR__.'/../routes/console.php',
health: '/up',
)
->withMiddleware(function (Middleware $middleware): void {
//
})
->withExceptions(function (Exceptions $exceptions): void {
//
})->create();

2
bootstrap/cache/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
*
!.gitignore

5
bootstrap/providers.php Normal file
View File

@ -0,0 +1,5 @@
<?php
return [
App\Providers\AppServiceProvider::class,
];

89
composer.json Normal file
View File

@ -0,0 +1,89 @@
{
"$schema": "https://getcomposer.org/schema.json",
"name": "laravel/laravel",
"type": "project",
"description": "The skeleton application for the Laravel framework.",
"keywords": [
"laravel",
"framework"
],
"license": "MIT",
"require": {
"php": "^8.2",
"laravel/framework": "^12.0",
"laravel/tinker": "^2.10.1"
},
"require-dev": {
"fakerphp/faker": "^1.23",
"laravel/pail": "^1.2.2",
"laravel/pint": "^1.24",
"laravel/sail": "^1.41",
"mockery/mockery": "^1.6",
"nunomaduro/collision": "^8.6",
"phpunit/phpunit": "^11.5.3"
},
"autoload": {
"psr-4": {
"App\\": "app/",
"Database\\Factories\\": "database/factories/",
"Database\\Seeders\\": "database/seeders/"
}
},
"autoload-dev": {
"psr-4": {
"Tests\\": "tests/"
}
},
"scripts": {
"setup": [
"composer install",
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\"",
"@php artisan key:generate",
"@php artisan migrate --force",
"npm install",
"npm run build"
],
"dev": [
"Composer\\Config::disableProcessTimeout",
"npx concurrently -c \"#93c5fd,#c4b5fd,#fdba74\" \"php artisan serve\" \"php artisan queue:listen --tries=1\" \"npm run dev\" --names='server,queue,vite'"
],
"test": [
"@php artisan config:clear --ansi",
"@php artisan test"
],
"post-autoload-dump": [
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
"@php artisan package:discover --ansi"
],
"post-update-cmd": [
"@php artisan vendor:publish --tag=laravel-assets --ansi --force"
],
"post-root-package-install": [
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"@php artisan key:generate --ansi",
"@php -r \"file_exists('database/database.sqlite') || touch('database/database.sqlite');\"",
"@php artisan migrate --graceful --ansi"
],
"pre-package-uninstall": [
"Illuminate\\Foundation\\ComposerScripts::prePackageUninstall"
]
},
"extra": {
"laravel": {
"dont-discover": []
}
},
"config": {
"optimize-autoloader": true,
"preferred-install": "dist",
"sort-packages": true,
"allow-plugins": {
"pestphp/pest-plugin": true,
"php-http/discovery": true
}
},
"minimum-stability": "stable",
"prefer-stable": true
}

8366
composer.lock generated Normal file

File diff suppressed because it is too large Load Diff

126
config/app.php Normal file
View File

@ -0,0 +1,126 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Application Name
|--------------------------------------------------------------------------
|
| This value is the name of your application, which will be used when the
| framework needs to place the application's name in a notification or
| other UI elements where an application name needs to be displayed.
|
*/
'name' => env('APP_NAME', 'Laravel'),
/*
|--------------------------------------------------------------------------
| Application Environment
|--------------------------------------------------------------------------
|
| This value determines the "environment" your application is currently
| running in. This may determine how you prefer to configure various
| services the application utilizes. Set this in your ".env" file.
|
*/
'env' => env('APP_ENV', 'production'),
/*
|--------------------------------------------------------------------------
| Application Debug Mode
|--------------------------------------------------------------------------
|
| When your application is in debug mode, detailed error messages with
| stack traces will be shown on every error that occurs within your
| application. If disabled, a simple generic error page is shown.
|
*/
'debug' => (bool) env('APP_DEBUG', false),
/*
|--------------------------------------------------------------------------
| Application URL
|--------------------------------------------------------------------------
|
| This URL is used by the console to properly generate URLs when using
| the Artisan command line tool. You should set this to the root of
| the application so that it's available within Artisan commands.
|
*/
'url' => env('APP_URL', 'http://localhost'),
/*
|--------------------------------------------------------------------------
| Application Timezone
|--------------------------------------------------------------------------
|
| Here you may specify the default timezone for your application, which
| will be used by the PHP date and date-time functions. The timezone
| is set to "UTC" by default as it is suitable for most use cases.
|
*/
'timezone' => 'UTC',
/*
|--------------------------------------------------------------------------
| Application Locale Configuration
|--------------------------------------------------------------------------
|
| The application locale determines the default locale that will be used
| by Laravel's translation / localization methods. This option can be
| set to any locale for which you plan to have translation strings.
|
*/
'locale' => env('APP_LOCALE', 'en'),
'fallback_locale' => env('APP_FALLBACK_LOCALE', 'en'),
'faker_locale' => env('APP_FAKER_LOCALE', 'en_US'),
/*
|--------------------------------------------------------------------------
| Encryption Key
|--------------------------------------------------------------------------
|
| This key is utilized by Laravel's encryption services and should be set
| to a random, 32 character string to ensure that all encrypted values
| are secure. You should do this prior to deploying the application.
|
*/
'cipher' => 'AES-256-CBC',
'key' => env('APP_KEY'),
'previous_keys' => [
...array_filter(
explode(',', (string) env('APP_PREVIOUS_KEYS', ''))
),
],
/*
|--------------------------------------------------------------------------
| Maintenance Mode Driver
|--------------------------------------------------------------------------
|
| These configuration options determine the driver used to determine and
| manage Laravel's "maintenance mode" status. The "cache" driver will
| allow maintenance mode to be controlled across multiple machines.
|
| Supported drivers: "file", "cache"
|
*/
'maintenance' => [
'driver' => env('APP_MAINTENANCE_DRIVER', 'file'),
'store' => env('APP_MAINTENANCE_STORE', 'database'),
],
];

115
config/auth.php Normal file
View File

@ -0,0 +1,115 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Authentication Defaults
|--------------------------------------------------------------------------
|
| This option defines the default authentication "guard" and password
| reset "broker" for your application. You may change these values
| as required, but they're a perfect start for most applications.
|
*/
'defaults' => [
'guard' => env('AUTH_GUARD', 'admin'),
'passwords' => env('AUTH_PASSWORD_BROKER', 'admins'),
],
/*
|--------------------------------------------------------------------------
| Authentication Guards
|--------------------------------------------------------------------------
|
| Next, you may define every authentication guard for your application.
| Of course, a great default configuration has been defined for you
| which utilizes session storage plus the Eloquent user provider.
|
| All authentication guards have a user provider, which defines how the
| users are actually retrieved out of your database or other storage
| system used by the application. Typically, Eloquent is utilized.
|
| Supported: "session"
|
*/
'guards' => [
'web' => [
'driver' => 'session',
'provider' => 'admins',
],
'admin' => [
'driver' => 'session',
'provider' => 'admins',
],
],
/*
|--------------------------------------------------------------------------
| User Providers
|--------------------------------------------------------------------------
|
| All authentication guards have a user provider, which defines how the
| users are actually retrieved out of your database or other storage
| system used by the application. Typically, Eloquent is utilized.
|
| If you have multiple user tables or models you may configure multiple
| providers to represent the model / table. These providers may then
| be assigned to any extra authentication guards you have defined.
|
| Supported: "database", "eloquent"
|
*/
'providers' => [
'admins' => [
'driver' => 'eloquent',
'model' => App\Models\Admin::class,
],
],
/*
|--------------------------------------------------------------------------
| Resetting Passwords
|--------------------------------------------------------------------------
|
| These configuration options specify the behavior of Laravel's password
| reset functionality, including the table utilized for token storage
| and the user provider that is invoked to actually retrieve users.
|
| The expiry time is the number of minutes that each reset token will be
| considered valid. This security feature keeps tokens short-lived so
| they have less time to be guessed. You may change this as needed.
|
| The throttle setting is the number of seconds a user must wait before
| generating more password reset tokens. This prevents the user from
| quickly generating a very large amount of password reset tokens.
|
*/
'passwords' => [
'admins' => [
'provider' => 'admins',
'table' => 'password_reset_tokens',
'expire' => 60,
'throttle' => 60,
],
],
/*
|--------------------------------------------------------------------------
| Password Confirmation Timeout
|--------------------------------------------------------------------------
|
| Here you may define the number of seconds before a password confirmation
| window expires and users are asked to re-enter their password via the
| confirmation screen. By default, the timeout lasts for three hours.
|
*/
'password_timeout' => env('AUTH_PASSWORD_TIMEOUT', 10800),
];

117
config/cache.php Normal file
View File

@ -0,0 +1,117 @@
<?php
use Illuminate\Support\Str;
return [
/*
|--------------------------------------------------------------------------
| Default Cache Store
|--------------------------------------------------------------------------
|
| This option controls the default cache store that will be used by the
| framework. This connection is utilized if another isn't explicitly
| specified when running a cache operation inside the application.
|
*/
'default' => env('CACHE_STORE', 'database'),
/*
|--------------------------------------------------------------------------
| Cache Stores
|--------------------------------------------------------------------------
|
| Here you may define all of the cache "stores" for your application as
| well as their drivers. You may even define multiple stores for the
| same cache driver to group types of items stored in your caches.
|
| Supported drivers: "array", "database", "file", "memcached",
| "redis", "dynamodb", "octane",
| "failover", "null"
|
*/
'stores' => [
'array' => [
'driver' => 'array',
'serialize' => false,
],
'database' => [
'driver' => 'database',
'connection' => env('DB_CACHE_CONNECTION'),
'table' => env('DB_CACHE_TABLE', 'cache'),
'lock_connection' => env('DB_CACHE_LOCK_CONNECTION'),
'lock_table' => env('DB_CACHE_LOCK_TABLE'),
],
'file' => [
'driver' => 'file',
'path' => storage_path('framework/cache/data'),
'lock_path' => storage_path('framework/cache/data'),
],
'memcached' => [
'driver' => 'memcached',
'persistent_id' => env('MEMCACHED_PERSISTENT_ID'),
'sasl' => [
env('MEMCACHED_USERNAME'),
env('MEMCACHED_PASSWORD'),
],
'options' => [
// Memcached::OPT_CONNECT_TIMEOUT => 2000,
],
'servers' => [
[
'host' => env('MEMCACHED_HOST', '127.0.0.1'),
'port' => env('MEMCACHED_PORT', 11211),
'weight' => 100,
],
],
],
'redis' => [
'driver' => 'redis',
'connection' => env('REDIS_CACHE_CONNECTION', 'cache'),
'lock_connection' => env('REDIS_CACHE_LOCK_CONNECTION', 'default'),
],
'dynamodb' => [
'driver' => 'dynamodb',
'key' => env('AWS_ACCESS_KEY_ID'),
'secret' => env('AWS_SECRET_ACCESS_KEY'),
'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
'table' => env('DYNAMODB_CACHE_TABLE', 'cache'),
'endpoint' => env('DYNAMODB_ENDPOINT'),
],
'octane' => [
'driver' => 'octane',
],
'failover' => [
'driver' => 'failover',
'stores' => [
'database',
'array',
],
],
],
/*
|--------------------------------------------------------------------------
| Cache Key Prefix
|--------------------------------------------------------------------------
|
| When utilizing the APC, database, memcached, Redis, and DynamoDB cache
| stores, there might be other applications using the same cache. For
| that reason, you may prefix every cache key to avoid collisions.
|
*/
'prefix' => env('CACHE_PREFIX', Str::slug((string) env('APP_NAME', 'laravel')).'-cache-'),
];

183
config/database.php Normal file
View File

@ -0,0 +1,183 @@
<?php
use Illuminate\Support\Str;
return [
/*
|--------------------------------------------------------------------------
| Default Database Connection Name
|--------------------------------------------------------------------------
|
| Here you may specify which of the database connections below you wish
| to use as your default connection for database operations. This is
| the connection which will be utilized unless another connection
| is explicitly specified when you execute a query / statement.
|
*/
'default' => env('DB_CONNECTION', 'sqlite'),
/*
|--------------------------------------------------------------------------
| Database Connections
|--------------------------------------------------------------------------
|
| Below are all of the database connections defined for your application.
| An example configuration is provided for each database system which
| is supported by Laravel. You're free to add / remove connections.
|
*/
'connections' => [
'sqlite' => [
'driver' => 'sqlite',
'url' => env('DB_URL'),
'database' => env('DB_DATABASE', database_path('database.sqlite')),
'prefix' => '',
'foreign_key_constraints' => env('DB_FOREIGN_KEYS', true),
'busy_timeout' => null,
'journal_mode' => null,
'synchronous' => null,
'transaction_mode' => 'DEFERRED',
],
'mysql' => [
'driver' => 'mysql',
'url' => env('DB_URL'),
'host' => env('DB_HOST', '127.0.0.1'),
'port' => env('DB_PORT', '3306'),
'database' => env('DB_DATABASE', 'laravel'),
'username' => env('DB_USERNAME', 'root'),
'password' => env('DB_PASSWORD', ''),
'unix_socket' => env('DB_SOCKET', ''),
'charset' => env('DB_CHARSET', 'utf8mb4'),
'collation' => env('DB_COLLATION', 'utf8mb4_unicode_ci'),
'prefix' => '',
'prefix_indexes' => true,
'strict' => true,
'engine' => null,
'options' => extension_loaded('pdo_mysql') ? array_filter([
PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'),
]) : [],
],
'mariadb' => [
'driver' => 'mariadb',
'url' => env('DB_URL'),
'host' => env('DB_HOST', '127.0.0.1'),
'port' => env('DB_PORT', '3306'),
'database' => env('DB_DATABASE', 'laravel'),
'username' => env('DB_USERNAME', 'root'),
'password' => env('DB_PASSWORD', ''),
'unix_socket' => env('DB_SOCKET', ''),
'charset' => env('DB_CHARSET', 'utf8mb4'),
'collation' => env('DB_COLLATION', 'utf8mb4_unicode_ci'),
'prefix' => '',
'prefix_indexes' => true,
'strict' => true,
'engine' => null,
'options' => extension_loaded('pdo_mysql') ? array_filter([
PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'),
]) : [],
],
'pgsql' => [
'driver' => 'pgsql',
'url' => env('DB_URL'),
'host' => env('DB_HOST', '127.0.0.1'),
'port' => env('DB_PORT', '5432'),
'database' => env('DB_DATABASE', 'laravel'),
'username' => env('DB_USERNAME', 'root'),
'password' => env('DB_PASSWORD', ''),
'charset' => env('DB_CHARSET', 'utf8'),
'prefix' => '',
'prefix_indexes' => true,
'search_path' => 'public',
'sslmode' => 'prefer',
],
'sqlsrv' => [
'driver' => 'sqlsrv',
'url' => env('DB_URL'),
'host' => env('DB_HOST', 'localhost'),
'port' => env('DB_PORT', '1433'),
'database' => env('DB_DATABASE', 'laravel'),
'username' => env('DB_USERNAME', 'root'),
'password' => env('DB_PASSWORD', ''),
'charset' => env('DB_CHARSET', 'utf8'),
'prefix' => '',
'prefix_indexes' => true,
// 'encrypt' => env('DB_ENCRYPT', 'yes'),
// 'trust_server_certificate' => env('DB_TRUST_SERVER_CERTIFICATE', 'false'),
],
],
/*
|--------------------------------------------------------------------------
| Migration Repository Table
|--------------------------------------------------------------------------
|
| This table keeps track of all the migrations that have already run for
| your application. Using this information, we can determine which of
| the migrations on disk haven't actually been run on the database.
|
*/
'migrations' => [
'table' => 'migrations',
'update_date_on_publish' => true,
],
/*
|--------------------------------------------------------------------------
| Redis Databases
|--------------------------------------------------------------------------
|
| Redis is an open source, fast, and advanced key-value store that also
| provides a richer body of commands than a typical key-value system
| such as Memcached. You may define your connection settings here.
|
*/
'redis' => [
'client' => env('REDIS_CLIENT', 'phpredis'),
'options' => [
'cluster' => env('REDIS_CLUSTER', 'redis'),
'prefix' => env('REDIS_PREFIX', Str::slug((string) env('APP_NAME', 'laravel')).'-database-'),
'persistent' => env('REDIS_PERSISTENT', false),
],
'default' => [
'url' => env('REDIS_URL'),
'host' => env('REDIS_HOST', '127.0.0.1'),
'username' => env('REDIS_USERNAME'),
'password' => env('REDIS_PASSWORD'),
'port' => env('REDIS_PORT', '6379'),
'database' => env('REDIS_DB', '0'),
'max_retries' => env('REDIS_MAX_RETRIES', 3),
'backoff_algorithm' => env('REDIS_BACKOFF_ALGORITHM', 'decorrelated_jitter'),
'backoff_base' => env('REDIS_BACKOFF_BASE', 100),
'backoff_cap' => env('REDIS_BACKOFF_CAP', 1000),
],
'cache' => [
'url' => env('REDIS_URL'),
'host' => env('REDIS_HOST', '127.0.0.1'),
'username' => env('REDIS_USERNAME'),
'password' => env('REDIS_PASSWORD'),
'port' => env('REDIS_PORT', '6379'),
'database' => env('REDIS_CACHE_DB', '1'),
'max_retries' => env('REDIS_MAX_RETRIES', 3),
'backoff_algorithm' => env('REDIS_BACKOFF_ALGORITHM', 'decorrelated_jitter'),
'backoff_base' => env('REDIS_BACKOFF_BASE', 100),
'backoff_cap' => env('REDIS_BACKOFF_CAP', 1000),
],
],
];

78
config/filesystems.php Normal file
View File

@ -0,0 +1,78 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Default Filesystem Disk
|--------------------------------------------------------------------------
|
| Here you may specify the default filesystem disk that should be used
| by the framework. The "local" disk, as well as a variety of cloud
| based disks are available to your application for file storage.
|
*/
'default' => env('FILESYSTEM_DISK', 'local'),
/*
|--------------------------------------------------------------------------
| Filesystem Disks
|--------------------------------------------------------------------------
|
| Below you may configure as many filesystem disks as necessary, and you
| may even configure multiple disks for the same driver. Examples for
| most supported storage drivers are configured here for reference.
|
| Supported drivers: "local", "ftp", "sftp", "s3"
|
*/
'disks' => [
'local' => [
'driver' => 'local',
'root' => storage_path('app'),
'throw' => false,
],
'public' => [
'driver' => 'local',
'root' => storage_path('app/public'),
'url' => rtrim(env('APP_URL', 'http://localhost'), '/').'/storage',
'visibility' => 'public',
'throw' => false,
'report' => false,
],
's3' => [
'driver' => 's3',
'key' => env('AWS_ACCESS_KEY_ID'),
'secret' => env('AWS_SECRET_ACCESS_KEY'),
'region' => env('AWS_DEFAULT_REGION'),
'bucket' => env('AWS_BUCKET'),
'url' => env('AWS_URL'),
'endpoint' => env('AWS_ENDPOINT'),
'use_path_style_endpoint' => env('AWS_USE_PATH_STYLE_ENDPOINT', false),
'throw' => false,
'report' => false,
],
],
/*
|--------------------------------------------------------------------------
| Symbolic Links
|--------------------------------------------------------------------------
|
| Here you may configure the symbolic links that will be created when the
| `storage:link` Artisan command is executed. The array keys should be
| the locations of the links and the values should be their targets.
|
*/
'links' => [
public_path('storage') => storage_path('app/public'),
],
];

132
config/logging.php Normal file
View File

@ -0,0 +1,132 @@
<?php
use Monolog\Handler\NullHandler;
use Monolog\Handler\StreamHandler;
use Monolog\Handler\SyslogUdpHandler;
use Monolog\Processor\PsrLogMessageProcessor;
return [
/*
|--------------------------------------------------------------------------
| Default Log Channel
|--------------------------------------------------------------------------
|
| This option defines the default log channel that is utilized to write
| messages to your logs. The value provided here should match one of
| the channels present in the list of "channels" configured below.
|
*/
'default' => env('LOG_CHANNEL', 'stack'),
/*
|--------------------------------------------------------------------------
| Deprecations Log Channel
|--------------------------------------------------------------------------
|
| This option controls the log channel that should be used to log warnings
| regarding deprecated PHP and library features. This allows you to get
| your application ready for upcoming major versions of dependencies.
|
*/
'deprecations' => [
'channel' => env('LOG_DEPRECATIONS_CHANNEL', 'null'),
'trace' => env('LOG_DEPRECATIONS_TRACE', false),
],
/*
|--------------------------------------------------------------------------
| Log Channels
|--------------------------------------------------------------------------
|
| Here you may configure the log channels for your application. Laravel
| utilizes the Monolog PHP logging library, which includes a variety
| of powerful log handlers and formatters that you're free to use.
|
| Available drivers: "single", "daily", "slack", "syslog",
| "errorlog", "monolog", "custom", "stack"
|
*/
'channels' => [
'stack' => [
'driver' => 'stack',
'channels' => explode(',', (string) env('LOG_STACK', 'single')),
'ignore_exceptions' => false,
],
'single' => [
'driver' => 'single',
'path' => storage_path('logs/laravel.log'),
'level' => env('LOG_LEVEL', 'debug'),
'replace_placeholders' => true,
],
'daily' => [
'driver' => 'daily',
'path' => storage_path('logs/laravel.log'),
'level' => env('LOG_LEVEL', 'debug'),
'days' => env('LOG_DAILY_DAYS', 14),
'replace_placeholders' => true,
],
'slack' => [
'driver' => 'slack',
'url' => env('LOG_SLACK_WEBHOOK_URL'),
'username' => env('LOG_SLACK_USERNAME', 'Laravel Log'),
'emoji' => env('LOG_SLACK_EMOJI', ':boom:'),
'level' => env('LOG_LEVEL', 'critical'),
'replace_placeholders' => true,
],
'papertrail' => [
'driver' => 'monolog',
'level' => env('LOG_LEVEL', 'debug'),
'handler' => env('LOG_PAPERTRAIL_HANDLER', SyslogUdpHandler::class),
'handler_with' => [
'host' => env('PAPERTRAIL_URL'),
'port' => env('PAPERTRAIL_PORT'),
'connectionString' => 'tls://'.env('PAPERTRAIL_URL').':'.env('PAPERTRAIL_PORT'),
],
'processors' => [PsrLogMessageProcessor::class],
],
'stderr' => [
'driver' => 'monolog',
'level' => env('LOG_LEVEL', 'debug'),
'handler' => StreamHandler::class,
'handler_with' => [
'stream' => 'php://stderr',
],
'formatter' => env('LOG_STDERR_FORMATTER'),
'processors' => [PsrLogMessageProcessor::class],
],
'syslog' => [
'driver' => 'syslog',
'level' => env('LOG_LEVEL', 'debug'),
'facility' => env('LOG_SYSLOG_FACILITY', LOG_USER),
'replace_placeholders' => true,
],
'errorlog' => [
'driver' => 'errorlog',
'level' => env('LOG_LEVEL', 'debug'),
'replace_placeholders' => true,
],
'null' => [
'driver' => 'monolog',
'handler' => NullHandler::class,
],
'emergency' => [
'path' => storage_path('logs/laravel.log'),
],
],
];

118
config/mail.php Normal file
View File

@ -0,0 +1,118 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Default Mailer
|--------------------------------------------------------------------------
|
| This option controls the default mailer that is used to send all email
| messages unless another mailer is explicitly specified when sending
| the message. All additional mailers can be configured within the
| "mailers" array. Examples of each type of mailer are provided.
|
*/
'default' => env('MAIL_MAILER', 'log'),
/*
|--------------------------------------------------------------------------
| Mailer Configurations
|--------------------------------------------------------------------------
|
| Here you may configure all of the mailers used by your application plus
| their respective settings. Several examples have been configured for
| you and you are free to add your own as your application requires.
|
| Laravel supports a variety of mail "transport" drivers that can be used
| when delivering an email. You may specify which one you're using for
| your mailers below. You may also add additional mailers if needed.
|
| Supported: "smtp", "sendmail", "mailgun", "ses", "ses-v2",
| "postmark", "resend", "log", "array",
| "failover", "roundrobin"
|
*/
'mailers' => [
'smtp' => [
'transport' => 'smtp',
'scheme' => env('MAIL_SCHEME'),
'url' => env('MAIL_URL'),
'host' => env('MAIL_HOST', '127.0.0.1'),
'port' => env('MAIL_PORT', 2525),
'username' => env('MAIL_USERNAME'),
'password' => env('MAIL_PASSWORD'),
'timeout' => null,
'local_domain' => env('MAIL_EHLO_DOMAIN', parse_url((string) env('APP_URL', 'http://localhost'), PHP_URL_HOST)),
],
'ses' => [
'transport' => 'ses',
],
'postmark' => [
'transport' => 'postmark',
// 'message_stream_id' => env('POSTMARK_MESSAGE_STREAM_ID'),
// 'client' => [
// 'timeout' => 5,
// ],
],
'resend' => [
'transport' => 'resend',
],
'sendmail' => [
'transport' => 'sendmail',
'path' => env('MAIL_SENDMAIL_PATH', '/usr/sbin/sendmail -bs -i'),
],
'log' => [
'transport' => 'log',
'channel' => env('MAIL_LOG_CHANNEL'),
],
'array' => [
'transport' => 'array',
],
'failover' => [
'transport' => 'failover',
'mailers' => [
'smtp',
'log',
],
'retry_after' => 60,
],
'roundrobin' => [
'transport' => 'roundrobin',
'mailers' => [
'ses',
'postmark',
],
'retry_after' => 60,
],
],
/*
|--------------------------------------------------------------------------
| Global "From" Address
|--------------------------------------------------------------------------
|
| You may wish for all emails sent by your application to be sent from
| the same address. Here you may specify a name and address that is
| used globally for all emails that are sent by your application.
|
*/
'from' => [
'address' => env('MAIL_FROM_ADDRESS', 'hello@example.com'),
'name' => env('MAIL_FROM_NAME', 'Example'),
],
];

129
config/queue.php Normal file
View File

@ -0,0 +1,129 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Default Queue Connection Name
|--------------------------------------------------------------------------
|
| Laravel's queue supports a variety of backends via a single, unified
| API, giving you convenient access to each backend using identical
| syntax for each. The default queue connection is defined below.
|
*/
'default' => env('QUEUE_CONNECTION', 'database'),
/*
|--------------------------------------------------------------------------
| Queue Connections
|--------------------------------------------------------------------------
|
| Here you may configure the connection options for every queue backend
| used by your application. An example configuration is provided for
| each backend supported by Laravel. You're also free to add more.
|
| Drivers: "sync", "database", "beanstalkd", "sqs", "redis",
| "deferred", "background", "failover", "null"
|
*/
'connections' => [
'sync' => [
'driver' => 'sync',
],
'database' => [
'driver' => 'database',
'connection' => env('DB_QUEUE_CONNECTION'),
'table' => env('DB_QUEUE_TABLE', 'jobs'),
'queue' => env('DB_QUEUE', 'default'),
'retry_after' => (int) env('DB_QUEUE_RETRY_AFTER', 90),
'after_commit' => false,
],
'beanstalkd' => [
'driver' => 'beanstalkd',
'host' => env('BEANSTALKD_QUEUE_HOST', 'localhost'),
'queue' => env('BEANSTALKD_QUEUE', 'default'),
'retry_after' => (int) env('BEANSTALKD_QUEUE_RETRY_AFTER', 90),
'block_for' => 0,
'after_commit' => false,
],
'sqs' => [
'driver' => 'sqs',
'key' => env('AWS_ACCESS_KEY_ID'),
'secret' => env('AWS_SECRET_ACCESS_KEY'),
'prefix' => env('SQS_PREFIX', 'https://sqs.us-east-1.amazonaws.com/your-account-id'),
'queue' => env('SQS_QUEUE', 'default'),
'suffix' => env('SQS_SUFFIX'),
'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
'after_commit' => false,
],
'redis' => [
'driver' => 'redis',
'connection' => env('REDIS_QUEUE_CONNECTION', 'default'),
'queue' => env('REDIS_QUEUE', 'default'),
'retry_after' => (int) env('REDIS_QUEUE_RETRY_AFTER', 90),
'block_for' => null,
'after_commit' => false,
],
'deferred' => [
'driver' => 'deferred',
],
'background' => [
'driver' => 'background',
],
'failover' => [
'driver' => 'failover',
'connections' => [
'database',
'deferred',
],
],
],
/*
|--------------------------------------------------------------------------
| Job Batching
|--------------------------------------------------------------------------
|
| The following options configure the database and table that store job
| batching information. These options can be updated to any database
| connection and table which has been defined by your application.
|
*/
'batching' => [
'database' => env('DB_CONNECTION', 'sqlite'),
'table' => 'job_batches',
],
/*
|--------------------------------------------------------------------------
| Failed Queue Jobs
|--------------------------------------------------------------------------
|
| These options configure the behavior of failed queue job logging so you
| can control how and where failed jobs are stored. Laravel ships with
| support for storing failed jobs in a simple file or in a database.
|
| Supported drivers: "database-uuids", "dynamodb", "file", "null"
|
*/
'failed' => [
'driver' => env('QUEUE_FAILED_DRIVER', 'database-uuids'),
'database' => env('DB_CONNECTION', 'sqlite'),
'table' => 'failed_jobs',
],
];

38
config/services.php Normal file
View File

@ -0,0 +1,38 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Third Party Services
|--------------------------------------------------------------------------
|
| This file is for storing the credentials for third party services such
| as Mailgun, Postmark, AWS and more. This file provides the de facto
| location for this type of information, allowing packages to have
| a conventional file to locate the various service credentials.
|
*/
'postmark' => [
'key' => env('POSTMARK_API_KEY'),
],
'resend' => [
'key' => env('RESEND_API_KEY'),
],
'ses' => [
'key' => env('AWS_ACCESS_KEY_ID'),
'secret' => env('AWS_SECRET_ACCESS_KEY'),
'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
],
'slack' => [
'notifications' => [
'bot_user_oauth_token' => env('SLACK_BOT_USER_OAUTH_TOKEN'),
'channel' => env('SLACK_BOT_USER_DEFAULT_CHANNEL'),
],
],
];

217
config/session.php Normal file
View File

@ -0,0 +1,217 @@
<?php
use Illuminate\Support\Str;
return [
/*
|--------------------------------------------------------------------------
| Default Session Driver
|--------------------------------------------------------------------------
|
| This option determines the default session driver that is utilized for
| incoming requests. Laravel supports a variety of storage options to
| persist session data. Database storage is a great default choice.
|
| Supported: "file", "cookie", "database", "memcached",
| "redis", "dynamodb", "array"
|
*/
'driver' => env('SESSION_DRIVER', 'file'),
/*
|--------------------------------------------------------------------------
| Session Lifetime
|--------------------------------------------------------------------------
|
| Here you may specify the number of minutes that you wish the session
| to be allowed to remain idle before it expires. If you want them
| to expire immediately when the browser is closed then you may
| indicate that via the expire_on_close configuration option.
|
*/
'lifetime' => (int) env('SESSION_LIFETIME', 120),
'expire_on_close' => env('SESSION_EXPIRE_ON_CLOSE', false),
/*
|--------------------------------------------------------------------------
| Session Encryption
|--------------------------------------------------------------------------
|
| This option allows you to easily specify that all of your session data
| should be encrypted before it's stored. All encryption is performed
| automatically by Laravel and you may use the session like normal.
|
*/
'encrypt' => env('SESSION_ENCRYPT', false),
/*
|--------------------------------------------------------------------------
| Session File Location
|--------------------------------------------------------------------------
|
| When utilizing the "file" session driver, the session files are placed
| on disk. The default storage location is defined here; however, you
| are free to provide another location where they should be stored.
|
*/
'files' => storage_path('framework/sessions'),
/*
|--------------------------------------------------------------------------
| Session Database Connection
|--------------------------------------------------------------------------
|
| When using the "database" or "redis" session drivers, you may specify a
| connection that should be used to manage these sessions. This should
| correspond to a connection in your database configuration options.
|
*/
'connection' => env('SESSION_CONNECTION'),
/*
|--------------------------------------------------------------------------
| Session Database Table
|--------------------------------------------------------------------------
|
| When using the "database" session driver, you may specify the table to
| be used to store sessions. Of course, a sensible default is defined
| for you; however, you're welcome to change this to another table.
|
*/
'table' => env('SESSION_TABLE', 'sessions'),
/*
|--------------------------------------------------------------------------
| Session Cache Store
|--------------------------------------------------------------------------
|
| When using one of the framework's cache driven session backends, you may
| define the cache store which should be used to store the session data
| between requests. This must match one of your defined cache stores.
|
| Affects: "dynamodb", "memcached", "redis"
|
*/
'store' => env('SESSION_STORE'),
/*
|--------------------------------------------------------------------------
| Session Sweeping Lottery
|--------------------------------------------------------------------------
|
| Some session drivers must manually sweep their storage location to get
| rid of old sessions from storage. Here are the chances that it will
| happen on a given request. By default, the odds are 2 out of 100.
|
*/
'lottery' => [2, 100],
/*
|--------------------------------------------------------------------------
| Session Cookie Name
|--------------------------------------------------------------------------
|
| Here you may change the name of the session cookie that is created by
| the framework. Typically, you should not need to change this value
| since doing so does not grant a meaningful security improvement.
|
*/
'cookie' => env(
'SESSION_COOKIE',
Str::slug((string) env('APP_NAME', 'laravel')).'-session'
),
/*
|--------------------------------------------------------------------------
| Session Cookie Path
|--------------------------------------------------------------------------
|
| The session cookie path determines the path for which the cookie will
| be regarded as available. Typically, this will be the root path of
| your application, but you're free to change this when necessary.
|
*/
'path' => env('SESSION_PATH', '/'),
/*
|--------------------------------------------------------------------------
| Session Cookie Domain
|--------------------------------------------------------------------------
|
| This value determines the domain and subdomains the session cookie is
| available to. By default, the cookie will be available to the root
| domain and all subdomains. Typically, this shouldn't be changed.
|
*/
'domain' => env('SESSION_DOMAIN'),
/*
|--------------------------------------------------------------------------
| HTTPS Only Cookies
|--------------------------------------------------------------------------
|
| By setting this option to true, session cookies will only be sent back
| to the server if the browser has a HTTPS connection. This will keep
| the cookie from being sent to you when it can't be done securely.
|
*/
'secure' => env('SESSION_SECURE_COOKIE'),
/*
|--------------------------------------------------------------------------
| HTTP Access Only
|--------------------------------------------------------------------------
|
| Setting this value to true will prevent JavaScript from accessing the
| value of the cookie and the cookie will only be accessible through
| the HTTP protocol. It's unlikely you should disable this option.
|
*/
'http_only' => env('SESSION_HTTP_ONLY', true),
/*
|--------------------------------------------------------------------------
| Same-Site Cookies
|--------------------------------------------------------------------------
|
| This option determines how your cookies behave when cross-site requests
| take place, and can be used to mitigate CSRF attacks. By default, we
| will set this value to "lax" to permit secure cross-site requests.
|
| See: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie#samesitesamesite-value
|
| Supported: "lax", "strict", "none", null
|
*/
'same_site' => env('SESSION_SAME_SITE', 'lax'),
/*
|--------------------------------------------------------------------------
| Partitioned Cookies
|--------------------------------------------------------------------------
|
| Setting this value to true will tie the cookie to the top-level site for
| a cross-site context. Partitioned cookies are accepted by the browser
| when flagged "secure" and the Same-Site attribute is set to "none".
|
*/
'partitioned' => env('SESSION_PARTITIONED_COOKIE', false),
];

1
database/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
*.sqlite*

View File

@ -0,0 +1,38 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('password_reset_tokens', function (Blueprint $table) {
$table->string('email')->primary();
$table->string('token');
$table->timestamp('created_at')->nullable();
});
Schema::create('sessions', function (Blueprint $table) {
$table->string('id')->primary();
$table->foreignId('admin_id')->nullable()->index();
$table->string('ip_address', 45)->nullable();
$table->text('user_agent')->nullable();
$table->longText('payload');
$table->integer('last_activity')->index();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('password_reset_tokens');
Schema::dropIfExists('sessions');
}
};

View File

@ -0,0 +1,35 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('cache', function (Blueprint $table) {
$table->string('key')->primary();
$table->mediumText('value');
$table->integer('expiration');
});
Schema::create('cache_locks', function (Blueprint $table) {
$table->string('key')->primary();
$table->string('owner');
$table->integer('expiration');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('cache');
Schema::dropIfExists('cache_locks');
}
};

View File

@ -0,0 +1,57 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('jobs', function (Blueprint $table) {
$table->id();
$table->string('queue')->index();
$table->longText('payload');
$table->unsignedTinyInteger('attempts');
$table->unsignedInteger('reserved_at')->nullable();
$table->unsignedInteger('available_at');
$table->unsignedInteger('created_at');
});
Schema::create('job_batches', function (Blueprint $table) {
$table->string('id')->primary();
$table->string('name');
$table->integer('total_jobs');
$table->integer('pending_jobs');
$table->integer('failed_jobs');
$table->longText('failed_job_ids');
$table->mediumText('options')->nullable();
$table->integer('cancelled_at')->nullable();
$table->integer('created_at');
$table->integer('finished_at')->nullable();
});
Schema::create('failed_jobs', function (Blueprint $table) {
$table->id();
$table->string('uuid')->unique();
$table->text('connection');
$table->text('queue');
$table->longText('payload');
$table->longText('exception');
$table->timestamp('failed_at')->useCurrent();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('jobs');
Schema::dropIfExists('job_batches');
Schema::dropIfExists('failed_jobs');
}
};

View File

@ -0,0 +1,33 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('admins', function (Blueprint $table) {
$table->id();
$table->string('nama_lengkap');
$table->string('email')->unique();
$table->string('password');
$table->string('nomor_telepon')->nullable();
$table->string('foto_profil')->nullable();
$table->rememberToken();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('admins');
}
};

View File

@ -0,0 +1,33 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('banners', function (Blueprint $table) {
$table->id();
$table->foreignId('admin_id')->constrained('admins')->onDelete('cascade');
$table->string('gambar');
$table->string('judul')->nullable();
$table->text('deskripsi')->nullable();
$table->boolean('status')->default(true);
$table->integer('urutan')->default(0);
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('banners');
}
};

View File

@ -0,0 +1,33 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('fasilitas', function (Blueprint $table) {
$table->id();
$table->foreignId('admin_id')->constrained('admins')->onDelete('cascade');
$table->string('nama_fasilitas');
$table->text('deskripsi_fasilitas');
$table->string('foto_fasilitas');
$table->boolean('status')->default(true);
$table->integer('urutan')->default(0);
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('fasilitas');
}
};

View File

@ -0,0 +1,33 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('galleries', function (Blueprint $table) {
$table->id();
$table->foreignId('admin_id')->constrained('admins')->onDelete('cascade');
$table->string('nama_gallery');
$table->text('deskripsi_gallery');
$table->string('foto_gallery');
$table->boolean('status')->default(true);
$table->integer('urutan')->default(0);
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('galleries');
}
};

View File

@ -0,0 +1,33 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('jurusans', function (Blueprint $table) {
$table->id();
$table->foreignId('admin_id')->constrained('admins')->onDelete('cascade');
$table->string('nama_jurusan');
$table->text('deskripsi_jurusan');
$table->string('kode_jurusan')->unique();
$table->boolean('status')->default(true);
$table->integer('urutan')->default(0);
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('jurusans');
}
};

View File

@ -0,0 +1,35 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('pengajars', function (Blueprint $table) {
$table->id();
$table->foreignId('admin_id')->constrained('admins')->onDelete('cascade');
$table->foreignId('jurusan_id')->nullable()->constrained('jurusans')->onDelete('set null');
$table->string('nama_pengajar');
$table->string('nip')->nullable();
$table->string('jabatan');
$table->string('foto_pengajar')->nullable();
$table->boolean('status')->default(true);
$table->integer('urutan')->default(0);
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('pengajars');
}
};

View File

@ -0,0 +1,36 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('prestasis', function (Blueprint $table) {
$table->id();
$table->foreignId('admin_id')->constrained('admins')->onDelete('cascade');
$table->foreignId('jurusan_id')->constrained('jurusans')->onDelete('cascade');
$table->string('nama_siswa');
$table->string('nama_prestasi');
$table->string('peringkat');
$table->integer('tahun_prestasi');
$table->string('foto_prestasi')->nullable();
$table->boolean('status')->default(true);
$table->integer('urutan')->default(0);
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('prestasis');
}
};

View File

@ -0,0 +1,33 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('pengumuman', function (Blueprint $table) {
$table->id();
$table->foreignId('admin_id')->constrained('admins')->onDelete('cascade');
$table->string('nama_pengumuman');
$table->text('deskripsi_pengumuman');
$table->string('foto_pengumuman')->nullable();
$table->boolean('status')->default(true);
$table->integer('urutan')->default(0);
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('pengumuman');
}
};

View File

@ -0,0 +1,30 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('strukturs', function (Blueprint $table) {
$table->id();
$table->foreignId('admin_id')->constrained('admins')->onDelete('cascade');
$table->string('gambar_struktur');
$table->boolean('status')->default(true);
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('strukturs');
}
};

View File

@ -0,0 +1,38 @@
<?php
namespace Database\Seeders;
use App\Models\Admin;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\Hash;
class AdminSeeder extends Seeder
{
/**
* Run the database seeds.
*/
public function run(): void
{
Admin::create([
'id' => 1,
'nama_lengkap' => 'Diva Rahma',
'email' => 'diva.rahma@smk.com',
'password' => '$2y$12$sHdFisA/bAwyin6SCNOGxObhKVwQN1PT6QirQ58dxk0FXXNHHeJzC',
'nomor_telepon' => '081234567891',
'foto_profil' => '1776073308_69dcba5cdd937.jpg',
'created_at' => '2026-04-13 02:36:27',
'updated_at' => '2026-04-13 02:41:48',
]);
Admin::create([
'id' => 2,
'nama_lengkap' => 'Admin SMK',
'email' => 'admin@smk.com',
'password' => '$2y$12$wetWgdu5/vQns278KIx7muk38Dw0nd4Bm0W9WJgV/cXM9Ub7JdPQS',
'nomor_telepon' => '081234567892',
'foto_profil' => null,
'created_at' => '2026-04-13 02:36:27',
'updated_at' => '2026-04-13 02:36:27',
]);
}
}

View File

@ -0,0 +1,51 @@
<?php
namespace Database\Seeders;
use App\Models\Banner;
use Illuminate\Database\Seeder;
class BannerSeeder extends Seeder
{
/**
* Run the database seeds.
*/
public function run(): void
{
Banner::create([
'id' => 1,
'admin_id' => 1,
'gambar' => '1776217712_69deee7066640.jpg',
'judul' => 'FOTO SEKOLAH',
'deskripsi' => 'Gambar yang merupakan tampak depan sekolah smk muhammadiyah 1 berbek',
'status' => 1,
'urutan' => 1,
'created_at' => '2026-02-26 20:55:51',
'updated_at' => '2026-04-14 18:48:32',
]);
Banner::create([
'id' => 3,
'admin_id' => 1,
'gambar' => '1776221919_69defedf7b04e.jpg',
'judul' => 'Foto Seluruh Guru',
'deskripsi' => 'Foto seluruh guru SMK Muhammadiyah 1 Berbek menampilkan kebersamaan para tenaga pendidik dan staf sekolah sebagai wujud kekompakan, profesionalisme, serta komitmen dalam memberikan pendidikan terbaik bagi siswa. Dokumentasi ini menjadi simbol sinergi antar guru dalam mendukung proses pembelajaran, pembinaan karakter, dan pengembangan potensi peserta didik.',
'status' => 1,
'urutan' => 2,
'created_at' => '2026-04-14 19:58:39',
'updated_at' => '2026-04-14 19:58:39',
]);
Banner::create([
'id' => 6,
'admin_id' => 1,
'gambar' => '1778117190_69fbea46b55ed.jpg',
'judul' => 'awrerwra',
'deskripsi' => 'l;l,;;,;',
'status' => 1,
'urutan' => 3,
'created_at' => '2026-05-06 18:26:30',
'updated_at' => '2026-05-06 18:26:35',
]);
}
}

View File

@ -0,0 +1,29 @@
<?php
namespace Database\Seeders;
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;
class DatabaseSeeder extends Seeder
{
use WithoutModelEvents;
/**
* Seed the application's database.
*/
public function run(): void
{
$this->call([
AdminSeeder::class,
BannerSeeder::class,
FasilitasSeeder::class,
GallerySeeder::class,
JurusanSeeder::class,
PengajarSeeder::class,
PrestasiSeeder::class,
PengumumanSeeder::class,
StrukturSeeder::class,
]);
}
}

View File

@ -0,0 +1,83 @@
<?php
namespace Database\Seeders;
use App\Models\Fasilitas;
use Illuminate\Database\Seeder;
class FasilitasSeeder extends Seeder
{
/**
* Run the database seeds.
*/
public function run(): void
{
$fasilitas = [
[
'id' => 1,
'nama_fasilitas' => 'Lab Komputer',
'deskripsi_fasilitas' => 'Laboratorium Komputer SMK Muhammadiyah 1 Berbek merupakan fasilitas penunjang pembelajaran berbasis teknologi yang dirancang untuk mendukung kegiatan praktik siswa, khususnya pada jurusan yang berkaitan dengan komputer dan teknologi informasi. Lab ini dilengkapi dengan perangkat komputer yang memadai, koneksi jaringan internet, perangkat jaringan, proyektor, serta software pendukung pembelajaran sesuai kebutuhan kompetensi keahlian. Fasilitas ini digunakan untuk praktik perakitan komputer, instalasi sistem operasi, desain, pemrograman, administrasi jaringan, hingga ujian berbasis komputer.',
'foto_fasilitas' => '1776219025_69def3911b832.jpeg',
'status' => 1,
'urutan' => 1,
'created_at' => '2026-04-14 19:10:25',
'updated_at' => '2026-04-14 19:10:25',
],
[
'id' => 2,
'nama_fasilitas' => 'Bengkel',
'deskripsi_fasilitas' => 'Bengkel Teknik Kendaraan Ringan (TKR) SMK Muhammadiyah 1 Berbek merupakan fasilitas praktik yang digunakan untuk mendukung pembelajaran siswa dalam bidang otomotif. Bengkel ini dilengkapi dengan berbagai peralatan servis, mesin praktik, alat tune up, scanner injeksi, sistem kelistrikan, serta unit kendaraan sebagai media pembelajaran langsung. Fasilitas ini memungkinkan siswa mempraktikkan perawatan, perbaikan, dan diagnosa kendaraan ringan sesuai standar dunia industri. Dengan adanya bengkel TKR yang memadai, siswa dapat meningkatkan keterampilan teknis, ketelitian, dan kesiapan kerja di bidang otomotif. Selain itu, bengkel ini juga menjadi sarana untuk membentuk lulusan yang kompeten, disiplin, dan siap bersaing di dunia usaha maupun dunia industri otomotif.',
'foto_fasilitas' => '1776219091_69def3d3cc749.jpeg',
'status' => 1,
'urutan' => 2,
'created_at' => '2026-04-14 19:11:31',
'updated_at' => '2026-04-14 19:11:31',
],
[
'id' => 3,
'nama_fasilitas' => 'Ruang Kelas',
'deskripsi_fasilitas' => 'Ruang kelas jurusan Akuntansi dan Keuangan Lembaga (AKL) SMK Muhammadiyah 1 Berbek merupakan fasilitas pembelajaran yang nyaman dan kondusif untuk mendukung kegiatan belajar mengajar siswa. Ruang kelas dilengkapi dengan meja dan kursi yang tertata rapi, papan tulis, proyektor, ventilasi yang baik, serta media pembelajaran pendukung lainnya. Fasilitas ini digunakan untuk pembelajaran teori akuntansi, administrasi keuangan, perpajakan, dan materi pendukung lainnya. Suasana kelas yang nyaman membantu siswa lebih fokus, aktif berdiskusi, serta meningkatkan pemahaman materi secara optimal. Dengan ruang kelas yang memadai, proses pembelajaran diharapkan mampu membentuk siswa yang teliti, disiplin, dan siap menghadapi tantangan dunia kerja di bidang akuntansi dan keuangan.',
'foto_fasilitas' => '1776219213_69def44db82e0.jpeg',
'status' => 1,
'urutan' => 3,
'created_at' => '2026-04-14 19:13:33',
'updated_at' => '2026-04-14 19:13:33',
],
[
'id' => 4,
'nama_fasilitas' => 'Perpustakaan',
'deskripsi_fasilitas' => 'Perpustakaan SMK Muhammadiyah 1 Berbek merupakan fasilitas penunjang pembelajaran yang menyediakan berbagai koleksi buku pelajaran, referensi jurusan, buku umum, majalah edukasi, serta sumber literasi lainnya untuk mendukung kebutuhan belajar siswa dan guru. Ruang perpustakaan dirancang nyaman, rapi, dan kondusif sehingga dapat digunakan untuk membaca, mencari referensi tugas, maupun belajar mandiri. Fasilitas ini juga dilengkapi meja baca, rak buku yang tertata, serta area yang mendukung kegiatan literasi sekolah. Dengan adanya perpustakaan yang memadai, siswa dapat meningkatkan minat baca, memperluas wawasan, dan mengembangkan budaya literasi sebagai bekal untuk meraih prestasi akademik maupun nonakademik.',
'foto_fasilitas' => '1776219266_69def482e9d94.jpeg',
'status' => 1,
'urutan' => 4,
'created_at' => '2026-04-14 19:14:26',
'updated_at' => '2026-04-14 19:14:26',
],
[
'id' => 5,
'nama_fasilitas' => 'Mushola',
'deskripsi_fasilitas' => 'Mushola SMK Muhammadiyah 1 Berbek merupakan fasilitas ibadah yang disediakan untuk mendukung pembinaan karakter religius dan akhlak Islami bagi siswa, guru, serta seluruh warga sekolah. Mushola ini digunakan untuk pelaksanaan salat berjamaah, kegiatan keagamaan, tadarus Al-Quran, kajian Islami, serta pembiasaan ibadah harian di lingkungan sekolah. Dengan suasana yang bersih, nyaman, dan tenang, mushola menjadi tempat yang mendukung siswa dalam meningkatkan keimanan, ketakwaan, serta membentuk sikap disiplin dan berakhlak mulia. Keberadaan mushola juga menjadi bagian dari komitmen SMK Muhammadiyah 1 Berbek dalam menciptakan lingkungan pendidikan yang tidak hanya unggul dalam akademik, tetapi juga kuat dalam nilai-nilai keislaman.',
'foto_fasilitas' => '1776219318_69def4b6d6351.jpeg',
'status' => 1,
'urutan' => 5,
'created_at' => '2026-04-14 19:15:18',
'updated_at' => '2026-04-14 19:15:18',
],
[
'id' => 6,
'nama_fasilitas' => 'Ruang Guru',
'deskripsi_fasilitas' => 'Ruang guru SMK Muhammadiyah 1 Berbek merupakan fasilitas yang disediakan sebagai tempat kerja, koordinasi, dan istirahat bagi para tenaga pendidik. Ruangan ini dirancang nyaman dan kondusif untuk mendukung kegiatan administrasi pembelajaran, penyusunan perangkat ajar, diskusi antar guru, serta pelayanan akademik kepada siswa. Fasilitas ruang guru dilengkapi dengan meja kerja, kursi, lemari penyimpanan dokumen, perangkat komputer, serta sarana pendukung lainnya yang menunjang efektivitas kerja. Dengan adanya ruang guru yang memadai, proses koordinasi dan pelaksanaan kegiatan pembelajaran dapat berjalan lebih optimal, sehingga mendukung peningkatan kualitas pendidikan di SMK Muhammadiyah 1 Berbek.',
'foto_fasilitas' => '1776219608_69def5d80ac46.jpeg',
'status' => 1,
'urutan' => 6,
'created_at' => '2026-04-14 19:20:08',
'updated_at' => '2026-04-14 19:20:08',
],
];
foreach ($fasilitas as $f) {
$f['admin_id'] = 1;
Fasilitas::create($f);
}
}
}

View File

@ -0,0 +1,63 @@
<?php
namespace Database\Seeders;
use App\Models\Gallery;
use Illuminate\Database\Seeder;
class GallerySeeder extends Seeder
{
/**
* Run the database seeds.
*/
public function run(): void
{
$galleries = [
[
'id' => 1,
'nama_gallery' => 'Kunjungan Industri',
'deskripsi_gallery' => 'Kunjungan industri merupakan salah satu program pembelajaran luar kelas yang diselenggarakan oleh Sekolah Menengah Kejuruan (SMK) untuk memberikan wawasan nyata kepada siswa mengenai dunia kerja dan proses industri secara langsung. Melalui kegiatan ini, siswa diajak mengunjungi perusahaan, pabrik, instansi, atau lembaga tertentu yang sesuai dengan kompetensi keahlian masing-masing jurusan. Tujuan utama kegiatan ini adalah untuk menambah pengetahuan, memperluas pengalaman, serta mengenalkan budaya kerja profesional agar siswa memiliki gambaran yang jelas tentang penerapan ilmu yang dipelajari di sekolah dalam dunia industri.',
'foto_gallery' => '1776218117_69def00560da9.JPG',
'status' => 1,
'urutan' => 1,
'created_at' => '2026-04-14 18:55:17',
'updated_at' => '2026-04-14 18:55:40',
],
[
'id' => 2,
'nama_gallery' => 'Ekstra Tari',
'deskripsi_gallery' => 'Ekstrakurikuler Tari SMK Muhammadiyah 1 Berbek merupakan kegiatan pengembangan bakat and minat siswa di bidang seni tari. Kegiatan ini bertujuan untuk melatih kreativitas, rasa percaya diri, kekompakan, serta kemampuan siswa dalam mengekspresikan seni melalui gerak. Siswa dibimbing untuk mempelajari berbagai jenis tarian, baik tari tradisional maupun modern, sehingga mampu melestarikan budaya sekaligus mengikuti perkembangan seni pertunjukan masa kini. Selain sebagai sarana pengembangan bakat, ekstrakurikuler tari juga menjadi wadah bagi siswa untuk tampil dalam berbagai kegiatan sekolah, perlombaan, maupun acara seni budaya. Melalui kegiatan ini, SMK Muhammadiyah 1 Berbek mendukung pembentukan siswa yang kreatif, berprestasi, and berkarakter.',
'foto_gallery' => '1776220257_69def861ef29a.jpg',
'status' => 1,
'urutan' => 2,
'created_at' => '2026-04-14 19:30:57',
'updated_at' => '2026-04-14 19:30:57',
],
[
'id' => 3,
'nama_gallery' => 'Ekstra Paskibraka',
'deskripsi_gallery' => 'Ekstrakurikuler Paskibraka SMK Muhammadiyah 1 Berbek merupakan kegiatan pengembangan karakter yang bertujuan membentuk siswa yang disiplin, bertanggung jawab, tangguh, and memiliki jiwa nasionalisme yang tinggi. Dalam kegiatan ini, siswa dilatih keterampilan baris-berbaris, tata upacara bendera, kepemimpinan, kekompakan, serta sikap tegas and percaya diri. Selain mendukung pelaksanaan upacara di sekolah, ekstrakurikuler ini juga menjadi wadah bagi siswa untuk mengikuti berbagai lomba and seleksi pasukan pengibar bendera tingkat kecamatan maupun kabupaten. Melalui kegiatan Paskibraka, SMK Muhammadiyah 1 Berbek berkomitmen membentuk generasi yang berkarakter, berjiwa patriotisme, serta siap menjadi teladan dalam kedisiplinan and tanggung jawab.',
'foto_gallery' => '1776220309_69def8958e64f.jpg',
'status' => 1,
'urutan' => 3,
'created_at' => '2026-04-14 19:31:49',
'updated_at' => '2026-04-14 19:31:49',
],
[
'id' => 4,
'nama_gallery' => 'Ujian Praktik Tkj',
'deskripsi_gallery' => 'Ujian praktik jurusan Teknik Komputer and Jaringan (TKJ) SMK Muhammadiyah 1 Berbek merupakan kegiatan evaluasi kompetensi siswa untuk mengukur kemampuan praktik sesuai bidang keahlian. Dalam kegiatan ini, siswa melaksanakan berbagai tugas seperti perakitan komputer, instalasi sistem operasi, konfigurasi jaringan, manajemen server, troubleshooting, serta pengujian koneksi jaringan sesuai standar pembelajaran. Ujian praktik bertujuan untuk mengetahui sejauh mana penguasaan keterampilan siswa dalam menerapkan teori ke dalam praktik nyata. Melalui kegiatan ini, SMK Muhammadiyah 1 Berbek memastikan siswa memiliki kompetensi yang siap diterapkan di dunia kerja maupun dunia industri, khususnya di bidang teknologi informasi and jaringan komputer.',
'foto_gallery' => '1776220407_69def8f75670a.jpg',
'status' => 1,
'urutan' => 4,
'created_at' => '2026-04-14 19:33:27',
'updated_at' => '2026-04-14 19:33:27',
],
];
foreach ($galleries as $g) {
$g['admin_id'] = 1;
Gallery::create($g);
}
}
}

View File

@ -0,0 +1,51 @@
<?php
namespace Database\Seeders;
use App\Models\Jurusan;
use Illuminate\Database\Seeder;
class JurusanSeeder extends Seeder
{
/**
* Run the database seeds.
*/
public function run(): void
{
Jurusan::create([
'id' => 1,
'admin_id' => 1,
'nama_jurusan' => 'Teknik Kendaraan Ringan Otomotif',
'deskripsi_jurusan' => 'Jurusan Teknik Kendaraan Ringan (TKR) SMK Muhammadiyah 1 Berbek merupakan program keahlian yang mempelajari perawatan, perbaikan, dan sistem kerja kendaraan ringan, khususnya mobil. Siswa dibekali pengetahuan teori dan praktik tentang mesin otomotif, sistem kelistrikan, pengereman, suspensi, tune up, hingga teknologi injeksi modern. Pembelajaran dilakukan melalui teori di kelas dan praktik langsung di bengkel sekolah dengan fasilitas yang mendukung. Melalui jurusan ini, SMK Muhammadiyah 1 Berbek berkomitmen mencetak lulusan yang kompeten, disiplin, berakhlak Islami, dan siap bekerja di dunia usaha maupun industri otomotif, seperti bengkel resmi, perusahaan kendaraan, atau membuka usaha bengkel mandiri. Jurusan ini juga membekali siswa agar mampu mengikuti perkembangan teknologi otomotif modern.',
'kode_jurusan' => 'TKRO',
'status' => 1,
'urutan' => 1,
'created_at' => '2026-04-14 18:58:14',
'updated_at' => '2026-04-14 19:22:23',
]);
Jurusan::create([
'id' => 2,
'admin_id' => 1,
'nama_jurusan' => 'Teknik Komputer Jaringan',
'deskripsi_jurusan' => 'Jurusan Teknik Komputer dan Jaringan (TKJ) SMK Muhammadiyah 1 Berbek merupakan program keahlian yang mempelajari komputer, jaringan, dan teknologi informasi. Siswa dibekali kemampuan merakit komputer, instalasi sistem operasi, konfigurasi jaringan LAN/WAN, manajemen server, keamanan jaringan, hingga troubleshooting perangkat keras dan perangkat lunak. Proses pembelajaran dilaksanakan melalui teori di kelas dan praktik langsung di laboratorium komputer yang didukung fasilitas memadai. Melalui jurusan ini, SMK Muhammadiyah 1 Berbek berkomitmen mencetak lulusan yang kompeten, disiplin, berakhlak Islami, serta siap bersaing di dunia kerja sebagai teknisi komputer, administrator jaringan, IT support, maupun wirausaha di bidang teknologi. Selain itu, siswa juga dibekali keterampilan untuk mengikuti perkembangan teknologi digital yang terus berkembang.',
'kode_jurusan' => 'TKJ',
'status' => 1,
'urutan' => 2,
'created_at' => '2026-04-14 18:59:25',
'updated_at' => '2026-04-14 19:22:37',
]);
Jurusan::create([
'id' => 3,
'admin_id' => 1,
'nama_jurusan' => 'Akutansi Keuangan Lembaga',
'deskripsi_jurusan' => 'Jurusan Akuntansi dan Keuangan Lembaga (AKL) SMK Muhammadiyah 1 Berbek merupakan program keahlian yang mempelajari pengelolaan keuangan, pencatatan transaksi, serta penyusunan laporan keuangan secara sistematis dan akurat. Siswa dibekali kemampuan dalam akuntansi dasar, komputer akuntansi, perpajakan, administrasi keuangan, pengelolaan kas, serta layanan perbankan. Pembelajaran dilakukan melalui teori di kelas dan praktik langsung menggunakan aplikasi akuntansi agar siswa siap menghadapi kebutuhan dunia kerja. Melalui jurusan ini, SMK Muhammadiyah 1 Berbek berkomitmen mencetak lulusan yang teliti, disiplin, berakhlak Islami, dan kompeten di bidang keuangan, sehingga siap bekerja di perusahaan, perbankan, kantor administrasi, maupun berwirausaha sesuai perkembangan dunia bisnis modern.',
'kode_jurusan' => 'AKL',
'status' => 1,
'urutan' => 3,
'created_at' => '2026-04-14 19:00:34',
'updated_at' => '2026-04-14 19:22:58',
]);
}
}

View File

@ -0,0 +1,55 @@
<?php
namespace Database\Seeders;
use App\Models\Pengajar;
use Illuminate\Database\Seeder;
class PengajarSeeder extends Seeder
{
/**
* Run the database seeds.
*/
public function run(): void
{
$pengajars = [
[1, 'Syeh Lendi Artana, S.Kom', '196512101992031001', 'Koordinator Tim / Kepala Sekolah', '1776073884_69dcbc9cde12a.jpg', 1, 1],
[2, 'Rinda Dwi Novita, S.Pd', '196808151995121001', 'Wakil Kepala Sekolah / Bendahara Sekolah', '1776220861_69defabd0dd09.jpg', 1, 2],
[3, 'Sri Puji Astuti S.Pd.', '197203201998022001', 'Wakabid Kurikulum', '1776220892_69defadc2a83f.jpg', 1, 3],
[4, 'Agus Sulistyono, S.Pd', '197511152001121001', 'Wakabid Kesiswaan dan ketertiban', '1776220927_69defaff10400.jpg', 1, 4],
[5, 'Mega Ayu Elis Safitri, S.Pd.', '198204102005012001', 'SPJ Rampung BOS', '1776220956_69defb1c0235b.jpg', 1, 5],
[6, 'Annisa Diyah Sitasari', '198512152007022001', 'SPJ Rampung BPOPP', '1776220987_69defb3bd8536.jpg', 1, 6],
[7, 'Ardyka Baharudin Safii, S.Pd', '198902102010011001', 'Operator Sekolah', '1776221012_69defb54b76e8.jpg', 1, 7],
[9, 'Tri Budhi Suwondo, S.Pd', '198103152006042001', 'Sosmed / Digital Sekolah', '', 1, 9],
[10, 'Intan Nurul \'Iza, S.Pd', '198609202009101001', 'Kepala Perpustakaan Sekolah', '', 1, 10],
[11, 'Siti Nur Jannah,S.T', '198912152012022001', 'Koperasi Sekolah', '', 1, 11],
[12, 'Anisza Apreliya Muamanah, S.Pd', '197504181998022001', 'Koperasi Sekolah', '', 1, 12],
[13, 'Miranda Putri Setya Ningsih', '197912202003121001', 'Tata Usaha', '', 1, 13],
[14, 'Isnayni firdayanti, S.Pd', '198206252007022001', 'Tata Usaha', '', 1, 14],
[15, 'Fanindiyas Cintiya Nadiva, S.H', '198710302010012001', 'Guru Bimbingan Konseling / BKK', '1776221558_69defd76517cc.jpg', 1, 15],
[16, 'Putut Nugroho, S.E', '197205151997031001', 'Wali Kelas X Akuntansi', '', 1, 16],
[17, 'Tutik Sujiati, S.Pd', '197611202000121001', 'Wali Kelas XI Akuntansi', '1776221571_69defd832ac0a.jpg', 1, 17],
[18, 'Ahmad Amin, S.E', '198302152005011001', 'Wali Kelas XII Akuntansi', '', 1, 18],
[19, 'Wahyudi Prasetyo', '198708202008011001', 'Wali Kelas X Teknik Komputer Jaringan', '1776002126_69dba44e703fa.jpg', 1, 19],
[20, 'Juvita Oktafi F, S.Pd', '197301201996012001', 'Wali Kelas XI Teknik Komputer Jaringan', '1776221609_69defda90d310.jpg', 1, 20],
[21, 'Adib Riyadi Bachtiar, M.MPd', '197409251998031001', 'Wali Kelas XII Teknik Komputer Jaringan', '1776221638_69defdc64b1b8.jpg', 1, 21],
[22, 'Danang Siswanto, M.Pd.,Gr', '197602281999031001', 'Wali Kelas X TKR', '1776221455_69defd0f4f856.jpg', 1, 22],
[23, 'Ratna Lestari, S.Pd', '198001152003122001', 'Wali Kelas XI TKR', '', 1, 23],
[24, 'Eksan Nur Afandi', '198304202006041001', 'Wali Kelas XII TKR', '1776221661_69defddd7c6b2.jpg', 1, 24],
[25, 'M. Ade Ilham', '198605202009022001', 'Guru Produktif', '', 1, 25],
];
foreach ($pengajars as $p) {
Pengajar::create([
'id' => $p[0],
'admin_id' => 1,
'nama_pengajar' => $p[1],
'nip' => $p[2],
'jabatan' => $p[3],
'foto_pengajar' => $p[4],
'status' => $p[5],
'urutan' => $p[6],
]);
}
}
}

View File

@ -0,0 +1,71 @@
<?php
namespace Database\Seeders;
use App\Models\Pengumuman;
use Illuminate\Database\Seeder;
class PengumumanSeeder extends Seeder
{
/**
* Run the database seeds.
*/
public function run(): void
{
Pengumuman::create([
'id' => 1,
'admin_id' => 1,
'nama_pengumuman' => 'PPDB 2025/2026 - Pendaftaran Siswa Baru',
'deskripsi_pengumuman' => 'Penerimaan Peserta Didik Baru (PPDB) Tahun Ajaran 2026/2027 SMK Muhammadiyah 1 Berbek telah dibuka. Daftarkan segera putra-putri Anda untuk bergabung dengan keluarga besar SMK Muhammadiyah 1 Berbek. Program keahlian yang tersedia: Teknik Komputer dan Jaringan, Akuntansi dan Keuangan Lembaga, Teknik Kendaraan Ringan Otomotif.',
'foto_pengumuman' => '1776733354_69e6ccaab2f5b.jpg',
'status' => 1,
'urutan' => 1,
'created_at' => '2026-01-07 20:04:45',
'updated_at' => '2026-04-20 18:18:22',
]);
Pengumuman::create([
'id' => 3,
'admin_id' => 1,
'nama_pengumuman' => 'Streaming Live SPMB Penerimaan Murid Baru 2026',
'deskripsi_pengumuman' => 'Pengumuman ini merupakan informasi resmi dari SMK Muhammadiyah 1 Berbek mengenai kegiatan Live Streaming SPMB (Sistem Penerimaan Murid Baru) tahun 2026/2027. Kegiatan ini disiarkan secara langsung melalui TikTok @smkmusaberbek.
Live streaming dilaksanakan hari SeninSabtu pukul 09.4511.45 WIB. Dalam siaran tersebut akan dibahas informasi seputar pendaftaran siswa baru, program jurusan, serta berbagai keunggulan sekolah.
Pengumuman ini bertujuan untuk memberikan kemudahan akses informasi kepada calon siswa dan orang tua secara online dan interaktif.',
'foto_pengumuman' => '1776733302_69e6cc762c563.jpg',
'status' => 1,
'urutan' => 3,
'created_at' => '2026-01-07 20:04:45',
'updated_at' => '2026-04-20 18:18:24',
]);
Pengumuman::create([
'id' => 4,
'admin_id' => 1,
'nama_pengumuman' => 'Sistem Penerimaan Murid Baru Tahun Ajaran 2026/2027',
'deskripsi_pengumuman' => 'Penerimaan Murid Baru Tahun Pelajaran 2026/2027 di SMK Muhammadiyah 1 Berbek.
Isi brosur meliputi:
Informasi bahwa pendaftaran siswa baru telah dibuka.
Tiga program keahlian yang tersedia, yaitu Teknik Kendaraan Ringan Otomotif (TKRO), Teknik Komputer dan Jaringan (TKJ), dan Akuntansi Keuangan Lembaga (AKL).
Persyaratan pendaftaran seperti mengisi formulir, menyerahkan ijazah SMP/sederajat, fotokopi Kartu Keluarga, dan fotokopi Akta Kelahiran.
Program Boarding School (asrama) dengan fokus hafalan Al-Quran, bahasa Arab dan Inggris, serta pembinaan akhlak.
Fasilitas sekolah seperti seragam gratis dan beasiswa.
Berbagai kegiatan ekstrakurikuler seperti HW, IPM, musik, tari, e-sport, futsal, voli, dan jurnalistik.
Informasi kontak dan QR code untuk pendaftaran online.',
'foto_pengumuman' => '1776733336_69e6cc98b37d0.jpg',
'status' => 1,
'urutan' => 2,
'created_at' => '2026-01-07 20:04:45',
'updated_at' => '2026-04-20 18:18:21',
]);
}
}

View File

@ -0,0 +1,30 @@
<?php
namespace Database\Seeders;
use App\Models\Prestasi;
use Illuminate\Database\Seeder;
class PrestasiSeeder extends Seeder
{
/**
* Run the database seeds.
*/
public function run(): void
{
Prestasi::create([
'id' => 1,
'admin_id' => 1,
'jurusan_id' => 3,
'nama_siswa' => 'Beregu',
'nama_prestasi' => 'Lomba Gerak Jalan Tingkat Kecamatan Berbek',
'peringkat' => 'Juara 1',
'tahun_prestasi' => 2024,
'foto_prestasi' => '1776733270_69e6cc569058d.jpg',
'status' => 1,
'urutan' => 1,
'created_at' => '2026-04-20 18:01:10',
'updated_at' => '2026-04-20 18:19:30',
]);
}
}

View File

@ -0,0 +1,42 @@
<?php
namespace Database\Seeders;
use App\Models\Struktur;
use Illuminate\Database\Seeder;
class StrukturSeeder extends Seeder
{
/**
* Run the database seeds.
*/
public function run(): void
{
Struktur::create([
'id' => 1,
'admin_id' => 1,
'gambar_struktur' => '1776217740_69deee8c719eb.jpeg',
'status' => 1,
'created_at' => '2026-02-26 21:01:43',
'updated_at' => '2026-05-06 18:25:10',
]);
Struktur::create([
'id' => 4,
'admin_id' => 1,
'gambar_struktur' => '1778117042_69fbe9b2d54e7.jpg',
'status' => 0,
'created_at' => '2026-05-06 18:24:02',
'updated_at' => '2026-05-06 18:25:09',
]);
Struktur::create([
'id' => 5,
'admin_id' => 1,
'gambar_struktur' => '1778117126_69fbea06ec686.jpg',
'status' => 0,
'created_at' => '2026-05-06 18:25:26',
'updated_at' => '2026-05-06 18:25:48',
]);
}
}

2378
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

17
package.json Normal file
View File

@ -0,0 +1,17 @@
{
"$schema": "https://www.schemastore.org/package.json",
"private": true,
"type": "module",
"scripts": {
"build": "vite build",
"dev": "vite"
},
"devDependencies": {
"@tailwindcss/vite": "^4.0.0",
"axios": "^1.11.0",
"concurrently": "^9.0.1",
"laravel-vite-plugin": "^2.0.0",
"tailwindcss": "^4.0.0",
"vite": "^7.0.7"
}
}

35
phpunit.xml Normal file
View File

@ -0,0 +1,35 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
bootstrap="vendor/autoload.php"
colors="true"
>
<testsuites>
<testsuite name="Unit">
<directory>tests/Unit</directory>
</testsuite>
<testsuite name="Feature">
<directory>tests/Feature</directory>
</testsuite>
</testsuites>
<source>
<include>
<directory>app</directory>
</include>
</source>
<php>
<env name="APP_ENV" value="testing"/>
<env name="APP_MAINTENANCE_DRIVER" value="file"/>
<env name="BCRYPT_ROUNDS" value="4"/>
<env name="BROADCAST_CONNECTION" value="null"/>
<env name="CACHE_STORE" value="array"/>
<env name="DB_CONNECTION" value="sqlite"/>
<env name="DB_DATABASE" value=":memory:"/>
<env name="MAIL_MAILER" value="array"/>
<env name="QUEUE_CONNECTION" value="sync"/>
<env name="SESSION_DRIVER" value="array"/>
<env name="PULSE_ENABLED" value="false"/>
<env name="TELESCOPE_ENABLED" value="false"/>
<env name="NIGHTWATCH_ENABLED" value="false"/>
</php>
</phpunit>

25
public/.htaccess Normal file
View File

@ -0,0 +1,25 @@
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews -Indexes
</IfModule>
RewriteEngine On
# Handle Authorization Header
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
# Handle X-XSRF-Token Header
RewriteCond %{HTTP:x-xsrf-token} .
RewriteRule .* - [E=HTTP_X_XSRF_TOKEN:%{HTTP:X-XSRF-Token}]
# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} (.+)/$
RewriteRule ^ %1 [L,R=301]
# Send Requests To Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</IfModule>

569
public/css/app.css Normal file
View File

@ -0,0 +1,569 @@
:root {
--primary: #0066cc;
--primary-dark: #004d99;
--primary-light: #4d94ff;
--secondary: #00a8ff;
--dark: #1a1a2e;
--darker: #0d0d1a;
--light: #f8f9fa;
--lighter: #ffffff;
--gradient: linear-gradient(135deg, var(--primary), var(--secondary));
--gradient-dark: linear-gradient(135deg, var(--primary-dark), #0097e6);
--shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
--shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.12);
--shadow-xl: 0 25px 50px rgba(0, 0, 0, 0.15);
--border-radius: 16px;
--border-radius-lg: 24px;
--transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Inter', sans-serif;
background-color: #f5f7fb;
overflow-x: hidden;
}
.admin-wrapper {
display: flex;
min-height: 100svh;
}
.sidebar {
width: 280px;
background: var(--gradient-dark);
color: white;
transition: var(--transition);
position: fixed;
height: 120svh;
z-index: 1000;
box-shadow: var(--shadow-lg);
}
.sidebar-header {
padding: 25px 20px;
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
display: flex;
align-items: center;
justify-content: space-between;
}
.sidebar-brand {
display: flex;
align-items: center;
gap: 12px;
}
.sidebar-brand img {
width: 200px;
height: auto;
border-radius: 8px;
}
.sidebar-brand-text {
font-family: 'Poppins', sans-serif;
font-weight: 700;
font-size: 1.3rem;
}
.sidebar-menu {
padding: 10px 0;
list-style: none;
}
.sidebar-item {
margin-bottom: 8px;
}
.sidebar-link {
display: flex;
align-items: center;
padding: 15px 20px;
color: rgba(255, 255, 255, 0.8);
text-decoration: none;
transition: var(--transition);
border-left: 4px solid transparent;
}
.sidebar-link:hover,
.sidebar-link.active {
background: rgba(255, 255, 255, 0.1);
color: white;
border-left-color: #ffff;
}
.sidebar-link i {
font-size: 1.2rem;
margin-right: 15px;
width: 24px;
text-align: center;
}
.sidebar-dropdown {
list-style: none;
padding-left: 0;
max-height: 0;
overflow: hidden;
transition: max-height 0.3s ease;
}
.sidebar-dropdown.show {
max-height: 500px;
}
.sidebar-dropdown .sidebar-link {
padding-left: 60px;
font-size: 0.9rem;
}
/* Main Content */
.main-content {
flex: 1;
margin-left: 280px;
transition: var(--transition);
}
/* Header */
.admin-header {
background: white;
padding: 20px 30px;
box-shadow: var(--shadow);
display: flex;
align-items: center;
justify-content: space-between;
position: sticky;
top: 0;
z-index: 999;
}
.header-left {
display: flex;
align-items: center;
gap: 15px;
}
.mobile-toggle {
display: none;
background: none;
border: none;
font-size: 1.3rem;
color: var(--dark);
cursor: pointer;
padding: 8px;
border-radius: 6px;
transition: var(--transition);
}
.mobile-toggle:hover {
background: var(--light);
}
.header-title h1 {
font-family: 'Poppins', sans-serif;
font-weight: 700;
font-size: 1.5rem;
color: var(--dark);
margin: 0;
}
.header-right {
display: flex;
align-items: center;
gap: 20px;
}
.header-actions {
display: flex;
align-items: center;
gap: 15px;
}
.notification-btn,
.profile-btn {
background: none;
border: none;
font-size: 1.8rem;
color: var(--dark);
cursor: pointer;
position: relative;
padding: 8px;
border-radius: 50%;
transition: var(--transition);
}
.notification-badge {
position: absolute;
top: 5px;
right: 5px;
background: var(--accent);
color: white;
border-radius: 50%;
width: 18px;
height: 18px;
font-size: 0.7rem;
display: flex;
align-items: center;
justify-content: center;
}
.profile-dropdown {
position: relative;
}
.profile-menu {
position: absolute;
top: 100%;
right: 0;
background: white;
border-radius: var(--border-radius);
box-shadow: var(--shadow-lg);
padding: 10px 0;
min-width: 200px;
display: none;
z-index: 1000;
}
.profile-menu.show {
display: block;
}
.profile-menu-item {
display: block;
padding: 10px 20px;
color: var(--dark);
text-decoration: none;
transition: var(--transition);
border: none;
background: none;
width: 100%;
text-align: left;
}
.profile-menu-item:hover {
background: var(--light);
color: var(--primary);
}
/* Content Area */
.content-wrapper {
padding: 30px;
}
@media (max-width: 1199.98px) {
.sidebar {
width: 250px;
}
.main-content {
margin-left: 250px;
}
}
@media (max-width: 991.98px) {
.sidebar {
transform: translateX(-100%);
width: 280px;
}
.sidebar.mobile-open {
transform: translateX(0);
}
.main-content {
margin-left: 0;
}
.mobile-toggle {
display: block;
}
}
@media (max-width: 767.98px) {
.admin-header {
padding: 15px 20px;
}
.content-wrapper {
padding: 20px;
}
.dashboard-cards {
grid-template-columns: 1fr;
}
.header-title h1 {
font-size: 1.3rem;
}
}
@media (max-width: 575.98px) {
.admin-header {
padding: 12px 15px;
}
.content-wrapper {
padding: 15px;
}
.dashboard-card {
padding: 20px;
}
.card-value {
font-size: 1.8rem;
}
}
.mobile-overlay {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.5);
z-index: 999;
display: none;
}
.mobile-overlay.show {
display: block;
}
@keyframes fadeIn {
from {
opacity: 0;
transform: translateY(20px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.fade-in {
animation: fadeIn 0.5s ease-out;
}
.profile-avatar {
width: 32px;
height: 32px;
border-radius: 50%;
object-fit: cover;
}
.profile-btn {
display: flex;
justify-content: center;
align-items: center;
}
.profile-btn i {
color: var(--primary);
}
.name-header {
font-size: 20px;
font-weight: 600;
color: var(--primary);
}
.sidebar-item.logout-item {
margin-top: auto;
border-top: 1px solid rgba(255, 255, 255, 0.1);
padding-top: 10px;
}
.sidebar-item.logout-item .sidebar-link {
color: #dd3333 !important;
background: #ffff;
padding: 20px;
border-radius: 20px;
margin-left: 16px;
margin-right: 16px;
font-weight: 800;
border: none;
}
.sidebar-item.logout-item .sidebar-link:hover {
background: #dd3333;
color: #ffff !important;
border: none;
}
.profile-info {
background: #f8f9fa;
margin: -10px 0 5px 0;
}
.swal2-popup {
border-radius: var(--border-radius) !important;
}
.swal2-confirm {
border-radius: 8px !important;
}
.swal2-cancel {
border-radius: 8px !important;
}
@media (max-width: 767.98px) {
.profile-btn span {
display: none !important;
}
}
.loading {
opacity: 0.7;
pointer-events: none;
}
.profile-menu {
animation: slideDown 0.2s ease-out;
}
@keyframes slideDown {
from {
opacity: 0;
transform: translateY(-10px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.dropdown-toggle::after {
display: none !important;
}
.sidebar-item.has-dropdown {
position: relative;
}
.sidebar-link.dropdown-toggle {
display: flex;
align-items: center;
justify-content: space-between;
position: relative;
}
.dropdown-arrow {
font-size: 0.8rem;
transition: transform 0.3s ease;
margin-left: auto;
}
.sidebar-item.has-dropdown.active .dropdown-arrow {
transform: rotate(180deg);
}
.sidebar-dropdown {
list-style: none;
text-decoration: none;
padding-left: 0;
max-height: 0;
overflow: hidden;
transition: max-height 0.4s ease, opacity 0.3s ease;
opacity: 0;
background: rgba(0, 0, 0, 0.1);
}
.sidebar-dropdown.show {
max-height: 500px;
opacity: 1;
}
.sidebar-dropdown .sidebar-link {
padding-left: 60px;
font-size: 0.9rem;
border-left: none;
position: relative;
}
.sidebar-dropdown .sidebar-link::before {
content: '';
position: absolute;
left: 40px;
top: 50%;
transform: translateY(-50%);
width: 6px;
height: 6px;
background: rgba(255, 255, 255, 0.5);
border-radius: 50%;
}
.sidebar-dropdown .sidebar-link.active::before {
background: white;
}
.sidebar-item.has-dropdown.active > .sidebar-link {
background: rgba(255, 255, 255, 0.15);
color: white;
border-left-color: white;
}
@media (max-width: 991.98px) {
.sidebar {
height: 100vh;
overflow-y: auto;
}
.sidebar-dropdown .sidebar-link {
padding-left: 50px;
}
.sidebar-dropdown .sidebar-link::before {
left: 30px;
}
}
.sidebar {
transition: transform 0.3s ease, width 0.3s ease;
}
.mobile-overlay {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.5);
z-index: 999;
opacity: 0;
visibility: hidden;
transition: opacity 0.3s ease, visibility 0.3s ease;
}
.mobile-overlay.show {
opacity: 1;
visibility: visible;
}
.sidebar-menu {
scrollbar-width: thin;
scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}
.sidebar-menu::-webkit-scrollbar {
width: 4px;
}
.sidebar-menu::-webkit-scrollbar-track {
background: transparent;
}
.sidebar-menu::-webkit-scrollbar-thumb {
background: rgba(255, 255, 255, 0.3);
border-radius: 2px;
}
.sidebar-menu::-webkit-scrollbar-thumb:hover {
background: rgba(255, 255, 255, 0.5);
}

879
public/css/dashboard.css Normal file
View File

@ -0,0 +1,879 @@
:root {
--primary: #0066cc;
--primary-light: #4d94ff;
--primary-dark: #004d99;
--secondary: #00a8ff;
--success: #28a745;
--success-light: #34ce57;
--warning: #ffc107;
--warning-light: #ffd350;
--info: #17a2b8;
--info-light: #3ab0c5;
--dark: #1a1a2e;
--light: #f8f9fa;
--lighter: #ffffff;
--gray: #6c757d;
--gray-light: #e9ecef;
--border-radius: 16px;
--border-radius-sm: 12px;
--border-radius-lg: 20px;
--shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
--shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.12);
--shadow-xl: 0 15px 40px rgba(0, 0, 0, 0.15);
--transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.dashboard-container {
padding: 0;
animation: fadeIn 0.6s ease-out;
}
/* Welcome Section */
.welcome-section {
background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
border-radius: var(--border-radius-lg);
padding: 40px;
margin-bottom: 30px;
color: white;
display: flex;
justify-content: space-between;
align-items: center;
box-shadow: var(--shadow-lg);
position: relative;
overflow: hidden;
}
.welcome-section::before {
content: '';
position: absolute;
top: 0;
right: 0;
width: 200px;
height: 200px;
background: rgba(255, 255, 255, 0.1);
border-radius: 50%;
transform: translate(30%, -30%);
}
.welcome-section::after {
content: '';
position: absolute;
bottom: -50px;
right: -50px;
width: 150px;
height: 150px;
background: rgba(255, 255, 255, 0.05);
border-radius: 50%;
}
.welcome-title {
font-family: 'Poppins', sans-serif;
font-weight: 700;
font-size: 2.2rem;
margin-bottom: 8px;
position: relative;
z-index: 2;
}
.welcome-subtitle {
font-size: 1.1rem;
opacity: 0.9;
margin: 0;
position: relative;
z-index: 2;
}
.welcome-actions {
position: relative;
z-index: 2;
}
.date-display {
background: rgba(255, 255, 255, 0.2);
padding: 12px 20px;
border-radius: var(--border-radius);
backdrop-filter: blur(10px);
border: 1px solid rgba(255, 255, 255, 0.3);
font-weight: 500;
}
.date-display i {
margin-right: 8px;
}
/* Stats Overview */
.stats-overview {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
gap: 25px;
margin-bottom: 30px;
}
.stat-card {
background: var(--lighter);
border-radius: var(--border-radius);
padding: 30px;
box-shadow: var(--shadow);
transition: var(--transition);
display: flex;
align-items: center;
gap: 20px;
position: relative;
overflow: hidden;
border: 1px solid var(--gray-light);
}
.stat-card::before {
content: '';
position: absolute;
top: 0;
left: 0;
width: 5px;
height: 100%;
transition: var(--transition);
}
.stat-card.primary::before { background: var(--primary); }
.stat-card.success::before { background: var(--success); }
.stat-card.warning::before { background: var(--warning); }
.stat-card.info::before { background: var(--info); }
.stat-card:hover {
transform: translateY(-5px);
box-shadow: var(--shadow-xl);
}
.stat-card:hover::before {
width: 8px;
}
.stat-icon {
width: 80px;
height: 80px;
border-radius: 20px;
display: flex;
align-items: center;
justify-content: center;
font-size: 2rem;
color: white;
flex-shrink: 0;
transition: var(--transition);
}
.stat-card:hover .stat-icon {
transform: scale(1.1) rotate(5deg);
}
.stat-card.primary .stat-icon { background: linear-gradient(135deg, var(--primary), var(--primary-light)); }
.stat-card.success .stat-icon { background: linear-gradient(135deg, var(--success), var(--success-light)); }
.stat-card.warning .stat-icon { background: linear-gradient(135deg, var(--warning), var(--warning-light)); }
.stat-card.info .stat-icon { background: linear-gradient(135deg, var(--info), var(--info-light)); }
.stat-content {
flex: 1;
}
.stat-value {
font-family: 'Poppins', sans-serif;
font-weight: 800;
font-size: 2.8rem;
color: var(--dark);
margin: 0;
line-height: 1;
}
.stat-label {
color: var(--gray);
font-weight: 500;
margin: 8px 0;
font-size: 1rem;
}
.stat-trend {
display: flex;
align-items: center;
gap: 6px;
font-size: 0.85rem;
font-weight: 600;
}
.stat-trend.positive {
color: var(--success);
}
.stat-trend.negative {
color: #dc3545;
}
/* Dashboard Grid */
.dashboard-grid {
display: grid;
grid-template-columns: 2fr 1fr;
gap: 30px;
margin-bottom: 30px;
}
.dashboard-column.wide {
display: flex;
flex-direction: column;
gap: 30px;
}
.dashboard-column.narrow {
display: flex;
flex-direction: column;
gap: 30px;
}
/* Section Styles */
.section-header {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 25px;
}
.section-title {
display: flex;
align-items: center;
gap: 12px;
}
.section-title i {
font-size: 1.3rem;
color: var(--primary);
}
.section-title h3 {
font-family: 'Poppins', sans-serif;
font-weight: 600;
color: var(--dark);
margin: 0;
font-size: 1.3rem;
}
.section-actions {
display: flex;
gap: 10px;
}
/* Chart Section */
.chart-section {
background: var(--lighter);
border-radius: var(--border-radius);
padding: 30px;
box-shadow: var(--shadow);
border: 1px solid var(--gray-light);
}
.chart-container {
height: 350px;
position: relative;
}
/* Activity Section */
.activity-section {
background: var(--lighter);
border-radius: var(--border-radius);
padding: 30px;
box-shadow: var(--shadow);
border: 1px solid var(--gray-light);
}
.activity-grid {
display: grid;
grid-template-columns: 1fr;
gap: 25px;
}
.activity-card {
background: var(--lighter);
}
.activity-list {
display: flex;
flex-direction: column;
gap: 16px;
}
.activity-item {
display: flex;
align-items: flex-start;
gap: 15px;
padding: 20px;
background: var(--light);
border-radius: var(--border-radius-sm);
transition: var(--transition);
border: 1px solid transparent;
}
.activity-item:hover {
background: var(--lighter);
border-color: var(--primary-light);
transform: translateX(5px);
box-shadow: var(--shadow);
}
.activity-icon {
width: 50px;
height: 50px;
border-radius: 12px;
display: flex;
align-items: center;
justify-content: center;
font-size: 1.2rem;
color: white;
flex-shrink: 0;
margin-top: 4px;
}
.activity-icon.success { background: linear-gradient(135deg, var(--success), var(--success-light)); }
.activity-icon.info { background: linear-gradient(135deg, var(--info), var(--info-light)); }
.activity-details {
flex: 1;
}
.activity-details h4 {
font-weight: 600;
color: var(--dark);
margin: 0 0 6px 0;
font-size: 1rem;
line-height: 1.4;
}
.activity-details p {
color: var(--gray);
font-size: 0.9rem;
margin: 0 0 8px 0;
line-height: 1.4;
}
.activity-time {
font-size: 0.8rem;
color: var(--gray);
display: flex;
align-items: center;
gap: 4px;
}
.activity-badge .badge {
padding: 6px 12px;
border-radius: 20px;
font-size: 0.75rem;
font-weight: 600;
text-transform: uppercase;
}
.badge.success { background: var(--success); color: white; }
.badge.secondary { background: var(--gray); color: white; }
.badge { background: var(--primary); color: white; }
/* Quick Stats */
.quick-stats {
background: var(--lighter);
border-radius: var(--border-radius);
padding: 30px;
box-shadow: var(--shadow);
border: 1px solid var(--gray-light);
}
.stats-list {
display: flex;
flex-direction: column;
gap: 15px;
}
.quick-stat-item {
display: flex;
align-items: center;
gap: 15px;
padding: 20px;
background: var(--light);
border-radius: var(--border-radius-sm);
transition: var(--transition);
}
.quick-stat-item:hover {
background: var(--lighter);
transform: translateX(3px);
}
.stat-icon-container {
width: 50px;
height: 50px;
border-radius: 12px;
display: flex;
align-items: center;
justify-content: center;
font-size: 1.3rem;
color: white;
flex-shrink: 0;
}
.stat-icon-container.primary { background: linear-gradient(135deg, var(--primary), var(--primary-light)); }
.stat-icon-container.success { background: linear-gradient(135deg, var(--success), var(--success-light)); }
.stat-icon-container.warning { background: linear-gradient(135deg, var(--warning), var(--warning-light)); }
.stat-icon-container.info { background: linear-gradient(135deg, var(--info), var(--info-light)); }
.stat-info h4 {
font-family: 'Poppins', sans-serif;
font-weight: 700;
font-size: 1.5rem;
color: var(--dark);
margin: 0;
line-height: 1;
}
.stat-info p {
color: var(--gray);
font-size: 0.9rem;
margin: 4px 0 0 0;
}
/* Quick Actions */
.quick-actions {
background: var(--lighter);
border-radius: var(--border-radius);
padding: 30px;
box-shadow: var(--shadow);
border: 1px solid var(--gray-light);
}
.actions-grid {
display: grid;
grid-template-columns: 1fr;
gap: 12px;
}
.action-btn {
display: flex;
align-items: center;
gap: 15px;
padding: 18px 20px;
border-radius: var(--border-radius-sm);
text-decoration: none;
transition: var(--transition);
border: 2px solid transparent;
font-weight: 500;
background: var(--light);
}
.action-btn.primary {
color: var(--primary);
border-color: rgba(0, 102, 204, 0.2);
}
.action-btn.success {
color: var(--success);
border-color: rgba(40, 167, 69, 0.2);
}
.action-btn.warning {
color: var(--warning);
border-color: rgba(255, 193, 7, 0.2);
}
.action-btn.info {
color: var(--info);
border-color: rgba(23, 162, 184, 0.2);
}
.action-btn:hover {
transform: translateY(-2px);
box-shadow: var(--shadow);
text-decoration: none;
}
.action-btn.primary:hover {
background: var(--primary);
color: white;
}
.action-btn.success:hover {
background: var(--success);
color: white;
}
.action-btn.warning:hover {
background: var(--warning);
color: white;
}
.action-btn.info:hover {
background: var(--info);
color: white;
}
.action-icon {
width: 40px;
height: 40px;
border-radius: 10px;
display: flex;
align-items: center;
justify-content: center;
font-size: 1.1rem;
background: rgba(255, 255, 255, 0.9);
}
/* Buttons */
.btn-refresh {
background: var(--primary);
color: white;
border: none;
padding: 10px 20px;
border-radius: var(--border-radius-sm);
font-weight: 500;
cursor: pointer;
transition: var(--transition);
display: flex;
align-items: center;
gap: 8px;
font-size: 0.9rem;
}
.btn-refresh:hover {
background: var(--primary-dark);
transform: translateY(-1px);
}
.btn-view-all {
color: var(--primary);
text-decoration: none;
font-weight: 500;
font-size: 0.9rem;
transition: var(--transition);
padding: 8px 16px;
border-radius: var(--border-radius-sm);
border: 1px solid transparent;
}
.btn-view-all:hover {
background: var(--primary);
color: white;
text-decoration: none;
}
/* Empty State */
.empty-state {
text-align: center;
padding: 40px 20px;
color: var(--gray);
}
.empty-state i {
font-size: 3rem;
margin-bottom: 15px;
opacity: 0.5;
}
.empty-state p {
margin: 0;
font-size: 1rem;
}
/* Animations */
@keyframes fadeIn {
from {
opacity: 0;
transform: translateY(20px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
/* Responsive Design */
@media (max-width: 1199.98px) {
.dashboard-grid {
grid-template-columns: 1fr;
}
.stats-overview {
grid-template-columns: repeat(2, 1fr);
}
}
@media (max-width: 767.98px) {
.welcome-section {
flex-direction: column;
gap: 20px;
text-align: center;
padding: 30px 20px;
}
.welcome-title {
font-size: 1.8rem;
}
.stats-overview {
grid-template-columns: 1fr;
}
.stat-card {
padding: 25px;
}
.stat-value {
font-size: 2.2rem;
}
.stat-icon {
width: 60px;
height: 60px;
font-size: 1.5rem;
}
.dashboard-grid {
gap: 20px;
}
.chart-section,
.activity-section,
.quick-stats,
.quick-actions {
padding: 20px;
}
}
@media (max-width: 575.98px) {
.section-header {
flex-direction: column;
align-items: flex-start;
gap: 15px;
}
.activity-item {
flex-direction: column;
text-align: center;
gap: 12px;
}
.activity-details {
text-align: center;
}
.quick-stat-item {
flex-direction: column;
text-align: center;
gap: 12px;
}
.action-btn {
flex-direction: column;
text-align: center;
gap: 10px;
padding: 15px;
}
}
.dashboard-container > * {
animation: fadeIn 0.6s ease-out;
}
.stats-overview .stat-card:nth-child(1) { animation-delay: 0.1s; }
.stats-overview .stat-card:nth-child(2) { animation-delay: 0.2s; }
.stats-overview .stat-card:nth-child(3) { animation-delay: 0.3s; }
.stats-overview .stat-card:nth-child(4) { animation-delay: 0.4s; }
/* Tambahkan kode ini ke file dashboard.css yang sudah ada */
/* Chart Controls */
.chart-controls {
display: flex;
gap: 8px;
margin-right: 15px;
}
.chart-btn {
background: var(--gray-light);
border: 2px solid var(--gray-light);
color: var(--gray);
padding: 8px 16px;
border-radius: var(--border-radius-sm);
font-weight: 500;
cursor: pointer;
transition: var(--transition);
display: flex;
align-items: center;
gap: 6px;
font-size: 0.85rem;
}
.chart-btn.active {
background: var(--primary);
border-color: var(--primary);
color: white;
}
.chart-btn:hover:not(.active) {
background: var(--primary-light);
border-color: var(--primary-light);
color: white;
}
/* Chart Statistics */
.chart-stats {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 15px;
margin-top: 20px;
padding-top: 20px;
border-top: 1px solid var(--gray-light);
}
.chart-stat-item {
text-align: center;
padding: 15px;
background: var(--light);
border-radius: var(--border-radius-sm);
transition: var(--transition);
}
.chart-stat-item:hover {
background: var(--lighter);
transform: translateY(-2px);
box-shadow: var(--shadow);
}
.chart-stat-item .stat-label {
font-size: 0.8rem;
color: var(--gray);
margin-bottom: 5px;
display: block;
font-weight: 500;
}
.chart-stat-item .stat-value-total,
.chart-stat-item .stat-value-avg,
.chart-stat-item .stat-value-max {
font-family: 'Poppins', sans-serif;
font-weight: 700;
font-size: 1.4rem;
display: block;
}
.chart-stat-item .stat-value-total {
color: var(--primary);
}
.chart-stat-item .stat-value-avg {
color: var(--success);
}
.chart-stat-item .stat-value-max {
color: var(--warning);
}
/* Enhanced Chart Container */
.chart-container {
height: 350px;
position: relative;
background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
border-radius: var(--border-radius-sm);
padding: 20px;
border: 1px solid var(--gray-light);
}
/* Improved Section Header */
.section-header {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 25px;
flex-wrap: wrap;
gap: 15px;
}
.section-actions {
display: flex;
align-items: center;
gap: 10px;
}
/* Enhanced Chart Animations */
@keyframes barGrowth {
from {
transform: scaleY(0);
transform-origin: bottom;
}
to {
transform: scaleY(1);
}
}
/* Responsive Chart */
@media (max-width: 767.98px) {
.chart-stats {
grid-template-columns: 1fr;
gap: 10px;
}
.chart-controls {
margin-right: 0;
margin-bottom: 10px;
}
.section-header {
flex-direction: column;
align-items: flex-start;
}
.section-actions {
width: 100%;
justify-content: space-between;
}
.chart-container {
height: 300px;
padding: 15px;
}
}
.chart-section {
transition: var(--transition);
}
.chart-loading {
position: relative;
}
.chart-loading::after {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(255, 255, 255, 0.8);
display: flex;
align-items: center;
justify-content: center;
border-radius: var(--border-radius-sm);
}
.chartjs-tooltip {
background: #ffff !important;
border: 1px solid rgba(255, 255, 255, 0.1) !important;
backdrop-filter: blur(10px) !important;
}
.chart-container::-webkit-scrollbar {
width: 6px;
height: 6px;
}
.chart-container::-webkit-scrollbar-track {
background: var(--gray-light);
border-radius: 3px;
}
.chart-container::-webkit-scrollbar-thumb {
background: var(--primary);
border-radius: 3px;
}
.chart-container::-webkit-scrollbar-thumb:hover {
background: var(--primary-dark);
}

252
public/css/landing-page.css Normal file
View File

@ -0,0 +1,252 @@
:root {
--primary-color: #0066cc;
--secondary-color: #004d99;
--accent-color: #00a8ff;
--light-color: #f8f9fa;
--dark-color: #343a40;
}
body {
font-family: 'Poppins', sans-serif;
line-height: 1.6;
color: #333;
}
.navbar {
background-color: transparent;
transition: background-color 0.3s ease;
padding: 15px 0;
}
.navbar-scrolled {
background-color: var(--primary-color) !important;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}
.navbar-brand {
font-size: 1.5rem;
}
.navbar-nav .nav-link {
font-weight: 500;
margin: 0 10px;
transition: color 0.3s ease;
}
.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
color: var(--accent-color) !important;
}
.hero-section {
background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
color: white;
padding-top: 100px;
padding-bottom: 50px;
}
.hero-title {
font-size: 3.5rem;
font-weight: 700;
margin-bottom: 1rem;
}
.hero-subtitle {
font-size: 1.5rem;
font-weight: 400;
margin-bottom: 1.5rem;
}
.hero-description {
font-size: 1.1rem;
margin-bottom: 2rem;
}
@media (max-width: 768px) {
.hero-title {
font-size: 2.5rem;
}
.hero-subtitle {
font-size: 1.2rem;
}
}
.section-title {
font-size: 2.5rem;
font-weight: 700;
margin-bottom: 1rem;
position: relative;
}
.section-title::after {
content: '';
position: absolute;
bottom: -10px;
left: 50%;
transform: translateX(-50%);
width: 80px;
height: 4px;
background-color: var(--primary-color);
border-radius: 2px;
}
.section-subtitle {
font-size: 1.2rem;
color: #6c757d;
margin-bottom: 3rem;
}
.card {
transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card:hover {
transform: translateY(-5px);
box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1) !important;
}
.icon-box {
color: var(--primary-color);
}
.jurusan-card {
border: none;
border-radius: 10px;
overflow: hidden;
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}
.jurusan-icon {
color: var(--primary-color);
}
.jurusan-card .card-title {
color: var(--primary-color);
font-weight: 700;
}
.jurusan-card .card-subtitle {
color: var(--secondary-color);
font-weight: 600;
}
/* Facility Cards */
.facility-card {
border-radius: 10px;
overflow: hidden;
transition: all 0.3s ease;
}
.facility-card img {
transition: transform 0.5s ease;
}
.facility-card:hover img {
transform: scale(1.05);
}
/* Gallery */
.gallery-item {
position: relative;
overflow: hidden;
border-radius: 10px;
cursor: pointer;
}
.gallery-item img {
transition: transform 0.5s ease;
}
.gallery-item:hover img {
transform: scale(1.05);
}
.gallery-overlay {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 102, 204, 0.8);
display: flex;
align-items: center;
justify-content: center;
opacity: 0;
transition: opacity 0.3s ease;
}
.gallery-item:hover .gallery-overlay {
opacity: 1;
}
.gallery-text {
text-align: center;
color: white;
padding: 20px;
}
/* Footer */
.footer-section {
background-color: var(--dark-color);
}
.social-links a {
color: white;
transition: color 0.3s ease;
}
.social-links a:hover {
color: var(--accent-color);
}
/* Buttons */
.btn-primary {
background-color: var(--primary-color);
border-color: var(--primary-color);
padding: 12px 30px;
font-weight: 600;
transition: all 0.3s ease;
}
.btn-primary:hover {
background-color: var(--secondary-color);
border-color: var(--secondary-color);
transform: translateY(-2px);
}
.btn-outline-primary {
color: var(--primary-color);
border-color: var(--primary-color);
padding: 12px 30px;
font-weight: 600;
transition: all 0.3s ease;
}
.btn-outline-primary:hover {
background-color: var(--primary-color);
border-color: var(--primary-color);
transform: translateY(-2px);
}
.btn-outline-light:hover {
color: var(--primary-color);
}
/* Responsive adjustments */
@media (max-width: 768px) {
.section-title {
font-size: 2rem;
}
.hero-buttons .btn {
display: block;
width: 100%;
margin-bottom: 10px;
}
.ppdb-form {
transform: none;
margin-top: 30px;
}
}

447
public/css/login.css Normal file
View File

@ -0,0 +1,447 @@
:root {
--primary: #0066cc;
--primary-dark: #004d99;
--primary-light: #4d94ff;
--secondary: #00a8ff;
--accent: #ff6b6b;
--accent-light: #ff9999;
--dark: #1a1a2e;
--darker: #0d0d1a;
--light: #f8f9fa;
--lighter: #ffffff;
--gradient: linear-gradient(135deg, var(--primary), var(--secondary));
--gradient-dark: linear-gradient(135deg, var(--primary-dark), #0097e6);
--gradient-accent: linear-gradient(135deg, var(--accent), #ff8e8e);
--shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
--shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.12);
--shadow-xl: 0 25px 50px rgba(0, 0, 0, 0.15);
--border-radius: 16px;
--border-radius-lg: 24px;
--transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Inter', sans-serif;
line-height: 1.7;
color: #333;
overflow-x: hidden;
background-color: var(--lighter);
}
.login-container {
min-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
position: relative;
background: var(--gradient-dark);
padding: 20px;
}
.login-background {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
overflow: hidden;
z-index: 0;
}
.login-background::before {
content: '';
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%23ffffff" fill-opacity="0.05" d="M0,96L48,112C96,128,192,160,288,186.7C384,213,480,235,576,213.3C672,192,768,128,864,128C960,128,1056,192,1152,192C1248,192,1344,128,1392,96L1440,64L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>');
background-size: cover;
background-position: center bottom;
}
.floating-elements {
position: absolute;
width: 100%;
height: 100%;
top: 0;
left: 0;
overflow: hidden;
}
.floating-element {
position: absolute;
background: rgba(255, 255, 255, 0.1);
border-radius: 50%;
animation: float 8s ease-in-out infinite;
}
.floating-element:nth-child(1) {
width: 80px;
height: 80px;
top: 10%;
left: 10%;
animation-delay: 0s;
}
.floating-element:nth-child(2) {
width: 120px;
height: 120px;
top: 20%;
right: 10%;
animation-delay: 2s;
}
.floating-element:nth-child(3) {
width: 60px;
height: 60px;
bottom: 20%;
left: 15%;
animation-delay: 4s;
}
.floating-element:nth-child(4) {
width: 100px;
height: 100px;
bottom: 10%;
right: 15%;
animation-delay: 6s;
}
@keyframes float {
0%, 100% {
transform: translateY(0) rotate(0deg);
}
50% {
transform: translateY(-25px) rotate(10deg);
}
}
.login-card-wrapper {
position: relative;
z-index: 2;
width: 100%;
max-width: 440px;
}
.login-card {
background: var(--lighter);
border-radius: var(--border-radius-lg);
padding: 40px 35px;
box-shadow: var(--shadow-xl);
backdrop-filter: blur(20px);
-webkit-backdrop-filter: blur(20px);
border: 1px solid rgba(255, 255, 255, 0.2);
animation: slideUp 0.6s ease-out;
}
@keyframes slideUp {
from {
opacity: 0;
transform: translateY(30px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.login-header {
display: flex;
justify-content: center;
align-items: center;
text-align: center;
flex-direction: column;
margin-bottom: 15px;
}
.logo-container {
margin-bottom: 10px;
}
.login-logo {
height: 80px;
width: auto;
border-radius: 8px;
}
.login-title {
font-family: 'Poppins', sans-serif;
font-size: 1.6rem;
font-weight: 700;
margin-bottom: 6px;
background: var(--gradient);
background-clip: text;
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
display: inline-block;
}
.login-subtitle {
color: #6c757d;
font-size: 1rem;
margin-bottom: 0;
max-width: 250px;
}
.form-group {
margin-bottom: 15px;
}
.form-label {
display: block;
margin-bottom: 8px;
font-weight: 600;
color: var(--dark);
font-size: 0.95rem;
}
.input-group {
position: relative;
display: flex;
align-items: center;
border-radius: var(--border-radius);
overflow: hidden;
}
.form-control {
width: 100%;
padding: 16px 20px;
border: 2px solid #e8f0fe;
border-radius: var(--border-radius);
font-size: 1rem;
transition: var(--transition);
background-color: #f8fafc;
font-family: 'Inter', sans-serif;
}
.form-control:focus {
outline: none;
border-color: var(--primary);
background-color: var(--lighter);
border-radius: var(--border-radius);
box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}
.password-toggle {
position: absolute;
right: 15px;
border: none;
background: none;
color: var(--primary);
cursor: pointer;
z-index: 5;
display: flex;
align-items: center;
justify-content: center;
padding: 0;
}
.password-toggle i {
border: none;
background: none;
text-decoration: none;
}
.form-options {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 15px;
}
.form-check {
display: flex;
align-items: center;
}
.form-check-input {
margin-right: 8px;
width: 18px;
height: 18px;
border: 2px solid #dee2e6;
border-radius: 4px;
cursor: pointer;
}
.form-check-input:checked {
background-color: var(--primary);
border-color: var(--primary);
}
.form-check-label {
font-size: 0.9rem;
color: #6c757d;
cursor: pointer;
}
.forgot-password {
color: var(--primary);
text-decoration: none;
font-size: 0.9rem;
font-weight: 500;
transition: var(--transition);
}
.forgot-password:hover {
color: var(--primary-dark);
text-decoration: underline;
}
.login-btn {
width: 100%;
padding: 16px 24px;
background: var(--gradient);
color: white;
border: none;
border-radius: var(--border-radius);
font-size: 1rem;
font-weight: 600;
cursor: pointer;
transition: var(--transition);
display: flex;
align-items: center;
justify-content: center;
gap: 10px;
margin-bottom: 14px;
position: relative;
overflow: hidden;
}
.login-btn::before {
content: '';
position: absolute;
top: 0;
left: -100%;
width: 100%;
height: 100%;
background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
transition: var(--transition);
}
.login-btn:hover::before {
left: 100%;
}
.login-btn:hover {
transform: translateY(-2px);
box-shadow: var(--shadow-lg);
}
.btn-text {
position: relative;
z-index: 1;
}
.btn-icon {
position: relative;
z-index: 1;
transition: var(--transition);
}
.login-btn:hover .btn-icon {
transform: translateX(5px);
}
.back-to-home {
margin-bottom: 25px;
}
.back-btn {
width: 100%;
padding: 14px 24px;
background: transparent;
color: var(--primary);
border: 2px solid var(--primary);
border-radius: var(--border-radius);
font-size: 1rem;
font-weight: 600;
cursor: pointer;
transition: var(--transition);
display: flex;
align-items: center;
justify-content: center;
gap: 10px;
position: relative;
overflow: hidden;
}
.back-btn::before {
content: '';
position: absolute;
top: 0;
left: -100%;
width: 100%;
height: 100%;
background: linear-gradient(90deg, transparent, rgba(0, 102, 204, 0.1), transparent);
transition: var(--transition);
}
.back-btn:hover::before {
left: 100%;
}
.back-btn:hover {
background: var(--primary);
color: white;
transform: translateY(-2px);
box-shadow: var(--shadow-lg);
}
.back-btn:hover i {
transform: translateX(-3px);
}
.back-btn i {
transition: var(--transition);
}
.login-btn:focus,
.back-btn:focus,
.form-control:focus {
outline: none;
box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.3);
}
@media (max-width: 575.98px) {
.login-container {
padding: 15px;
}
.login-card {
padding: 30px 25px;
}
.login-title {
font-size: 1.8rem;
}
.login-logo {
height: 70px;
}
.back-btn {
padding: 12px 20px;
font-size: 0.95rem;
}
}
@media (max-width: 767.98px) {
.form-options {
flex-direction: column;
gap: 15px;
align-items: flex-start;
}
}
@media (max-width: 991.98px) {
.login-card-wrapper {
max-width: 400px;
}
}

View File

@ -0,0 +1,704 @@
.manajemen-admin-container {
max-width: 1400px;
margin: 0 auto;
}
.page-header {
padding: 20px 0;
}
.page-title {
font-family: 'Poppins', sans-serif;
font-weight: 700;
font-size: 2rem;
color: var(--dark);
margin-bottom: 0.5rem;
}
.page-subtitle {
color: #6c757d;
font-size: 1.1rem;
margin: 0;
}
.stat-card {
background: white;
border-radius: var(--border-radius);
padding: 25px;
box-shadow: var(--shadow);
display: flex;
align-items: center;
gap: 20px;
transition: var(--transition);
border-left: 4px solid transparent;
}
.stat-card:hover {
transform: translateY(-3px);
box-shadow: var(--shadow-lg);
}
.stat-card.primary {
border-left-color: var(--primary);
}
.stat-card.success {
border-left-color: #28a745;
}
.stat-card.warning {
border-left-color: #ffc107;
}
.stat-card.info {
border-left-color: #17a2b8;
}
.stat-icon {
width: 60px;
height: 60px;
border-radius: 15px;
display: flex;
align-items: center;
justify-content: center;
font-size: 1.5rem;
color: white;
}
.stat-card.primary .stat-icon {
background: var(--gradient);
}
.stat-card.success .stat-icon {
background: linear-gradient(135deg, #28a745, #20c997);
}
.stat-card.warning .stat-icon {
background: linear-gradient(135deg, #ffc107, #fd7e14);
}
.stat-card.info .stat-icon {
background: linear-gradient(135deg, #17a2b8, #6f42c1);
}
.stat-content {
flex: 1;
}
.stat-value {
font-family: 'Poppins', sans-serif;
font-weight: 700;
font-size: 2rem;
color: var(--dark);
margin: 0;
line-height: 1;
}
.stat-label {
color: #6c757d;
font-size: 0.9rem;
margin: 5px 0 0 0;
font-weight: 500;
}
.admin-table-card {
background: white;
border-radius: var(--border-radius);
box-shadow: var(--shadow);
transition: var(--transition);
border: 1px solid rgba(0, 0, 0, 0.05);
}
.admin-table-card:hover {
box-shadow: var(--shadow-lg);
}
.admin-table-card .card-header {
padding: 25px 30px 0;
border: none;
background: none;
display: flex;
align-items: center;
justify-content: space-between;
flex-wrap: wrap;
gap: 20px;
}
.admin-table-card .card-body {
padding: 0;
}
.header-content {
display: flex;
align-items: center;
flex: 1;
}
.header-icon {
font-size: 1.8rem;
color: var(--primary);
margin-right: 15px;
width: 50px;
height: 50px;
background: linear-gradient(135deg, var(--primary-light), var(--primary));
border-radius: 12px;
display: flex;
align-items: center;
justify-content: center;
color: white;
}
.card-title {
font-family: 'Poppins', sans-serif;
font-weight: 600;
font-size: 1.3rem;
color: var(--dark);
margin: 0;
}
.card-subtitle {
color: #6c757d;
font-size: 0.9rem;
margin: 5px 0 0 0;
}
.search-box {
position: relative;
min-width: 250px;
}
.search-box i {
position: absolute;
left: 15px;
top: 50%;
transform: translateY(-50%);
color: #6c757d;
}
.search-box input {
width: 100%;
padding: 12px 15px 12px 45px;
border: 2px solid #e9ecef;
border-radius: 8px;
font-size: 0.95rem;
transition: var(--transition);
}
.search-box input:focus {
border-color: var(--primary);
box-shadow: 0 0 0 0.2rem rgba(0, 102, 204, 0.1);
outline: none;
}
.table {
margin: 0;
border-collapse: separate;
border-spacing: 0;
}
.table thead th {
background: #f8f9fa;
border-bottom: 2px solid #e9ecef;
padding: 20px 15px;
font-weight: 600;
color: var(--dark);
font-size: 0.9rem;
text-transform: uppercase;
letter-spacing: 0.5px;
}
.table tbody td {
padding: 20px 15px;
vertical-align: middle;
border-bottom: 1px solid #f0f0f0;
}
.table tbody tr:last-child td {
border-bottom: none;
}
.table tbody tr:hover {
background: #f8f9fa;
}
.current-user {
background: linear-gradient(135deg, #f8f9ff, #e3f2fd) !important;
}
.current-user:hover {
background: linear-gradient(135deg, #f0f4ff, #dbeafe) !important;
}
/* Admin Avatar */
.admin-avatar {
width: 50px;
height: 50px;
}
.admin-avatar img {
width: 100%;
height: 100%;
border-radius: 50%;
object-fit: cover;
border: 2px solid var(--primary-light);
}
.avatar-placeholder {
width: 100%;
height: 100%;
border-radius: 50%;
background: var(--gradient);
display: flex;
align-items: center;
justify-content: center;
color: white;
font-size: 1.2rem;
border: 2px solid var(--primary-light);
}
/* Admin Info */
.admin-info h6 {
font-weight: 600;
color: var(--dark);
margin: 0 0 5px 0;
font-size: 1rem;
}
.admin-email {
color: #6c757d;
font-size: 0.85rem;
}
/* Contact Info */
.contact-info .phone {
color: var(--dark);
font-weight: 500;
}
/* Date */
.date {
color: #6c757d;
font-size: 0.9rem;
}
/* Badges */
.badge {
padding: 6px 12px;
border-radius: 20px;
font-size: 0.75rem;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.5px;
}
.badge-current {
background: linear-gradient(135deg, var(--primary), var(--secondary));
color: white;
}
.badge-active {
background: linear-gradient(135deg, #28a745, #20c997);
color: white;
}
.badge-inactive {
background: #6c757d;
color: white;
}
/* Action Buttons */
.action-buttons {
display: flex;
gap: 8px;
justify-content: center;
}
.action-buttons .btn {
width: 36px;
height: 36px;
padding: 0;
display: flex;
align-items: center;
justify-content: center;
border-radius: 8px;
border: 2px solid;
transition: var(--transition);
}
.btn-edit {
color: var(--primary);
border-color: var(--primary) !important;
background: transparent;
}
.btn-edit:hover {
background: var(--primary);
color: white;
transform: translateY(-2px);
}
.btn-password {
color: #ffc107;
border-color: #ffc107 !important;
background: transparent;
}
.btn-password:hover {
background: #ffc107;
color: white;
transform: translateY(-2px);
}
.btn-delete {
color: #dc3545;
border-color: #dc3545 !important;
background: transparent;
}
.btn-delete:hover {
background: #dc3545;
color: white;
transform: translateY(-2px);
}
/* Empty State */
.empty-state {
padding: 60px 20px;
text-align: center;
}
.empty-state h5 {
color: var(--dark);
margin-bottom: 10px;
font-weight: 600;
}
.empty-state p {
color: #6c757d;
max-width: 400px;
margin: 0 auto;
}
/* Modal Styles */
.modal-content {
border: none;
border-radius: var(--border-radius);
box-shadow: var(--shadow-xl);
}
.modal-header {
border-bottom: 1px solid #e9ecef;
padding: 25px 30px 20px;
}
.modal-title {
font-family: 'Poppins', sans-serif;
font-weight: 600;
color: var(--dark);
display: flex;
align-items: center;
}
.modal-body {
padding: 25px 30px;
}
.modal-footer {
border-top: 1px solid #e9ecef;
padding: 20px 30px 25px;
}
/* Profile Picture Upload */
.profile-picture-upload {
text-align: center;
}
.upload-wrapper {
position: relative;
display: inline-block;
cursor: pointer;
border-radius: 50%;
overflow: hidden;
}
.upload-preview {
width: 120px;
height: 120px;
border-radius: 50%;
object-fit: cover;
border: 3px solid var(--primary-light);
}
.upload-placeholder {
width: 120px;
height: 120px;
border-radius: 50%;
background: var(--gradient);
display: flex;
align-items: center;
justify-content: center;
color: white;
font-size: 2rem;
border: 3px solid var(--primary-light);
}
.upload-overlay {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.7);
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
color: white;
opacity: 0;
transition: var(--transition);
border-radius: 50%;
}
.upload-wrapper:hover .upload-overlay {
opacity: 1;
}
.upload-overlay i {
font-size: 1.5rem;
margin-bottom: 5px;
}
.upload-overlay span {
font-size: 0.8rem;
font-weight: 500;
}
.upload-input {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
opacity: 0;
cursor: pointer;
}
/* Form Styles */
.form-group {
margin-bottom: 1.5rem;
}
.form-label {
font-weight: 600;
color: var(--dark);
margin-bottom: 8px;
display: block;
}
.form-control {
border: 2px solid #e9ecef;
border-radius: 8px;
padding: 12px 15px;
transition: var(--transition);
font-size: 0.95rem;
}
.form-control:focus {
border-color: var(--primary);
box-shadow: 0 0 0 0.2rem rgba(0, 102, 204, 0.1);
}
.input-group .form-control {
border-right: none;
}
.input-group .btn {
border-left: none;
background: white;
border-color: #e9ecef;
}
.input-group .btn:hover {
background: #f8f9fa;
border-color: #e9ecef;
}
.toggle-password {
background: #e9ecef;
border-radius: 0 8px 8px 0;
color: var(--primary);
}
.toggle-password:hover {
background: #e9ecef;
border-radius: 0 8px 8px 0;
color: var(--primary);
}
.btn-primary {
background: var(--gradient);
border: none;
}
.btn-primary:hover {
transform: translateY(-2px);
box-shadow: 0 5px 15px rgba(0, 102, 204, 0.3);
}
.btn-secondary {
background: #6c757d;
border: none;
}
.btn-secondary:hover {
background: #5a6268;
transform: translateY(-2px);
}
/* Loading State */
.btn-loading {
position: relative;
color: transparent !important;
}
.btn-loading::after {
content: '';
position: absolute;
width: 20px;
height: 20px;
top: 50%;
left: 50%;
margin-left: -10px;
margin-top: -10px;
border: 2px solid #ffffff;
border-radius: 50%;
border-top-color: transparent;
animation: spin 1s ease-in-out infinite;
}
@keyframes spin {
to { transform: rotate(360deg); }
}
/* Alert Styles */
.alert {
border: none;
border-radius: 8px;
padding: 15px 20px;
}
.alert-info {
background: #e3f2fd;
color: #0d6efd;
}
/* Responsive Design */
@media (max-width: 991.98px) {
.page-header {
padding: 15px 0;
}
.page-title {
font-size: 1.7rem;
}
.stat-card {
padding: 20px;
}
.stat-value {
font-size: 1.7rem;
}
.admin-table-card .card-header {
padding: 20px 25px 0;
flex-direction: column;
align-items: flex-start;
gap: 15px;
}
.header-content {
width: 100%;
}
.search-box {
min-width: 100%;
}
}
@media (max-width: 767.98px) {
.table thead {
display: none;
}
.table tbody tr {
display: block;
margin-bottom: 20px;
border: 1px solid #e9ecef;
border-radius: var(--border-radius);
padding: 20px;
background: white;
box-shadow: var(--shadow);
}
.table tbody td {
display: flex;
justify-content: space-between;
align-items: center;
padding: 10px 0;
border-bottom: 1px solid #f0f0f0;
}
.table tbody td:last-child {
border-bottom: none;
}
.table tbody td::before {
content: attr(data-label);
font-weight: 600;
color: var(--dark);
text-transform: uppercase;
font-size: 0.8rem;
letter-spacing: 0.5px;
}
.action-buttons {
justify-content: flex-end;
}
.modal-body {
padding: 20px 25px;
}
.modal-header,
.modal-footer {
padding: 20px 25px;
}
}
@media (max-width: 575.98px) {
.manajemen-admin-container {
padding: 0 15px;
}
.page-title {
font-size: 1.5rem;
}
.stat-card {
flex-direction: column;
text-align: center;
gap: 15px;
}
.upload-preview,
.upload-placeholder {
width: 100px;
height: 100px;
}
.admin-avatar {
width: 40px;
height: 40px;
}
}

View File

@ -0,0 +1,709 @@
/* Manajemen Banner Container */
.manajemen-banner-container {
max-width: 1400px;
margin: 0 auto;
}
/* Page Header */
.page-header {
padding: 20px 0;
}
.page-title {
font-family: 'Poppins', sans-serif;
font-weight: 700;
font-size: 2rem;
color: var(--dark);
margin-bottom: 0.5rem;
}
.page-subtitle {
color: #6c757d;
font-size: 1.1rem;
margin: 0;
}
/* Statistics Cards */
.stat-card {
background: white;
border-radius: var(--border-radius);
padding: 25px;
box-shadow: var(--shadow);
display: flex;
align-items: center;
gap: 20px;
transition: var(--transition);
border-left: 4px solid transparent;
}
.stat-card:hover {
transform: translateY(-3px);
box-shadow: var(--shadow-lg);
}
.stat-card.primary {
border-left-color: var(--primary);
}
.stat-card.success {
border-left-color: #28a745;
}
.stat-card.warning {
border-left-color: #ffc107;
}
.stat-card.info {
border-left-color: #17a2b8;
}
.stat-icon {
width: 60px;
height: 60px;
border-radius: 15px;
display: flex;
align-items: center;
justify-content: center;
font-size: 1.5rem;
color: white;
}
.stat-card.primary .stat-icon {
background: var(--gradient);
}
.stat-card.success .stat-icon {
background: linear-gradient(135deg, #28a745, #20c997);
}
.stat-card.warning .stat-icon {
background: linear-gradient(135deg, #ffc107, #fd7e14);
}
.stat-card.info .stat-icon {
background: linear-gradient(135deg, #17a2b8, #6f42c1);
}
.stat-content {
flex: 1;
}
.stat-value {
font-family: 'Poppins', sans-serif;
font-weight: 700;
font-size: 2rem;
color: var(--dark);
margin: 0;
line-height: 1;
}
.stat-label {
color: #6c757d;
font-size: 0.9rem;
margin: 5px 0 0 0;
font-weight: 500;
}
.banners-grid-card {
background: white;
border-radius: var(--border-radius);
box-shadow: var(--shadow);
transition: var(--transition);
border: 1px solid rgba(0, 0, 0, 0.05);
}
.banners-grid-card:hover {
box-shadow: var(--shadow-lg);
}
.banners-grid-card .card-header {
padding: 25px 30px 0;
border: none;
background: none;
display: flex;
align-items: center;
justify-content: space-between;
flex-wrap: wrap;
gap: 20px;
}
.banners-grid-card .card-body {
padding: 25px 30px 30px;
}
.header-content {
display: flex;
align-items: center;
flex: 1;
}
.header-icon {
font-size: 1.8rem;
color: var(--primary);
margin-right: 15px;
width: 50px;
height: 50px;
background: linear-gradient(135deg, var(--primary-light), var(--primary));
border-radius: 12px;
display: flex;
align-items: center;
justify-content: center;
color: white;
}
.card-title {
font-family: 'Poppins', sans-serif;
font-weight: 600;
font-size: 1.3rem;
color: var(--dark);
margin: 0;
}
.card-subtitle {
color: #6c757d;
font-size: 0.9rem;
margin: 5px 0 0 0;
}
.view-toggle {
display: flex;
gap: 5px;
background: #f8f9fa;
padding: 5px;
border-radius: 8px;
}
.view-btn {
width: 40px;
height: 40px;
border: none;
background: transparent;
border-radius: 6px;
color: #6c757d;
transition: var(--transition);
display: flex;
align-items: center;
justify-content: center;
}
.view-btn:hover {
background: white;
color: var(--primary);
}
.view-btn.active {
background: var(--primary);
color: white;
}
.banners-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
gap: 25px;
}
.banner-card {
background: white;
border-radius: var(--border-radius);
box-shadow: var(--shadow);
transition: var(--transition);
overflow: hidden;
border: 1px solid rgba(0, 0, 0, 0.05);
}
.banner-card:hover {
transform: translateY(-5px);
box-shadow: var(--shadow-lg);
}
.banner-image {
position: relative;
height: 200px;
overflow: hidden;
}
.banner-image img {
width: 100%;
height: 100%;
object-fit: cover;
transition: var(--transition);
}
.banner-card:hover .banner-image img {
transform: scale(1.05);
}
.banner-overlay {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.7);
display: flex;
align-items: center;
justify-content: center;
opacity: 0;
transition: var(--transition);
}
.banner-card:hover .banner-overlay {
opacity: 1;
}
.banner-badges {
position: absolute;
top: 10px;
left: 10px;
display: flex;
gap: 5px;
flex-direction: column;
}
.badge {
padding: 4px 8px;
border-radius: 12px;
font-size: 0.7rem;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.5px;
}
.badge-urutan {
background: rgba(0, 0, 0, 0.8);
color: white;
}
.badge-active {
background: linear-gradient(135deg, #28a745, #20c997);
color: white;
}
.badge-inactive {
background: #6c757d;
color: white;
}
.banner-content {
padding: 20px;
}
.banner-title {
font-weight: 600;
color: var(--dark);
margin: 0 0 10px 0;
font-size: 1.1rem;
line-height: 1.4;
}
.banner-description {
color: #6c757d;
font-size: 0.9rem;
line-height: 1.5;
margin: 0 0 15px 0;
}
.banner-meta {
margin-bottom: 15px;
}
.banner-actions {
display: flex;
justify-content: space-between;
align-items: center;
}
.form-check.form-switch {
display: flex;
align-items: center;
gap: 10px;
margin: 0;
}
.form-check-input {
width: 3em;
height: 1.5em;
margin: 0;
}
.form-check-label {
font-size: 0.9rem;
color: var(--dark);
font-weight: 500;
}
.action-buttons {
display: flex;
gap: 8px;
}
.action-buttons .btn {
width: 36px;
height: 36px;
padding: 0;
display: flex;
align-items: center;
justify-content: center;
border-radius: 8px;
border: 2px solid;
transition: var(--transition);
}
.btn-edit {
color: var(--primary);
border-color: var(--primary) !important;
background: transparent;
}
.btn-edit:hover {
background: var(--primary);
color: white;
transform: translateY(-2px);
}
.btn-delete {
color: #dc3545;
border-color: #dc3545 !important;
background: transparent;
}
.btn-delete:hover {
background: #dc3545;
color: white;
transform: translateY(-2px);
}
.banners-list .banner-thumb {
width: 80px;
height: 60px;
border-radius: 8px;
overflow: hidden;
}
.banners-list .banner-thumb img {
width: 100%;
height: 100%;
object-fit: cover;
}
.banners-list .banner-info h6 {
margin: 0 0 5px 0;
font-weight: 600;
}
.banners-list .banner-info p {
margin: 0;
color: #6c757d;
font-size: 0.9rem;
}
.urutan-badge {
background: var(--primary);
color: white;
padding: 4px 8px;
border-radius: 12px;
font-size: 0.8rem;
font-weight: 600;
}
.empty-state {
padding: 60px 20px;
text-align: center;
}
.empty-state h4 {
color: var(--dark);
margin-bottom: 10px;
font-weight: 600;
}
.empty-state p {
color: #6c757d;
max-width: 400px;
margin: 0 auto;
}
.modal-content {
border: none;
border-radius: var(--border-radius);
box-shadow: var(--shadow-xl);
}
.modal-header {
border-bottom: 1px solid #e9ecef;
padding: 25px 30px 20px;
}
.modal-title {
font-family: 'Poppins', sans-serif;
font-weight: 600;
color: var(--dark);
display: flex;
align-items: center;
}
.modal-body {
padding: 25px 30px;
}
.modal-footer {
border-top: 1px solid #e9ecef;
padding: 20px 30px 25px;
}
.banner-upload-area {
position: relative;
}
.upload-wrapper {
border: 2px dashed #dee2e6;
border-radius: var(--border-radius);
padding: 40px 20px;
text-align: center;
cursor: pointer;
transition: var(--transition);
background: #f8f9fa;
}
.upload-wrapper:hover {
border-color: var(--primary);
background: #f0f4ff;
}
.upload-wrapper.dragover {
border-color: var(--primary);
background: #e3f2fd;
}
.upload-placeholder i {
font-size: 3rem;
color: #6c757d;
margin-bottom: 15px;
}
.upload-placeholder p {
font-weight: 600;
color: var(--dark);
margin: 0 0 10px 0;
}
.upload-placeholder small {
color: #6c757d;
line-height: 1.4;
}
.upload-input {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
opacity: 0;
cursor: pointer;
}
.image-preview {
position: relative;
border: 2px solid #e9ecef;
border-radius: var(--border-radius);
overflow: hidden;
margin-top: 15px;
}
.image-preview img {
width: 100%;
height: 200px;
object-fit: cover;
}
.btn-remove-preview {
position: absolute;
top: 10px;
right: 10px;
width: 30px;
height: 30px;
border: none;
background: rgba(220, 53, 69, 0.9);
color: white;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-size: 0.8rem;
transition: var(--transition);
}
.btn-remove-preview:hover {
background: #dc3545;
transform: scale(1.1);
}
.current-image-preview {
border: 2px solid #e9ecef;
border-radius: var(--border-radius);
overflow: hidden;
}
.current-image-preview img {
width: 100%;
height: 150px;
object-fit: cover;
}
.form-group {
margin-bottom: 1.5rem;
}
.form-label {
font-weight: 600;
color: var(--dark);
margin-bottom: 8px;
display: block;
}
.form-control {
border: 2px solid #e9ecef;
border-radius: 8px;
padding: 12px 15px;
transition: var(--transition);
font-size: 0.95rem;
}
.form-control:focus {
border-color: var(--primary);
box-shadow: 0 0 0 0.2rem rgba(0, 102, 204, 0.1);
}
textarea.form-control {
resize: vertical;
min-height: 80px;
}
.btn {
padding: 12px 25px;
border-radius: 8px;
font-weight: 500;
transition: var(--transition);
border: none;
}
.btn-primary {
background: var(--gradient);
border: none;
}
.btn-primary:hover {
transform: translateY(-2px);
box-shadow: 0 5px 15px rgba(0, 102, 204, 0.3);
}
.btn-secondary {
background: #6c757d;
border: none;
}
.btn-secondary:hover {
background: #5a6268;
transform: translateY(-2px);
}
.btn-loading {
position: relative;
color: transparent !important;
}
.btn-loading::after {
content: '';
position: absolute;
width: 20px;
height: 20px;
top: 50%;
left: 50%;
margin-left: -10px;
margin-top: -10px;
border: 2px solid #ffffff;
border-radius: 50%;
border-top-color: transparent;
animation: spin 1s ease-in-out infinite;
}
@keyframes spin {
to { transform: rotate(360deg); }
}
@media (max-width: 991.98px) {
.page-header {
padding: 15px 0;
}
.page-title {
font-size: 1.7rem;
}
.stat-card {
padding: 20px;
}
.stat-value {
font-size: 1.7rem;
}
.banners-grid {
grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
gap: 20px;
}
.banners-grid-card .card-header {
padding: 20px 25px 0;
flex-direction: column;
align-items: flex-start;
gap: 15px;
}
.header-content {
width: 100%;
}
}
@media (max-width: 767.98px) {
.banners-grid {
grid-template-columns: 1fr;
}
.modal-body {
padding: 20px 25px;
}
.modal-header,
.modal-footer {
padding: 20px 25px;
}
.banners-list .table-responsive {
font-size: 0.9rem;
}
}
@media (max-width: 575.98px) {
.manajemen-banner-container {
padding: 0 15px;
}
.page-title {
font-size: 1.5rem;
}
.stat-card {
flex-direction: column;
text-align: center;
gap: 15px;
}
.upload-placeholder {
padding: 30px 15px;
}
.upload-placeholder i {
font-size: 2.5rem;
}
}

View File

@ -0,0 +1,781 @@
.manajemen-fasilitas-container {
max-width: 1400px;
margin: 0 auto;
}
.page-header {
padding: 20px 0;
}
.page-title {
font-family: 'Poppins', sans-serif;
font-weight: 700;
font-size: 2rem;
color: var(--dark);
margin-bottom: 0.5rem;
}
.page-subtitle {
color: #6c757d;
font-size: 1.1rem;
margin: 0;
}
.stat-card {
background: white;
border-radius: var(--border-radius);
padding: 25px;
box-shadow: var(--shadow);
display: flex;
align-items: center;
gap: 20px;
transition: var(--transition);
border-left: 4px solid transparent;
}
.stat-card:hover {
transform: translateY(-3px);
box-shadow: var(--shadow-lg);
}
.stat-card.primary {
border-left-color: var(--primary);
}
.stat-card.success {
border-left-color: #28a745;
}
.stat-card.warning {
border-left-color: #ffc107;
}
.stat-card.info {
border-left-color: #17a2b8;
}
.stat-icon {
width: 60px;
height: 60px;
border-radius: 15px;
display: flex;
align-items: center;
justify-content: center;
font-size: 1.5rem;
color: white;
}
.stat-card.primary .stat-icon {
background: var(--gradient);
}
.stat-card.success .stat-icon {
background: linear-gradient(135deg, #28a745, #20c997);
}
.stat-card.warning .stat-icon {
background: linear-gradient(135deg, #ffc107, #fd7e14);
}
.stat-card.info .stat-icon {
background: linear-gradient(135deg, #17a2b8, #6f42c1);
}
.stat-content {
flex: 1;
}
.stat-value {
font-family: 'Poppins', sans-serif;
font-weight: 700;
font-size: 2rem;
color: var(--dark);
margin: 0;
line-height: 1;
}
.stat-label {
color: #6c757d;
font-size: 0.9rem;
margin: 5px 0 0 0;
font-weight: 500;
}
.fasilitas-grid-card {
background: white;
border-radius: var(--border-radius);
box-shadow: var(--shadow);
transition: var(--transition);
border: 1px solid rgba(0, 0, 0, 0.05);
}
.fasilitas-grid-card:hover {
box-shadow: var(--shadow-lg);
}
.fasilitas-grid-card .card-header {
padding: 25px 30px 0;
border: none;
background: none;
display: flex;
align-items: center;
justify-content: space-between;
flex-wrap: wrap;
gap: 20px;
}
.fasilitas-grid-card .card-body {
padding: 25px 30px 30px;
}
.header-content {
display: flex;
align-items: center;
flex: 1;
}
.header-icon {
font-size: 1.8rem;
color: var(--primary);
margin-right: 15px;
width: 50px;
height: 50px;
background: linear-gradient(135deg, var(--primary-light), var(--primary));
border-radius: 12px;
display: flex;
align-items: center;
justify-content: center;
color: white;
}
.card-title {
font-family: 'Poppins', sans-serif;
font-weight: 600;
font-size: 1.3rem;
color: var(--dark);
margin: 0;
}
.card-subtitle {
color: #6c757d;
font-size: 0.9rem;
margin: 5px 0 0 0;
}
.header-actions {
display: flex;
align-items: center;
gap: 15px;
}
.view-toggle {
display: flex;
gap: 5px;
background: #f8f9fa;
padding: 5px;
border-radius: 8px;
}
.view-btn {
width: 40px;
height: 40px;
border: none;
background: transparent;
border-radius: 6px;
color: #6c757d;
transition: var(--transition);
display: flex;
align-items: center;
justify-content: center;
}
.view-btn:hover {
background: white;
color: var(--primary);
}
.view-btn.active {
background: var(--primary);
color: white;
}
.search-box {
position: relative;
min-width: 250px;
}
.search-box i {
position: absolute;
left: 15px;
top: 50%;
transform: translateY(-50%);
color: #6c757d;
}
.search-box input {
width: 100%;
padding: 12px 15px 12px 45px;
border: 2px solid #e9ecef;
border-radius: 8px;
font-size: 0.95rem;
transition: var(--transition);
}
.search-box input:focus {
border-color: var(--primary);
box-shadow: 0 0 0 0.2rem rgba(0, 102, 204, 0.1);
outline: none;
}
.fasilitas-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
gap: 25px;
}
.fasilitas-card {
background: white;
border-radius: var(--border-radius);
box-shadow: var(--shadow);
transition: var(--transition);
overflow: hidden;
border: 1px solid rgba(0, 0, 0, 0.05);
}
.fasilitas-card:hover {
transform: translateY(-5px);
box-shadow: var(--shadow-lg);
}
.fasilitas-image {
position: relative;
height: 220px;
overflow: hidden;
}
.fasilitas-image img {
width: 100%;
height: 100%;
object-fit: cover;
transition: var(--transition);
}
.fasilitas-card:hover .fasilitas-image img {
transform: scale(1.05);
}
.fasilitas-overlay {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.7);
display: flex;
align-items: center;
justify-content: center;
opacity: 0;
transition: var(--transition);
}
.fasilitas-card:hover .fasilitas-overlay {
opacity: 1;
}
.fasilitas-badges {
position: absolute;
top: 10px;
left: 10px;
display: flex;
gap: 5px;
flex-direction: column;
}
.badge {
padding: 4px 8px;
border-radius: 12px;
font-size: 0.7rem;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.5px;
}
.badge-urutan {
background: rgba(0, 0, 0, 0.8);
color: white;
}
.badge-active {
background: linear-gradient(135deg, #28a745, #20c997);
color: white;
}
.badge-inactive {
background: #6c757d;
color: white;
}
.fasilitas-content {
padding: 20px;
}
.fasilitas-title {
font-weight: 600;
color: var(--dark);
margin: 0 0 10px 0;
font-size: 1.1rem;
line-height: 1.4;
}
.fasilitas-description {
color: #6c757d;
font-size: 0.9rem;
line-height: 1.5;
margin: 0 0 15px 0;
display: -webkit-box;
-webkit-line-clamp: 3;
line-clamp: 3;
-webkit-box-orient: vertical;
overflow: hidden;
}
.fasilitas-meta {
margin-bottom: 15px;
}
.fasilitas-actions {
display: flex;
justify-content: space-between;
align-items: center;
}
.form-check.form-switch {
display: flex;
align-items: center;
gap: 10px;
margin: 0;
}
.form-check-input {
width: 3em;
height: 1.5em;
margin: 0;
}
.form-check-label {
font-size: 0.9rem;
color: var(--dark);
font-weight: 500;
}
.action-buttons {
display: flex;
gap: 8px;
}
.action-buttons .btn {
width: 36px;
height: 36px;
padding: 0;
display: flex;
align-items: center;
justify-content: center;
border-radius: 8px;
border: 2px solid;
transition: var(--transition);
}
.btn-edit {
color: var(--primary);
border-color: var(--primary) !important;
background: transparent;
}
.btn-edit:hover {
background: var(--primary);
color: white;
transform: translateY(-2px);
}
.btn-delete {
color: #dc3545;
border-color: #dc3545 !important;
background: transparent;
}
.btn-delete:hover {
background: #dc3545;
color: white;
transform: translateY(-2px);
}
.fasilitas-list .fasilitas-thumb {
width: 80px;
height: 60px;
border-radius: 8px;
overflow: hidden;
}
.fasilitas-list .fasilitas-thumb img {
width: 100%;
height: 100%;
object-fit: cover;
}
.fasilitas-list .fasilitas-info h6 {
margin: 0 0 5px 0;
font-weight: 600;
}
.fasilitas-list .fasilitas-info p {
margin: 0;
color: #6c757d;
font-size: 0.9rem;
display: -webkit-box;
-webkit-line-clamp: 2;
line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
}
.urutan-badge {
background: var(--primary);
color: white;
padding: 4px 8px;
border-radius: 12px;
font-size: 0.8rem;
font-weight: 600;
}
.empty-state {
padding: 60px 20px;
text-align: center;
}
.empty-state h4 {
color: var(--dark);
margin-bottom: 10px;
font-weight: 600;
}
.empty-state p {
color: #6c757d;
max-width: 400px;
margin: 0 auto;
}
.modal-content {
border: none;
border-radius: var(--border-radius);
box-shadow: var(--shadow-xl);
}
.modal-header {
border-bottom: 1px solid #e9ecef;
padding: 25px 30px 20px;
}
.modal-title {
font-family: 'Poppins', sans-serif;
font-weight: 600;
color: var(--dark);
display: flex;
align-items: center;
}
.modal-body {
padding: 25px 30px;
}
.modal-footer {
border-top: 1px solid #e9ecef;
padding: 20px 30px 25px;
}
.fasilitas-upload-area {
position: relative;
}
.upload-wrapper {
border: 2px dashed #dee2e6;
border-radius: var(--border-radius);
padding: 40px 20px;
text-align: center;
cursor: pointer;
transition: var(--transition);
background: #f8f9fa;
}
.upload-wrapper:hover {
border-color: var(--primary);
background: #f0f4ff;
}
.upload-wrapper.dragover {
border-color: var(--primary);
background: #e3f2fd;
}
.upload-placeholder i {
font-size: 3rem;
color: #6c757d;
margin-bottom: 15px;
}
.upload-placeholder p {
font-weight: 600;
color: var(--dark);
margin: 0 0 10px 0;
}
.upload-placeholder small {
color: #6c757d;
line-height: 1.4;
}
.upload-input {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
opacity: 0;
cursor: pointer;
}
.image-preview {
position: relative;
border: 2px solid #e9ecef;
border-radius: var(--border-radius);
overflow: hidden;
margin-top: 15px;
}
.image-preview img {
width: 100%;
height: 200px;
object-fit: cover;
}
.btn-remove-preview {
position: absolute;
top: 10px;
right: 10px;
width: 30px;
height: 30px;
border: none;
background: rgba(220, 53, 69, 0.9);
color: white;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-size: 0.8rem;
transition: var(--transition);
}
.btn-remove-preview:hover {
background: #dc3545;
transform: scale(1.1);
}
.current-image-preview {
border: 2px solid #e9ecef;
border-radius: var(--border-radius);
overflow: hidden;
}
.current-image-preview img {
width: 100%;
height: 150px;
object-fit: cover;
}
.form-group {
margin-bottom: 1.5rem;
}
.form-label {
font-weight: 600;
color: var(--dark);
margin-bottom: 8px;
display: block;
}
.form-control {
border: 2px solid #e9ecef;
border-radius: 8px;
padding: 12px 15px;
transition: var(--transition);
font-size: 0.95rem;
}
.form-control:focus {
border-color: var(--primary);
box-shadow: 0 0 0 0.2rem rgba(0, 102, 204, 0.1);
}
textarea.form-control {
resize: vertical;
min-height: 100px;
}
.form-text {
font-size: 0.85rem;
}
.btn {
padding: 12px 25px;
border-radius: 8px;
font-weight: 500;
transition: var(--transition);
border: none;
}
.btn-primary {
background: var(--gradient);
border: none;
}
.btn-primary:hover {
transform: translateY(-2px);
box-shadow: 0 5px 15px rgba(0, 102, 204, 0.3);
}
.btn-secondary {
background: #6c757d;
border: none;
}
.btn-secondary:hover {
background: #5a6268;
transform: translateY(-2px);
}
.btn-loading {
position: relative;
color: transparent !important;
}
.btn-loading::after {
content: '';
position: absolute;
width: 20px;
height: 20px;
top: 50%;
left: 50%;
margin-left: -10px;
margin-top: -10px;
border: 2px solid #ffffff;
border-radius: 50%;
border-top-color: transparent;
animation: spin 1s ease-in-out infinite;
}
@keyframes spin {
to { transform: rotate(360deg); }
}
@media (max-width: 991.98px) {
.page-header {
padding: 15px 0;
}
.page-title {
font-size: 1.7rem;
}
.stat-card {
padding: 20px;
}
.stat-value {
font-size: 1.7rem;
}
.fasilitas-grid {
grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
gap: 20px;
}
.fasilitas-grid-card .card-header {
padding: 20px 25px 0;
flex-direction: column;
align-items: flex-start;
gap: 15px;
}
.header-content {
width: 100%;
}
.header-actions {
width: 100%;
justify-content: space-between;
}
.search-box {
min-width: 200px;
}
}
@media (max-width: 767.98px) {
.fasilitas-grid {
grid-template-columns: 1fr;
}
.modal-body {
padding: 20px 25px;
}
.modal-header,
.modal-footer {
padding: 20px 25px;
}
.fasilitas-list .table-responsive {
font-size: 0.9rem;
}
.header-actions {
flex-direction: column;
gap: 10px;
align-items: stretch;
}
.search-box {
min-width: 100%;
}
}
@media (max-width: 575.98px) {
.manajemen-fasilitas-container {
padding: 0 15px;
}
.page-title {
font-size: 1.5rem;
}
.stat-card {
flex-direction: column;
text-align: center;
gap: 15px;
}
.upload-placeholder {
padding: 30px 15px;
}
.upload-placeholder i {
font-size: 2.5rem;
}
.modal-body .row {
flex-direction: column;
}
.modal-body .col-md-6 {
width: 100%;
}
}

View File

@ -0,0 +1,849 @@
/* Manajemen Gallery Container */
.manajemen-gallery-container {
max-width: 1400px;
margin: 0 auto;
}
/* Page Header */
.page-header {
padding: 20px 0;
}
.page-title {
font-family: 'Poppins', sans-serif;
font-weight: 700;
font-size: 2rem;
color: var(--dark);
margin-bottom: 0.5rem;
}
.page-subtitle {
color: #6c757d;
font-size: 1.1rem;
margin: 0;
}
/* Statistics Cards */
.stat-card {
background: white;
border-radius: var(--border-radius);
padding: 25px;
box-shadow: var(--shadow);
display: flex;
align-items: center;
gap: 20px;
transition: var(--transition);
border-left: 4px solid transparent;
}
.stat-card:hover {
transform: translateY(-3px);
box-shadow: var(--shadow-lg);
}
.stat-card.primary {
border-left-color: var(--primary);
}
.stat-card.success {
border-left-color: #28a745;
}
.stat-card.warning {
border-left-color: #ffc107;
}
.stat-card.info {
border-left-color: #17a2b8;
}
.stat-icon {
width: 60px;
height: 60px;
border-radius: 15px;
display: flex;
align-items: center;
justify-content: center;
font-size: 1.5rem;
color: white;
}
.stat-card.primary .stat-icon {
background: var(--gradient);
}
.stat-card.success .stat-icon {
background: linear-gradient(135deg, #28a745, #20c997);
}
.stat-card.warning .stat-icon {
background: linear-gradient(135deg, #ffc107, #fd7e14);
}
.stat-card.info .stat-icon {
background: linear-gradient(135deg, #17a2b8, #6f42c1);
}
.stat-content {
flex: 1;
}
.stat-value {
font-family: 'Poppins', sans-serif;
font-weight: 700;
font-size: 2rem;
color: var(--dark);
margin: 0;
line-height: 1;
}
.stat-label {
color: #6c757d;
font-size: 0.9rem;
margin: 5px 0 0 0;
font-weight: 500;
}
/* Gallery Grid Card */
.gallery-grid-card {
background: white;
border-radius: var(--border-radius);
box-shadow: var(--shadow);
transition: var(--transition);
border: 1px solid rgba(0, 0, 0, 0.05);
}
.gallery-grid-card:hover {
box-shadow: var(--shadow-lg);
}
.gallery-grid-card .card-header {
padding: 25px 30px 0;
border: none;
background: none;
display: flex;
align-items: center;
justify-content: space-between;
flex-wrap: wrap;
gap: 20px;
}
.gallery-grid-card .card-body {
padding: 25px 30px 30px;
}
.header-content {
display: flex;
align-items: center;
flex: 1;
}
.header-icon {
font-size: 1.8rem;
color: var(--primary);
margin-right: 15px;
width: 50px;
height: 50px;
background: linear-gradient(135deg, var(--primary-light), var(--primary));
border-radius: 12px;
display: flex;
align-items: center;
justify-content: center;
color: white;
}
.card-title {
font-family: 'Poppins', sans-serif;
font-weight: 600;
font-size: 1.3rem;
color: var(--dark);
margin: 0;
}
.card-subtitle {
color: #6c757d;
font-size: 0.9rem;
margin: 5px 0 0 0;
}
/* Header Actions */
.header-actions {
display: flex;
align-items: center;
gap: 15px;
}
/* View Toggle */
.view-toggle {
display: flex;
gap: 5px;
background: #f8f9fa;
padding: 5px;
border-radius: 8px;
}
.view-btn {
width: 40px;
height: 40px;
border: none;
background: transparent;
border-radius: 6px;
color: #6c757d;
transition: var(--transition);
display: flex;
align-items: center;
justify-content: center;
}
.view-btn:hover {
background: white;
color: var(--primary);
}
.view-btn.active {
background: var(--primary);
color: white;
}
/* Search Box */
.search-box {
position: relative;
min-width: 250px;
}
.search-box i {
position: absolute;
left: 15px;
top: 50%;
transform: translateY(-50%);
color: #6c757d;
}
.search-box input {
width: 100%;
padding: 12px 15px 12px 45px;
border: 2px solid #e9ecef;
border-radius: 8px;
font-size: 0.95rem;
transition: var(--transition);
}
.search-box input:focus {
border-color: var(--primary);
box-shadow: 0 0 0 0.2rem rgba(0, 102, 204, 0.1);
outline: none;
}
/* Gallery Grid */
.gallery-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
gap: 25px;
}
.gallery-card {
background: white;
border-radius: var(--border-radius);
box-shadow: var(--shadow);
transition: var(--transition);
overflow: hidden;
border: 1px solid rgba(0, 0, 0, 0.05);
}
.gallery-card:hover {
transform: translateY(-5px);
box-shadow: var(--shadow-lg);
}
.gallery-image {
position: relative;
height: 220px;
overflow: hidden;
}
.gallery-image img {
width: 100%;
height: 100%;
object-fit: cover;
transition: var(--transition);
}
.gallery-card:hover .gallery-image img {
transform: scale(1.05);
}
.gallery-overlay {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.7);
display: flex;
align-items: center;
justify-content: center;
opacity: 0;
transition: var(--transition);
}
.gallery-card:hover .gallery-overlay {
opacity: 1;
}
.gallery-badges {
position: absolute;
top: 10px;
left: 10px;
display: flex;
gap: 5px;
flex-direction: column;
}
.badge {
padding: 4px 8px;
border-radius: 12px;
font-size: 0.7rem;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.5px;
}
.badge-urutan {
background: rgba(0, 0, 0, 0.8);
color: white;
}
.badge-active {
background: linear-gradient(135deg, #28a745, #20c997);
color: white;
}
.badge-inactive {
background: #6c757d;
color: white;
}
/* Gallery Content */
.gallery-content {
padding: 20px;
}
.gallery-title {
font-weight: 600;
color: var(--dark);
margin: 0 0 10px 0;
font-size: 1.1rem;
line-height: 1.4;
}
.gallery-description {
color: #6c757d;
font-size: 0.9rem;
line-height: 1.5;
margin: 0 0 15px 0;
display: -webkit-box;
-webkit-line-clamp: 3;
line-clamp: 3;
-webkit-box-orient: vertical;
overflow: hidden;
}
.gallery-meta {
margin-bottom: 15px;
}
.gallery-actions {
display: flex;
justify-content: space-between;
align-items: center;
}
/* Form Switch */
.form-check.form-switch {
display: flex;
align-items: center;
gap: 10px;
margin: 0;
}
.form-check-input {
width: 3em;
height: 1.5em;
margin: 0;
}
.form-check-label {
font-size: 0.9rem;
color: var(--dark);
font-weight: 500;
}
/* Action Buttons */
.action-buttons {
display: flex;
gap: 8px;
}
.action-buttons .btn {
width: 36px;
height: 36px;
padding: 0;
display: flex;
align-items: center;
justify-content: center;
border-radius: 8px;
border: 2px solid;
transition: var(--transition);
}
.btn-edit {
color: var(--primary);
border-color: var(--primary) !important;
background: transparent;
}
.btn-edit:hover {
background: var(--primary);
color: white;
transform: translateY(-2px);
}
.btn-view {
color: #17a2b8;
border-color: #17a2b8 !important;
background: transparent;
}
.btn-view:hover {
background: #17a2b8;
color: white;
transform: translateY(-2px);
}
.btn-delete {
color: #dc3545;
border-color: #dc3545 !important;
background: transparent;
}
.btn-delete:hover {
background: #dc3545;
color: white;
transform: translateY(-2px);
}
/* Gallery List View */
.gallery-list .gallery-thumb {
width: 80px;
height: 60px;
border-radius: 8px;
overflow: hidden;
}
.gallery-list .gallery-thumb img {
width: 100%;
height: 100%;
object-fit: cover;
}
.gallery-list .gallery-info h6 {
margin: 0 0 5px 0;
font-weight: 600;
}
.gallery-list .gallery-info p {
margin: 0;
color: #6c757d;
font-size: 0.9rem;
display: -webkit-box;
-webkit-line-clamp: 2;
line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
}
.urutan-badge {
background: var(--primary);
color: white;
padding: 4px 8px;
border-radius: 12px;
font-size: 0.8rem;
font-weight: 600;
}
/* Empty State */
.empty-state {
padding: 60px 20px;
text-align: center;
}
.empty-state h4 {
color: var(--dark);
margin-bottom: 10px;
font-weight: 600;
}
.empty-state p {
color: #6c757d;
max-width: 400px;
margin: 0 auto;
}
/* Modal Styles */
.modal-content {
border: none;
border-radius: var(--border-radius);
box-shadow: var(--shadow-xl);
}
.modal-header {
border-bottom: 1px solid #e9ecef;
padding: 25px 30px 20px;
}
.modal-title {
font-family: 'Poppins', sans-serif;
font-weight: 600;
color: var(--dark);
display: flex;
align-items: center;
}
.modal-body {
padding: 25px 30px;
}
.modal-footer {
border-top: 1px solid #e9ecef;
padding: 20px 30px 25px;
}
/* Gallery Upload Area */
.gallery-upload-area {
position: relative;
}
.upload-wrapper {
border: 2px dashed #dee2e6;
border-radius: var(--border-radius);
padding: 40px 20px;
text-align: center;
cursor: pointer;
transition: var(--transition);
background: #f8f9fa;
}
.upload-wrapper:hover {
border-color: var(--primary);
background: #f0f4ff;
}
.upload-wrapper.dragover {
border-color: var(--primary);
background: #e3f2fd;
}
.upload-placeholder i {
font-size: 3rem;
color: #6c757d;
margin-bottom: 15px;
}
.upload-placeholder p {
font-weight: 600;
color: var(--dark);
margin: 0 0 10px 0;
}
.upload-placeholder small {
color: #6c757d;
line-height: 1.4;
}
.upload-input {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
opacity: 0;
cursor: pointer;
}
/* Image Preview */
.image-preview {
position: relative;
border: 2px solid #e9ecef;
border-radius: var(--border-radius);
overflow: hidden;
margin-top: 15px;
}
.image-preview img {
width: 100%;
height: 200px;
object-fit: cover;
}
.btn-remove-preview {
position: absolute;
top: 10px;
right: 10px;
width: 30px;
height: 30px;
border: none;
background: rgba(220, 53, 69, 0.9);
color: white;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-size: 0.8rem;
transition: var(--transition);
}
.btn-remove-preview:hover {
background: #dc3545;
transform: scale(1.1);
}
/* Current Image Preview */
.current-image-preview {
border: 2px solid #e9ecef;
border-radius: var(--border-radius);
overflow: hidden;
}
.current-image-preview img {
width: 100%;
height: 150px;
object-fit: cover;
}
/* Gallery Detail View */
.gallery-detail-image img {
width: 100%;
height: 300px;
object-fit: cover;
}
.gallery-detail-info {
padding: 20px 0;
}
.detail-item {
margin-bottom: 15px;
}
.detail-label {
font-weight: 600;
color: var(--dark);
display: block;
margin-bottom: 5px;
}
.detail-content {
color: #6c757d;
margin: 0;
}
/* Form Styles */
.form-group {
margin-bottom: 1.5rem;
}
.form-label {
font-weight: 600;
color: var(--dark);
margin-bottom: 8px;
display: block;
}
.form-control {
border: 2px solid #e9ecef;
border-radius: 8px;
padding: 12px 15px;
transition: var(--transition);
font-size: 0.95rem;
}
.form-control:focus {
border-color: var(--primary);
box-shadow: 0 0 0 0.2rem rgba(0, 102, 204, 0.1);
}
textarea.form-control {
resize: vertical;
min-height: 100px;
}
.form-text {
font-size: 0.85rem;
}
/* Buttons */
.btn {
padding: 12px 25px;
border-radius: 8px;
font-weight: 500;
transition: var(--transition);
border: none;
}
.btn-primary {
background: var(--gradient);
border: none;
}
.btn-primary:hover {
transform: translateY(-2px);
box-shadow: 0 5px 15px rgba(0, 102, 204, 0.3);
}
.btn-secondary {
background: #6c757d;
border: none;
}
.btn-secondary:hover {
background: #5a6268;
transform: translateY(-2px);
}
/* Loading State */
.btn-loading {
position: relative;
color: transparent !important;
}
.btn-loading::after {
content: '';
position: absolute;
width: 20px;
height: 20px;
top: 50%;
left: 50%;
margin-left: -10px;
margin-top: -10px;
border: 2px solid #ffffff;
border-radius: 50%;
border-top-color: transparent;
animation: spin 1s ease-in-out infinite;
}
@keyframes spin {
to { transform: rotate(360deg); }
}
/* Responsive Design */
@media (max-width: 991.98px) {
.page-header {
padding: 15px 0;
}
.page-title {
font-size: 1.7rem;
}
.stat-card {
padding: 20px;
}
.stat-value {
font-size: 1.7rem;
}
.gallery-grid {
grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
gap: 20px;
}
.gallery-grid-card .card-header {
padding: 20px 25px 0;
flex-direction: column;
align-items: flex-start;
gap: 15px;
}
.header-content {
width: 100%;
}
.header-actions {
width: 100%;
justify-content: space-between;
}
.search-box {
min-width: 200px;
}
}
@media (max-width: 767.98px) {
.gallery-grid {
grid-template-columns: 1fr;
}
.modal-body {
padding: 20px 25px;
}
.modal-header,
.modal-footer {
padding: 20px 25px;
}
.gallery-list .table-responsive {
font-size: 0.9rem;
}
.header-actions {
flex-direction: column;
gap: 10px;
align-items: stretch;
}
.search-box {
min-width: 100%;
}
.gallery-detail-info {
padding: 15px 0 0 0;
}
}
@media (max-width: 575.98px) {
.manajemen-gallery-container {
padding: 0 15px;
}
.page-title {
font-size: 1.5rem;
}
.stat-card {
flex-direction: column;
text-align: center;
gap: 15px;
}
.upload-placeholder {
padding: 30px 15px;
}
.upload-placeholder i {
font-size: 2.5rem;
}
.modal-body .row {
flex-direction: column;
}
.modal-body .col-md-6 {
width: 100%;
}
.action-buttons {
justify-content: center;
}
}

View File

@ -0,0 +1,765 @@
/* Manajemen Jurusan Container */
.manajemen-jurusan-container {
max-width: 1400px;
margin: 0 auto;
}
/* Page Header */
.page-header {
padding: 20px 0;
}
.page-title {
font-family: 'Poppins', sans-serif;
font-weight: 700;
font-size: 2rem;
color: var(--dark);
margin-bottom: 0.5rem;
}
.page-subtitle {
color: #6c757d;
font-size: 1.1rem;
margin: 0;
}
/* Statistics Cards */
.stat-card {
background: white;
border-radius: var(--border-radius);
padding: 25px;
box-shadow: var(--shadow);
display: flex;
align-items: center;
gap: 20px;
transition: var(--transition);
border-left: 4px solid transparent;
}
.stat-card:hover {
transform: translateY(-3px);
box-shadow: var(--shadow-lg);
}
.stat-card.primary {
border-left-color: var(--primary);
}
.stat-card.success {
border-left-color: #28a745;
}
.stat-card.warning {
border-left-color: #ffc107;
}
.stat-card.info {
border-left-color: #17a2b8;
}
.stat-icon {
width: 60px;
height: 60px;
border-radius: 15px;
display: flex;
align-items: center;
justify-content: center;
font-size: 1.5rem;
color: white;
}
.stat-card.primary .stat-icon {
background: var(--gradient);
}
.stat-card.success .stat-icon {
background: linear-gradient(135deg, #28a745, #20c997);
}
.stat-card.warning .stat-icon {
background: linear-gradient(135deg, #ffc107, #fd7e14);
}
.stat-card.info .stat-icon {
background: linear-gradient(135deg, #17a2b8, #6f42c1);
}
.stat-content {
flex: 1;
}
.stat-value {
font-family: 'Poppins', sans-serif;
font-weight: 700;
font-size: 2rem;
color: var(--dark);
margin: 0;
line-height: 1;
}
.stat-label {
color: #6c757d;
font-size: 0.9rem;
margin: 5px 0 0 0;
font-weight: 500;
}
/* Jurusan Grid Card */
.jurusan-grid-card {
background: white;
border-radius: var(--border-radius);
box-shadow: var(--shadow);
transition: var(--transition);
border: 1px solid rgba(0, 0, 0, 0.05);
}
.jurusan-grid-card:hover {
box-shadow: var(--shadow-lg);
}
.jurusan-grid-card .card-header {
padding: 25px 30px 0;
border: none;
background: none;
display: flex;
align-items: center;
justify-content: space-between;
flex-wrap: wrap;
gap: 20px;
}
.jurusan-grid-card .card-body {
padding: 25px 30px 30px;
}
.header-content {
display: flex;
align-items: center;
flex: 1;
}
.header-icon {
font-size: 1.8rem;
color: var(--primary);
margin-right: 15px;
width: 50px;
height: 50px;
background: linear-gradient(135deg, var(--primary-light), var(--primary));
border-radius: 12px;
display: flex;
align-items: center;
justify-content: center;
color: white;
}
.card-title {
font-family: 'Poppins', sans-serif;
font-weight: 600;
font-size: 1.3rem;
color: var(--dark);
margin: 0;
}
.card-subtitle {
color: #6c757d;
font-size: 0.9rem;
margin: 5px 0 0 0;
}
/* Header Actions */
.header-actions {
display: flex;
align-items: center;
gap: 15px;
}
/* View Toggle */
.view-toggle {
display: flex;
gap: 5px;
background: #f8f9fa;
padding: 5px;
border-radius: 8px;
}
.view-btn {
width: 40px;
height: 40px;
border: none;
background: transparent;
border-radius: 6px;
color: #6c757d;
transition: var(--transition);
display: flex;
align-items: center;
justify-content: center;
}
.view-btn:hover {
background: white;
color: var(--primary);
}
.view-btn.active {
background: var(--primary);
color: white;
}
/* Search Box */
.search-box {
position: relative;
min-width: 250px;
}
.search-box i {
position: absolute;
left: 15px;
top: 50%;
transform: translateY(-50%);
color: #6c757d;
}
.search-box input {
width: 100%;
padding: 12px 15px 12px 45px;
border: 2px solid #e9ecef;
border-radius: 8px;
font-size: 0.95rem;
transition: var(--transition);
}
.search-box input:focus {
border-color: var(--primary);
box-shadow: 0 0 0 0.2rem rgba(0, 102, 204, 0.1);
outline: none;
}
/* Jurusan Grid */
.jurusan-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
gap: 25px;
}
.jurusan-card {
background: white;
border-radius: var(--border-radius);
box-shadow: var(--shadow);
transition: var(--transition);
border: 1px solid rgba(0, 0, 0, 0.05);
overflow: hidden;
}
.jurusan-card:hover {
transform: translateY(-5px);
box-shadow: var(--shadow-lg);
}
.jurusan-header {
background: linear-gradient(135deg, var(--primary), var(--secondary));
color: white;
padding: 20px;
position: relative;
display: flex;
justify-content: space-between;
align-items: flex-start;
}
.jurusan-kode {
font-size: 2rem;
font-weight: 700;
font-family: 'Poppins', sans-serif;
letter-spacing: 1px;
}
.jurusan-badges {
display: flex;
gap: 5px;
flex-direction: column;
align-items: flex-end;
}
.badge {
padding: 4px 8px;
border-radius: 12px;
font-size: 0.7rem;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.5px;
}
.badge-urutan {
background: rgba(255, 255, 255, 0.2);
color: white;
backdrop-filter: blur(10px);
}
.badge-active {
background: rgba(255, 255, 255, 0.9);
color: var(--primary);
}
.badge-inactive {
background: rgba(255, 255, 255, 0.9);
color: #43484d;
}
/* Jurusan Content */
.jurusan-content {
padding: 20px;
}
.jurusan-title {
font-weight: 600;
color: var(--dark);
margin: 0 0 15px 0;
font-size: 1.2rem;
line-height: 1.4;
}
.jurusan-description {
color: #6c757d;
font-size: 0.9rem;
line-height: 1.5;
margin: 0 0 15px 0;
display: -webkit-box;
line-clamp: 3;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
overflow: hidden;
}
.jurusan-meta {
margin-bottom: 15px;
}
.jurusan-actions {
display: flex;
justify-content: space-between;
align-items: center;
padding: 15px 20px;
background: #f8f9fa;
border-top: 1px solid #e9ecef;
}
/* Form Switch */
.form-check.form-switch {
display: flex;
align-items: center;
gap: 10px;
margin: 0;
}
.form-check-input {
width: 3em;
height: 1.5em;
margin: 0;
}
.form-check-label {
font-size: 0.9rem;
color: var(--dark);
font-weight: 500;
}
/* Action Buttons */
.action-buttons {
display: flex;
gap: 8px;
}
.action-buttons .btn {
width: 36px;
height: 36px;
padding: 0;
display: flex;
align-items: center;
justify-content: center;
border-radius: 8px;
border: 2px solid;
transition: var(--transition);
}
.btn-edit {
color: var(--primary);
border-color: var(--primary) !important;
background: transparent;
}
.btn-edit:hover {
background: var(--primary);
color: white;
transform: translateY(-2px);
}
.btn-view {
color: #17a2b8;
border-color: #17a2b8 !important;
background: transparent;
}
.btn-view:hover {
background: #17a2b8;
color: white;
transform: translateY(-2px);
}
.btn-delete {
color: #dc3545;
border-color: #dc3545 !important;
background: transparent;
}
.btn-delete:hover {
background: #dc3545;
color: white;
transform: translateY(-2px);
}
/* Jurusan List View */
.jurusan-list .kode-badge {
background: var(--primary);
color: white;
padding: 6px 12px;
border-radius: 20px;
font-weight: 600;
font-size: 0.9rem;
letter-spacing: 0.5px;
}
.jurusan-list .jurusan-info h6 {
margin: 0 0 5px 0;
font-weight: 600;
}
.jurusan-list .jurusan-description {
margin: 0;
color: #6c757d;
font-size: 0.9rem;
display: -webkit-box;
line-clamp: 2;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
}
.urutan-badge {
background: var(--primary);
color: white;
padding: 4px 8px;
border-radius: 12px;
font-size: 0.8rem;
font-weight: 600;
}
/* Empty State */
.empty-state {
padding: 60px 20px;
text-align: center;
}
.empty-state h4 {
color: var(--dark);
margin-bottom: 10px;
font-weight: 600;
}
.empty-state p {
color: #6c757d;
max-width: 400px;
margin: 0 auto;
}
/* Modal Styles */
.modal-content {
border: none;
border-radius: var(--border-radius);
box-shadow: var(--shadow-xl);
}
.modal-header {
border-bottom: 1px solid #e9ecef;
padding: 25px 30px 20px;
}
.modal-title {
font-family: 'Poppins', sans-serif;
font-weight: 600;
color: var(--dark);
display: flex;
align-items: center;
}
.modal-body {
padding: 25px 30px;
}
.modal-footer {
border-top: 1px solid #e9ecef;
padding: 20px 30px 25px;
}
/* Jurusan Detail View */
.jurusan-detail {
padding: 10px 0;
}
.detail-header {
padding-bottom: 20px;
border-bottom: 1px solid #e9ecef;
}
.kode-display {
display: flex;
align-items: center;
gap: 10px;
}
.kode-badge-large {
background: var(--primary);
color: white;
padding: 8px 16px;
border-radius: 20px;
font-weight: 700;
font-size: 1.2rem;
letter-spacing: 1px;
}
.urutan-display {
background: #6c757d;
color: white;
padding: 6px 12px;
border-radius: 15px;
font-weight: 600;
font-size: 0.9rem;
}
.detail-section {
margin-bottom: 25px;
}
.detail-label {
font-weight: 600;
color: var(--dark);
display: block;
margin-bottom: 8px;
font-size: 1.1rem;
}
.detail-content {
color: #6c757d;
line-height: 1.6;
margin: 0;
}
.detail-item {
margin-bottom: 15px;
}
/* Form Styles */
.form-group {
margin-bottom: 1.5rem;
}
.form-label {
font-weight: 600;
color: var(--dark);
margin-bottom: 8px;
display: block;
}
.form-control {
border: 2px solid #e9ecef;
border-radius: 8px;
padding: 12px 15px;
transition: var(--transition);
font-size: 0.95rem;
}
.form-control:focus {
border-color: var(--primary);
box-shadow: 0 0 0 0.2rem rgba(0, 102, 204, 0.1);
}
textarea.form-control {
resize: vertical;
min-height: 100px;
}
.form-text {
font-size: 0.85rem;
color: #6c757d;
margin-top: 5px;
}
/* Buttons */
.btn {
padding: 12px 25px;
border-radius: 8px;
font-weight: 500;
transition: var(--transition);
border: none;
}
.btn-primary {
background: var(--gradient);
border: none;
}
.btn-primary:hover {
transform: translateY(-2px);
box-shadow: 0 5px 15px rgba(0, 102, 204, 0.3);
}
.btn-secondary {
background: #6c757d;
border: none;
}
.btn-secondary:hover {
background: #5a6268;
transform: translateY(-2px);
}
/* Loading State */
.btn-loading {
position: relative;
color: transparent !important;
}
.btn-loading::after {
content: '';
position: absolute;
width: 20px;
height: 20px;
top: 50%;
left: 50%;
margin-left: -10px;
margin-top: -10px;
border: 2px solid #ffffff;
border-radius: 50%;
border-top-color: transparent;
animation: spin 1s ease-in-out infinite;
}
@keyframes spin {
to { transform: rotate(360deg); }
}
/* Responsive Design */
@media (max-width: 991.98px) {
.page-header {
padding: 15px 0;
}
.page-title {
font-size: 1.7rem;
}
.stat-card {
padding: 20px;
}
.stat-value {
font-size: 1.7rem;
}
.jurusan-grid {
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
gap: 20px;
}
.jurusan-grid-card .card-header {
padding: 20px 25px 0;
flex-direction: column;
align-items: flex-start;
gap: 15px;
}
.header-content {
width: 100%;
}
.header-actions {
width: 100%;
justify-content: space-between;
}
.search-box {
min-width: 200px;
}
}
@media (max-width: 767.98px) {
.jurusan-grid {
grid-template-columns: 1fr;
}
.modal-body {
padding: 20px 25px;
}
.modal-header,
.modal-footer {
padding: 20px 25px;
}
.jurusan-list .table-responsive {
font-size: 0.9rem;
}
.header-actions {
flex-direction: column;
gap: 10px;
align-items: stretch;
}
.search-box {
min-width: 100%;
}
.jurusan-actions {
flex-direction: column;
gap: 15px;
align-items: stretch;
}
.action-buttons {
justify-content: center;
}
}
@media (max-width: 575.98px) {
.manajemen-jurusan-container {
padding: 0 15px;
}
.page-title {
font-size: 1.5rem;
}
.stat-card {
flex-direction: column;
text-align: center;
gap: 15px;
}
.jurusan-header {
flex-direction: column;
gap: 10px;
align-items: flex-start;
}
.jurusan-badges {
flex-direction: row;
width: 100%;
justify-content: space-between;
}
.modal-body .row {
flex-direction: column;
}
.modal-body .col-md-6 {
width: 100%;
}
}

View File

@ -0,0 +1,849 @@
/* Manajemen Pengumuman Container */
.manajemen-pengumuman-container {
max-width: 1400px;
margin: 0 auto;
}
/* Page Header */
.page-header {
padding: 20px 0;
}
.page-title {
font-family: 'Poppins', sans-serif;
font-weight: 700;
font-size: 2rem;
color: var(--dark);
margin-bottom: 0.5rem;
}
.page-subtitle {
color: #6c757d;
font-size: 1.1rem;
margin: 0;
}
/* Statistics Cards */
.stat-card {
background: white;
border-radius: var(--border-radius);
padding: 25px;
box-shadow: var(--shadow);
display: flex;
align-items: center;
gap: 20px;
transition: var(--transition);
border-left: 4px solid transparent;
}
.stat-card:hover {
transform: translateY(-3px);
box-shadow: var(--shadow-lg);
}
.stat-card.primary {
border-left-color: var(--primary);
}
.stat-card.success {
border-left-color: #28a745;
}
.stat-card.warning {
border-left-color: #ffc107;
}
.stat-card.info {
border-left-color: #17a2b8;
}
.stat-icon {
width: 60px;
height: 60px;
border-radius: 15px;
display: flex;
align-items: center;
justify-content: center;
font-size: 1.5rem;
color: white;
}
.stat-card.primary .stat-icon {
background: var(--gradient);
}
.stat-card.success .stat-icon {
background: linear-gradient(135deg, #28a745, #20c997);
}
.stat-card.warning .stat-icon {
background: linear-gradient(135deg, #ffc107, #fd7e14);
}
.stat-card.info .stat-icon {
background: linear-gradient(135deg, #17a2b8, #6f42c1);
}
.stat-content {
flex: 1;
}
.stat-value {
font-family: 'Poppins', sans-serif;
font-weight: 700;
font-size: 2rem;
color: var(--dark);
margin: 0;
line-height: 1;
}
.stat-label {
color: #6c757d;
font-size: 0.9rem;
margin: 5px 0 0 0;
font-weight: 500;
}
/* Pengumuman Grid Card */
.pengumuman-grid-card {
background: white;
border-radius: var(--border-radius);
box-shadow: var(--shadow);
transition: var(--transition);
border: 1px solid rgba(0, 0, 0, 0.05);
}
.pengumuman-grid-card:hover {
box-shadow: var(--shadow-lg);
}
.pengumuman-grid-card .card-header {
padding: 25px 30px 0;
border: none;
background: none;
display: flex;
align-items: center;
justify-content: space-between;
flex-wrap: wrap;
gap: 20px;
}
.pengumuman-grid-card .card-body {
padding: 25px 30px 30px;
}
.header-content {
display: flex;
align-items: center;
flex: 1;
}
.header-icon {
font-size: 1.8rem;
color: var(--primary);
margin-right: 15px;
width: 50px;
height: 50px;
background: linear-gradient(135deg, var(--primary-light), var(--primary));
border-radius: 12px;
display: flex;
align-items: center;
justify-content: center;
color: white;
}
.card-title {
font-family: 'Poppins', sans-serif;
font-weight: 600;
font-size: 1.3rem;
color: var(--dark);
margin: 0;
}
.card-subtitle {
color: #6c757d;
font-size: 0.9rem;
margin: 5px 0 0 0;
}
/* Header Actions */
.header-actions {
display: flex;
align-items: center;
gap: 15px;
}
/* View Toggle */
.view-toggle {
display: flex;
gap: 5px;
background: #f8f9fa;
padding: 5px;
border-radius: 8px;
}
.view-btn {
width: 40px;
height: 40px;
border: none;
background: transparent;
border-radius: 6px;
color: #6c757d;
transition: var(--transition);
display: flex;
align-items: center;
justify-content: center;
}
.view-btn:hover {
background: white;
color: var(--primary);
}
.view-btn.active {
background: var(--primary);
color: white;
}
/* Search Box */
.search-box {
position: relative;
min-width: 250px;
}
.search-box i {
position: absolute;
left: 15px;
top: 50%;
transform: translateY(-50%);
color: #6c757d;
}
.search-box input {
width: 100%;
padding: 12px 15px 12px 45px;
border: 2px solid #e9ecef;
border-radius: 8px;
font-size: 0.95rem;
transition: var(--transition);
}
.search-box input:focus {
border-color: var(--primary);
box-shadow: 0 0 0 0.2rem rgba(0, 102, 204, 0.1);
outline: none;
}
/* Pengumuman Grid */
.pengumuman-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
gap: 25px;
}
.pengumuman-card {
background: white;
border-radius: var(--border-radius);
box-shadow: var(--shadow);
transition: var(--transition);
overflow: hidden;
border: 1px solid rgba(0, 0, 0, 0.05);
}
.pengumuman-card:hover {
transform: translateY(-5px);
box-shadow: var(--shadow-lg);
}
.pengumuman-image {
position: relative;
height: 220px;
overflow: hidden;
}
.pengumuman-image img {
width: 100%;
height: 100%;
object-fit: cover;
transition: var(--transition);
}
.pengumuman-card:hover .pengumuman-image img {
transform: scale(1.05);
}
.pengumuman-overlay {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.7);
display: flex;
align-items: center;
justify-content: center;
opacity: 0;
transition: var(--transition);
}
.pengumuman-card:hover .pengumuman-overlay {
opacity: 1;
}
.pengumuman-badges {
position: absolute;
top: 10px;
left: 10px;
display: flex;
gap: 5px;
flex-direction: column;
}
.badge {
padding: 4px 8px;
border-radius: 12px;
font-size: 0.7rem;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.5px;
}
.badge-urutan {
background: rgba(0, 0, 0, 0.8);
color: white;
}
.badge-active {
background: linear-gradient(135deg, #28a745, #20c997);
color: white;
}
.badge-inactive {
background: #6c757d;
color: white;
}
/* Pengumuman Content */
.pengumuman-content {
padding: 20px;
}
.pengumuman-title {
font-weight: 600;
color: var(--dark);
margin: 0 0 10px 0;
font-size: 1.1rem;
line-height: 1.4;
}
.pengumuman-description {
color: #6c757d;
font-size: 0.9rem;
line-height: 1.5;
margin: 0 0 15px 0;
display: -webkit-box;
-webkit-line-clamp: 3;
line-clamp: 3;
-webkit-box-orient: vertical;
overflow: hidden;
}
.pengumuman-meta {
margin-bottom: 15px;
}
.pengumuman-actions {
display: flex;
justify-content: space-between;
align-items: center;
}
/* Form Switch */
.form-check.form-switch {
display: flex;
align-items: center;
gap: 10px;
margin: 0;
}
.form-check-input {
width: 3em;
height: 1.5em;
margin: 0;
}
.form-check-label {
font-size: 0.9rem;
color: var(--dark);
font-weight: 500;
}
/* Action Buttons */
.action-buttons {
display: flex;
gap: 8px;
}
.action-buttons .btn {
width: 36px;
height: 36px;
padding: 0;
display: flex;
align-items: center;
justify-content: center;
border-radius: 8px;
border: 2px solid;
transition: var(--transition);
}
.btn-edit {
color: var(--primary);
border-color: var(--primary) !important;
background: transparent;
}
.btn-edit:hover {
background: var(--primary);
color: white;
transform: translateY(-2px);
}
.btn-view {
color: #17a2b8;
border-color: #17a2b8 !important;
background: transparent;
}
.btn-view:hover {
background: #17a2b8;
color: white;
transform: translateY(-2px);
}
.btn-delete {
color: #dc3545;
border-color: #dc3545 !important;
background: transparent;
}
.btn-delete:hover {
background: #dc3545;
color: white;
transform: translateY(-2px);
}
/* Pengumuman List View */
.pengumuman-list .pengumuman-thumb {
width: 80px;
height: 60px;
border-radius: 8px;
overflow: hidden;
}
.pengumuman-list .pengumuman-thumb img {
width: 100%;
height: 100%;
object-fit: cover;
}
.pengumuman-list .pengumuman-info h6 {
margin: 0 0 5px 0;
font-weight: 600;
}
.pengumuman-list .pengumuman-info p {
margin: 0;
color: #6c757d;
font-size: 0.9rem;
display: -webkit-box;
-webkit-line-clamp: 2;
line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
}
.urutan-badge {
background: var(--primary);
color: white;
padding: 4px 8px;
border-radius: 12px;
font-size: 0.8rem;
font-weight: 600;
}
/* Empty State */
.empty-state {
padding: 60px 20px;
text-align: center;
}
.empty-state h4 {
color: var(--dark);
margin-bottom: 10px;
font-weight: 600;
}
.empty-state p {
color: #6c757d;
max-width: 400px;
margin: 0 auto;
}
/* Modal Styles */
.modal-content {
border: none;
border-radius: var(--border-radius);
box-shadow: var(--shadow-xl);
}
.modal-header {
border-bottom: 1px solid #e9ecef;
padding: 25px 30px 20px;
}
.modal-title {
font-family: 'Poppins', sans-serif;
font-weight: 600;
color: var(--dark);
display: flex;
align-items: center;
}
.modal-body {
padding: 25px 30px;
}
.modal-footer {
border-top: 1px solid #e9ecef;
padding: 20px 30px 25px;
}
/* Pengumuman Upload Area */
.pengumuman-upload-area {
position: relative;
}
.upload-wrapper {
border: 2px dashed #dee2e6;
border-radius: var(--border-radius);
padding: 40px 20px;
text-align: center;
cursor: pointer;
transition: var(--transition);
background: #f8f9fa;
}
.upload-wrapper:hover {
border-color: var(--primary);
background: #f0f4ff;
}
.upload-wrapper.dragover {
border-color: var(--primary);
background: #e3f2fd;
}
.upload-placeholder i {
font-size: 3rem;
color: #6c757d;
margin-bottom: 15px;
}
.upload-placeholder p {
font-weight: 600;
color: var(--dark);
margin: 0 0 10px 0;
}
.upload-placeholder small {
color: #6c757d;
line-height: 1.4;
}
.upload-input {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
opacity: 0;
cursor: pointer;
}
/* Image Preview */
.image-preview {
position: relative;
border: 2px solid #e9ecef;
border-radius: var(--border-radius);
overflow: hidden;
margin-top: 15px;
}
.image-preview img {
width: 100%;
height: 200px;
object-fit: cover;
}
.btn-remove-preview {
position: absolute;
top: 10px;
right: 10px;
width: 30px;
height: 30px;
border: none;
background: rgba(220, 53, 69, 0.9);
color: white;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-size: 0.8rem;
transition: var(--transition);
}
.btn-remove-preview:hover {
background: #dc3545;
transform: scale(1.1);
}
/* Current Image Preview */
.current-image-preview {
border: 2px solid #e9ecef;
border-radius: var(--border-radius);
overflow: hidden;
}
.current-image-preview img {
width: 100%;
height: 150px;
object-fit: cover;
}
/* Pengumuman Detail View */
.pengumuman-detail-image img {
width: 100%;
height: 300px;
object-fit: cover;
}
.pengumuman-detail-info {
padding: 20px 0;
}
.detail-item {
margin-bottom: 15px;
}
.detail-label {
font-weight: 600;
color: var(--dark);
display: block;
margin-bottom: 5px;
}
.detail-content {
color: #6c757d;
margin: 0;
}
/* Form Styles */
.form-group {
margin-bottom: 1.5rem;
}
.form-label {
font-weight: 600;
color: var(--dark);
margin-bottom: 8px;
display: block;
}
.form-control {
border: 2px solid #e9ecef;
border-radius: 8px;
padding: 12px 15px;
transition: var(--transition);
font-size: 0.95rem;
}
.form-control:focus {
border-color: var(--primary);
box-shadow: 0 0 0 0.2rem rgba(0, 102, 204, 0.1);
}
textarea.form-control {
resize: vertical;
min-height: 100px;
}
.form-text {
font-size: 0.85rem;
}
/* Buttons */
.btn {
padding: 12px 25px;
border-radius: 8px;
font-weight: 500;
transition: var(--transition);
border: none;
}
.btn-primary {
background: var(--gradient);
border: none;
}
.btn-primary:hover {
transform: translateY(-2px);
box-shadow: 0 5px 15px rgba(0, 102, 204, 0.3);
}
.btn-secondary {
background: #6c757d;
border: none;
}
.btn-secondary:hover {
background: #5a6268;
transform: translateY(-2px);
}
/* Loading State */
.btn-loading {
position: relative;
color: transparent !important;
}
.btn-loading::after {
content: '';
position: absolute;
width: 20px;
height: 20px;
top: 50%;
left: 50%;
margin-left: -10px;
margin-top: -10px;
border: 2px solid #ffffff;
border-radius: 50%;
border-top-color: transparent;
animation: spin 1s ease-in-out infinite;
}
@keyframes spin {
to { transform: rotate(360deg); }
}
/* Responsive Design */
@media (max-width: 991.98px) {
.page-header {
padding: 15px 0;
}
.page-title {
font-size: 1.7rem;
}
.stat-card {
padding: 20px;
}
.stat-value {
font-size: 1.7rem;
}
.pengumuman-grid {
grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
gap: 20px;
}
.pengumuman-grid-card .card-header {
padding: 20px 25px 0;
flex-direction: column;
align-items: flex-start;
gap: 15px;
}
.header-content {
width: 100%;
}
.header-actions {
width: 100%;
justify-content: space-between;
}
.search-box {
min-width: 200px;
}
}
@media (max-width: 767.98px) {
.pengumuman-grid {
grid-template-columns: 1fr;
}
.modal-body {
padding: 20px 25px;
}
.modal-header,
.modal-footer {
padding: 20px 25px;
}
.pengumuman-list .table-responsive {
font-size: 0.9rem;
}
.header-actions {
flex-direction: column;
gap: 10px;
align-items: stretch;
}
.search-box {
min-width: 100%;
}
.pengumuman-detail-info {
padding: 15px 0 0 0;
}
}
@media (max-width: 575.98px) {
.manajemen-pengumuman-container {
padding: 0 15px;
}
.page-title {
font-size: 1.5rem;
}
.stat-card {
flex-direction: column;
text-align: center;
gap: 15px;
}
.upload-placeholder {
padding: 30px 15px;
}
.upload-placeholder i {
font-size: 2.5rem;
}
.modal-body .row {
flex-direction: column;
}
.modal-body .col-md-6 {
width: 100%;
}
.action-buttons {
justify-content: center;
}
}

View File

@ -0,0 +1,887 @@
/* Manajemen Prestasi Container */
.manajemen-prestasi-container {
max-width: 1400px;
margin: 0 auto;
}
/* Page Header */
.page-header {
padding: 20px 0;
}
.page-title {
font-family: 'Poppins', sans-serif;
font-weight: 700;
font-size: 2rem;
color: var(--dark);
margin-bottom: 0.5rem;
}
.page-subtitle {
color: #6c757d;
font-size: 1.1rem;
margin: 0;
}
/* Statistics Cards */
.stat-card {
background: white;
border-radius: var(--border-radius);
padding: 25px;
box-shadow: var(--shadow);
display: flex;
align-items: center;
gap: 20px;
transition: var(--transition);
border-left: 4px solid transparent;
}
.stat-card:hover {
transform: translateY(-3px);
box-shadow: var(--shadow-lg);
}
.stat-card.primary {
border-left-color: var(--primary);
}
.stat-card.success {
border-left-color: #28a745;
}
.stat-card.warning {
border-left-color: #ffc107;
}
.stat-card.info {
border-left-color: #17a2b8;
}
.stat-icon {
width: 60px;
height: 60px;
border-radius: 15px;
display: flex;
align-items: center;
justify-content: center;
font-size: 1.5rem;
color: white;
}
.stat-card.primary .stat-icon {
background: var(--gradient);
}
.stat-card.success .stat-icon {
background: linear-gradient(135deg, #28a745, #20c997);
}
.stat-card.warning .stat-icon {
background: linear-gradient(135deg, #ffc107, #fd7e14);
}
.stat-card.info .stat-icon {
background: linear-gradient(135deg, #17a2b8, #6f42c1);
}
.stat-content {
flex: 1;
}
.stat-value {
font-family: 'Poppins', sans-serif;
font-weight: 700;
font-size: 2rem;
color: var(--dark);
margin: 0;
line-height: 1;
}
.stat-label {
color: #6c757d;
font-size: 0.9rem;
margin: 5px 0 0 0;
font-weight: 500;
}
/* Prestasi Grid Card */
.prestasi-grid-card {
background: white;
border-radius: var(--border-radius);
box-shadow: var(--shadow);
transition: var(--transition);
border: 1px solid rgba(0, 0, 0, 0.05);
}
.prestasi-grid-card:hover {
box-shadow: var(--shadow-lg);
}
.prestasi-grid-card .card-header {
padding: 25px 30px 0;
border: none;
background: none;
display: flex;
align-items: center;
justify-content: space-between;
flex-wrap: wrap;
gap: 20px;
}
.prestasi-grid-card .card-body {
padding: 25px 30px 30px;
}
.header-content {
display: flex;
align-items: center;
flex: 1;
}
.header-icon {
font-size: 1.8rem;
color: var(--primary);
margin-right: 15px;
width: 50px;
height: 50px;
background: linear-gradient(135deg, var(--primary-light), var(--primary));
border-radius: 12px;
display: flex;
align-items: center;
justify-content: center;
color: white;
}
.card-title {
font-family: 'Poppins', sans-serif;
font-weight: 600;
font-size: 1.3rem;
color: var(--dark);
margin: 0;
}
.card-subtitle {
color: #6c757d;
font-size: 0.9rem;
margin: 5px 0 0 0;
}
/* Header Actions */
.header-actions {
display: flex;
align-items: center;
gap: 15px;
}
/* View Toggle */
.view-toggle {
display: flex;
gap: 5px;
background: #f8f9fa;
padding: 5px;
border-radius: 8px;
}
.view-btn {
width: 40px;
height: 40px;
border: none;
background: transparent;
border-radius: 6px;
color: #6c757d;
transition: var(--transition);
display: flex;
align-items: center;
justify-content: center;
}
.view-btn:hover {
background: white;
color: var(--primary);
}
.view-btn.active {
background: var(--primary);
color: white;
}
/* Search Box */
.search-box {
position: relative;
min-width: 250px;
}
.search-box i {
position: absolute;
left: 15px;
top: 50%;
transform: translateY(-50%);
color: #6c757d;
}
.search-box input {
width: 100%;
padding: 12px 15px 12px 45px;
border: 2px solid #e9ecef;
border-radius: 8px;
font-size: 0.95rem;
transition: var(--transition);
}
.search-box input:focus {
border-color: var(--primary);
box-shadow: 0 0 0 0.2rem rgba(0, 102, 204, 0.1);
outline: none;
}
/* Prestasi Grid */
.prestasi-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
gap: 25px;
}
.prestasi-card {
background: white;
border-radius: var(--border-radius);
box-shadow: var(--shadow);
transition: var(--transition);
overflow: hidden;
border: 1px solid rgba(0, 0, 0, 0.05);
}
.prestasi-card:hover {
transform: translateY(-5px);
box-shadow: var(--shadow-lg);
}
.prestasi-image {
position: relative;
height: 220px;
overflow: hidden;
}
.prestasi-image img {
width: 100%;
height: 100%;
object-fit: cover;
transition: var(--transition);
}
.prestasi-card:hover .prestasi-image img {
transform: scale(1.05);
}
.prestasi-overlay {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.7);
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
opacity: 0;
transition: var(--transition);
overflow-y: auto;
padding: 20px;
text-align: center;
color: white;
z-index: 2;
}
.prestasi-card:hover .prestasi-overlay {
opacity: 1;
}
.prestasi-overlay::-webkit-scrollbar {
width: 6px;
}
.prestasi-overlay::-webkit-scrollbar-track {
background: rgba(0, 0, 0, 0.2);
}
.prestasi-overlay::-webkit-scrollbar-thumb {
background: rgba(255, 255, 255, 0.3);
border-radius: 4px;
}
.prestasi-overlay::-webkit-scrollbar-thumb:hover {
background: rgba(255, 255, 255, 0.5);
}
.prestasi-badges {
position: absolute;
top: 10px;
left: 10px;
display: flex;
gap: 5px;
flex-direction: column;
}
.badge {
padding: 4px 8px;
border-radius: 12px;
font-size: 0.7rem;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.5px;
}
.badge-urutan {
background: rgba(0, 0, 0, 0.8);
color: white;
}
.badge-active {
background: linear-gradient(135deg, #28a745, #20c997);
color: white;
}
.badge-inactive {
background: #6c757d;
color: white;
}
/* Prestasi Content */
.prestasi-content {
padding: 20px;
}
.prestasi-title {
font-weight: 600;
color: var(--dark);
margin: 0 0 15px 0;
font-size: 1.1rem;
line-height: 1.4;
height: 3em;
overflow: hidden;
display: -webkit-box;
-webkit-line-clamp: 2;
line-clamp: 2;
-webkit-box-orient: vertical;
}
.prestasi-info {
margin-bottom: 15px;
}
.info-item {
display: flex;
align-items: center;
gap: 8px;
margin-bottom: 8px;
font-size: 0.9rem;
}
.info-item i {
width: 16px;
color: var(--primary);
text-align: center;
}
.info-item span {
color: #6c757d;
}
.prestasi-actions {
display: flex;
justify-content: space-between;
align-items: center;
border-top: 1px solid #e9ecef;
padding-top: 15px;
}
/* Form Switch */
.form-check.form-switch {
display: flex;
align-items: center;
gap: 10px;
margin: 0;
}
.form-check-input {
width: 3em;
height: 1.5em;
margin: 0;
}
.form-check-label {
font-size: 0.9rem;
color: var(--dark);
font-weight: 500;
}
/* Action Buttons */
.action-buttons {
display: flex;
gap: 8px;
}
.action-buttons .btn {
width: 36px;
height: 36px;
padding: 0;
display: flex;
align-items: center;
justify-content: center;
border-radius: 8px;
border: 2px solid;
transition: var(--transition);
}
.btn-edit {
color: var(--primary);
border-color: var(--primary) !important;
background: transparent;
}
.btn-edit:hover {
background: var(--primary);
color: white;
transform: translateY(-2px);
}
.btn-view {
color: #17a2b8;
border-color: #17a2b8 !important;
background: transparent;
}
.btn-view:hover {
background: #17a2b8;
color: white;
transform: translateY(-2px);
}
.btn-delete {
color: #dc3545;
border-color: #dc3545 !important;
background: transparent;
}
.btn-delete:hover {
background: #dc3545;
color: white;
transform: translateY(-2px);
}
/* Prestasi List View */
.prestasi-list .prestasi-thumb {
width: 80px;
height: 60px;
border-radius: 8px;
overflow: hidden;
}
.prestasi-list .prestasi-thumb img {
width: 100%;
height: 100%;
object-fit: cover;
}
.prestasi-list .prestasi-info-list h6 {
margin: 0;
font-weight: 600;
font-size: 0.95rem;
}
.student-info {
font-size: 0.9rem;
}
.achievement-info {
font-size: 0.9rem;
}
.urutan-badge {
background: var(--primary);
color: white;
padding: 4px 8px;
border-radius: 12px;
font-size: 0.8rem;
font-weight: 600;
}
/* Empty State */
.empty-state {
padding: 60px 20px;
text-align: center;
}
.empty-state h4 {
color: var(--dark);
margin-bottom: 10px;
font-weight: 600;
}
.empty-state p {
color: #6c757d;
max-width: 400px;
margin: 0 auto;
}
/* Modal Styles */
.modal-content {
border: none;
border-radius: var(--border-radius);
box-shadow: var(--shadow-xl);
}
.modal-header {
border-bottom: 1px solid #e9ecef;
padding: 25px 30px 20px;
}
.modal-title {
font-family: 'Poppins', sans-serif;
font-weight: 600;
color: var(--dark);
display: flex;
align-items: center;
}
.modal-body {
padding: 25px 30px;
}
.modal-footer {
border-top: 1px solid #e9ecef;
padding: 20px 30px 25px;
}
/* Prestasi Upload Area */
.prestasi-upload-area {
position: relative;
}
.upload-wrapper {
border: 2px dashed #dee2e6;
border-radius: var(--border-radius);
padding: 40px 20px;
text-align: center;
cursor: pointer;
transition: var(--transition);
background: #f8f9fa;
}
.upload-wrapper:hover {
border-color: var(--primary);
background: #f0f4ff;
}
.upload-wrapper.dragover {
border-color: var(--primary);
background: #e3f2fd;
}
.upload-placeholder i {
font-size: 3rem;
color: #6c757d;
margin-bottom: 15px;
}
.upload-placeholder p {
font-weight: 600;
color: var(--dark);
margin: 0 0 10px 0;
}
.upload-placeholder small {
color: #6c757d;
line-height: 1.4;
}
.upload-input {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
opacity: 0;
cursor: pointer;
}
/* Image Preview */
.image-preview {
position: relative;
border: 2px solid #e9ecef;
border-radius: var(--border-radius);
overflow: hidden;
margin-top: 15px;
}
.image-preview img {
width: 100%;
height: 200px;
object-fit: cover;
}
.btn-remove-preview {
position: absolute;
top: 10px;
right: 10px;
width: 30px;
height: 30px;
border: none;
background: rgba(220, 53, 69, 0.9);
color: white;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-size: 0.8rem;
transition: var(--transition);
}
.btn-remove-preview:hover {
background: #dc3545;
transform: scale(1.1);
}
/* Current Image Preview */
.current-image-preview {
border: 2px solid #e9ecef;
border-radius: var(--border-radius);
overflow: hidden;
}
.current-image-preview img {
width: 100%;
height: 150px;
object-fit: cover;
}
/* Prestasi Detail View */
.prestasi-detail-image img {
width: 100%;
height: 300px;
object-fit: cover;
}
.prestasi-detail-info {
padding: 20px 0;
}
.detail-item {
margin-bottom: 15px;
}
.detail-label {
font-weight: 600;
color: var(--dark);
display: block;
margin-bottom: 5px;
}
.detail-content {
color: #6c757d;
margin: 0;
}
/* Form Styles */
.form-group {
margin-bottom: 1.5rem;
}
.form-label {
font-weight: 600;
color: var(--dark);
margin-bottom: 8px;
display: block;
}
.form-control {
border: 2px solid #e9ecef;
border-radius: 8px;
padding: 12px 15px;
transition: var(--transition);
font-size: 0.95rem;
}
.form-control:focus {
border-color: var(--primary);
box-shadow: 0 0 0 0.2rem rgba(0, 102, 204, 0.1);
}
textarea.form-control {
resize: vertical;
min-height: 100px;
}
.form-text {
font-size: 0.85rem;
}
/* Buttons */
.btn {
padding: 12px 25px;
border-radius: 8px;
font-weight: 500;
transition: var(--transition);
border: none;
}
.btn-primary {
background: var(--gradient);
border: none;
}
.btn-primary:hover {
transform: translateY(-2px);
box-shadow: 0 5px 15px rgba(0, 102, 204, 0.3);
}
.btn-secondary {
background: #6c757d;
border: none;
}
.btn-secondary:hover {
background: #5a6268;
transform: translateY(-2px);
}
/* Loading State */
.btn-loading {
position: relative;
color: transparent !important;
}
.btn-loading::after {
content: '';
position: absolute;
width: 20px;
height: 20px;
top: 50%;
left: 50%;
margin-left: -10px;
margin-top: -10px;
border: 2px solid #ffffff;
border-radius: 50%;
border-top-color: transparent;
animation: spin 1s ease-in-out infinite;
}
@keyframes spin {
to { transform: rotate(360deg); }
}
/* Responsive Design */
@media (max-width: 991.98px) {
.page-header {
padding: 15px 0;
}
.page-title {
font-size: 1.7rem;
}
.stat-card {
padding: 20px;
}
.stat-value {
font-size: 1.7rem;
}
.prestasi-grid {
grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
gap: 20px;
}
.prestasi-grid-card .card-header {
padding: 20px 25px 0;
flex-direction: column;
align-items: flex-start;
gap: 15px;
}
.header-content {
width: 100%;
}
.header-actions {
width: 100%;
justify-content: space-between;
}
.search-box {
min-width: 200px;
}
}
@media (max-width: 767.98px) {
.prestasi-grid {
grid-template-columns: 1fr;
}
.modal-body {
padding: 20px 25px;
}
.modal-header,
.modal-footer {
padding: 20px 25px;
}
.prestasi-list .table-responsive {
font-size: 0.9rem;
}
.header-actions {
flex-direction: column;
gap: 10px;
align-items: stretch;
}
.search-box {
min-width: 100%;
}
.prestasi-detail-info {
padding: 15px 0 0 0;
}
}
@media (max-width: 575.98px) {
.manajemen-prestasi-container {
padding: 0 15px;
}
.page-title {
font-size: 1.5rem;
}
.stat-card {
flex-direction: column;
text-align: center;
gap: 15px;
}
.upload-placeholder {
padding: 30px 15px;
}
.upload-placeholder i {
font-size: 2.5rem;
}
.modal-body .row {
flex-direction: column;
}
.modal-body .col-md-6 {
width: 100%;
}
.action-buttons {
justify-content: center;
}
.prestasi-title {
height: auto;
-webkit-line-clamp: 3;
line-clamp: 3;
}
}

View File

@ -0,0 +1,697 @@
/* Manajemen Struktur Container */
.manajemen-struktur-container {
max-width: 1400px;
margin: 0 auto;
}
/* Page Header */
.page-header {
padding: 20px 0;
}
.page-title {
font-family: 'Poppins', sans-serif;
font-weight: 700;
font-size: 2rem;
color: var(--dark);
margin-bottom: 0.5rem;
}
.page-subtitle {
color: #6c757d;
font-size: 1.1rem;
margin: 0;
}
/* Statistics Cards */
.stat-card {
background: white;
border-radius: var(--border-radius);
padding: 25px;
box-shadow: var(--shadow);
display: flex;
align-items: center;
gap: 20px;
transition: var(--transition);
border-left: 4px solid transparent;
}
.stat-card:hover {
transform: translateY(-3px);
box-shadow: var(--shadow-lg);
}
.stat-card.primary {
border-left-color: var(--primary);
}
.stat-card.success {
border-left-color: #28a745;
}
.stat-card.warning {
border-left-color: #ffc107;
}
.stat-card.info {
border-left-color: #17a2b8;
}
.stat-icon {
width: 60px;
height: 60px;
border-radius: 15px;
display: flex;
align-items: center;
justify-content: center;
font-size: 1.5rem;
color: white;
}
.stat-card.primary .stat-icon {
background: var(--gradient);
}
.stat-card.success .stat-icon {
background: linear-gradient(135deg, #28a745, #20c997);
}
.stat-card.warning .stat-icon {
background: linear-gradient(135deg, #ffc107, #fd7e14);
}
.stat-card.info .stat-icon {
background: linear-gradient(135deg, #17a2b8, #6f42c1);
}
.stat-content {
flex: 1;
}
.stat-value {
font-family: 'Poppins', sans-serif;
font-weight: 700;
font-size: 2rem;
color: var(--dark);
margin: 0;
line-height: 1;
}
.stat-label {
color: #6c757d;
font-size: 0.9rem;
margin: 5px 0 0 0;
font-weight: 500;
}
/* Struktur Grid Card */
.struktur-grid-card {
background: white;
border-radius: var(--border-radius);
box-shadow: var(--shadow);
transition: var(--transition);
border: 1px solid rgba(0, 0, 0, 0.05);
}
.struktur-grid-card:hover {
box-shadow: var(--shadow-lg);
}
.struktur-grid-card .card-header {
padding: 25px 30px 0;
border: none;
background: none;
display: flex;
align-items: center;
justify-content: space-between;
flex-wrap: wrap;
gap: 20px;
}
.struktur-grid-card .card-body {
padding: 25px 30px 30px;
}
.header-content {
display: flex;
align-items: center;
flex: 1;
}
.header-icon {
font-size: 1.8rem;
color: var(--primary);
margin-right: 15px;
width: 50px;
height: 50px;
background: linear-gradient(135deg, var(--primary-light), var(--primary));
border-radius: 12px;
display: flex;
align-items: center;
justify-content: center;
color: white;
}
.card-title {
font-family: 'Poppins', sans-serif;
font-weight: 600;
font-size: 1.3rem;
color: var(--dark);
margin: 0;
}
.card-subtitle {
color: #6c757d;
font-size: 0.9rem;
margin: 5px 0 0 0;
}
/* Struktur Grid */
.struktur-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
gap: 25px;
}
.struktur-card {
background: white;
border-radius: var(--border-radius);
box-shadow: var(--shadow);
transition: var(--transition);
overflow: hidden;
border: 1px solid rgba(0, 0, 0, 0.05);
}
.struktur-card:hover {
transform: translateY(-5px);
box-shadow: var(--shadow-lg);
}
.struktur-image {
position: relative;
height: 250px;
overflow: hidden;
}
.struktur-image img {
width: 100%;
height: 100%;
object-fit: cover;
transition: var(--transition);
}
.struktur-card:hover .struktur-image img {
transform: scale(1.05);
}
.struktur-overlay {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.7);
display: flex;
align-items: center;
justify-content: center;
opacity: 0;
transition: var(--transition);
}
.struktur-card:hover .struktur-overlay {
opacity: 1;
}
.struktur-badges {
position: absolute;
top: 10px;
left: 10px;
display: flex;
gap: 5px;
}
.badge {
padding: 4px 8px;
border-radius: 12px;
font-size: 0.7rem;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.5px;
}
.badge-active {
background: linear-gradient(135deg, #28a745, #20c997);
color: white;
}
.badge-inactive {
background: #6c757d;
color: white;
}
/* Struktur Content */
.struktur-content {
padding: 15px 20px;
}
.struktur-meta {
margin-bottom: 10px;
}
.struktur-actions {
display: flex;
justify-content: space-between;
align-items: center;
}
/* Form Switch */
.form-check.form-switch {
display: flex;
align-items: center;
gap: 10px;
margin: 0;
}
.form-check-input {
width: 3em;
height: 1.5em;
margin: 0;
}
.form-check-label {
font-size: 0.9rem;
color: var(--dark);
font-weight: 500;
}
/* Action Buttons */
.action-buttons {
display: flex;
gap: 8px;
}
.action-buttons .btn {
width: 36px;
height: 36px;
padding: 0;
display: flex;
align-items: center;
justify-content: center;
border-radius: 8px;
border: 2px solid;
transition: var(--transition);
}
.btn-edit {
color: var(--primary);
border-color: var(--primary) !important;
background: transparent;
}
.btn-edit:hover {
background: var(--primary);
color: white;
transform: translateY(-2px);
}
.btn-view {
color: #17a2b8;
border-color: #17a2b8 !important;
background: transparent;
}
.btn-view:hover {
background: #17a2b8;
color: white;
transform: translateY(-2px);
}
.btn-delete {
color: #dc3545;
border-color: #dc3545 !important;
background: transparent;
}
.btn-delete:hover {
background: #dc3545;
color: white;
transform: translateY(-2px);
}
/* Empty State */
.empty-state {
padding: 60px 20px;
text-align: center;
}
.empty-state h4 {
color: var(--dark);
margin-bottom: 10px;
font-weight: 600;
}
.empty-state p {
color: #6c757d;
max-width: 400px;
margin: 0 auto;
}
/* Modal Styles */
.modal-content {
border: none;
border-radius: var(--border-radius);
box-shadow: var(--shadow-xl);
}
.modal-header {
border-bottom: 1px solid #e9ecef;
padding: 25px 30px 20px;
}
.modal-title {
font-family: 'Poppins', sans-serif;
font-weight: 600;
color: var(--dark);
display: flex;
align-items: center;
}
.modal-body {
padding: 25px 30px;
}
.modal-footer {
border-top: 1px solid #e9ecef;
padding: 20px 30px 25px;
}
/* Struktur Upload Area */
.struktur-upload-area {
position: relative;
}
.upload-wrapper {
border: 2px dashed #dee2e6;
border-radius: var(--border-radius);
padding: 60px 20px;
text-align: center;
cursor: pointer;
transition: var(--transition);
background: #f8f9fa;
}
.upload-wrapper:hover {
border-color: var(--primary);
background: #f0f4ff;
}
.upload-wrapper.dragover {
border-color: var(--primary);
background: #e3f2fd;
}
.upload-placeholder i {
font-size: 3rem;
color: #6c757d;
margin-bottom: 15px;
}
.upload-placeholder p {
font-weight: 600;
color: var(--dark);
margin: 0 0 10px 0;
}
.upload-placeholder small {
color: #6c757d;
line-height: 1.4;
}
.upload-input {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
opacity: 0;
cursor: pointer;
}
/* Image Preview */
.image-preview {
position: relative;
border: 2px solid #e9ecef;
border-radius: var(--border-radius);
overflow: hidden;
margin-top: 15px;
}
.image-preview img {
width: 100%;
height: 300px;
object-fit: contain;
background: #f8f9fa;
}
.btn-remove-preview {
position: absolute;
top: 10px;
right: 10px;
width: 30px;
height: 30px;
border: none;
background: rgba(220, 53, 69, 0.9);
color: white;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-size: 0.8rem;
transition: var(--transition);
}
.btn-remove-preview:hover {
background: #dc3545;
transform: scale(1.1);
}
/* Current Image Preview */
.current-image-preview {
border: 2px solid #e9ecef;
border-radius: var(--border-radius);
overflow: hidden;
margin-bottom: 20px;
}
.current-image-preview img {
width: 100%;
height: 200px;
object-fit: contain;
background: #f8f9fa;
}
/* Struktur Detail View */
.struktur-detail-image img {
max-width: 100%;
max-height: 600px;
object-fit: contain;
background: #f8f9fa;
border-radius: var(--border-radius);
border: 2px solid #e9ecef;
}
.detail-item {
margin-bottom: 15px;
}
.detail-label {
font-weight: 600;
color: var(--dark);
display: block;
margin-bottom: 5px;
}
.detail-content {
color: #6c757d;
margin: 0;
}
/* Form Styles */
.form-group {
margin-bottom: 1.5rem;
}
.form-label {
font-weight: 600;
color: var(--dark);
margin-bottom: 8px;
display: block;
}
.form-control {
border: 2px solid #e9ecef;
border-radius: 8px;
padding: 12px 15px;
transition: var(--transition);
font-size: 0.95rem;
}
.form-control:focus {
border-color: var(--primary);
box-shadow: 0 0 0 0.2rem rgba(0, 102, 204, 0.1);
}
textarea.form-control {
resize: vertical;
min-height: 100px;
}
.form-text {
font-size: 0.85rem;
}
/* Buttons */
.btn {
padding: 12px 25px;
border-radius: 8px;
font-weight: 500;
transition: var(--transition);
border: none;
}
.btn-primary {
background: var(--gradient);
border: none;
}
.btn-primary:hover {
transform: translateY(-2px);
box-shadow: 0 5px 15px rgba(0, 102, 204, 0.3);
}
.btn-secondary {
background: #6c757d;
border: none;
}
.btn-secondary:hover {
background: #5a6268;
transform: translateY(-2px);
}
/* Loading State */
.btn-loading {
position: relative;
color: transparent !important;
}
.btn-loading::after {
content: '';
position: absolute;
width: 20px;
height: 20px;
top: 50%;
left: 50%;
margin-left: -10px;
margin-top: -10px;
border: 2px solid #ffffff;
border-radius: 50%;
border-top-color: transparent;
animation: spin 1s ease-in-out infinite;
}
@keyframes spin {
to { transform: rotate(360deg); }
}
/* Responsive Design */
@media (max-width: 991.98px) {
.page-header {
padding: 15px 0;
}
.page-title {
font-size: 1.7rem;
}
.stat-card {
padding: 20px;
}
.stat-value {
font-size: 1.7rem;
}
.struktur-grid {
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
gap: 20px;
}
.struktur-grid-card .card-header {
padding: 20px 25px 0;
flex-direction: column;
align-items: flex-start;
gap: 15px;
}
.header-content {
width: 100%;
}
}
@media (max-width: 767.98px) {
.struktur-grid {
grid-template-columns: 1fr;
}
.modal-body {
padding: 20px 25px;
}
.modal-header,
.modal-footer {
padding: 20px 25px;
}
.upload-placeholder {
padding: 40px 15px;
}
.upload-placeholder i {
font-size: 2.5rem;
}
.struktur-detail-image img {
max-height: 400px;
}
}
@media (max-width: 575.98px) {
.manajemen-struktur-container {
padding: 0 15px;
}
.page-title {
font-size: 1.5rem;
}
.stat-card {
flex-direction: column;
text-align: center;
gap: 15px;
}
.upload-placeholder {
padding: 30px 15px;
}
.action-buttons {
justify-content: center;
}
.struktur-actions {
flex-direction: column;
gap: 10px;
align-items: flex-start;
}
}

View File

@ -0,0 +1,854 @@
.manajemen-tenaga-pendidik-container {
max-width: 1400px;
margin: 0 auto;
}
/* Page Header */
.page-header {
padding: 20px 0;
}
.page-title {
font-family: 'Poppins', sans-serif;
font-weight: 700;
font-size: 2rem;
color: var(--dark);
margin-bottom: 0.5rem;
}
.page-subtitle {
color: #6c757d;
font-size: 1.1rem;
margin: 0;
}
/* Statistics Cards */
.stat-card {
background: white;
border-radius: var(--border-radius);
padding: 25px;
box-shadow: var(--shadow);
display: flex;
align-items: center;
gap: 20px;
transition: var(--transition);
border-left: 4px solid transparent;
}
.stat-card:hover {
transform: translateY(-3px);
box-shadow: var(--shadow-lg);
}
.stat-card.primary {
border-left-color: var(--primary);
}
.stat-card.success {
border-left-color: #28a745;
}
.stat-card.warning {
border-left-color: #ffc107;
}
.stat-card.info {
border-left-color: #17a2b8;
}
.stat-icon {
width: 60px;
height: 60px;
border-radius: 15px;
display: flex;
align-items: center;
justify-content: center;
font-size: 1.5rem;
color: white;
}
.stat-card.primary .stat-icon {
background: var(--gradient);
}
.stat-card.success .stat-icon {
background: linear-gradient(135deg, #28a745, #20c997);
}
.stat-card.warning .stat-icon {
background: linear-gradient(135deg, #ffc107, #fd7e14);
}
.stat-card.info .stat-icon {
background: linear-gradient(135deg, #17a2b8, #6f42c1);
}
.stat-content {
flex: 1;
}
.stat-value {
font-family: 'Poppins', sans-serif;
font-weight: 700;
font-size: 2rem;
color: var(--dark);
margin: 0;
line-height: 1;
}
.stat-label {
color: #6c757d;
font-size: 0.9rem;
margin: 5px 0 0 0;
font-weight: 500;
}
/* Pengajar Grid Card */
.pengajar-grid-card {
background: white;
border-radius: var(--border-radius);
box-shadow: var(--shadow);
transition: var(--transition);
border: 1px solid rgba(0, 0, 0, 0.05);
}
.pengajar-grid-card:hover {
box-shadow: var(--shadow-lg);
}
.pengajar-grid-card .card-header {
padding: 25px 30px 0;
border: none;
background: none;
display: flex;
align-items: center;
justify-content: space-between;
flex-wrap: wrap;
gap: 20px;
}
.pengajar-grid-card .card-body {
padding: 25px 30px 30px;
}
.header-content {
display: flex;
align-items: center;
flex: 1;
}
.header-icon {
font-size: 1.8rem;
color: var(--primary);
margin-right: 15px;
width: 50px;
height: 50px;
background: linear-gradient(135deg, var(--primary-light), var(--primary));
border-radius: 12px;
display: flex;
align-items: center;
justify-content: center;
color: white;
}
.card-title {
font-family: 'Poppins', sans-serif;
font-weight: 600;
font-size: 1.3rem;
color: var(--dark);
margin: 0;
}
.card-subtitle {
color: #6c757d;
font-size: 0.9rem;
margin: 5px 0 0 0;
}
/* Header Actions */
.header-actions {
display: flex;
align-items: center;
gap: 15px;
}
/* View Toggle */
.view-toggle {
display: flex;
gap: 5px;
background: #f8f9fa;
padding: 5px;
border-radius: 8px;
}
.view-btn {
width: 40px;
height: 40px;
border: none;
background: transparent;
border-radius: 6px;
color: #6c757d;
transition: var(--transition);
display: flex;
align-items: center;
justify-content: center;
}
.view-btn:hover {
background: white;
color: var(--primary);
}
.view-btn.active {
background: var(--primary);
color: white;
}
/* Search Box */
.search-box {
position: relative;
min-width: 250px;
}
.search-box i {
position: absolute;
left: 15px;
top: 50%;
transform: translateY(-50%);
color: #6c757d;
}
.search-box input {
width: 100%;
padding: 12px 15px 12px 45px;
border: 2px solid #e9ecef;
border-radius: 8px;
font-size: 0.95rem;
transition: var(--transition);
}
.search-box input:focus {
border-color: var(--primary);
box-shadow: 0 0 0 0.2rem rgba(0, 102, 204, 0.1);
outline: none;
}
/* Pengajar Grid */
.pengajar-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
gap: 25px;
}
.pengajar-card {
background: white;
border-radius: var(--border-radius);
box-shadow: var(--shadow);
transition: var(--transition);
overflow: hidden;
border: 1px solid rgba(0, 0, 0, 0.05);
}
.pengajar-card:hover {
transform: translateY(-5px);
box-shadow: var(--shadow-lg);
}
.pengajar-image {
position: relative;
height: 250px;
overflow: hidden;
}
.pengajar-image img {
width: 100%;
height: 100%;
object-fit: cover;
transition: var(--transition);
}
.pengajar-card:hover .pengajar-image img {
transform: scale(1.05);
}
.pengajar-overlay {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.7);
display: flex;
align-items: center;
justify-content: center;
opacity: 0;
transition: var(--transition);
}
.pengajar-card:hover .pengajar-overlay {
opacity: 1;
}
.pengajar-badges {
position: absolute;
top: 10px;
left: 10px;
display: flex;
gap: 5px;
flex-direction: column;
}
.badge {
padding: 4px 8px;
border-radius: 12px;
font-size: 0.7rem;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.5px;
}
.badge-urutan {
background: rgba(0, 0, 0, 0.8);
color: white;
}
.badge-active {
background: linear-gradient(135deg, #28a745, #20c997);
color: white;
}
.badge-inactive {
background: #6c757d;
color: white;
}
/* Pengajar Content */
.pengajar-content {
padding: 20px;
}
.pengajar-title {
font-weight: 600;
color: var(--dark);
margin: 0 0 15px 0;
font-size: 1.1rem;
line-height: 1.4;
text-align: start;
}
.pengajar-details {
margin-bottom: 15px;
}
.detail-item {
display: flex;
align-items: center;
gap: 10px;
margin-bottom: 8px;
font-size: 0.9rem;
color: #6c757d;
}
.detail-item i {
width: 16px;
text-align: center;
color: var(--primary);
}
.pengajar-meta {
margin-bottom: 15px;
text-align: start;
}
.pengajar-actions {
display: flex;
justify-content: space-between;
align-items: center;
}
/* Form Switch */
.form-check.form-switch {
display: flex;
align-items: center;
gap: 10px;
margin: 0;
}
.form-check-input {
width: 3em;
height: 1.5em;
margin: 0;
}
.form-check-label {
font-size: 0.9rem;
color: var(--dark);
font-weight: 500;
}
/* Action Buttons */
.action-buttons {
display: flex;
gap: 8px;
}
.action-buttons .btn {
width: 36px;
height: 36px;
padding: 0;
display: flex;
align-items: center;
justify-content: center;
border-radius: 8px;
border: 2px solid;
transition: var(--transition);
}
.btn-edit {
color: var(--primary);
border-color: var(--primary) !important;
background: transparent;
}
.btn-edit:hover {
background: var(--primary);
color: white;
transform: translateY(-2px);
}
.btn-view {
color: #17a2b8;
border-color: #17a2b8 !important;
background: transparent;
}
.btn-view:hover {
background: #17a2b8;
color: white;
transform: translateY(-2px);
}
.btn-delete {
color: #dc3545;
border-color: #dc3545 !important;
background: transparent;
}
.btn-delete:hover {
background: #dc3545;
color: white;
transform: translateY(-2px);
}
/* Pengajar List View */
.pengajar-list .pengajar-thumb {
width: 60px;
height: 60px;
border-radius: 50%;
overflow: hidden;
}
.pengajar-list .pengajar-thumb img {
width: 100%;
height: 100%;
object-fit: cover;
}
.pengajar-list .pengajar-info h6 {
margin: 0 0 5px 0;
font-weight: 600;
}
.pengajar-list .pengajar-info .pengajar-nip {
margin: 0;
color: #6c757d;
font-size: 0.85rem;
}
.pengajar-jabatan {
font-size: 0.9rem;
color: #6c757d;
}
.urutan-badge {
background: var(--primary);
color: white;
padding: 4px 8px;
border-radius: 12px;
font-size: 0.8rem;
font-weight: 600;
}
/* Empty State */
.empty-state {
padding: 60px 20px;
text-align: center;
}
.empty-state h4 {
color: var(--dark);
margin-bottom: 10px;
font-weight: 600;
}
.empty-state p {
color: #6c757d;
max-width: 400px;
margin: 0 auto;
}
/* Modal Styles */
.modal-content {
border: none;
border-radius: var(--border-radius);
box-shadow: var(--shadow-xl);
}
.modal-header {
border-bottom: 1px solid #e9ecef;
padding: 25px 30px 20px;
}
.modal-title {
font-family: 'Poppins', sans-serif;
font-weight: 600;
color: var(--dark);
display: flex;
align-items: center;
}
.modal-body {
padding: 25px 30px;
}
.modal-footer {
border-top: 1px solid #e9ecef;
padding: 20px 30px 25px;
}
/* Pengajar Upload Area */
.pengajar-upload-area {
position: relative;
}
.upload-wrapper {
border: 2px dashed #dee2e6;
border-radius: var(--border-radius);
padding: 40px 20px;
text-align: center;
cursor: pointer;
transition: var(--transition);
background: #f8f9fa;
}
.upload-wrapper:hover {
border-color: var(--primary);
background: #f0f4ff;
}
.upload-wrapper.dragover {
border-color: var(--primary);
background: #e3f2fd;
}
.upload-placeholder i {
font-size: 3rem;
color: #6c757d;
margin-bottom: 15px;
}
.upload-placeholder p {
font-weight: 600;
color: var(--dark);
margin: 0 0 10px 0;
}
.upload-placeholder small {
color: #6c757d;
line-height: 1.4;
}
.upload-input {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
opacity: 0;
cursor: pointer;
}
/* Image Preview */
.image-preview {
position: relative;
border: 2px solid #e9ecef;
border-radius: var(--border-radius);
overflow: hidden;
margin-top: 15px;
}
.image-preview img {
width: 100%;
height: 200px;
object-fit: cover;
}
.btn-remove-preview {
position: absolute;
top: 10px;
right: 10px;
width: 30px;
height: 30px;
border: none;
background: rgba(220, 53, 69, 0.9);
color: white;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-size: 0.8rem;
transition: var(--transition);
}
.btn-remove-preview:hover {
background: #dc3545;
transform: scale(1.1);
}
/* Current Image Preview */
.current-image-preview {
border: 2px solid #e9ecef;
border-radius: var(--border-radius);
overflow: hidden;
}
.current-image-preview img {
width: 100%;
height: 200px;
object-fit: cover;
}
/* Pengajar Detail View */
.pengajar-detail-image img {
width: 100%;
height: 300px;
object-fit: cover;
border-radius: var(--border-radius);
}
.pengajar-detail-info {
padding: 20px 0;
}
.detail-item {
margin-bottom: 15px;
}
.detail-label {
font-weight: 600;
color: var(--dark);
display: block;
margin-bottom: 5px;
}
.detail-content {
color: #6c757d;
margin: 0;
}
/* Form Styles */
.form-group {
margin-bottom: 1.5rem;
}
.form-label {
font-weight: 600;
color: var(--dark);
margin-bottom: 8px;
display: block;
}
.form-control {
border: 2px solid #e9ecef;
border-radius: 8px;
padding: 12px 15px;
transition: var(--transition);
font-size: 0.95rem;
}
.form-control:focus {
border-color: var(--primary);
box-shadow: 0 0 0 0.2rem rgba(0, 102, 204, 0.1);
}
/* Buttons */
.btn {
padding: 12px 25px;
border-radius: 8px;
font-weight: 500;
transition: var(--transition);
border: none;
}
.btn-primary {
background: var(--gradient);
border: none;
}
.btn-primary:hover {
transform: translateY(-2px);
box-shadow: 0 5px 15px rgba(0, 102, 204, 0.3);
}
.btn-secondary {
background: #6c757d;
border: none;
}
.btn-secondary:hover {
background: #5a6268;
transform: translateY(-2px);
}
/* Loading State */
.btn-loading {
position: relative;
color: transparent !important;
}
.btn-loading::after {
content: '';
position: absolute;
width: 20px;
height: 20px;
top: 50%;
left: 50%;
margin-left: -10px;
margin-top: -10px;
border: 2px solid #ffffff;
border-radius: 50%;
border-top-color: transparent;
animation: spin 1s ease-in-out infinite;
}
@keyframes spin {
to { transform: rotate(360deg); }
}
/* Responsive Design */
@media (max-width: 991.98px) {
.page-header {
padding: 15px 0;
}
.page-title {
font-size: 1.7rem;
}
.stat-card {
padding: 20px;
}
.stat-value {
font-size: 1.7rem;
}
.pengajar-grid {
grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
gap: 20px;
}
.pengajar-grid-card .card-header {
padding: 20px 25px 0;
flex-direction: column;
align-items: flex-start;
gap: 15px;
}
.header-content {
width: 100%;
}
.header-actions {
width: 100%;
justify-content: space-between;
}
.search-box {
min-width: 200px;
}
}
@media (max-width: 767.98px) {
.pengajar-grid {
grid-template-columns: 1fr;
}
.modal-body {
padding: 20px 25px;
}
.modal-header,
.modal-footer {
padding: 20px 25px;
}
.pengajar-list .table-responsive {
font-size: 0.9rem;
}
.header-actions {
flex-direction: column;
gap: 10px;
align-items: stretch;
}
.search-box {
min-width: 100%;
}
.pengajar-detail-info {
padding: 15px 0 0 0;
}
.modal-body .row {
flex-direction: column;
}
.modal-body .col-md-4,
.modal-body .col-md-8 {
width: 100%;
}
}
@media (max-width: 575.98px) {
.manajemen-tenaga-pendidik-container {
padding: 0 15px;
}
.page-title {
font-size: 1.5rem;
}
.stat-card {
flex-direction: column;
text-align: center;
gap: 15px;
}
.upload-placeholder {
padding: 30px 15px;
}
.upload-placeholder i {
font-size: 2.5rem;
}
.action-buttons {
justify-content: center;
}
.pengajar-content {
padding: 15px;
}
}

486
public/css/settings.css Normal file
View File

@ -0,0 +1,486 @@
/* Settings Container */
.settings-container {
max-width: 1200px;
margin: 0 auto;
}
/* Page Header */
.settings-header {
padding: 20px 0;
}
.page-title {
font-family: 'Poppins', sans-serif;
font-weight: 700;
font-size: 2rem;
color: var(--dark);
margin-bottom: 0.5rem;
}
.page-subtitle {
color: #6c757d;
font-size: 1.1rem;
margin: 0;
}
/* Settings Cards */
.settings-card {
background: white;
border-radius: var(--border-radius);
box-shadow: var(--shadow);
transition: var(--transition);
border: 1px solid rgba(0, 0, 0, 0.05);
}
.settings-card:hover {
box-shadow: var(--shadow-lg);
transform: translateY(-2px);
}
.settings-card .card-header {
padding: 25px 30px 0;
border: none;
background: none;
display: flex;
align-items: center;
justify-content: between;
}
.settings-card .card-body {
padding: 25px 30px 30px;
}
.header-content {
display: flex;
align-items: center;
flex: 1;
}
.header-icon {
font-size: 1.8rem;
color: var(--primary);
margin-right: 15px;
width: 50px;
height: 50px;
background: linear-gradient(135deg, var(--primary-light), var(--primary));
border-radius: 12px;
display: flex;
align-items: center;
justify-content: center;
color: white;
}
.card-title {
font-family: 'Poppins', sans-serif;
font-weight: 600;
font-size: 1.3rem;
color: var(--dark);
margin: 0;
}
.card-subtitle {
color: #6c757d;
font-size: 0.9rem;
margin: 5px 0 0 0;
}
/* Buttons */
.btn-edit {
background: var(--gradient);
color: white;
border: none;
padding: 10px 20px;
border-radius: 8px;
font-weight: 500;
transition: var(--transition);
text-decoration: none;
display: inline-flex;
align-items: center;
}
.btn-edit:hover {
transform: translateY(-2px);
box-shadow: 0 5px 15px rgba(0, 102, 204, 0.3);
color: white;
}
/* Profile Info Grid */
.profile-info-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
gap: 25px;
}
.info-item {
padding: 15px 0;
border-bottom: 1px solid #f0f0f0;
}
.info-item:last-child {
border-bottom: none;
}
.info-label {
font-weight: 600;
color: #6c757d;
font-size: 0.9rem;
margin-bottom: 5px;
display: block;
}
.info-value {
font-weight: 500;
color: var(--dark);
font-size: 1rem;
margin: 0;
}
/* Security Status */
.security-status {
display: flex;
flex-direction: column;
gap: 15px;
}
.status-item {
display: flex;
align-items: center;
padding: 12px 15px;
background: #f8f9fa;
border-radius: 8px;
font-weight: 500;
}
/* Profile Picture */
.picture-card .card-body {
padding: 30px;
}
.profile-picture-wrapper {
position: relative;
display: inline-block;
}
.profile-picture {
width: 150px;
height: 150px;
border-radius: 50%;
object-fit: cover;
border: 4px solid var(--primary-light);
box-shadow: var(--shadow);
}
.profile-picture-placeholder {
width: 150px;
height: 150px;
border-radius: 50%;
background: var(--gradient);
display: flex;
align-items: center;
justify-content: center;
color: white;
font-size: 3rem;
border: 4px solid var(--primary-light);
box-shadow: var(--shadow);
}
.picture-help {
color: #6c757d;
font-size: 0.85rem;
line-height: 1.4;
}
/* Quick Actions */
.quick-actions {
display: flex;
flex-direction: column;
gap: 10px;
}
.quick-action-btn {
background: none;
border: 1px solid #e9ecef;
padding: 15px 20px;
border-radius: 8px;
text-align: left;
transition: var(--transition);
display: flex;
align-items: center;
gap: 12px;
color: var(--dark);
text-decoration: none;
}
.quick-action-btn:hover {
background: var(--light);
border-color: var(--primary-light);
color: var(--primary);
transform: translateX(5px);
}
.quick-action-btn i {
font-size: 1.2rem;
width: 20px;
text-align: center;
}
/* Modal Styles */
.modal-content {
border: none;
border-radius: var(--border-radius);
box-shadow: var(--shadow-xl);
}
.modal-header {
border-bottom: 1px solid #e9ecef;
padding: 25px 30px 20px;
}
.modal-title {
font-family: 'Poppins', sans-serif;
font-weight: 600;
color: var(--dark);
display: flex;
align-items: center;
}
.modal-body {
padding: 25px 30px;
}
.modal-footer {
border-top: 1px solid #e9ecef;
padding: 20px 30px 25px;
}
/* Profile Picture Upload */
.profile-picture-upload {
text-align: center;
}
.upload-wrapper {
position: relative;
display: inline-block;
cursor: pointer;
border-radius: 50%;
overflow: hidden;
}
.upload-preview {
width: 120px;
height: 120px;
border-radius: 50%;
object-fit: cover;
border: 3px solid var(--primary-light);
}
.upload-placeholder {
width: 120px;
height: 120px;
border-radius: 50%;
background: var(--gradient);
display: flex;
align-items: center;
justify-content: center;
color: white;
font-size: 2rem;
border: 3px solid var(--primary-light);
}
.upload-overlay {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.7);
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
color: white;
opacity: 0;
transition: var(--transition);
border-radius: 50%;
}
.upload-wrapper:hover .upload-overlay {
opacity: 1;
}
.upload-overlay i {
font-size: 1.5rem;
margin-bottom: 5px;
}
.upload-overlay span {
font-size: 0.8rem;
font-weight: 500;
}
.upload-input {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
opacity: 0;
cursor: pointer;
}
/* Form Styles */
.form-group {
margin-bottom: 1.5rem;
}
.form-label {
font-weight: 600;
color: var(--dark);
margin-bottom: 8px;
display: block;
}
.form-control {
border: 2px solid #e9ecef;
border-radius: 8px;
padding: 12px 15px;
transition: var(--transition);
font-size: 0.95rem;
}
.form-control:focus {
border-color: var(--primary);
box-shadow: 0 0 0 0.2rem rgba(0, 102, 204, 0.1);
}
.input-group .form-control {
border-right: none;
}
.toggle-password {
background: #e9ecef;
border-radius: 0 8px 8px 0;
color: var(--primary);
}
.toggle-password:hover {
background: #e9ecef;
border-radius: 0 8px 8px 0;
color: var(--primary);
}
.btn {
padding: 12px 25px;
border-radius: 8px;
font-weight: 500;
transition: var(--transition);
border: none;
}
.btn-primary {
background: var(--gradient);
border: none;
}
.btn-primary:hover {
transform: translateY(-2px);
box-shadow: 0 5px 15px rgba(0, 102, 204, 0.3);
}
.btn-secondary {
background: #6c757d;
border: none;
}
.btn-secondary:hover {
background: #5a6268;
transform: translateY(-2px);
}
.btn-loading {
position: relative;
color: transparent !important;
}
.btn-loading::after {
content: '';
position: absolute;
width: 20px;
height: 20px;
top: 50%;
left: 50%;
margin-left: -10px;
margin-top: -10px;
border: 2px solid #ffffff;
border-radius: 50%;
border-top-color: transparent;
animation: spin 1s ease-in-out infinite;
}
@keyframes spin {
to { transform: rotate(360deg); }
}
/* Responsive Design */
@media (max-width: 991.98px) {
.settings-header {
padding: 15px 0;
}
.page-title {
font-size: 1.7rem;
}
.profile-info-grid {
grid-template-columns: 1fr;
gap: 20px;
}
}
@media (max-width: 767.98px) {
.settings-card .card-header {
padding: 20px 25px 0;
flex-direction: column;
align-items: flex-start;
gap: 15px;
}
.settings-card .card-body {
padding: 20px 25px 25px;
}
.header-content {
width: 100%;
}
.modal-body {
padding: 20px 25px;
}
.modal-header,
.modal-footer {
padding: 20px 25px;
}
}
@media (max-width: 575.98px) {
.settings-container {
padding: 0 15px;
}
.page-title {
font-size: 1.5rem;
}
.profile-picture,
.profile-picture-placeholder {
width: 120px;
height: 120px;
}
.upload-preview,
.upload-placeholder {
width: 100px;
height: 100px;
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 387 KiB

20
public/index.php Normal file
View File

@ -0,0 +1,20 @@
<?php
use Illuminate\Foundation\Application;
use Illuminate\Http\Request;
define('LARAVEL_START', microtime(true));
// Determine if the application is in maintenance mode...
if (file_exists($maintenance = __DIR__.'/../storage/framework/maintenance.php')) {
require $maintenance;
}
// Register the Composer autoloader...
require __DIR__.'/../vendor/autoload.php';
// Bootstrap Laravel and handle the request...
/** @var Application $app */
$app = require_once __DIR__.'/../bootstrap/app.php';
$app->handleRequest(Request::capture());

2
public/robots.txt Normal file
View File

@ -0,0 +1,2 @@
User-agent: *
Disallow:

Some files were not shown because too many files have changed in this diff Show More