Amazing-Python-Scripts

Форк
0
78 строк · 2.7 Кб
1
import tkinter as tk
2
from tkinter import ttk
3

4

5
class PortfolioApp(tk.Tk):
6
    def __init__(self):
7
        super().__init__()
8
        self.title("My Portfolio")
9
        self.geometry("400x300")
10

11
        self.create_widgets()
12

13
    def create_widgets(self):
14
        # Create a label for the title
15
        title_label = ttk.Label(
16
            self, text="Welcome to My Portfolio", font=("Helvetica", 16))
17
        title_label.pack(pady=10)
18

19
        # Create a button to go to the projects page
20
        projects_button = ttk.Button(
21
            self, text="View Projects", command=self.show_projects)
22
        projects_button.pack(pady=5)
23

24
        # Create a button to show more information
25
        more_info_button = ttk.Button(
26
            self, text="More Information", command=self.show_more_info)
27
        more_info_button.pack(pady=5)
28

29
        # Create a button to exit the app
30
        exit_button = ttk.Button(self, text="Exit", command=self.destroy)
31
        exit_button.pack(pady=5)
32

33
    def show_projects(self):
34
        projects_window = tk.Toplevel(self)
35
        projects_window.title("My Projects")
36
        projects_window.geometry("400x300")
37

38
        # Create a label for the projects page
39
        projects_label = ttk.Label(
40
            projects_window, text="List of Projects", font=("Helvetica", 16))
41
        projects_label.pack(pady=10)
42

43
        # Create project descriptions (you can add more as needed)
44
        project1_label = ttk.Label(
45
            projects_window, text="Project 1: Description of project 1.")
46
        project1_label.pack(pady=5)
47

48
        project2_label = ttk.Label(
49
            projects_window, text="Project 2: Description of project 2.")
50
        project2_label.pack(pady=5)
51

52
    def show_more_info(self):
53
        info_window = tk.Toplevel(self)
54
        info_window.title("More Information")
55
        info_window.geometry("400x300")
56

57
        # Create labels for more information
58
        info_label = ttk.Label(
59
            info_window, text="Experience, Skills, and Contact Details", font=("Helvetica", 16))
60
        info_label.pack(pady=10)
61

62
        # Add more labels here for additional information about yourself
63
        experience_label = ttk.Label(
64
            info_window, text="Experience: Describe your work experience here.")
65
        experience_label.pack(pady=5)
66

67
        skills_label = ttk.Label(
68
            info_window, text="Skills: List your skills here.")
69
        skills_label.pack(pady=5)
70

71
        contact_label = ttk.Label(
72
            info_window, text="Contact: Your contact details (email, phone, etc.).")
73
        contact_label.pack(pady=5)
74

75

76
if __name__ == "__main__":
77
    app = PortfolioApp()
78
    app.mainloop()
79

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.